Install V2
What changed
How approval works
Each approval call gets the approval message for the entity. The SDK signs the message with the key in yourAPIClient. The SDK then submits the signed approval. See Approvals for the REST flow.
Use two separate calls: create, then approve. Store the entity id after the create call. If the approval call fails, retry the approval only. Do not repeat the create call, or you create a duplicate.
Vaults
1
Create the vault
Pass Copy the vault group IDs from the PrimeVault web app. The SDK has no method to list vault groups.
vaultName, chains, and vaultGroupIds. Do not pass templateId.2
Approve the vault
createVaultApproval approves the change request and returns the vault.3
Wait for wallet addresses
Wallet generation is asynchronous. Retrieve the vault until The attempt count and delay are example values. Tune them for your workload.
walletsGenerated is true. Then read the addresses from wallets.Contacts
Create a contact
status set to PENDING. Use the contact in a transfer only after status is APPROVED.
Update contact groups
updateContact changes assetList and contactGroupIds only. It cannot change name or address.
Transfers
1
Create the transfer
source and destination are party objects with a type and an id. amount is a decimal string.2
Approve the transfer
PENDING. Skip the approval call.3
Track the transfer
approveChangeRequest returns the approval result, not the transaction. Call getTransactionById(txn.id) or listen for webhooks. Stop when status is COMPLETED, FAILED, or DECLINED.One-call helpers
V2 also has helpers that create and approve in one call. Use them in scripts and tests. In production, prefer two calls so a retry does not create a duplicate.Other V1 methods that changed
Next steps
Approvals
Approval messages, signing, and the REST approval flow.
Create a Transfer
Transfer fields, fee payer, and lifecycle.