privium.deposit moves tokens from the wallet into a Pool vault shard, with a sealed note that names the account to the enclave alone. The Commit after the deposit lands credits the balance. It is the one transaction of the account’s that carries its wallet.
Finds asset among the base and quote assets of the markets GET /v1/markets returns on its first page, for its decimals, and converts amount to base units.
Draws a vault shard uniformly from the Pool’s vaultShards.
Seals a deposit note to the enclave’s key under the privium/deposit-note/v1 info: the account’s auth public key, viewing root, escape public key, owner salt and reply key (The deposit queue).
Has the API build the transaction with POST /v1/deposits/build: the wallet’s public key as source, the amount, the note and the shard.
sent when the wallet sent the transaction; built when the caller sends transaction.
transaction
Uint8Array
The transaction's bytes: signed when the wallet signed them, unsigned when it has no transaction signing.
signature
string (optional)
The transaction signature, base58, when the wallet sent it.
shard
number
The vault shard the deposit pays into, drawn uniformly.
fixture
boolean
Whether the API built the bytes in fixture mode; those bytes never reach the wallet.
Send a built transaction through any RPC endpoint, the API’s relay included. Then follow its signature with privium.api.depositStatus(signature) (GET /v1/deposits/{signature}) through sent, landed and credited at Crossing k. From that Crossing on, readBalances returns the credited balance.
A deposit whose note the enclave cannot read as a valid note for its account (one that does not open under the enclave’s key, does not decode, or disagrees with the account’s registration) is never credited and never stops its Crossing: that Crossing’s Commit lists the amount as an Exit to the owner of the source token account, due at once, and once release_exit pays it the status reads refunded, with the payment in refundTransaction (The deposit queue). A deposit still uncredited when the Escape opens reads refunded too, once refund_deposit returns it.