Skip to main content
POST
Decrypt a Token-2022 confidential token account's balances

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string
required

ID of the environment

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

walletId
string
required

UUID of the wallet

Required string length: 36
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Example:

"95b11417-f18f-457f-8804-68e361f9164f"

Body

application/json
solanaAddress
string
required

Solana address (base58 public key) whose stored confidential seed decrypts the balances. The seed must already exist (see POST /waas/{walletId}/confidentialSeed or the PUT variant).

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
tokenAccount
string
required

The confidential-capable token account to read.

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
mint
string
required

The Token-2022 mint.

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
accountState
object
required

Raw on-chain state of a Token-2022 account, read via getAccountInfo (base64 encoding) and relayed to the enclave, which is offline and cannot reach Solana RPC.

derivationVersion
integer

Version of the stored seed to decrypt with. Defaults to the newest stored version; must match the version active on the confidential token account.

Required range: x >= 1

Response

The decrypted confidential balances

availableBalance
string
required

The decrypted available confidential balance of the token account, in base units, decimal-encoded (u64).

Pattern: ^[0-9]+$
pendingBalance
string
required

The decrypted pending confidential balance of the token account, in base units, decimal-encoded (u64).

Pattern: ^[0-9]+$