Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
78dff0d
Use configurable signatureExpirationLedgers for auth entry expiration
christian-rogobete Apr 4, 2026
84d3c22
Fund wallet and SorobanServer initialization improvements
christian-rogobete Apr 4, 2026
9e0e9bf
Add multi-signer support for arbitrary contract calls
christian-rogobete Apr 4, 2026
c6a99ff
Remove redundant parseSigner, use DelegatedSigner directly
christian-rogobete Apr 4, 2026
3c2c1ef
Fix withLock returns, add builder maxContextRuleScanId, use correct l…
christian-rogobete Apr 4, 2026
93d2c8b
Fix documentation type mismatches, add SessionException, correct plat…
christian-rogobete Apr 4, 2026
e22aa79
Document ContractErrorCodes, config methods, ED25519_PUBLIC_KEY_SIZE,…
christian-rogobete Apr 4, 2026
8123c0a
Fix demo app resource leaks, validation, state encapsulation, and sta…
christian-rogobete Apr 4, 2026
550de0d
Add IndexerException for proper indexer error handling
christian-rogobete Apr 4, 2026
8f7a514
Improve indexer and validation: use effectiveIndexerUrl, full StrKey …
christian-rogobete Apr 4, 2026
6695374
Use consistent SDK name and version in relayer headers, remove SmartA…
christian-rogobete Apr 4, 2026
e8938cd
Validate accountWasmHash format in config init
christian-rogobete Apr 4, 2026
11f3d92
Add deployPendingCredential, fix createWallet to always build transac…
christian-rogobete Apr 6, 2026
6eaef43
Add full edit-mode support for context rules with multi-signer author…
christian-rogobete Apr 6, 2026
08f286e
Remove collapsible sections on wallet connection screen
christian-rogobete Apr 6, 2026
c9d3ab1
Show undeployed wallet state on create wallet and main screens
christian-rogobete Apr 6, 2026
1b8d6e2
Add approve feature to demo apps and generic contract call APIs to SDK
christian-rogobete Apr 7, 2026
7a44905
Refactor transfer methods to use generic contractCall/multiSignerCont…
christian-rogobete Apr 7, 2026
2c50447
Use executeAndSubmit/multiSignerExecuteAndSubmit for simple threshold…
christian-rogobete Apr 7, 2026
81ac3c9
Improve SDK documentation, fix bugs, and clean up APIs
christian-rogobete Apr 7, 2026
94bd78c
Clean up OZWalletOperations warnings, document and use OZBuilders, ad…
christian-rogobete Apr 7, 2026
ef64da9
Fix OZConstants KDoc and remove unused MAX_CONTEXT_RULES
christian-rogobete Apr 7, 2026
c5a3fcd
Improve OZTransactionOperations KDoc and fix documentation
christian-rogobete Apr 7, 2026
19cf3f9
Clean up OZCredentialManager: delete markDeployed, wire up lastUsedAt…
christian-rogobete Apr 7, 2026
cd88e4b
Add removeSigner by signer value, fix OZSignerManager and OZCredentia…
christian-rogobete Apr 7, 2026
3a8e11e
Add removePolicy by address, fix OZPolicyManager validations and KDoc
christian-rogobete Apr 7, 2026
31f5c5c
Fix OZContextRuleManager: document missing APIs, tighten visibility, …
christian-rogobete Apr 7, 2026
ce765ca
Fix OZMultiSignerManager: equals/hashCode, remove dead code, clean up…
christian-rogobete Apr 7, 2026
a5aec74
Fix OZExternalSignerManager: tighten visibility, add disconnectByAddr…
christian-rogobete Apr 7, 2026
5d0c7ff
Fix OZIndexerClient: normalize URL, implement AutoCloseable, fix KDoc…
christian-rogobete Apr 7, 2026
c47f219
Complete api-reference docs, fix adapters, add indexer/relayer client…
christian-rogobete Apr 8, 2026
8f3dfb6
Fix docs: remove external SDK references, fix stale claims, update pl…
christian-rogobete Apr 8, 2026
46e1310
Add 645 unit tests for smart account layer, fix executeAndSubmit vali…
christian-rogobete Apr 8, 2026
d51fd1e
Core layer improvements: remove external SDK reference, fix exception…
christian-rogobete Apr 8, 2026
e413ea0
Fix platform adapters and add 58 platform-specific tests
christian-rogobete Apr 8, 2026
009c197
Extract shared WebAuthnCborParser, remove duplicated CBOR logic
christian-rogobete Apr 8, 2026
3f047fa
Update testnet contract addresses and add mainnet indexer URL
christian-rogobete Apr 8, 2026
5a52197
Fix network subtitle color in demo app top bar
christian-rogobete Apr 8, 2026
b0d93ba
Skip Keychain tests when Keychain is unavailable in CI
christian-rogobete Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions docs/smart-accounts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,10 @@ val wallet = kit.walletOperations.createWallet(
nativeTokenContract = "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC"
)

// wallet.credentialId -- Base64URL-encoded credential ID
// wallet.contractId -- Stellar C-address of the deployed contract
// wallet.transactionHash -- deployment transaction hash
// wallet.credentialId -- Base64URL-encoded credential ID
// wallet.contractId -- Stellar C-address of the deployed contract
// wallet.signedTransactionXdr -- signed deploy transaction envelope (always present)
// wallet.transactionHash -- deployment transaction hash (present when autoSubmit = true)

// Step 4: Transfer tokens
//
Expand All @@ -135,7 +136,7 @@ val wallet = kit.walletOperations.createWallet(
val result = kit.transactionOperations.transfer(
tokenContract = "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC",
recipient = "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ",
amount = 10.0 // 10 XLM (automatically converted to stroops)
amount = "10" // decimal amount (automatically converted to stroops)
)

if (result.success) {
Expand Down Expand Up @@ -202,6 +203,18 @@ val connection = kit.walletOperations.connectWallet(
)
```

### Retrying Failed Deployments

When `createWallet(autoSubmit = false)` is used, or if a deployment fails after the credential is created, use `deployPendingCredential()` to submit the deploy transaction later. The credential must exist in local storage. The `signedTransactionXdr` field on `CreateWalletResult` is always populated regardless of `autoSubmit`, so it can also be submitted externally.

```kotlin
val result = kit.walletOperations.deployPendingCredential(
credentialId = wallet.credentialId,
autoSubmit = true
)
println("Deployed: ${result.contractId}, tx: ${result.transactionHash}")
```

### Managing Signers

Add additional signers to a context rule so multiple parties can authorize transactions:
Expand Down Expand Up @@ -270,6 +283,10 @@ val result = kit.policyManager.addPolicy(
)
```

### Multi-Signer Operations

When a context rule requires multiple signers, use `kit.multiSignerManager` to coordinate signatures. `multiSignerTransfer()` handles token transfers with multiple signers. `multiSignerExecuteAndSubmit()` handles arbitrary contract calls (e.g., governance votes, multisig swaps) with multiple signers -- it routes the call through the smart account's `execute` entry point.

### Error Handling

All operations throw typed exceptions from the `SmartAccountException` hierarchy:
Expand Down Expand Up @@ -391,7 +408,7 @@ Contract address derivation is deterministic: given the same deployer keypair, c

### Default Deployer

The SDK provides a default deployer derived from `SHA256("openzeppelin-smart-account-kit")`. This default is suitable for testing and simple deployments. The [TypeScript Smart Account Kit](https://github.com/kalepail/smart-account-kit) uses the same derivation, so both SDKs produce identical results from the same inputs -- useful for verifying correctness across implementations.
The SDK provides a default deployer derived from `SHA256("openzeppelin-smart-account-kit")`. This default is suitable for testing and simple deployments. Other OpenZeppelin Smart Account SDK implementations use the same derivation, so all SDKs produce identical results from the same inputs.

```kotlin
val deployer = OZSmartAccountConfig.createDefaultDeployer()
Expand Down Expand Up @@ -424,15 +441,14 @@ Given the same credential ID and deployer, `SmartAccountUtils.deriveContractAddr

### Signer Format Compatibility

Signer representations (`DelegatedSigner`, `ExternalSigner`) encode to the same Soroban SCVal structure as the TypeScript Smart Account Kit. The `ExternalSigner.webAuthn()` factory produces the same `keyData` format (65-byte public key + credential ID bytes). Signers added by either SDK are recognized on-chain by both.
Signer representations (`DelegatedSigner`, `ExternalSigner`) encode to the standard Soroban SCVal structure defined by the OpenZeppelin smart account contract. The `ExternalSigner.webAuthn()` factory produces the `keyData` format (65-byte public key + credential ID bytes) expected by the on-chain verifier. Signers added by any compatible SDK are recognized on-chain.

## Contract Limits

The OpenZeppelin smart account contract enforces these limits:

| Limit | Value |
|-------|-------|
| Maximum context rules per account | 15 |
| Maximum signers per context rule | 15 |
| Maximum policies per context rule | 5 |

Expand Down
Loading
Loading