-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Let's add an enum field to receive APIs (blind_receive and witness_receive) to allow the user to have more control over the transfer, based on the RGB amount being received.
The enum should be defined as:
/// Choice of policy to apply when receiving a transfer, based on the RGB amount
pub enum ReceiveAmount{
/// Any received amount will be accepted, regardless of the amount that has been specified in the invoice
Whatever,
/// If the received amount is different from the requested one the transfer should be refused. This value is possible only when setting an amount into the invoice
Exact,
/// If the received amount is lower than the requested one the transfer should be refused. This value is possible only when setting an amount into the invoice
AtLeast,
}As the enum documentation says, if the user specifies ReceiveAmount::Exact or ReceiveAmount::AtLeast then the optional amount field of the receive APIs should be set, otherwise an Error::NoReceiveAmount error (to be added) should be returned.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers