Optional
account?: AccountOptional
amounts?: BN[]Optional
appOptional
appOptional
appOptional
assets?: PublicKey[]Optional
blinding?: BNOptional
includeOptional
index?: numberOptional
poolOptional
verifierOptional
_commitmentOptional
_nullifierarray of utxo amounts, amounts[0] is the sol amount amounts[1] is the spl amount
array of utxo assets, assets[0] is the sol asset assets[1] is the spl asset
Blinding factor, a 31 bytes big number, to add randomness to the commitment hash.
the account owning the utxo.
the index of the utxo's commitment hash in the Merkle tree.
application data of app utxos not provided for normal utxos.
the solana address of the verifier, SystemProgramId/BN(0) for system verifiers.
hashAndTruncateToCircuit(verifierAddress) to fit into 254 bit field size of bn254.
is the poseidon hash of app utxo data. This compresses the app data and ties it to the app utxo.
is the pool type domain of the utxo default is [0;32].
flag whether to include app data when serializing utxo to bytes.
cached commitment hash to avoid recomputing.
cached nullifier hash to avoid recomputing.
Optional
appOptional
indexEncrypts the utxo to the utxo's accounts public key with nacl.box.
Optional
merkleTreePdaPublicKey: PublicKeyOptional
transactionNonce: numberwith the first 24 bytes being the nonce
Static
decryptDecrypts a utxo from an array of bytes, the last 24 bytes are the nonce.
Optional
aes?: booleanOptional
appOptional
compressed?: booleanOptional
merkleOptional
transactionStatic
equalStatic
fromParses a utxo from bytes.
Optional
account?: AccountOptional
appOptional
includeOptional
index?: numberOptional
verifierStatic
fromCreates a new Utxo from a given base58 encoded string.
The base58 encoded string representation of the Utxo.
The newly created Utxo.
Generated using TypeDoc
Description
Initialize a new utxo - unspent transaction output or input. Note, a full TX consists of 2 inputs and 2 outputs