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
Name | Type |
---|---|
amount | Field |
increment
increment(// docs, &mut PrivateContext>, amount, recipient, outgoing_viewer, // docs, );
Inserts it to the recipient's set of notes.
Parameters
Name | Type |
---|---|
// docs | start |
&mut PrivateContext> | |
amount | Field |
recipient | AztecAddress |
outgoing_viewer | AztecAddress |
// docs | end |
decrement
decrement(balance, &mut PrivateContext>, amount, owner, outgoing_viewer, sender, );
Parameters
Name | Type |
---|---|
balance | PrivateSet<ValueNote |
&mut PrivateContext> | |
amount | Field |
owner | AztecAddress |
outgoing_viewer | AztecAddress |
sender | AztecAddress |
decrement_by_at_most
decrement_by_at_most(balance, &mut PrivateContext>, max_amount, owner, outgoing_viewer, sender, );
Parameters
Name | Type |
---|---|
balance | PrivateSet<ValueNote |
&mut PrivateContext> | |
max_amount | Field |
owner | AztecAddress |
outgoing_viewer | AztecAddress |
sender | AztecAddress |