Skip to main content
POST
Build Token-2022 confidential-transfer transactions

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 confidential seed signs the operation. The seed must already exist (see POST /waas/{walletId}/confidentialSeed).

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

The Token-2022 confidential-transfer operation to build and sign.

Available options:
configureAccount,
deposit,
transfer,
applyPendingBalance,
withdraw
mint
string
required

The Token-2022 mint.

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

The source confidential-capable token account.

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

Current cluster rent constant in lamports per byte (e.g. 6333), used to compute rent exemption for the proof accounts. This is the per-byte rate, not the per-account total returned by getMinimumBalanceForRentExemption.

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

SVM cluster identifier (genesis hash), binding the transaction to one cluster.

recentBlockhash
string
required

A recent blockhash (or durable-nonce value) fetched moments before invoking, since the enclave is offline and cannot reach Solana RPC.

lastValidBlockHeight
string
required

The last valid block height paired with recentBlockhash.

Pattern: ^[0-9]+$
derivationVersion
integer

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

Required range: x >= 1
destinationTokenAccount
string

Required for transfer: the recipient's confidential-capable token account for the same mint.

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

Required for deposit, transfer and withdraw: the token amount in base units, decimal-encoded (u64).

Pattern: ^[0-9]+$
decimals
integer

The mint's decimals, required for deposit and withdraw. Read from the mint account by the caller.

Required range: 0 <= x <= 255
auditorElgamalPubkey
string

The mint's confidential-transfer auditor ElGamal public key, when configured. Read from the mint account by the caller; omit when the mint has no auditor.

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

The account that pays transaction fees. Defaults to solanaAddress.

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

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.

destinationAccountState
object

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.

Response

Unsigned transactions and their binding tag, ready for the sign step

serializedTransactions
string[]
required

Base64-encoded v1 transaction carrying the operation with its ZK proofs inlined. The wallet's signature slot is zeroed; sign it through POST /waas/{walletId}/signConfidentialTransactions.

Required array length: 1 element
transactionsTag
string
required

Enclave-issued authentication tag binding the wallet, operation, mint, token accounts, amount and the hash of every emitted message, with a short expiry. Submit it unchanged with serializedTransactions to POST /waas/{walletId}/signConfidentialTransactions.