def vcx_set_active_txn_author_agreement_meta(text: Optional[str], version: Optional[str], hash: Optional[str], acc_mech_type: str, time_of_acceptance: int) -> None: """ Set some accepted agreement as active. As result of successful call of this function appropriate metadata will be appended to each write request. :param text and version - (optional) raw data about TAA from ledger. These parameters should be passed together. These parameters are required if hash parameter is ommited. :param hash - (optional) hash on text and version. This parameter is required if text and version parameters are ommited. :param acc_mech_type - mechanism how user has accepted the TAA :param time_of_acceptance - UTC timestamp when user has accepted the TAA :return: no value """ logger = logging.getLogger(__name__) name = 'vcx_set_active_txn_author_agreement_meta' c_text = c_char_p(json.dumps(text).encode('utf-8')) if text else None c_version = c_char_p( json.dumps(version).encode('utf-8')) if version else None c_hash = c_char_p(json.dumps(hash).encode('utf-8')) if hash else None c_acc_mech_type = c_char_p(acc_mech_type.encode('utf-8')) c_time_of_acceptance = c_uint64(time_of_acceptance) do_call_sync(name, c_text, c_version, c_hash, c_acc_mech_type, c_time_of_acceptance) logger.debug("set_active_txn_author_agreement_meta completed")
def vcx_pool_set_handle(handle: int) -> None: """ Sets the pool handle for libvcx to use, called before vcx_init_minimal :param handle: pool handle """ c_handle = c_uint32(handle) do_call_sync('vcx_pool_set_handle', c_handle)
def vcx_set_active_txn_author_agreement_meta(text: Optional[str], version: Optional[str], hash: Optional[str], acc_mech_type: str, time_of_acceptance: int) -> None: logger = logging.getLogger(__name__) name = 'vcx_set_active_txn_author_agreement_meta' c_text = c_char_p(json.dumps(text).encode('utf-8')) if text else None c_version = c_char_p(json.dumps(version).encode('utf-8')) if version else None c_hash = c_char_p(json.dumps(hash).encode('utf-8')) if hash else None c_acc_mech_type = c_char_p(acc_mech_type.encode('utf-8')) c_time_of_acceptance = c_uint64(time_of_acceptance) do_call_sync(name, c_text, c_version, c_hash, c_acc_mech_type, c_time_of_acceptance) logger.debug("set_active_txn_author_agreement_meta completed")
def vcx_set_active_txn_author_agreement_meta(text: Optional[str], version: Optional[str], hash: Optional[str], acc_mech_type: str, time_of_acceptance: int) -> None: logger = logging.getLogger(__name__) name = 'vcx_set_active_txn_author_agreement_meta' c_text = c_char_p(json.dumps(text).encode('utf-8')) if text else None c_version = c_char_p( json.dumps(version).encode('utf-8')) if version else None c_hash = c_char_p(json.dumps(hash).encode('utf-8')) if hash else None c_acc_mech_type = c_char_p(acc_mech_type.encode('utf-8')) c_time_of_acceptance = c_uint64(time_of_acceptance) do_call_sync(name, c_text, c_version, c_hash, c_acc_mech_type, c_time_of_acceptance) logger.debug("set_active_txn_author_agreement_meta completed")
def vcx_init_minimal(config_string: str) -> None: """ Initializes VCX with minimal (no-agency) config file AFTER the wallet and pool are set. :param config_string: String Example: vcx_wallet_set_handle(wallet_handle) vcx_pool_set_handle(pool_handle) await vcx_init_minimal('{"wallet_name":"wallet1",.....}') :return: """ logger = logging.getLogger(__name__) c_config_string = c_char_p(config_string.encode('utf-8')) result = do_call_sync('vcx_init_minimal', c_config_string) logger.debug("vcx_init_minimal completed") return result