Skip to main content

StewardClient

The StewardClient class provides typed methods for all Steward API operations.

Constructor

When both apiKey and bearerToken are provided, bearerToken takes priority. Use apiKey for tenant operations and bearerToken for agent operations.

Agent Methods

createWallet

Creates a new agent with encrypted EVM and Solana wallets.

listAgents

Lists all agents for the authenticated tenant. The SDK walks stable API pages at the maximum page size and fails closed on duplicate or non-progressing pages, while retaining the historical array return type.
Use the canonical paginated result when the metadata is needed:

getAgent

Gets a single agent by ID.

createWalletBatch

Creates multiple agents in one request with optional shared policies.

Signing Methods

signTransaction

Signs and optionally broadcasts an EVM transaction.

signTypedData

Signs EIP-712 structured data.

signSolanaTransaction

Signs a serialized Solana transaction.

signBitcoinPsbt

Signs a scoped Bitcoin PSBT for an agent wallet. Steward returns a signed PSBT and a Steward transactionId; it does not broadcast.
Steward decodes standard PSBT destination outputs and enforces fee caps, spend/address policies, and Bitcoin raw-signing-chain policy requirements before signing. For safe retries, reuse a stable referenceId and, where accepted by your deployment, the same Idempotency-Key header. If finalize: true returns finalizedTxHex, avoid blindly retrying broadcast attempts; first check whether the returned Bitcoin txId is already known to your broadcaster or indexer.

signMessage

Signs an arbitrary message.

Encrypted Key Import Methods

Agent-vault import helpers require a tenant owner/admin bearer session with recent MFA. User-wallet import helpers require the authenticated user’s bearer session with recent MFA. Both flows use a server X25519 init response and then submit only an encrypted envelope; do not include a plaintext privateKey field.
Init sessions are bound to tenant/app/user/agent/wallet fields returned in aad. Wrong-agent and wrong-wallet-index submits fail without consuming the original session; validated submits consume the session atomically, so replay fails.

Query Methods

getBalance

Gets the native token balance for an agent’s wallet.

getAddresses

Gets all wallet addresses across chain families.

getHistory

Gets the complete transaction history for an agent. The SDK walks every bounded API page before returning the historical array result.

rpcPassthrough

Proxies a read-only RPC call.

Global Wallet Methods

Global wallet helpers require a user bearer token. Pass walletIndex when the user selected a non-default embedded wallet; the server binds consent, scan, confirmation, audit, and execution to that same wallet index plus wallet agent id/address. Omitting walletIndex selects index 0.
Contract calldata remains blocked for global wallet transaction execution until selector-aware scanning and policy checks are configured for that deployment.

App Client Methods

Tenant app-client helpers expose the same TenantAppClient shape documented in the control-plane API. Native app clients can set iOS and Android allowlists with allowedBundleIds and allowedPackageNames; device-code auth then checks X-Steward-Native-Bundle-Id, X-Steward-Native-Package-Name, or matching JSON fields against the enabled client.

Tenant User Methods

bulkRemediateTenantWalletPolicyViolations

Removes selected EVM/Solana linked wallet accounts from tenant members after an owner/admin has reviewed a one-third-party-wallet policy violation report. Requires a user bearer token scoped to the tenant with recent MFA.
The API caps requests at 50 items and returns per-item success/error results so callers can retry failed selections without repeating successful remediations.

Policy Methods

getPolicies

Gets all policies for an agent.

setPolicies

Replaces all policies for an agent.

Additional API Areas

This page covers the core StewardClient methods. The archived root SDK reference also covered webhook, tenant configuration, dashboard, and approval APIs; those surfaces now live in the API reference:

Error Handling

All methods throw StewardApiError on failure: