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);

Inserts it to the recipient's set of notes.

Parameters

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

decrement

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

Parameters

NameType
balancePrivateSet<ValueNote
&mut PrivateContext>
amountField
ownerAztecAddress
outgoing_viewerAztecAddress

decrement_by_at_most

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

Parameters

NameType
balancePrivateSet<ValueNote
&mut PrivateContext>
max_amountField
ownerAztecAddress
outgoing_viewerAztecAddress