Function indyrs::payments::get_request_info[][src]

pub fn get_request_info(
    get_auth_rule_resp_json: &str,
    requester_info_json: &str,
    fees_json: &str
) -> Box<dyn Future<Item = String, Error = IndyError>>

Gets request requirements (with minimal price) correspondent to specific auth rule in case the requester can perform this action.

EXPERIMENTAL

If the requester does not match to the request constraints TransactionNotAllowed error will be thrown.

Arguments

  • get_auth_rule_response_json: response on GET_AUTH_RULE request returning action constraints set on the ledger.
  • requester_info_json: { "role": string (optional) - role of a user which can sign a transaction. "sig_count": u64 - number of signers. "is_owner": bool (optional) - if user is an owner of transaction (false by default). "is_off_ledger_signature": bool (optional) - if user did is unknow for ledger (false by default). }
  • fees_json: fees set on the ledger (result of parse_get_txn_fees_response).

Returns

  • request_info_json: request info if a requester match to the action auth rule. { "price": u64 - tokens amount required for action performing, "requirements": [{ "role": string (optional) - role of users who should sign, "sig_count": string - count of signers, "need_to_be_owner": bool - if requester need to be owner, "off_ledger_signature": bool - allow signature of unknow for ledger did (false by default). }] }