Type Alias indyAddRequestFeesCB

Source
pub type indyAddRequestFeesCB = Option<unsafe extern "C" fn(command_handle: indy_handle_t, wallet_handle: indy_handle_t, submitter_did: *const c_char, req_json: *const c_char, inputs_json: *const c_char, outputs_json: *const c_char, extra: *const c_char, cb: indy_err_str_cb) -> indy_error_t>;
Expand description

Modifies Indy request by adding information how to pay fees for this transaction according to this payment method.

This method consumes set of 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.

#Params command_handle: command handle to map callback to context wallet_handle: wallet handle submitter_did: (Optional) DID of request sender req_json: initial transaction request as json inputs_json: The list of payment sources as json array: [“source1”, …] Note that each source should reference payment address outputs_json: The list of outputs as json array: [{ recipient: , // payment address of recipient amount: , // amount }] extra: // optional information for payment operation

#Returns req_with_fees_json - modified Indy request with added fees info

Aliased Type§

pub enum indyAddRequestFeesCB {
    None,
    Some(unsafe extern "C" fn(i32, i32, *const i8, *const i8, *const i8, *const i8, *const i8, Option<unsafe extern "C" fn(i32, i32, *const i8) -> i32>) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(i32, i32, *const i8, *const i8, *const i8, *const i8, *const i8, Option<unsafe extern "C" fn(i32, i32, *const i8) -> i32>) -> i32)

Some value of type T.