NewCommitment
Event emitted when a new commitment is added to the Merkle tree.This event is emitted for each new commitment created during a privacy-preserving transaction. It provides the commitment hash, its index in the tree, and the encrypted output data for the recipient. # Privacy Considerations - The commitment hash reveals no information about the transaction amount - The encrypted output can only be decrypted by the intended recipient - The index provides ordering information without revealing transaction details # Usage - External systems can track the growth of the Merkle tree - Recipients can scan for their encrypted outputs using their private key - Provides transparency while maintaining transaction privacy
Fully qualified path: obscura::events::NewCommitment
#[derive(Drop, starknet::Event)]
pub struct NewCommitment {
pub commitment: u256,
pub index: u32,
pub encrypted_output: ByteArray,
}
Members
commitment
The commitment hash that was added to the Merkle tree. This is a cryptographic commitment to the transaction output.
Fully qualified path: obscura::events::NewCommitment::commitment
pub commitment: u256
index
The index of the commitment in the Merkle tree. Provides ordering information for tree construction.
Fully qualified path: obscura::events::NewCommitment::index
pub index: u32
encrypted_output
The encrypted output data for the transaction recipient. Contains private transaction details encrypted with the recipient's public key.
Fully qualified path: obscura::events::NewCommitment::encrypted_output
pub encrypted_output: ByteArray