txType: Type of transaction- DEPOSIT, TRANSFER, WITHDRAW, CONVERT
revokerId: ID of revoker used for this transaction. This will enable the selected revoker to decrypt these transaction details, but only once the deanonymisation request has been approved by the guardian network.
addressTreeRoot: Recent Merkle root of address tree.
commitmentTreeRoot Recent Merkle root of the commitment tree.
pubAssets An array of encoded bytes (3 bytes assetId + 28 bytes asset value) for publicly spent assets. If the shielded transaction is coming through the bundler, the fee asset in which the bundler fee is paid to the paymaster, is the first element in this array.
nullifiers Revealed nullifiers of input/spent notes.
commitments New commitments of output notes to be inserted in the commitment merkle tree. This merkle tree holding all note commitments is used to create a proof of inclusion by a user attempting to spend a note on the Veilnyx protocol.
proof Abi encoded ZK proof used to prove the validity of the transaction along with obscuring sensitive transaction details, thus enforcing privacy!
noteMemos Memos for output notes. This is list of encrypted notes' fields for each note and can be decrypted by the owner of the notes.
assetMemo This is empty for non-TRANSFER transactions. For TRANSFER transactions,
this is encrypted assets using sender's key that were transferred to receiver. These can only be decrypted by the sender.
complianceMemo Encrypted compliance data that was created using the compliance encryption key.
targetData Target address (first 20-bytes) for withdraw/adapter concatenated with any required payload.
refundData Refund address (first 32-byte) for public deposit to shielded account concatenated with refund memo.
Sending Transaction
But before passing the TypeScript object ZTransaction to transact you have to convert it to input suitable for the contract. Doing so is as simple as calling ztx.toSolidityInput().