Skip to main content

UintNote

Fields

FieldType
ownerAztecAddress
randomnessField
valueu128

Methods

new

UintNote::new(value, owner);

Parameters

NameType
valueu128
ownerAztecAddress

get_value

UintNote::get_value(self);

Parameters

NameType
self

partial

/ Creates a partial note that will hide the owner and storage slot but not the value, since the note will be later / completed in public. This is a powerful technique for scenarios in which the value cannot be known in private / (e.g. because it depends on some public state, such as a DEX). /// The returned PartialUintNote value must be sent to public execution via a secure channel, since it is not / possible to verify the integrity of its contents due to it hiding information. The recommended ways to do this / are to retrieve it from public storage, or to receive it in an internal public function call. /// Each partial note should only be used once, since otherwise multiple notes would be linked together and known to / belong to the same owner. /// As part of the partial note creation process, a log will be sent to recipient from sender so that they can / discover the note. recipient will typically be the same as owner.

UintNote::partial(owner, storage_slot, context, recipient, sender, );

Parameters

NameType
ownerAztecAddress
storage_slotField
context&mut PrivateContext
recipientAztecAddress
senderAztecAddress

UintPartialNotePrivateContent

Fields

FieldType
ownerAztecAddress
randomnessField

Methods

compute_partial_commitment

UintPartialNotePrivateContent::compute_partial_commitment(self, storage_slot);

Parameters

NameType
self
storage_slotField

PrivateUintPartialNotePrivateLogContent

Fields

FieldType
public_log_tagField
ownerAztecAddress
randomnessField

PartialUintNote

Fields

FieldType
commitmentField

Methods

commitment

PartialUintNote::commitment(self);

Parameters

NameType
self

complete

/ Completes the partial note, creating a new note that can be used like any other UintNote.

PartialUintNote::complete(self, value, context);

Parameters

NameType
self
valueu128
context&mut PublicContext

compute_note_completion_log

PartialUintNote::compute_note_completion_log(self, value);

Parameters

NameType
self
valueu128

compute_complete_note_hash

PartialUintNote::compute_complete_note_hash(self, value);

Parameters

NameType
self
valueu128

Standalone Functions

compute_note_hash

compute_note_hash(self, storage_slot);

Parameters

NameType
self
storage_slotField

compute_nullifier

compute_nullifier(self, context, note_hash_for_nullify, );

#[note] macro.

Parameters

NameType
self
context&mut PrivateContext
note_hash_for_nullifyField

compute_nullifier_unconstrained

compute_nullifier_unconstrained(self, note_hash_for_nullify);

Parameters

NameType
self
note_hash_for_nullifyField

get_id

get_id();

Takes no parameters.

note_hash_matches_completed_partial_note_hash

note_hash_matches_completed_partial_note_hash();

Takes no parameters.

unpack_from_partial_note_encoding

unpack_from_partial_note_encoding();

Takes no parameters.