Shuttle Docs

createWallet

Create one network-scoped signing identity in an explicit control mode.

GroupWallet lifecycle
RuntimesTypeScript browser/server, React client adapter, Python/Go server
Updated2026-09-16

Status

Proposed target SDK behavior for implementation. This is not an available SDK, an implementation-ready contract, or a change to the approved Streams PRD.

controlMode: embedded End user browser / device Owner-controlled protected runtime Shuttle backend authenticates actor · evaluates grants and policy Authorization comes from the wallet owner. Backend coordination never transfers owner authority. Browser code is an untrusted caller. controlMode: server Named service treasury · payouts · fees Protected remote signer Policies · transaction limits · approval rules checked at signing time, not after the fact End-user authentication never grants service authority. No server credential is embedded in browser code. Mode is immutable at creation — V1 has no migration.
One wallet is one network-scoped key and address with a stable wallet ID and a controlMode fixed at creation. Neither mode returns raw custody material. Public reads expose safe summaries of mode, authority, address, grants, limits and effective policy assignments — never credentials, signing material or authorization proofs.

Business action#

Create one network-scoped wallet signing identity and address in an explicitly selected embedded or server control mode. The SDK exposes the wallet and operation result; custody preparation remains internal.

Proposed call#

createWallet(
  input: CreateWalletInput,
  options?: CallOptions,
): Promise<Operation<CreateWalletResult>>

CreateWalletInput uses requestId, network, required controlMode, mode-appropriate owner or serviceIdentity, initial policies/transaction limits, optional name, and optional authorization. CreateWalletResult contains the completed wallet projection and safe storage disposition.

The Go DTO exposes RequestID, Network, ControlMode, the mode-appropriate authority, limits, and optional Name with stable JSON tags. A nil input, missing mode or invalid required field returns an error before submission.

Required input:

The target model is one network-scoped key/address. No mnemonic length, derivation path, derived-account, or mnemonic-export capability is promised.

Result and operation recovery#

Success returns wallet ID, immutable control mode, network, address, public signing metadata, controlling owner/service identity, granted rights, limits and safe storage disposition. Embedded custody stays owner-controlled. Server authority stays in the protected remote signer under the named service identity. Custody material is never a public result. Creation in one mode never creates or migrates the other.

The SDK binds requestId to immutable owner, network, payload and required authority context. Authorization responses bind to that record but are accumulated separately, so a valid response does not change operation material. Same-ID/same-material replay converges on the prior operation; same ID with different material conflicts. After an uncertain outcome, call getOperation(requestId) instead of creating another wallet. The retained identity horizon and expired-identity behavior must be specified before implementation; expiry never authorizes blind repetition.

Authorization and effects#

The operation may complete under existing authority. Otherwise the SDK invokes the mode-appropriate owner/service handler once or returns requiresAction; it cannot do both. Proof binds action, mode, wallet target, actor/service identity, request ID and payload. End-user login never substitutes for server-wallet service authorization.

Successful completion creates exactly one wallet identity. Rejection or conflict creates none. It does not fund, monitor, export or transfer the wallet.

Acceptance#

See SDK model and business stories, getWallet, and getOperation.