Prerequisites
Read-only calls (getWallets, getWallet, getPortfolio, getTotalAssetValue,
getSupportedTokens, getWalletHistory) need only the API key.
Anything that touches key material (createWallet, importWallet) additionally
needs a configured shareStore (omitting it throws shareStore is required for SDK v2 wallet-password flows), an unlocked wallet-password session, and userRef passed explicitly or
through sdk.runWithUserRef(userRef, fn). See Authentication for
unlocking a session and Key Management for what
shareStore implements.
Chain types
EChainType is the enum every wallet method takes. Its members are exactly the ChainType
string literals, so the two are interchangeable at the call site.
Bitcoin has two chain types:
BTC on mainnet and BTC_T3 on testnet. The exported helper
getBtcChainType() returns the right one for the network the SDK was constructed with.ChainIdValue union, always strings: the EVM chain id ("1", "8453", …) or a
named id per chain ("sol_mainnet", "tron_mainnet", "BTC", "ada_mainnet", "xrp_mainnet").
Each has a testnet counterpart. The full set is in
Supported chains.
Wallet scope
WalletScope is 'personal' | 'organization'. It appears on every method that fetches key shares
or acts on an ownership-specific resource, and it selects which share partition the SDK reads.
It defaults to 'personal' when omitted.
Creating wallets
On an account whose root is a hardware wallet,
createWallet throws HardwareSignerRequiredError.
Use prepareHardwareAddAccount instead. See Hardware Wallets.Omit mode
createWallet takes an optional mode, but a normal integration never passes it. Every account with
an API key already has a recovery phrase, so the wallet is derived from that phrase: shareless,
with nothing written to your share store. See Recovery Phrase.
Importing wallets
The private key is split locally and never uploaded. An imported key cannot be derived from the account seed, so unlike a wallet you create, it is split into shares and its device share is written to yourshareStore. See Key Management.
The wallet record
Wallet generations
The account holder can replace their recovery phrase in the app. Wallets of the old phrase stay in the listing and keep their balance and history, butaccessState says what they can still do.
An absent value reads as
active. The backend refuses in every one of these cases anyway, so the
helpers below are there to save a round trip and to tell the user why before they submit:
PermissionDeniedError with user-ready wording. details carries walletAddress and accessState
on a blocked spend, and walletAddresses on a refused vault owner set.
archived is stricter for vaults than for spending on purpose. A vault records its signer set
once, and an archived generation no longer reproduces the signer the vault stored, so it cannot
sign there. Moving the wallet’s own funds keeps working.Listing wallets
getWallets returns everything or a page, depending on the input:
page: 1, limit: 10. chain is a single-value convenience:
use it instead of chainTypes when you only want one chain.
StatusFilterEnum filters transaction and order status, not wallet listing. Do not pass it to
getWallets.Reading one wallet
Renaming and deleting
Portfolio and balances
Batch
getWalletsPortfolio is the primitive; you build the request array yourself.
force: true bypasses the cached balance and re-reads from the chain.
Single wallet
getPortfolio is the one-wallet form of the same call.
Aggregate value
Token prices
There is no token-price method on
TrustodianSDK. The per-token priceUSD and price24hChange
on a portfolio response are the prices the SDK exposes; standalone price lookups are not part of
the SDK surface.Supported tokens
Transaction history
TransactionHistoryItem carries status
('success' | 'failed' | 'pending'), method, from, to, value, hash, time, token
and details.
UTXO chains (BTC and ADA)
getOrgWalletUtxos is the only UTXO method the SDK exposes. See
Organization Wallets.
Its response separates coins by spendability:
UtxoDto has txHash, index, value (lovelace for ADA, satoshis for BTC) and, on ADA,
nativeAssets: [{ policyId, assetName, value }].
Unconfirmed BTC coins appear in
allUtxos but never in freeUtxos, so a balance computed from
allUtxos can exceed what a send is actually able to spend.Next
Transactions
Sending value, fee estimation, memos, address validation, spend authorization
Preflight
Simulate and verify before a signature is collected
Organization Wallets
Org-owned wallets, assignment, and provisioning
Key Management
Sessions, shares, rotation, and recovery