/// Builds a AUTH_RULE request. Request to change authentication rules for a ledger transaction.
///
/// # Arguments
/// * `submitter_did` - Identifier (DID) of the transaction author as base58-encoded string.
///                Actual request sender may differ if Endorser is used (look at `append_request_endorser`)
/// * `txn_type`: ledger transaction alias or associated value for which authentication rules will be applied.
/// * `field`: type of an action for which authentication rules will be applied.
///     Can be either "ADD" (to add a new rule) or "EDIT" (to edit an existing one).
/// * `action`: transaction field for which authentication rule will be applied.
/// * `old_value`: (Optional) old value of a field, which can be changed to a new_value (mandatory for EDIT action).
/// * `new_value`:(Optional) new value that can be used to fill the field.
/// * `constraint`: set of constraints required for execution of an action in the following format:
///     {
///         constraint_id - <string> type of a constraint.
///             Can be either "ROLE" to specify final constraint or  "AND"/"OR" to combine constraints.
///         role - <string> (optional) role of a user which satisfy to constrain.
///         sig_count - <u32> the number of signatures required to execution action.
///         need_to_be_owner - <bool> (optional) if user must be an owner of transaction (false by default).
///         off_ledger_signature - <bool> (optional) allow signature of unknow for ledger did (false by default).
///         metadata - <object> (optional) additional parameters of the constraint.
///     }
/// can be combined by
///     {
///         'constraint_id': <"AND" or "OR">
///         'auth_constraints': [<constraint_1>, <constraint_2>]
///     }
///
/// # Returns
/// Request result as json.
Builds a AUTH_RULE request. Request to change authentication rules for a ledger transaction.
Builds a AUTH_RULE request . Request to change authentication rules for a ledger transaction .
pub fn build_auth_rule_request(submitter_did: &str, txn_type: &str, action: &str, field: &str,
                               old_value: Option<&str>, new_value: Option<&str>, constraint: &str) -> Box<dyn Future<Item=String, Error=IndyError>> {
    let (receiver, command_handle, cb) = ClosureHandler::cb_ec_string();
    let err = _build_auth_rule_request(command_handle, submitter_did, txn_type, action, field, old_value, new_value, constraint, cb);
    ResultHandler::str(command_handle, err, receiver)
}
pub fn build_auth_rule_request ( submitter_did : & str , txn_type : & str , action : & str , field : & str , old_value : Option < & str > , new_value : Option < & str > , constraint : & str ) -> Box < dyn Future < Item = String , Error = IndyError > > { let ( receiver , command_handle , cb ) = ClosureHandler :: cb_ec_string ( ) ; let err = _build_auth_rule_request ( command_handle , submitter_did , txn_type , action , field , old_value , new_value , constraint , cb ) ; ResultHandler :: str ( command_handle , err , receiver ) }
Builds a AUTH_RULE request.
Builds a AUTH_RULE request .
Request result as json.
Request result as json .
submitter_did
&str
txn_type
&str
action
&str
field
&str
old_value
Option<&str>
new_value
Option<&str>
constraint
&str