Hero path
Hero surface
Hero path is the level a wallet, treasury, or approval product should start with. The app submits an intent, policy context, and idempotency key, then follows a receipt until the act is executed or published.
Hero keeps DVM score details out of normal product flows. The caller works at business intent level — create a wallet, initiate a transfer — while the SDK handles policy evaluation, admission, peer coordination, mobile signing, and receipt tracking internally. Every Hero operation calls policyProvider.evaluate(request) before it reaches the bridge; a rejected policy throws DvmBridgeError.policyRejected(reason) without touching the runtime.
When a phone participates as one signer, Hero calls are backed by the mobile bridge on that device. The app stores and binds the local keyshare through the vault, but the product service can stay focused on the act and receipt.
Operation path
One operation path across every SDK surface
Hero collapses these steps; Expert exposes them. Both keep the operation id and receipt as the recovery anchor.
1. Build intent
Provide business inputs: label, wallet id, asset, recipient, amount, idempotency key. The SDK derives the operation id, resolves policy, and selects the mobile signer when the device is a signing party.
2. Submit
The SDK submits the act through policy evaluation and the bridge in one call, routing through the local Mobile Node when the device holds a keyshare.
3. Inspect gates
Validate score hash, mobile signer binding, approval state, backend profile, and publication plan.
4. Run
Execution moves through admission, PendingRemote, local signer calls, and publication gate checks.
5. Await receipt
The caller follows one receipt state machine instead of raw peer, JNI, or native runtime events.
6. Export evidence
Support and audit receive the receipt, trace hashes, gate decisions, mobile binding, and publication receipt.
// Hero: wallet + transfer (current surface)
let transferOp = try await sdk.hero.transfer(
wallet: walletId,
asset: "ETH",
recipient: recipientAddress,
amount: "0.1",
idempotencyKey: "wire-2026-0142"
)
for await progress in transferOp.progress {
if case .waitingForUserPresence = progress {
try await biometricChallenge.complete()
}
}
let receipt = try await transferOp.awaitReceipt()
// Expert: signing through namespace
let signOp = try await sdk.expert.signatures.signDigest(request)
let signReceipt = try await signOp.awaitReceipt()API reference
Call contracts
Each call should name when to use it, what it accepts, what it returns, how it fails, and which evidence it leaves behind.
hero.createEvmWallet(label, idempotencyKey)
Use whenEnrollment — provision an EVM wallet and generate the device keyshare.Inputlabel, idempotencyKeyReturnsHeroWalletCreateOperation -> WalletCreatedReceiptFails withPOLICY_DENIED, BOUNDARY_UNAVAILABLEEvidencewalletId, keyId, custody, address, policyReceiptIdhero.transfer(wallet, asset, recipient, amount, idempotencyKey)
Use whenUser-approved transfer — requires user presence before signing.InputwalletId, asset, recipient, amount, idempotencyKeyReturnsTransferOperation -> TransferReceiptFails withPOLICY_DENIED, PEER_UNAVAILABLE, BOUNDARY_UNAVAILABLEEvidencetransactionId, walletId, policyReceiptId; progress stream emits .waitingForUserPresenceWhen to use Hero
Use Hero for production screens where the operation shape is already known. The current Hero surface covers wallet creation and transfers: call createEvmWallet during enrollment to provision an EVM wallet and transfer when a user approves a payment. Both return DvmOp<Receipt> — the caller can await the receipt directly or observe the progress stream for user-presence, network, and peer states during execution. Transfer sets requireUserPresence: true, so the progress stream will emit .waitingForUserPresence before the signing step, giving the app a clear hook for a biometric prompt.
let transferOp = try await sdk.hero.transfer(
wallet: walletId,
asset: "ETH",
recipient: recipientAddress,
amount: "0.1",
idempotencyKey: "wire-2026-0142"
)
for await progress in transferOp.progress {
if case .waitingForUserPresence = progress {
try await biometricChallenge.complete()
}
}
let receipt = try await transferOp.awaitReceipt()What Hero returns
The receipt is the shared object between product, operations, and support. It carries operation id, phase, public artifacts, runtime hashes, and a policy receipt id that traces back to the approval decision that allowed the operation. Product UI consumes the phase and artifacts. Support queries by operation id and receipt hash. Audit retains the policy receipt and evidence handles.