Skip to main content

utils

Standalone Functions

create_note_getter_options_for_decreasing_balance

create_note_getter_options_for_decreasing_balance(amount, );

Pick the fewest notes whose sum is equal to or greater than amount.

Parameters

NameType
amountField

increment

increment(// docs, &mut PrivateContext>, amount, recipient, outgoing_viewer, // docs, );

Inserts it to the recipient's set of notes.

Parameters

NameType
// docsstart
&mut PrivateContext>
amountField
recipientAztecAddress
outgoing_viewerAztecAddress
// docsend

decrement

decrement(balance, &mut PrivateContext>, amount, owner, outgoing_viewer, sender, );

Parameters

NameType
balancePrivateSet<ValueNote
&mut PrivateContext>
amountField
ownerAztecAddress
outgoing_viewerAztecAddress
senderAztecAddress

decrement_by_at_most

decrement_by_at_most(balance, &mut PrivateContext>, max_amount, owner, outgoing_viewer, sender, );

Parameters

NameType
balancePrivateSet<ValueNote
&mut PrivateContext>
max_amountField
ownerAztecAddress
outgoing_viewerAztecAddress
senderAztecAddress