Shielded Transfer
Function Signature
function shieldedTransfer(
ShieldedTransferParams calldata params,
bytes calldata proof
) external nonReentrantParameters Struct
struct ShieldedTransferParams {
bytes32[6] noteNullifiers; // Spent note nullifiers
bytes32 txNullifier; // Transaction nullifier (replay prevention)
bytes32 root; // Note Merkle tree root
bytes32 rkRoot; // Key registry Merkle tree root
bytes32 noteOutCommitment; // Recipient's note commitment
bytes32 noteChangeCommitment; // Sender's change note
bytes32 noteFeeChangeCommitment; // Sender's fee change note
bytes32[9] ciphertextOut; // Encrypted recipient note
bytes32[9] ciphertextChange; // Encrypted change note
bytes32[9] ciphertextFeeChange; // Encrypted fee change note
GasFee gasFee; // Gas parameters
bytes32 nullifiersHash; // Hash of all 6 nullifiers
bytes32 fee; // Relayer fee amount
bytes32 feeTokenAddress; // Fee token address
}
struct GasFee {
bytes32 maxPriorityFeePerGas;
bytes32 maxFeePerGas;
bytes32 gasLimit;
}Execution Steps
Public Inputs Layout
Output Notes
Note
Commitment Field
Ciphertext Field
Recipient
Last updated