Example
Properties
Accessors
Account Management
account
Get Signature
Example
Returns
AccountManager
Methods
Account Management
getAccount()
Parameters
Returns
Promise<GetAccountResponse>
Promise resolving to account details or error information
Example
updateAccount()
Parameters
Returns
Promise<TransactionResponse>
Promise resolving to transaction response for the update operation
Example
getTransfers()
Parameters
Returns
Promise<TransferResponse>
Promise resolving to transfers response with transaction history
Example
getTransactions()
Parameters
Returns
Promise<GetTransactionsResponse>
Promise resolving to transaction history response
Example
Authentication
initAuth()
Note: For new users, you must call createAccount first to create an account before initializing authentication. This method is only for authenticating existing users.
Parameters
Returns
Promise<InitAuthResponse>
Promise resolving to authentication initialization response with OTP details
Example
completeAuth()
Note: For new users who need to create an account, use completeAuthAndCreateAccount instead, which completes authentication and creates the account in one step.
Parameters
Returns
Promise<CompleteAuthResponse>
Promise resolving to authentication completion response with session data
Example
completeAuthAndCreateAccount()
Parameters
Returns
Promise<CompleteAuthAndCreateAccountResponse>
Created account information
Example
refreshSession()
Note: Currently supports Privy only. Turnkey refresh not yet implemented.
Parameters
Returns
Promise<RefreshSessionResponse>
Refreshed session data
Example
createAccount()
Parameters
Returns
Promise<CreateAccountResponse>
Promise resolving to created account information
Note: When passing AccountPolicies with signers, role defaults to ‘primary’ and provider defaults to ‘external’ if not specified.
Examples
Configuration
getConfig()
Returns
GridApiConfig
Example
KYC Verification
requestKycLink()
Parameters
Returns
Promise<KycLinkResponse>
Promise resolving to KYC link response with verification URL
Example
getKycStatus()
Parameters
Returns
Promise<KycStatusResponse>
Promise resolving to KYC status response
Example
Key Management
generateSessionSecrets()
Returns
Promise<SessionSecrets>
Example
Other
extractSignableTransaction()
Parameters
Returns
VersionedTransaction
Deserialized VersionedTransaction ready for signing
Example
setExternallySignedTransaction()
Parameters
Returns
TransactionPayload
Updated Grid transaction response with signed transaction data
Example
getAccountBalances()
Parameters
Returns
Promise<AccountBalancesResponse>
Promise resolving to account balances response
Example
Passkey Management
getPasskeys()
Parameters
Returns
Promise<GetPasskeysResponse>
Promise resolving to passkeys response with credential details
Example
addPasskey()
Parameters
Returns
Promise<AddPasskeyResponse>
Promise resolving to passkey addition response
Example
removePasskey()
Parameters
Returns
Promise<RemovePasskeyResponse>
Promise resolving to passkey removal response
Example
createPasskeyCredentials()
Parameters
Returns
Promise<PasskeyCredentialData>
Promise resolving to credential data with public key and credential ID
Example
getPasskeyCredentials()
Parameters
Returns
Promise<PasskeyAssertionResponse>
Promise resolving to assertion response with signature and authentication data
Example
extractPasskeyCreateParams()
Parameters
Returns
PasskeyRequest
Parsed passkey request object ready for credential creation
Example
extractPasskeyAuthParams()
Parameters
Returns
PasskeyRequest
Parsed passkey request object ready for authentication
Example
createPasskeyAccount()
Parameters
Returns
Promise<CreatePasskeyAccountResponse>
Promise resolving to the created smart account details including passkey info
Example
Passkey Sessions
createPasskeySession()
Parameters
Returns
Promise<CreatePasskeySessionResponse>
Promise resolving to passkey session creation response
Example
authorizePasskeySession()
Parameters
Returns
Promise<AuthorizePasskeySessionResponse>
Promise resolving to session authorization response
Example
submitPasskeySession()
Parameters
Returns
Promise<SubmitPasskeySessionResponse>
Promise resolving to session submission response with account details
Example
findPasskeyAccount()
Parameters
Returns
Promise<FindPasskeyAccountResponse>
Promise resolving to found passkey account information
Example
getPasskeyAccount()
Parameters
Returns
Promise<GetPasskeyAccountResponse>
Promise resolving to passkey account details with relying party ID, public key, and optional session key
Example
Payment Processing
createPaymentIntent()
Note: Non-Enterprise customers must provide a
feeConfig in the request.Parameters
Returns
Promise<CreatePaymentIntentResponse>
Promise resolving to payment intent response with transaction details
Example
Proposal
createProposal()
Parameters
Returns
Promise<CreateProposalResponse>
Promise resolving to create proposal response
Example
voteProposal()
Parameters
Returns
Promise<VoteProposalResponse>
Promise resolving to vote proposal response with unsigned transaction
Example
executeProposal()
- Signer must have CAN_EXECUTE permission
- Proposal must be in Approved state
- Returns unsigned transaction with signatures
- The transactionSignatures array can contain multiple signatures
Parameters
Returns
Promise<ExecuteProposalResponse>
Promise resolving to execute proposal response with unsigned transaction
Example
Spending Limits
createSpendingLimit()
Parameters
Returns
Promise<CreateSpendingLimitResponse>
Promise resolving to transaction response for spending limit creation
Example
updateSpendingLimit()
Parameters
Returns
Promise<SpendingLimitTransactionResponse>
Promise resolving to transaction response for the update
Example
deleteSpendingLimit()
Parameters
Returns
Promise<SpendingLimitTransactionResponse>
Promise resolving to transaction response for the deletion
Example
useSpendingLimit()
Parameters
Returns
Promise<SpendingLimitTransactionResponse>
Promise resolving to transaction response for the authorized transaction
Example
getSpendingLimit()
Parameters
Returns
Promise<SpendingLimitResponse>
Promise resolving to spending limit data
Example
getSpendingLimits()
Parameters
Returns
Promise<SpendingLimitsResponse>
Promise resolving to array of spending limit data
Example
Standing Orders
createStandingOrder()
Parameters
Returns
Promise<CreateStandingOrderResponse>
Promise resolving to standing order creation response
Example
getStandingOrders()
Parameters
Returns
Promise<StandingOrdersResponse>
Promise resolving to standing orders response
Example
getStandingOrder()
Parameters
Returns
Promise<StandingOrderResponse>
Promise resolving to standing order details response
Example
Transaction Processing
prepareArbitraryTransaction()
Parameters
Returns
Promise<TransactionResponse>
Promise resolving to prepared transaction response ready for signing
Example
Transaction Signing
sign()
Parameters
Returns
Promise<TransactionResult>
Promise resolving to transaction result with signatures and metadata
Example
signAndSend()
Parameters
Returns
Promise<TransactionSubmissionResponse>
Promise resolving to transaction submission result with blockchain signature
Example
send()
Parameters
Returns
Promise<TransactionSubmissionResponse>
Promise resolving to transaction submission result with signature
Example
Utilities
getSessionKeyObject()
Parameters
Returns
SessionKey
SessionKey object with decoded key bytes and parsed expiration
Example
getEnvironment()
Returns
"sandbox" | "production"
The current environment (‘sandbox’ for devnet, ‘production’ for mainnet)
Example
Virtual Accounts
requestVirtualAccount()
Parameters
Returns
Promise<VirtualAccountResponse>
Promise resolving to virtual account response with banking details
Example
getVirtualAccounts()
Parameters
Returns
Promise<VirtualAccountsResponse>
Promise resolving to virtual accounts response