Struct rust_libindy_wrapper::payments::Payment [−][src]
pub struct Payment {}
Methods
impl Payment
[src]
impl Payment
pub fn register_method(
payment_method: &str,
create_payment_address: Option<CreatePaymentAddressCB>,
add_request_fees: Option<AddRequestFeesCB>,
parse_response_with_fees: Option<ParseResponseWithFeesCB>,
build_get_payment_sources_request: Option<BuildGetPaymentSourcesRequestCB>,
parse_get_payment_sources_response: Option<ParseGetPaymentSourcesResponseCB>,
build_payment_req: Option<BuildPaymentReqCB>,
parse_payment_response: Option<ParsePaymentResponseCB>,
build_mint_req: Option<BuildMintReqCB>,
build_set_txn_fees_req: Option<BuildSetTxnFeesReqCB>,
build_get_txn_fees_req: Option<BuildGetTxnFeesReqCB>,
parse_get_txn_fees_response: Option<ParseGetTxnFeesResponseCB>,
build_verify_payment_req: Option<BuildVerifyPaymentReqCB>,
parse_verify_payment_response: Option<ParseVerifyPaymentResponseCB>
) -> Result<(), ErrorCode>
[src]
pub fn register_method(
payment_method: &str,
create_payment_address: Option<CreatePaymentAddressCB>,
add_request_fees: Option<AddRequestFeesCB>,
parse_response_with_fees: Option<ParseResponseWithFeesCB>,
build_get_payment_sources_request: Option<BuildGetPaymentSourcesRequestCB>,
parse_get_payment_sources_response: Option<ParseGetPaymentSourcesResponseCB>,
build_payment_req: Option<BuildPaymentReqCB>,
parse_payment_response: Option<ParsePaymentResponseCB>,
build_mint_req: Option<BuildMintReqCB>,
build_set_txn_fees_req: Option<BuildSetTxnFeesReqCB>,
build_get_txn_fees_req: Option<BuildGetTxnFeesReqCB>,
parse_get_txn_fees_response: Option<ParseGetTxnFeesResponseCB>,
build_verify_payment_req: Option<BuildVerifyPaymentReqCB>,
parse_verify_payment_response: Option<ParseVerifyPaymentResponseCB>
) -> Result<(), ErrorCode>
pub fn register_method_timeout(
payment_method: &str,
create_payment_address: Option<CreatePaymentAddressCB>,
add_request_fees: Option<AddRequestFeesCB>,
parse_response_with_fees: Option<ParseResponseWithFeesCB>,
build_get_payment_sources_request: Option<BuildGetPaymentSourcesRequestCB>,
parse_get_payment_sources_response: Option<ParseGetPaymentSourcesResponseCB>,
build_payment_req: Option<BuildPaymentReqCB>,
parse_payment_response: Option<ParsePaymentResponseCB>,
build_mint_req: Option<BuildMintReqCB>,
build_set_txn_fees_req: Option<BuildSetTxnFeesReqCB>,
build_get_txn_fees_req: Option<BuildGetTxnFeesReqCB>,
parse_get_txn_fees_response: Option<ParseGetTxnFeesResponseCB>,
build_verify_payment_req: Option<BuildVerifyPaymentReqCB>,
parse_verify_payment_response: Option<ParseVerifyPaymentResponseCB>,
timeout: Duration
) -> Result<(), ErrorCode>
[src]
pub fn register_method_timeout(
payment_method: &str,
create_payment_address: Option<CreatePaymentAddressCB>,
add_request_fees: Option<AddRequestFeesCB>,
parse_response_with_fees: Option<ParseResponseWithFeesCB>,
build_get_payment_sources_request: Option<BuildGetPaymentSourcesRequestCB>,
parse_get_payment_sources_response: Option<ParseGetPaymentSourcesResponseCB>,
build_payment_req: Option<BuildPaymentReqCB>,
parse_payment_response: Option<ParsePaymentResponseCB>,
build_mint_req: Option<BuildMintReqCB>,
build_set_txn_fees_req: Option<BuildSetTxnFeesReqCB>,
build_get_txn_fees_req: Option<BuildGetTxnFeesReqCB>,
parse_get_txn_fees_response: Option<ParseGetTxnFeesResponseCB>,
build_verify_payment_req: Option<BuildVerifyPaymentReqCB>,
parse_verify_payment_response: Option<ParseVerifyPaymentResponseCB>,
timeout: Duration
) -> Result<(), ErrorCode>
timeout
- the maximum time this function waits for a response
pub fn register_method_async<F: 'static>(
payment_method: &str,
create_payment_address: Option<CreatePaymentAddressCB>,
add_request_fees: Option<AddRequestFeesCB>,
parse_response_with_fees: Option<ParseResponseWithFeesCB>,
build_get_payment_sources_request: Option<BuildGetPaymentSourcesRequestCB>,
parse_get_payment_sources_response: Option<ParseGetPaymentSourcesResponseCB>,
build_payment_req: Option<BuildPaymentReqCB>,
parse_payment_response: Option<ParsePaymentResponseCB>,
build_mint_req: Option<BuildMintReqCB>,
build_set_txn_fees_req: Option<BuildSetTxnFeesReqCB>,
build_get_txn_fees_req: Option<BuildGetTxnFeesReqCB>,
parse_get_txn_fees_response: Option<ParseGetTxnFeesResponseCB>,
build_verify_payment_req: Option<BuildVerifyPaymentReqCB>,
parse_verify_payment_response: Option<ParseVerifyPaymentResponseCB>,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode) + Send,
[src]
pub fn register_method_async<F: 'static>(
payment_method: &str,
create_payment_address: Option<CreatePaymentAddressCB>,
add_request_fees: Option<AddRequestFeesCB>,
parse_response_with_fees: Option<ParseResponseWithFeesCB>,
build_get_payment_sources_request: Option<BuildGetPaymentSourcesRequestCB>,
parse_get_payment_sources_response: Option<ParseGetPaymentSourcesResponseCB>,
build_payment_req: Option<BuildPaymentReqCB>,
parse_payment_response: Option<ParsePaymentResponseCB>,
build_mint_req: Option<BuildMintReqCB>,
build_set_txn_fees_req: Option<BuildSetTxnFeesReqCB>,
build_get_txn_fees_req: Option<BuildGetTxnFeesReqCB>,
parse_get_txn_fees_response: Option<ParseGetTxnFeesResponseCB>,
build_verify_payment_req: Option<BuildVerifyPaymentReqCB>,
parse_verify_payment_response: Option<ParseVerifyPaymentResponseCB>,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode) + Send,
closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn create_payment_address(
wallet_handle: IndyHandle,
payment_method: &str,
config: &str
) -> Result<String, ErrorCode>
[src]
pub fn create_payment_address(
wallet_handle: IndyHandle,
payment_method: &str,
config: &str
) -> Result<String, ErrorCode>
Create the payment address for specified payment method
This method generates private part of payment address and stores it in a secure place. Ideally it should be secret in libindy wallet (see crypto module).
Note that payment method should be able to resolve this secret by fully resolvable payment address format.
Arguments
wallet_handle
- wallet handle where to save new addresspayment_method
- payment method to use (for example, 'sov')config
- payment address config as json
Example
config
{
seed:
Returns
payment_address
- public identifier of payment address in fully resolvable payment address format
pub fn create_payment_address_timeout(
wallet_handle: IndyHandle,
payment_method: &str,
config: &str,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn create_payment_address_timeout(
wallet_handle: IndyHandle,
payment_method: &str,
config: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Create the payment address for specified payment method
This method generates private part of payment address and stores it in a secure place. Ideally it should be secret in libindy wallet (see crypto module).
Note that payment method should be able to resolve this secret by fully resolvable payment address format.
Arguments
wallet_handle
- wallet handle where to save new addresspayment_method
- payment method to use (for example, 'sov')config
- payment address config as jsontimeout
- the maximum time this function waits for a response
Example
config
{
seed:
Returns
payment_address
- public identifier of payment address in fully resolvable payment address format
pub fn create_payment_address_async<F: 'static>(
wallet_handle: IndyHandle,
payment_method: &str,
config: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn create_payment_address_async<F: 'static>(
wallet_handle: IndyHandle,
payment_method: &str,
config: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
Create the payment address for specified payment method
This method generates private part of payment address and stores it in a secure place. Ideally it should be secret in libindy wallet (see crypto module).
Note that payment method should be able to resolve this secret by fully resolvable payment address format.
Arguments
wallet_handle
- wallet handle where to save new addresspayment_method
- payment method to use (for example, 'sov')config
- payment address config as jsonclosure
- the closure that is called when finished
Example
config
{
seed:
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn list_payment_addresses(
wallet_handle: IndyHandle
) -> Result<String, ErrorCode>
[src]
pub fn list_payment_addresses(
wallet_handle: IndyHandle
) -> Result<String, ErrorCode>
Lists all payment addresses that are stored in the wallet
Arguments
wallet_handle
- wallet to search for payment_addresses
Returns
payment_addresses_json
- json array of string with json addresses
pub fn list_payment_addresses_timeout(
wallet_handle: IndyHandle,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn list_payment_addresses_timeout(
wallet_handle: IndyHandle,
timeout: Duration
) -> Result<String, ErrorCode>
Lists all payment addresses that are stored in the wallet
Arguments
wallet_handle
- wallet to search for payment_addressestimeout
- the maximum time this function waits for a response
Returns
payment_addresses_json
- json array of string with json addresses
pub fn list_payment_addresses_async<F: 'static>(
wallet_handle: IndyHandle,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn list_payment_addresses_async<F: 'static>(
wallet_handle: IndyHandle,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
Lists all payment addresses that are stored in the wallet
Arguments
wallet_handle
- wallet to search for payment_addressesclosure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn add_request_fees(
wallet_handle: IndyHandle,
submitter_did: &str,
req_json: &str,
inputs_json: &str,
outputs_json: &str,
extra: Option<&str>
) -> Result<(String, String), ErrorCode>
[src]
pub fn add_request_fees(
wallet_handle: IndyHandle,
submitter_did: &str,
req_json: &str,
inputs_json: &str,
outputs_json: &str,
extra: Option<&str>
) -> Result<(String, String), ErrorCode>
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
pub fn add_request_fees_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
req_json: &str,
inputs_json: &str,
outputs_json: &str,
extra: Option<&str>,
timeout: Duration
) -> Result<(String, String), ErrorCode>
[src]
pub fn add_request_fees_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
req_json: &str,
inputs_json: &str,
outputs_json: &str,
extra: Option<&str>,
timeout: Duration
) -> Result<(String, String), ErrorCode>
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 arraytimeout
- the maximum time this function waits for a response
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
pub fn add_request_fees_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
req_json: &str,
inputs_json: &str,
outputs_json: &str,
extra: Option<&str>,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
[src]
pub fn add_request_fees_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
req_json: &str,
inputs_json: &str,
outputs_json: &str,
extra: Option<&str>,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
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 arrayclosure
- the closure that is called when finished
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
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn parse_response_with_fees(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
[src]
pub fn parse_response_with_fees(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
Parses response for Indy request with fees.
Arguments
payment_method
resp_json
: response for Indy request with fees Note: this param will be used to determine payment_method
Returns
utxo_json
- parsed (payment method and node version agnostic) utxo info as json
Example
utxo_json
[{
input:
pub fn parse_response_with_fees_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn parse_response_with_fees_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Parses response for Indy request with fees.
Arguments
payment_method
resp_json
: response for Indy request with feestimeout
- the maximum time this function waits for a response Note: this param will be used to determine payment_method
Returns
utxo_json
- parsed (payment method and node version agnostic) utxo info as json
Example
utxo_json
[{
input:
pub fn parse_response_with_fees_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn parse_response_with_fees_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
Parses response for Indy request with fees.
Arguments
payment_method
resp_json
: response for Indy request with feesclosure
- the closure that is called when finished Note: this param will be used to determine payment_method
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn build_get_payment_sources_request(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_address: &str
) -> Result<(String, String), ErrorCode>
[src]
pub fn build_get_payment_sources_request(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_address: &str
) -> Result<(String, String), ErrorCode>
Builds Indy request for getting UTXO list for payment address according to this payment method.
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_address
-: target payment address
Returns
get_utxo_txn_json
- Indy request for getting UTXO list for payment addresspayment_method
pub fn build_get_payment_sources_request_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_address: &str,
timeout: Duration
) -> Result<(String, String), ErrorCode>
[src]
pub fn build_get_payment_sources_request_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_address: &str,
timeout: Duration
) -> Result<(String, String), ErrorCode>
Builds Indy request for getting UTXO list for payment address according to this payment method.
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_address
-: target payment addresstimeout
- the maximum time this function waits for a response
Returns
get_utxo_txn_json
- Indy request for getting UTXO list for payment addresspayment_method
pub fn build_get_payment_sources_request_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_address: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
[src]
pub fn build_get_payment_sources_request_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_address: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
Builds Indy request for getting UTXO list for payment address according to this payment method.
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_address
-: target payment addressclosure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn parse_get_payment_sources_response(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
[src]
pub fn parse_get_payment_sources_response(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
Parses response for Indy request for getting UTXO list.
Arguments
payment_method
resp_json
- response for Indy request for getting UTXO list Note: this param will be used to determine payment_method
Returns
utxo_json
- parsed (payment method and node version agnostic) utxo info as json:
Examples:
[{
input:
pub fn parse_get_payment_sources_response_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn parse_get_payment_sources_response_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Parses response for Indy request for getting UTXO list.
Arguments
payment_method
resp_json
- response for Indy request for getting UTXO listtimeout
- the maximum time this function waits for a response Note: this param will be used to determine payment_method
Returns
utxo_json
- parsed (payment method and node version agnostic) utxo info as json:
Examples:
[{
input:
pub fn parse_get_payment_sources_response_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn parse_get_payment_sources_response_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
Parses response for Indy request for getting UTXO list.
Arguments
payment_method
resp_json
- response for Indy request for getting UTXO listclosure
- the closure that is called when finished Note: this param will be used to determine payment_method
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn build_payment_req(
wallet_handle: IndyHandle,
submitter_did: &str,
inputs: &str,
outputs: &str,
extra: Option<&str>
) -> Result<(String, String), ErrorCode>
[src]
pub fn build_payment_req(
wallet_handle: IndyHandle,
submitter_did: &str,
inputs: &str,
outputs: &str,
extra: Option<&str>
) -> Result<(String, String), ErrorCode>
Builds Indy request for doing tokens payment according to this payment method.
This method consumes set of UTXO inputs and outputs.
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 senderinputs_json
- The list of UTXO inputs as json array: ["input1", ...] Note that each input should reference paymentAddressoutputs_json
- The list of UTXO outputs as json array: [{ paymentAddress:, // payment address used as output amount: , // amount of tokens to transfer to this payment address extra: , // optional data }]
Returns
payment_req_json
- Indy request for doing tokens paymentpayment_method
pub fn build_payment_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
inputs: &str,
outputs: &str,
extra: Option<&str>,
timeout: Duration
) -> Result<(String, String), ErrorCode>
[src]
pub fn build_payment_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
inputs: &str,
outputs: &str,
extra: Option<&str>,
timeout: Duration
) -> Result<(String, String), ErrorCode>
Builds Indy request for doing tokens payment according to this payment method.
This method consumes set of UTXO inputs and outputs.
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 senderinputs_json
- The list of UTXO inputs as json array: ["input1", ...] Note that each input should reference paymentAddressoutputs_json
- The list of UTXO outputs as json array: [{ paymentAddress:, // payment address used as output amount: , // amount of tokens to transfer to this payment address extra: , // optional data }] timeout
- the maximum time this function waits for a response
Returns
payment_req_json
- Indy request for doing tokens paymentpayment_method
pub fn build_payment_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
inputs: &str,
outputs: &str,
extra: Option<&str>,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
[src]
pub fn build_payment_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
inputs: &str,
outputs: &str,
extra: Option<&str>,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
Builds Indy request for doing tokens payment according to this payment method.
This method consumes set of UTXO inputs and outputs.
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 senderinputs_json
- The list of UTXO inputs as json array: ["input1", ...] Note that each input should reference paymentAddressoutputs_json
- The list of UTXO outputs as json array: [{ paymentAddress:, // payment address used as output amount: , // amount of tokens to transfer to this payment address extra: , // optional data }] closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn parse_payment_response(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
[src]
pub fn parse_payment_response(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
Parses response for Indy request for payment txn.
Arguments
command_handle
payment_method
resp_json
- response for Indy request for payment txn Note: this param will be used to determine payment_method
Returns
utxo_json
- parsed (payment method and node version agnostic) utxo info as jso-n [{ input:, // UTXO input amount: , // amount of tokens in this input extra: , // optional data from payment transaction }]
pub fn parse_payment_response_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn parse_payment_response_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Parses response for Indy request for payment txn.
Arguments
command_handle
payment_method
resp_json
- response for Indy request for payment txntimeout
- the maximum time this function waits for a response Note: this param will be used to determine payment_method
Returns
utxo_json
- parsed (payment method and node version agnostic) utxo info as jso-n [{ input:, // UTXO input amount: , // amount of tokens in this input extra: , // optional data from payment transaction }]
pub fn parse_payment_response_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn parse_payment_response_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
Parses response for Indy request for payment txn.
Arguments
command_handle
payment_method
resp_json
- response for Indy request for payment txnclosure
- the closure that is called when finished Note: this param will be used to determine payment_method
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn build_mint_req(
wallet_handle: IndyHandle,
submitter_did: &str,
outputs_json: &str,
extra: Option<&str>
) -> Result<(String, String), ErrorCode>
[src]
pub fn build_mint_req(
wallet_handle: IndyHandle,
submitter_did: &str,
outputs_json: &str,
extra: Option<&str>
) -> Result<(String, String), ErrorCode>
Builds Indy request for doing tokens minting according to this payment method.
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderoutputs_json
- The list of UTXO outputs as json array: [{ paymentAddress:, // payment address used as output amount: , // amount of tokens to transfer to this payment address extra: , // optional data }]
Returns
mint_req_json
- Indy request for doing tokens mintingpayment_method
pub fn build_mint_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
outputs_json: &str,
extra: Option<&str>,
timeout: Duration
) -> Result<(String, String), ErrorCode>
[src]
pub fn build_mint_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
outputs_json: &str,
extra: Option<&str>,
timeout: Duration
) -> Result<(String, String), ErrorCode>
Builds Indy request for doing tokens minting according to this payment method.
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderoutputs_json
- The list of UTXO outputs as json array: [{ paymentAddress:, // payment address used as output amount: , // amount of tokens to transfer to this payment address extra: , // optional data }] timeout
- the maximum time this function waits for a response
Returns
mint_req_json
- Indy request for doing tokens mintingpayment_method
pub fn build_mint_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
outputs_json: &str,
extra: Option<&str>,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
[src]
pub fn build_mint_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
outputs_json: &str,
extra: Option<&str>,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
Builds Indy request for doing tokens minting according to this payment method.
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderoutputs_json
- The list of UTXO outputs as json array: [{ paymentAddress:, // payment address used as output amount: , // amount of tokens to transfer to this payment address extra: , // optional data }] closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn build_set_txn_fees_req(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
fees_json: &str
) -> Result<String, ErrorCode>
[src]
pub fn build_set_txn_fees_req(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
fees_json: &str
) -> Result<String, ErrorCode>
Builds Indy request for setting fees for transactions in the ledger
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_method
fees_json
- { txnType1: amount1, txnType2: amount2, ................. txnTypeN: amountN, }
Returns
set_txn_fees_json
- Indy request for setting fees for transactions in the ledger
pub fn build_set_txn_fees_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
fees_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn build_set_txn_fees_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
fees_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Builds Indy request for setting fees for transactions in the ledger
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_method
fees_json
- { txnType1: amount1, txnType2: amount2, ................. txnTypeN: amountN, }timeout
- the maximum time this function waits for a response
Returns
set_txn_fees_json
- Indy request for setting fees for transactions in the ledger
pub fn build_set_txn_fees_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
fees_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn build_set_txn_fees_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
fees_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
Builds Indy request for setting fees for transactions in the ledger
Arguments
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_method
fees_json
- { txnType1: amount1, txnType2: amount2, ................. txnTypeN: amountN, }closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn build_get_txn_fees_req(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str
) -> Result<String, ErrorCode>
[src]
pub fn build_get_txn_fees_req(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str
) -> Result<String, ErrorCode>
Builds Indy get request for getting fees for transactions in the ledger
Arguments
command_handle
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_method
Returns
get_txn_fees_json
- Indy request for getting fees for transactions in the ledger
pub fn build_get_txn_fees_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn build_get_txn_fees_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Builds Indy get request for getting fees for transactions in the ledger
Arguments
command_handle
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_method
timeout
- the maximum time this function waits for a response
Returns
get_txn_fees_json
- Indy request for getting fees for transactions in the ledger
pub fn build_get_txn_fees_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn build_get_txn_fees_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
payment_method: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
Builds Indy get request for getting fees for transactions in the ledger
Arguments
command_handle
wallet_handle
- wallet handlesubmitter_did
- DID of request senderpayment_method
closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn parse_get_txn_fees_response(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
[src]
pub fn parse_get_txn_fees_response(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
Parses response for Indy request for getting fees
Arguments
command_handle
payment_method
resp_json
- response for Indy request for getting fees
Returns
fees_json
{ txnType1: amount1, txnType2: amount2, ................. txnTypeN: amountN, }
pub fn parse_get_txn_fees_response_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn parse_get_txn_fees_response_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Parses response for Indy request for getting fees
Arguments
command_handle
payment_method
resp_json
- response for Indy request for getting feestimeout
- the maximum time this function waits for a response
Returns
fees_json
{ txnType1: amount1, txnType2: amount2, ................. txnTypeN: amountN, }
pub fn parse_get_txn_fees_response_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn parse_get_txn_fees_response_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
Parses response for Indy request for getting fees
Arguments
command_handle
payment_method
resp_json
- response for Indy request for getting feesclosure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn build_verify_req(
wallet_handle: IndyHandle,
submitter_did: &str,
receipt: &str
) -> Result<(String, String), ErrorCode>
[src]
pub fn build_verify_req(
wallet_handle: IndyHandle,
submitter_did: &str,
receipt: &str
) -> Result<(String, String), ErrorCode>
pub fn build_verify_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
receipt: &str,
timeout: Duration
) -> Result<(String, String), ErrorCode>
[src]
pub fn build_verify_req_timeout(
wallet_handle: IndyHandle,
submitter_did: &str,
receipt: &str,
timeout: Duration
) -> Result<(String, String), ErrorCode>
timeout
- the maximum time this function waits for a response
pub fn build_verify_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
receipt: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
[src]
pub fn build_verify_req_async<F: 'static>(
wallet_handle: IndyHandle,
submitter_did: &str,
receipt: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String, String) + Send,
closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
pub fn parse_verify_response(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
[src]
pub fn parse_verify_response(
payment_method: &str,
resp_json: &str
) -> Result<String, ErrorCode>
pub fn parse_verify_response_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
[src]
pub fn parse_verify_response_timeout(
payment_method: &str,
resp_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
timeout
- the maximum time this function waits for a response
pub fn parse_verify_response_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
[src]
pub fn parse_verify_response_async<F: 'static>(
payment_method: &str,
resp_json: &str,
closure: F
) -> ErrorCode where
F: FnMut(ErrorCode, String) + Send,
closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result