Skip to main content

TokenNoteProperties

/ Generates note properties struct for a given note struct s. / / Example: / ```

TokenNoteFields_5695262104

/ Generates note export for a given note struct s. The export is a global variable that contains note type id, / note name and information about note fields (field name, index and whether the field is nullable or not). / / Example: / ```

TokenNoteSetupPayload

/ Generates setup payload for a given note struct s. The setup payload contains log plaintext and hiding point. / / Example: / ```

Methods

new

TokenNoteSetupPayload::new(mut self, npk_m_hash, randomness, storage_slot);

Parameters

NameType
mut self
npk_m_hashField
randomnessField
storage_slotField

encrypt_log

TokenNoteSetupPayload::encrypt_log(self, context, recipient_keys, recipient);

Parameters

NameType
self
context&mut PrivateContext
recipient_keysaztec
recipientaztec

empty

TokenNoteSetupPayload::empty();

Takes no parameters.

generate_setup_payload

TokenNoteSetupPayload::generate_setup_payload(s, indexed_fixed_fields, Type, u32);

Parameters

NameType
sStructDefinition
indexed_fixed_fields[(Quoted
Type
u32

new

TokenNoteSetupPayload::new($new_args);

Parameters

NameType
$new_args

encrypt_log

TokenNoteSetupPayload::encrypt_log(self, context, ovpk, recipient, sender);

Parameters

NameType
self
context&mut PrivateContext
ovpkaztec
recipientaztec
senderaztec

empty

TokenNoteSetupPayload::empty();

Takes no parameters.

get_setup_log_plaintext_body

TokenNoteSetupPayload::get_setup_log_plaintext_body(s, log_plaintext_length, indexed_nullable_fields, Type, u32);

Parameters

NameType
sStructDefinition
log_plaintext_lengthu32
indexed_nullable_fields[(Quoted
Type
u32

new

TokenNoteSetupPayload::new(mut self, context, slot, amount);

Parameters

NameType
mut self
context&mut aztec
slotField
amountU128

emit

TokenNoteSetupPayload::emit(self);

Parameters

NameType
self

emit_note_hash

TokenNoteSetupPayload::emit_note_hash(self);

Parameters

NameType
self

emit_log

TokenNoteSetupPayload::emit_log(self);

Parameters

NameType
self

empty

TokenNoteSetupPayload::empty();

Takes no parameters.

generate_finalization_payload

TokenNoteSetupPayload::generate_finalization_payload(s, indexed_fixed_fields, Type, u32);

Parameters

NameType
sStructDefinition
indexed_fixed_fields[(Quoted
Type
u32

new

TokenNoteSetupPayload::new(mut self, context, slot, $args);

Parameters

NameType
mut self
context&mut aztec
slotField
$args

emit

TokenNoteSetupPayload::emit(self);

Parameters

NameType
self

emit_note_hash

TokenNoteSetupPayload::emit_note_hash(self);

Parameters

NameType
self

emit_log

TokenNoteSetupPayload::emit_log(self);

Parameters

NameType
self

empty

TokenNoteSetupPayload::empty();

Takes no parameters.

setup_payload

TokenNoteSetupPayload::setup_payload();

Takes no parameters.

finalization_payload

TokenNoteSetupPayload::finalization_payload();

Takes no parameters.

generate_partial_note_impl

TokenNoteSetupPayload::generate_partial_note_impl(s, setup_payload_name, finalization_payload_name, );

Parameters

NameType
sStructDefinition
setup_payload_nameQuoted
finalization_payload_nameQuoted

setup_payload

TokenNoteSetupPayload::setup_payload();

Takes no parameters.

finalization_payload

TokenNoteSetupPayload::finalization_payload();

Takes no parameters.

register_note

TokenNoteSetupPayload::register_note(note, note_serialized_len, note_type_id, fixed_fields, Type, u32);

Parameters

NameType
noteStructDefinition
note_serialized_lenu32
note_type_idField
fixed_fields[(Quoted
Type
u32

index_note_fields

TokenNoteSetupPayload::index_note_fields(s, nullable_fields, );

Parameters

NameType
sStructDefinition
nullable_fields[Quoted]

inject_note_header

TokenNoteSetupPayload::inject_note_header(s);

Parameters

NameType
sStructDefinition

partial_note

TokenNoteSetupPayload::partial_note(s, nullable_fields);

Parameters

NameType
sStructDefinition
nullable_fields[Quoted]

note

TokenNoteSetupPayload::note(s);

Parameters

NameType
sStructDefinition

note_custom_interface

TokenNoteSetupPayload::note_custom_interface(s);

Parameters

NameType
sStructDefinition

TokenNoteFinalizationPayload

/ Generates finalization payload for a given note struct s. The finalization payload contains log and note hash. / / Example: / ```

Methods

new

TokenNoteFinalizationPayload::new(mut self, context, slot, amount);

Parameters

NameType
mut self
context&mut aztec
slotField
amountU128

emit

TokenNoteFinalizationPayload::emit(self);

Parameters

NameType
self

emit_note_hash

TokenNoteFinalizationPayload::emit_note_hash(self);

Parameters

NameType
self

emit_log

TokenNoteFinalizationPayload::emit_log(self);

Parameters

NameType
self

Standalone Functions

compute_note_type_id

compute_note_type_id(name);

Parameters

NameType
nameQuoted

to_be_bytes

to_be_bytes(self, storage_slot);

Parameters

NameType
self
storage_slotField

deserialize_content

deserialize_content(value);

Parameters

NameType
value[Field; N]

serialize_content

serialize_content(self);

Parameters

NameType
self

get_note_type_id

get_note_type_id();

Takes no parameters.

set_header

set_header(&mut self, header);

Parameters

NameType
&mut self
headerNoteHeader

get_header

get_header(self);

Parameters

NameType
self

compute_note_hash

compute_note_hash(self);

Parameters

NameType
self

generate_note_interface

generate_note_interface(s, note_type_id, indexed_fixed_fields, Type, u32);

Parameters

NameType
sStructDefinition
note_type_idField
indexed_fixed_fields[(Quoted
Type
u32

to_be_bytes

to_be_bytes(self, storage_slot);

Parameters

NameType
self
storage_slotField

deserialize_content

deserialize_content(value);

Parameters

NameType
value[Field; $content_len]

serialize_content

serialize_content(self);

Parameters

NameType
self

get_note_type_id

get_note_type_id();

Takes no parameters.

set_header

set_header(&mut self, header);

Parameters

NameType
&mut self
header$NOTE_HEADER_TYPE

get_header

get_header(self);

Parameters

NameType
self

compute_note_hash

compute_note_hash(self);

Parameters

NameType
self

properties

properties();

Takes no parameters.

generate_note_properties

generate_note_properties(s);

Parameters

NameType
sStructDefinition

properties

properties();

Takes no parameters.

generate_note_export

generate_note_export(s, note_type_id, fields, u32, bool);

Parameters

NameType
sStructDefinition
note_type_idField
fields[(Quoted
u32
bool

generate_multi_scalar_mul

generate_multi_scalar_mul(indexed_fields, Type, u32);

Parameters

NameType
indexed_fields[(Quoted
Type
u32