AbstractStaticassertProtected StaticassertValidates the caller input of an outbound note factory.
The value, token data, optional random, and optional master public key
The token types the factory accepts
StaticgetComputes the note hash from npk, token hash, and value.
The note public key as a Uint8Array
The token hash as a Uint8Array
The note value as a bigint
The note hash as a Uint8Array
StaticcomputeComputes the note public key (NPK) from a master public key and random value. NPK = poseidon(masterPublicKey, random)
The receiver's master public key as a Uint8Array
The note random value as a Uint8Array (16 bytes)
The note public key as a Uint8Array
StaticcomputeComputes the nullifier for a note at a given leaf index. The nullifier uniquely identifies a note when it is spent.
The wallet's nullifying key as a Uint8Array
The note's position in the merkle tree
The nullifier as a Uint8Array
AbstractserializeSerializes the note to a Uint8Array. Must be implemented by subclasses.
The serialized note
The note public key (npk) as a hex string
The note value as a bigint
The token data containing address, type, and subID
The token hash as a hex string
Random value (16 bytes hex string)
Abstract base class for all note types. Provides common properties and serialization interface.