[−][src]Function indyrs::payments::add_request_fees
pub fn add_request_fees(
wallet_handle: IndyHandle,
submitter_did: Option<&str>,
req_json: &str,
inputs_json: &str,
outputs_json: &str,
extra: Option<&str>
) -> Box<dyn Future<Item = (String, String), Error = IndyError>>
Modifies Indy request by adding information how to pay fees for this transaction according to selected payment method.
Payment selection is performed by looking to o
This method consumes set of UTXO inputs and outputs. The difference between inputs balance and outputs balance is the fee for this transaction.
Not that this method also produces correct fee signatures.
Format of inputs is specific for payment method. Usually it should reference payment transaction with at least one output that corresponds to payment address that user owns.
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderreq_json
- initial transaction request as jsoninputs_json
- the list of UTXO inputs as json array
Examples
inputs_json:
["input1", ...]
Notes:
- each input should reference paymentAddress
- this param will be used to determine payment_method
outputs_json: The list of UTXO outputs as json array:
[{
paymentAddress:
Returns
req_with_fees_json
- modified Indy request with added fees infopayment_method