Otto WalletsDocs
⌘ K
Docs/SDK Reference
Package surface

Map the SDK surface

The SDK mirrors the public contract with grouped helpers. This page focuses on the methods that exist today, the exact parameter shapes they expect, and where they map into the public API.

Package @ottowallets/sdk
Export OttoSDK
Runtime Trusted backends only
Client setup

Initialize one signed client per integration

The main export is OttoWalletSDK, also re-exported asOttoSDK. Both share the same HMAC request-signing logic.

AUTHConstructornew OttoSDK(config)
NameTypeRequiredDescription
apiKeystringYesWorkspace-issued public API key.
secretKeystringYesPrivate signing secret. Keep it server-side only.
basePathBasePath | stringNoDefaults to BasePath.prod. Available presets: prod, sandbox, local.
otto.vaults.list({ page?: number, pageSize?: number })
Group

vaults

Use this group to create vault roots and list vault inventory available to the active integration.

Methodsotto.vaults
NameInputHTTP mappingDescription
create{ name: string }POST /vault/createCreate a vault boundary.
list{ page?: number, pageSize?: number }GET /dash/vaults/listFetch paginated vault inventory.
Group

wallets

The wallet group concentrates the most common app-facing calls: generate address, list wallets, fetch balances, preview transfers, and send transactions.

Methodsotto.wallets
NameInputHTTP mappingDescription
create{ network, vault_id, name? }POST /wallet/generate-address-hdGenerate a managed address under a vault.
list{ page?, pageSize?, filters? }GET /dash/wallets/listList wallets with vault, chain, and address filters.
getBalance{ network, address }POST /wallet/get-balanceFetch on-chain or indexed balance data.
generateAddressHD{ network, vault_id, name? }POST /wallet/generate-address-hdAlias for explicit HD generation.
previewTransfer{ from, to, amount, tokenAddress? }POST /wallet/transfer-previewPreview fee and readiness before sending.
sendTransaction{ network, from, to, amount, tokenAddress? }POST /wallet/send-transactionSubmit a signed transaction request.

Wallet list filters

{
  page?: number,
  pageSize?: number,
  filters?: {
    vault?: string,
    networks?: string[],
    address?: string
  }
}
otto.wallets.getBalance({ network, address })
otto.wallets.previewTransfer({ from, to, amount, tokenAddress? })
otto.wallets.sendTransaction({ network, from, to, amount, tokenAddress? })
Group

transactions

Transaction helpers are retrieval-oriented and are designed to complement execution flows with reporting and activity history.

Methodsotto.transactions
NameInputHTTP mappingDescription
list{ page?: number, limit?: number }GET /transaction/listPaginated transaction feed.
getMetrics{ from?: string }GET /transaction/metricsAggregate transaction metrics from an optional date.
getVolumeHistory{ from?: string }GET /transaction/volume-historyMonthly or periodic volume history.
otto.transactions.getMetrics({ from?: string })
otto.transactions.getVolumeHistory({ from?: string })
Group

gasStation

This group exposes the public operational helpers for refill, inventory, targeting, and processing of gas station workflows.

Methodsotto.gasStation
NameInputHTTP mappingDescription
createRecord<string, unknown>POST /gas-station/createCreate a gas station configuration.
listnoneGET /gas-station/listList configured gas stations.
getid: stringGET /gas-station/:idFetch one gas station.
getAvailableNetworksnoneGET /gas-station/available-networksList supported sponsor networks.
getLowBalance{ threshold?: number }GET /gas-station/low-balanceReturn wallets below threshold.
refill{ walletAddress, amount?, purpose? }POST /gas-station/refillQueue a refill request.
processnonePOST /gas-station/processTrigger processing of refill work.

Targeting helpers

  • addVault / removeVault expect id: string, vaultId: string.
  • includeWallet / excludeWallet expect id: string, walletId: string.
  • addTarget / removeTarget also use id: string, walletId: string.
Group

mpc

The MPC group stays focused on wallet and session operations instead of dashboard administration. That keeps the public package narrow while still enabling signer coordination flows.

Methodsotto.mpc

Wallet methods

NameInputHTTP mappingDescription
listWalletsnoneGET /mpc-security/walletsList MPC wallets.
getWalletByIdwalletId: stringGET /mpc-security/wallets/:walletIdFetch one MPC wallet.
createWallet{ networkId, name?, threshold, participants }POST /mpc-security/walletsCreate a threshold wallet.

Session methods

NameInputHTTP mappingDescription
listSessionsnoneGET /mpc-security/sessionsList signing sessions.
createSession{ walletId, networkId, to, amount, assetSymbol, assetAddress? }POST /mpc-security/sessionsCreate a signing session for one transfer.
startSessionsessionId: stringPOST /mpc-security/sessions/:sessionId/startStart the orchestrated signing flow.
signSessionsessionId: string, { participantId }POST /mpc-security/sessions/:sessionId/signSubmit one signer approval.
listParticipantsnoneGET /mpc-security/participantsList signer candidates.

Participant types

'USER' | 'DEVICE' | 'SERVER' | 'BACKUP' | 'EXTERNAL'
The current sign flow still exposes participantId. That is workable today, but it is also a good candidate for future hardening.
Reliability

Errors

SDK errors still reflect the underlying HTTP contract. In practice, treat network, authentication, permission, business validation, and transient failures as separate categories.

  • 401: wrong API key or bad signature source data.
  • 403: policy or assignment denied the action.
  • 400/422: invalid payload or business rule violation.
  • 404: resource id does not exist in the current scope.
  • 5xx: retry only from safe backend workers.
Compatibility

waas alias

The SDK still ships a compatibility alias for older vault and wallet integrations so teams can migrate incrementally instead of rewriting all call sites at once.

otto.waas.vaults.create(...)
otto.waas.wallets.create(...)
otto.waas.wallets.list(...)
otto.waas.wallets.previewTransfer(...)
otto.waas.wallets.createTransaction(...)