INSTRUCTION stringlengths 1 8.43k | RESPONSE stringlengths 75 104k |
|---|---|
Search for credentials matching the given proof request. | async def prover_search_credentials_for_proof_req(wallet_handle: int,
proof_request_json: str,
extra_query_json: Optional[str]) -> int:
"""
Search for credentials matching the given proof request.
Instead of... |
Creates a proof according to the given proof request Either a corresponding credential with optionally revealed attributes or self - attested attribute must be provided for each requested attribute ( see indy_prover_get_credentials_for_pool_req ). A proof request may request multiple credentials from different schemas ... | async def prover_create_proof(wallet_handle: int,
proof_req_json: str,
requested_credentials_json: str,
master_secret_name: str,
schemas_json: str,
credential_defs_json: ... |
Verifies a proof ( of multiple credential ). All required schemas public keys and revocation registries must be provided. | async def verifier_verify_proof(proof_request_json: str,
proof_json: str,
schemas_json: str,
credential_defs_json: str,
rev_reg_defs_json: str,
rev_regs_json: s... |
Create revocation state for a credential in the particular time moment. | async def create_revocation_state(blob_storage_reader_handle: int,
rev_reg_def_json: str,
rev_reg_delta_json: str,
timestamp: int,
cred_rev_id: str) -> str:
"""
Create revocati... |
Signs and submits request message to validator pool. | async def sign_and_submit_request(pool_handle: int,
wallet_handle: int,
submitter_did: str,
request_json: str) -> str:
"""
Signs and submits request message to validator pool.
Adds submitter information to... |
Publishes request message to validator pool ( no signing unlike sign_and_submit_request ). The request is sent to the validator pool as is. It s assumed that it s already prepared. | async def submit_request(pool_handle: int,
request_json: str) -> str:
"""
Publishes request message to validator pool (no signing, unlike sign_and_submit_request).
The request is sent to the validator pool as is. It's assumed that it's already prepared.
:param pool_handle: pool... |
Send action to particular nodes of validator pool. The list of requests can be send: POOL_RESTART GET_VALIDATOR_INFO The request is sent to the nodes as is. It s assumed that it s already prepared. | async def submit_action(pool_handle: int,
request_json: str,
nodes: Optional[str],
timeout: Optional[int]) -> str:
"""
Send action to particular nodes of validator pool.
The list of requests can be send:
POOL_RESTART
... |
Builds a request to get a DDO. | async def build_get_ddo_request(submitter_did: Optional[str],
target_did: str) -> str:
"""
Builds a request to get a DDO.
:param submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used).
:param target_did: Id of Ide... |
Builds a NYM request. | async def build_nym_request(submitter_did: str,
target_did: str,
ver_key: Optional[str],
alias: Optional[str],
role: Optional[str]) -> str:
"""
Builds a NYM request.
:param submitter_did: DID of ... |
Builds an ATTRIB request. Request to add attribute to a NYM record. | async def build_attrib_request(submitter_did: str,
target_did: str,
xhash: Optional[str],
raw: Optional[str],
enc: Optional[str]) -> str:
"""
Builds an ATTRIB request. Request to add attri... |
Parse a GET_SCHEMA response to get Schema in the format compatible with Anoncreds API | async def parse_get_schema_response(get_schema_response: str) -> (str, str):
"""
Parse a GET_SCHEMA response to get Schema in the format compatible with Anoncreds API
:param get_schema_response: response of GET_SCHEMA request.
:return: Schema Id and Schema json.
{
id: identifier of schema... |
Builds a GET_CRED_DEF request. Request to get a credential definition ( in particular public key ) that Issuer creates for a particular Credential Schema. | async def build_get_cred_def_request(submitter_did: Optional[str],
id_: str) -> str:
"""
Builds a GET_CRED_DEF request. Request to get a credential definition (in particular, public key),
that Issuer creates for a particular Credential Schema.
:param submitter_did: (O... |
Parse a GET_CRED_DEF response to get Credential Definition in the format compatible with Anoncreds API. | async def parse_get_cred_def_response(get_cred_def_response: str) -> (str, str):
"""
Parse a GET_CRED_DEF response to get Credential Definition in the format compatible with Anoncreds API.
:param get_cred_def_response: response of GET_CRED_DEF request.
:return: Credential Definition Id and Credential D... |
Builds a GET_VALIDATOR_INFO request.: param submitter_did: Id of Identity stored in secured Wallet.: return: Request result as json. | async def build_get_validator_info_request(submitter_did: str) -> str:
"""
Builds a GET_VALIDATOR_INFO request.
:param submitter_did: Id of Identity stored in secured Wallet.
:return: Request result as json.
"""
logger = logging.getLogger(__name__)
logger.debug("build_get_validator_info_req... |
Builds a GET_TXN request. Request to get any transaction by its seq_no. | async def build_get_txn_request(submitter_did: Optional[str],
ledger_type: Optional[str],
seq_no: int) -> str:
"""
Builds a GET_TXN request. Request to get any transaction by its seq_no.
:param submitter_did: (Optional) DID of the read request... |
Builds a POOL_CONFIG request. Request to change Pool s configuration. | async def build_pool_config_request(submitter_did: str,
writes: bool,
force: bool) -> str:
"""
Builds a POOL_CONFIG request. Request to change Pool's configuration.
:param submitter_did: DID of the submitter stored in secured Wallet.
... |
Builds a POOL_RESTART request | async def build_pool_restart_request(submitter_did: str, action: str, datetime: str) -> str:
"""
Builds a POOL_RESTART request
:param submitter_did: Id of Identity that sender transaction
:param action : Action that pool has to do after received transaction.
Can be "star... |
Builds a POOL_UPGRADE request. Request to upgrade the Pool ( sent by Trustee ). It upgrades the specified Nodes ( either all nodes in the Pool or some specific ones ). | async def build_pool_upgrade_request(submitter_did: str,
name: str,
version: str,
action: str,
_sha256: str,
_timeout: Optional[int],
... |
Builds a GET_REVOC_REG_DEF request. Request to get a revocation registry definition that Issuer creates for a particular Credential Definition. | async def build_get_revoc_reg_def_request(submitter_did: Optional[str],
rev_reg_def_id: str) -> str:
"""
Builds a GET_REVOC_REG_DEF request. Request to get a revocation registry definition,
that Issuer creates for a particular Credential Definition.
:param subm... |
Parse a GET_REVOC_REG_DEF response to get Revocation Registry Definition in the format compatible with Anoncreds API. | async def parse_get_revoc_reg_def_response(get_revoc_ref_def_response: str) -> (str, str):
"""
Parse a GET_REVOC_REG_DEF response to get Revocation Registry Definition in the format compatible with Anoncreds API.
:param get_revoc_ref_def_response: response of GET_REVOC_REG_DEF request.
:return: Revocat... |
Builds a REVOC_REG_ENTRY request. Request to add the RevocReg entry containing the new accumulator value and issued/ revoked indices. This is just a delta of indices not the whole list. So it can be sent each time a new credential is issued/ revoked. | async def build_revoc_reg_entry_request(submitter_did: str,
revoc_reg_def_id: str,
rev_def_type: str,
value: str) -> str:
"""
Builds a REVOC_REG_ENTRY request. Request to add the RevocReg ent... |
Builds a GET_REVOC_REG request. Request to get the accumulated state of the Revocation Registry by ID. The state is defined by the given timestamp. | async def build_get_revoc_reg_request(submitter_did: Optional[str],
revoc_reg_def_id: str,
timestamp: int) -> str:
"""
Builds a GET_REVOC_REG request. Request to get the accumulated state of the Revocation Registry
by ID. The state ... |
Parse a GET_REVOC_REG response to get Revocation Registry in the format compatible with Anoncreds API. | async def parse_get_revoc_reg_response(get_revoc_reg_response: str) -> (str, str, int):
"""
Parse a GET_REVOC_REG response to get Revocation Registry in the format compatible with Anoncreds API.
:param get_revoc_reg_response: response of GET_REVOC_REG request.
:return: Revocation Registry Definition Id... |
Builds a GET_REVOC_REG_DELTA request. Request to get the delta of the accumulated state of the Revocation Registry. The Delta is defined by from and to timestamp fields. If from is not specified then the whole state till to will be returned. | async def build_get_revoc_reg_delta_request(submitter_did: Optional[str],
revoc_reg_def_id: str,
from_: Optional[int],
to: int) -> str:
"""
Builds a GET_REVOC_REG_DELTA request. Re... |
Parse a GET_REVOC_REG_DELTA response to get Revocation Registry Delta in the format compatible with Anoncreds API. | async def parse_get_revoc_reg_delta_response(get_revoc_reg_delta_response: str) -> (str, str, int):
"""
Parse a GET_REVOC_REG_DELTA response to get Revocation Registry Delta in the format compatible with Anoncreds API.
:param get_revoc_reg_delta_response: response of GET_REVOC_REG_DELTA request.
:retur... |
Parse transaction response to fetch metadata. The important use case for this method is validation of Node s response freshens. | async def get_response_metadata(response: str) -> str:
"""
Parse transaction response to fetch metadata.
The important use case for this method is validation of Node's response freshens.
Distributed Ledgers can reply with outdated information for consequence read request after write.
To reduce ... |
Builds a AUTH_RULE request. Request to change authentication rules for a ledger transaction. | async def build_auth_rule_request(submitter_did: str,
txn_type: str,
action: str,
field: str,
old_value: Optional[str],
new_value: Optional[str],
... |
Creates keys ( signing and encryption keys ) for a new DID ( owned by the caller of the library ). Identity s DID must be either explicitly provided or taken as the first 16 bit of verkey. Saves the Identity DID with keys in a secured Wallet so that it can be used to sign and encrypt transactions. | async def create_and_store_my_did(wallet_handle: int,
did_json: str) -> (str, str):
"""
Creates keys (signing and encryption keys) for a new
DID (owned by the caller of the library).
Identity's DID must be either explicitly provided, or taken as the first 16 bit of verk... |
Generated new keys ( signing and encryption keys ) for an existing DID ( owned by the caller of the library ). | async def replace_keys_start(wallet_handle: int,
did: str,
identity_json: str) -> str:
"""
Generated new keys (signing and encryption keys) for an existing
DID (owned by the caller of the library).
:param wallet_handle: wallet handler (created b... |
Apply temporary keys as main for an existing DID ( owned by the caller of the library ). | async def replace_keys_apply(wallet_handle: int,
did: str) -> None:
"""
Apply temporary keys as main for an existing DID (owned by the caller of the library).
:param wallet_handle: wallet handler (created by open_wallet).
:param did: The DID to resolve key.
:return: Err... |
Saves their DID for a pairwise connection in a secured Wallet so that it can be used to verify transaction. | async def store_their_did(wallet_handle: int,
identity_json: str) -> None:
"""
Saves their DID for a pairwise connection in a secured Wallet,
so that it can be used to verify transaction.
:param wallet_handle: wallet handler (created by open_wallet).
:param identity_json: ... |
Creates keys pair and stores in the wallet. | async def create_key(wallet_handle: int,
key_json: str) -> str:
"""
Creates keys pair and stores in the wallet.
:param wallet_handle: Wallet handle (created by open_wallet).
:param key_json: Key information as json. Example:
{
"seed": string, (optional) Seed that a... |
Creates keys pair and stores in the wallet. | async def set_key_metadata(wallet_handle: int,
verkey: str,
metadata: str) -> None:
"""
Creates keys pair and stores in the wallet.
:param wallet_handle: Wallet handle (created by open_wallet).
:param verkey: the key (verkey, key id) to store metada... |
Retrieves the meta information for the giving key in the wallet. | async def get_key_metadata(wallet_handle: int,
verkey: str) -> str:
"""
Retrieves the meta information for the giving key in the wallet.
:param wallet_handle: Wallet handle (created by open_wallet).
:param verkey: The key (verkey, key id) to retrieve metadata.
:return: me... |
Set/ replaces endpoint information for the given DID. | async def set_endpoint_for_did(wallet_handle: int,
did: str,
address: str,
transport_key: str) -> None:
"""
Set/replaces endpoint information for the given DID.
:param wallet_handle: Wallet handle (created by open_... |
Returns endpoint information for the given DID. | async def get_endpoint_for_did(wallet_handle: int,
pool_handle: int,
did: str) -> (str, Optional[str]):
"""
Returns endpoint information for the given DID.
:param wallet_handle: Wallet handle (created by open_wallet).
:param pool_handle: Poo... |
Saves/ replaces the meta information for the giving DID in the wallet. | async def set_did_metadata(wallet_handle: int,
did: str,
metadata: str) -> None:
"""
Saves/replaces the meta information for the giving DID in the wallet.
:param wallet_handle: Wallet handle (created by open_wallet).
:param did: the DID to store met... |
Get DID metadata and verkey stored in the wallet. | async def get_my_did_with_meta(wallet_handle: int, did: str) -> str:
"""
Get DID metadata and verkey stored in the wallet.
:param wallet_handle: wallet handler (created by open_wallet).
:param did: The DID to retrieve metadata.
:return: DID with verkey and metadata.
"""
logger = logging.ge... |
Retrieves abbreviated verkey if it is possible otherwise return full verkey. | async def abbreviate_verkey(did: str,
full_verkey: str) -> str:
"""
Retrieves abbreviated verkey if it is possible otherwise return full verkey.
:param did: The DID.
:param full_verkey: The DIDs verification key,
:return: metadata: Either abbreviated or full verkey.
""... |
Creates a credential with an offer.: param source_id: user defined id of object.: param credential_offer: JSON string representing the offer used as the basis of creation.: return: A created credential Example: offer = [ { msg_type: CLAIM_OFFER version: 0. 1 to_did: 8XFh8yBzrpJQmNyZzgoTqB from_did: 8XFh8yBzrpJQmNyZzgoT... | async def create(source_id: str, credential_offer: str):
"""
Creates a credential with an offer.
:param source_id: user defined id of object.
:param credential_offer: JSON string representing the offer used as the basis of creation.
:return: A created credential
Example:
... |
Create a credential based off of a known message id for a given connection.: param source_id: user defined id of object.: param connection: connection handle of connection to receive offer from: param msg_id: message id: return: A created credential Example: credential = await Credential. create_with_msgid ( source_id ... | async def create_with_msgid(source_id: str, connection: Connection, msg_id: str):
"""
Create a credential based off of a known message id for a given connection.
:param source_id: user defined id of object.
:param connection: connection handle of connection to receive offer from
... |
Create a credential object from a previously serialized credential object: param data: JSON data from a serialized object.: return: A created credential Example: credential = await Credential. create ( source_id offer ) data = await credential. serialize () credential2 = await Credential. deserialize ( data ) | async def deserialize(data: dict):
"""
Create a credential object from a previously serialized credential object
:param data: JSON data from a serialized object.
:return: A created credential
Example:
credential = await Credential.create(source_id, offer)
data = a... |
Retrieves all pending credential offers for a given connection.: param connection: A connection handle: return: A list of dictionary objects representing offers from a given connection. Example: credential = await Credential. create_with_msgid ( source_id connection msg_id ) offers = await credential. get_offers ( conn... | async def get_offers(connection: Connection) -> dict:
"""
Retrieves all pending credential offers for a given connection.
:param connection: A connection handle
:return: A list of dictionary objects representing offers from a given connection.
Example:
credential = await ... |
Approves the credential offer and submits a credential request. The result will be a credential stored in the prover s wallet.: param connection: connection to submit request from: param payment_handle: currently unused: return: Example: connection = await Connection. create ( source_id ) await connection. connect ( ph... | async def send_request(self, connection: Connection, payment_handle: int):
"""
Approves the credential offer and submits a credential request. The result will be a credential stored in the prover's wallet.
:param connection: connection to submit request from
:param payment_handle: curren... |
Retrieve Payment Transaction Information for this Credential. Typically this will include how much payment is requried by the issuer which needs to be provided by the prover before the issuer will issue the credential to the prover. Ideally a prover would want to know how much payment is being asked before submitting t... | async def get_payment_info(self):
"""
Retrieve Payment Transaction Information for this Credential. Typically this will include
how much payment is requried by the issuer, which needs to be provided by the prover, before the issuer will
issue the credential to the prover. Ideally a prove... |
Retirieve the payment transaction associated with this credential. This can be used to get the txn that was used to pay the issuer from the prover. This could be considered a receipt of payment from the payer to the issuer.: return: Example: txn = credential. get_payment_txn () | async def get_payment_txn(self):
"""
Retirieve the payment transaction associated with this credential. This can be used to get the txn that
was used to pay the issuer from the prover. This could be considered a receipt of payment from the payer to
the issuer.
:return:
E... |
Create a connection object represents a single endpoint and can be used for sending and receiving credentials and proofs | async def create(source_id: str):
"""
Create a connection object, represents a single endpoint and can be used for sending and receiving
credentials and proofs
:param source_id: Institution's unique ID for the connection
:return: connection object
Example:
connec... |
Create a connection object with a provided invite represents a single endpoint and can be used for sending and receiving credentials and proofs | async def create_with_details(source_id: str, invite_details: str):
"""
Create a connection object with a provided invite, represents a single endpoint and can be used for sending and receiving
credentials and proofs
Invite details are provided by the entity offering a connection and ge... |
Create the object from a previously serialized object. | async def deserialize(data: dict):
"""
Create the object from a previously serialized object.
:param data: The output of the "serialize" call
Example:
data = await connection1.serialize()
connection2 = await Connection.deserialize(data)
:return: A re-instantiated... |
Connect securely and privately to the endpoint represented by the object. | async def connect(self, options: str) -> str:
"""
Connect securely and privately to the endpoint represented by the object.
:param options: detailed connection options
Example options:
{"connection_type":"SMS","phone":"5555555555","use_public_did":true}
or:
{"con... |
Send a generic message to the connection: param msg:: param msg_type:: param msg_title:: return: | async def send_message(self, msg: str, msg_type: str, msg_title: str) -> str:
"""
Send a generic message to the connection
:param msg:
:param msg_type:
:param msg_title:
:return:
"""
if not hasattr(Connection.send_message, "cb"):
... |
Sign data using connection s pairwise key: param msg:: return: signature | async def sign_data(self, msg: bytes) -> bytes:
"""
Sign data using connection's pairwise key
:param msg:
:return: signature
"""
def transform_cb(arr_ptr: POINTER(c_uint8), arr_len: c_uint32):
return bytes(arr_ptr[:arr_len]),
if not hasattr(Connectio... |
Verification the signature of a msg: param msg:: param signature:: return: bool | async def verify_signature(self, msg: bytes, signature: bytes) -> bool:
"""
Verification the signature of a msg
:param msg:
:param signature:
:return: bool
"""
if not hasattr(Connection.verify_signature, "cb"):
self.logger.debug("vcx_connection_verify_... |
Get the invite details that were sent or can be sent to the endpoint. | async def invite_details(self, abbreviated: bool) -> dict:
"""
Get the invite details that were sent or can be sent to the endpoint.
:param abbreviated: abbreviate invite details or not
Example:
phone_number = '8019119191'
connection = await Connection.create('foobar123'... |
Create a proof for fulfilling a corresponding proof request: param source_id: Tag associated by user of sdk: param proof_request: Proof Request data sent by requestor. Example: source_id = sourceId request = { | async def create(source_id: str, proof_request: str):
"""
Create a proof for fulfilling a corresponding proof request
:param source_id: Tag associated by user of sdk
:param proof_request: Proof Request data sent by requestor.
Example:
source_id = 'sourceId'
reques... |
: param data: Data provided by the serialize method Example: msg_id = 1 phone_number = 8019119191 connection = await Connection. create ( source_id ) await connection. connect ( phone_number ) disclosed_proof = await DisclosedProof. create_with_msgid ( source_id connection msg_id ) data = await disclosed_proof. seriali... | async def deserialize(data: dict):
"""
:param data: Data provided by the serialize method
Example:
msg_id = '1'
phone_number = '8019119191'
connection = await Connection.create(source_id)
await connection.connect(phone_number)
disclosed_proof = await Discl... |
Example: msg_id = 1 phone_number = 8019119191 connection = await Connection. create ( source_id ) await connection. connect ( phone_number ) disclosed_proof = await DisclosedProof. create_with_msgid ( source_id connection msg_id ) requests = await DisclosedProof. get_requests ( connection ): param connection: Connectio... | async def get_requests(connection: Connection) -> dict:
"""
Example:
msg_id = '1'
phone_number = '8019119191'
connection = await Connection.create(source_id)
await connection.connect(phone_number)
disclosed_proof = await DisclosedProof.create_with_msgid(source_id,... |
Gets the credentials from a disclosed proof Example: msg_id = 1 phone_number = 8019119191 connection = await Connection. create ( source_id ) await connection. connect ( phone_number ) disclosed_proof = await DisclosedProof. create_with_msgid ( source_id connection msg_id ) creds = await disclosed_proof. get_creds (): ... | async def get_creds(self) -> dict:
"""
Gets the credentials from a disclosed proof
Example:
msg_id = '1'
phone_number = '8019119191'
connection = await Connection.create(source_id)
await connection.connect(phone_number)
disclosed_proof = await DisclosedPro... |
Sends the proof to the Connection Example: msg_id = 1 phone_number = 8019119191 connection = await Connection. create ( source_id ) await connection. connect ( phone_number ) disclosed_proof = await DisclosedProof. create_with_msgid ( source_id connection msg_id ) await disclosed_proof. send_proof ( connection ): param... | async def send_proof(self, connection: Connection):
"""
Sends the proof to the Connection
Example:
msg_id = '1'
phone_number = '8019119191'
connection = await Connection.create(source_id)
await connection.connect(phone_number)
disclosed_proof = await Discl... |
Generates the proof Example: msg_id = 1 phone_number = 8019119191 connection = await Connection. create ( source_id ) await connection. connect ( phone_number ) disclosed_proof = await DisclosedProof. create_with_msgid ( source_id connection msg_id ) await disclosed_proof. generate_proof ( {} {} ): param selected_creds... | async def generate_proof(self, selected_creds: dict, self_attested_attrs: dict):
"""
Generates the proof
Example:
msg_id = '1'
phone_number = '8019119191'
connection = await Connection.create(source_id)
await connection.connect(phone_number)
disclosed_proo... |
Create the payment address for specified payment method | async def create_payment_address(wallet_handle: int,
payment_method: str,
config: str) -> str:
"""
Create the payment address for specified payment method
This method generates private part of payment address
and stores it in a secur... |
Builds Indy request for getting sources list for payment address according to this payment method. | async def build_get_payment_sources_request(wallet_handle: int,
submitter_did: str,
payment_address: str) -> (str, str):
"""
Builds Indy request for getting sources list for payment address
according to this payment meth... |
Builds Indy request for doing payment according to this payment method. This method consumes set of 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. | async def build_payment_req(wallet_handle: int,
submitter_did: str,
inputs_json: str,
outputs_json: str,
extra: Optional[str]) -> (str, str):
"""
Builds Indy request for doing payment
according to... |
Builds Indy request for setting fees for transactions in the ledger | async def build_set_txn_fees_req(wallet_handle: int,
submitter_did: str,
payment_method: str,
fees_json: str) -> str:
"""
Builds Indy request for setting fees for transactions in the ledger
:param wallet_hand... |
Builds Indy request for getting fees for transactions in the ledger | async def build_get_txn_fees_req(wallet_handle: int,
submitter_did: str,
payment_method: str) -> str:
"""
Builds Indy request for getting fees for transactions in the ledger
:param wallet_handle: wallet handle (created by open_wallet).
:... |
Parses response for Indy request for getting fees | async def parse_get_txn_fees_response(payment_method: str,
resp_json: str) -> str:
"""
Parses response for Indy request for getting fees
:param payment_method: Payment method to use (for example, 'sov').
:param resp_json: response for Indy request for getting fees
... |
Builds Indy request for information to verify the payment receipt | async def build_verify_payment_req(wallet_handle: int,
submitter_did: str,
receipt: str) -> (str, str):
"""
Builds Indy request for information to verify the payment receipt
:param wallet_handle: wallet handle (created by open_wallet).
... |
Creates a new schema object that is written to the ledger | async def create(source_id: str, name: str, version: str, attrs: list, payment_handle: int):
"""
Creates a new schema object that is written to the ledger
:param source_id: Institution's unique ID for the schema
:param name: Name of schema
:param version: Version of the schema
... |
Create the object from a previously serialized object. | async def deserialize(data: dict):
"""
Create the object from a previously serialized object.
:param data: The output of the "serialize" call
Example:
source_id = 'foobar123'
name = 'Address Schema'
version = '1.0'
attrs = ['address', 'city', 'state']
... |
Create a new schema object from an existing ledger schema | async def lookup(source_id: str, schema_id: str):
"""
Create a new schema object from an existing ledger schema
:param source_id: Institution's personal identification for the schema
:param schema_id: Ledger schema ID for lookup
Example:
source_id = 'foobar123'
n... |
Get the ledger ID of the object | async def get_schema_id(self):
"""
Get the ledger ID of the object
Example:
source_id = 'foobar123'
name = 'Address Schema'
version = '1.0'
attrs = ['address', 'city', 'state']
payment_handle = 0
schema1 = await Schema.create(source_id, name, vers... |
Check if pairwise is exists. | async def is_pairwise_exists(wallet_handle: int,
their_did: str) -> bool:
"""
Check if pairwise is exists.
:param wallet_handle: wallet handler (created by open_wallet).
:param their_did: encoded Did.
:return: true - if pairwise is exists, false - otherwise
"""
... |
Get list of saved pairwise. | async def list_pairwise(wallet_handle: int) -> str:
"""
Get list of saved pairwise.
:param wallet_handle: wallet handler (created by open_wallet).
:return: pairwise_list: list of saved pairwise
"""
logger = logging.getLogger(__name__)
logger.debug("list_pairwise: >>> wallet_handle: %r", wa... |
Gets pairwise information for specific their_did. | async def get_pairwise(wallet_handle: int,
their_did: str) -> None:
"""
Gets pairwise information for specific their_did.
:param wallet_handle: wallet handler (created by open_wallet).
:param their_did: encoded Did
:return: pairwise_info_json: did info associated with their d... |
Save some data in the Wallet for pairwise associated with Did. | async def set_pairwise_metadata(wallet_handle: int,
their_did: str,
metadata: Optional[str]) -> None:
"""
Save some data in the Wallet for pairwise associated with Did.
:param wallet_handle: wallet handler (created by open_wallet).
:param ... |
set the colors for text. | def print_log(value_color="", value_noncolor=""):
"""set the colors for text."""
HEADER = '\033[92m'
ENDC = '\033[0m'
print(HEADER + value_color + ENDC + str(value_noncolor)) |
Set libindy runtime configuration. Can be optionally called to change current params. | def set_runtime_config(config: str):
"""
Set libindy runtime configuration. Can be optionally called to change current params.
:param config: {
"crypto_thread_pool_size": Optional<int> - size of thread pool for the most expensive crypto operations. (4 by default)
"collect_backtrace": Optional... |
Builds a generic proof object: param source_id: Tag associated by user of sdk: param name: Name of the Proof: param requested_attrs: Attributes associated with the Proof: param revocation_interval: interval applied to all requested attributes indicating when the claim must be valid ( NOT revoked ) Example: name = proof... | async def create(source_id: str, name: str, requested_attrs: list, revocation_interval: dict, requested_predicates: list = []):
"""
Builds a generic proof object
:param source_id: Tag associated by user of sdk
:param name: Name of the Proof
:param requested_attrs: Attributes ass... |
Builds a Proof object with defined attributes. Attributes are provided by a previous call to the serialize function.: param data: Example: name = proof name requested_attrs = [ { name: age restrictions: [ { schema_id: 6XFh8yBzrpJQmNyZzgoTqB: 2: schema_name: 0. 0. 11 schema_name: Faber Student Info schema_version: 1. 0 ... | async def deserialize(data: dict):
"""
Builds a Proof object with defined attributes.
Attributes are provided by a previous call to the serialize function.
:param data:
Example:
name = "proof name"
requested_attrs = [{"name": "age", "restrictions": [{"schema_id": ... |
Example: connection = await Connection. create ( source_id ) await connection. connect ( phone_number ) name = proof name requested_attrs = [ { name: age restrictions: [ { schema_id: 6XFh8yBzrpJQmNyZzgoTqB: 2: schema_name: 0. 0. 11 schema_name: Faber Student Info schema_version: 1. 0 schema_issuer_did: 6XFh8yBzrpJQmNyZ... | async def request_proof(self, connection: Connection):
"""
Example:
connection = await Connection.create(source_id)
await connection.connect(phone_number)
name = "proof name"
requested_attrs = [{"name": "age", "restrictions": [{"schema_id": "6XFh8yBzrpJQmNyZzgoTqB:2:schem... |
Example: connection = await Connection. create ( source_id ) await connection. connect ( phone_number ) name = proof name requested_attrs = [ { name: age restrictions: [ { schema_id: 6XFh8yBzrpJQmNyZzgoTqB: 2: schema_name: 0. 0. 11 schema_name: Faber Student Info schema_version: 1. 0 schema_issuer_did: 6XFh8yBzrpJQmNyZ... | async def get_proof(self, connection: Connection) -> list:
"""
Example:
connection = await Connection.create(source_id)
await connection.connect(phone_number)
name = "proof name"
requested_attrs = [{"name": "age", "restrictions": [{"schema_id": "6XFh8yBzrpJQmNyZzgoTqB:2:s... |
Provision an agent in the agency populate configuration and wallet for this agent. Example: import json enterprise_config = { agency_url: http:// localhost: 8080 agency_did: VsKV7grR1BUE29mG2Fm2kX agency_verkey: Hezce2UWMZ3wUhVkh2LfKSs8nDzWwzs2Win7EzNN3YaR wallet_name: LIBVCX_SDK_WALLET agent_seed: 00000000000000000000... | async def vcx_agent_provision(config: str) -> None:
"""
Provision an agent in the agency, populate configuration and wallet for this agent.
Example:
import json
enterprise_config = {
'agency_url': 'http://localhost:8080',
'agency_did': 'VsKV7grR1BUE29mG2Fm2kX',
'agency_verkey... |
Get ledger fees from the sovrin network Example: fees = await vcx_ledger_get_fees (): return: JSON representing fees | async def vcx_ledger_get_fees() -> str:
"""
Get ledger fees from the sovrin network
Example:
fees = await vcx_ledger_get_fees()
:return: JSON representing fees
"""
logger = logging.getLogger(__name__)
if not hasattr(vcx_ledger_get_fees, "cb"):
logger.debug("vcx_ledger_get_fees: ... |
Retrieve messages from the specified connection: param status:: param uids:: param pw_dids:: return: | async def vcx_messages_download(status: str = None, uids: str = None, pw_dids: str = None) -> str:
"""
Retrieve messages from the specified connection
:param status:
:param uids:
:param pw_dids:
:return:
"""
logger = logging.getLogger(__name__)
if not hasattr(vcx_messages_download, ... |
Update the status of messages from the specified connection: param msg_json:: return: | async def vcx_messages_update_status(msg_json: str):
"""
Update the status of messages from the specified connection
:param msg_json:
:return:
"""
logger = logging.getLogger(__name__)
if not hasattr(vcx_messages_update_status, "cb"):
logger.debug("vcx_messages_update_status: Creatin... |
Signs a message with a key. | async def crypto_sign(wallet_handle: int,
signer_vk: str,
msg: bytes) -> bytes:
"""
Signs a message with a key.
Note to use DID keys with this function you can call indy_key_for_did to get key id (verkey) for specific DID.
:param wallet_handle: wallet handle... |
Verify a signature with a verkey. | async def crypto_verify(signer_vk: str,
msg: bytes,
signature: bytes) -> bool:
"""
Verify a signature with a verkey.
Note to use DID keys with this function you can call indy_key_for_did to get key id (verkey) for specific DID.
:param signer_vk: verkey o... |
**** THIS FUNCTION WILL BE DEPRECATED USE pack_message INSTEAD **** | async def auth_crypt(wallet_handle: int,
sender_vk: str,
recipient_vk: str,
msg: bytes) -> bytes:
"""
**** THIS FUNCTION WILL BE DEPRECATED USE pack_message INSTEAD ****
Encrypt a message by authenticated-encryption scheme.
Sender can encr... |
**** THIS FUNCTION WILL BE DEPRECATED USE unpack_message INSTEAD **** | async def auth_decrypt(wallet_handle: int,
recipient_vk: str,
encrypted_msg: bytes) -> (str, bytes):
"""
**** THIS FUNCTION WILL BE DEPRECATED USE unpack_message INSTEAD ****
Decrypt a message by authenticated-encryption scheme.
Sender can encrypt a confid... |
Encrypts a message by anonymous - encryption scheme. | async def anon_crypt(recipient_vk: str,
msg: bytes) -> bytes:
"""
Encrypts a message by anonymous-encryption scheme.
Sealed boxes are designed to anonymously send messages to a Recipient given its public key.
Only the Recipient can decrypt these messages, using its private key.
... |
Decrypts a message by anonymous - encryption scheme. | async def anon_decrypt(wallet_handle: int,
recipient_vk: str,
encrypted_msg: bytes) -> bytes:
"""
Decrypts a message by anonymous-encryption scheme.
Sealed boxes are designed to anonymously send messages to a Recipient given its public key.
Only the Recipie... |
Packs a message by encrypting the message and serializes it in a JWE - like format ( Experimental ) | async def pack_message(wallet_handle: int,
message: str,
recipient_verkeys: list,
sender_verkey: Optional[str]) -> bytes:
"""
Packs a message by encrypting the message and serializes it in a JWE-like format (Experimental)
Note to use DID ... |
Unpacks a JWE - like formatted message outputted by pack_message ( Experimental ) | async def unpack_message(wallet_handle: int,
jwe: bytes) -> bytes:
"""
Unpacks a JWE-like formatted message outputted by pack_message (Experimental)
#Params
command_handle: command handle to map callback to user context.
wallet_handle: wallet handler (created by open_wallet... |
Initializes VCX with config file.: param config_path: String Example: await vcx_init (/ home/ username/ vcxconfig. json ): return: | async def vcx_init(config_path: str) -> None:
"""
Initializes VCX with config file.
:param config_path: String
Example:
await vcx_init('/home/username/vcxconfig.json')
:return:
"""
logger = logging.getLogger(__name__)
if not hasattr(vcx_init, "cb"):
logger.debug("vcx_init: C... |
Creates a new CredentialDef object that is written to the ledger | async def create(source_id: str, name: str, schema_id: str, payment_handle: int):
"""
Creates a new CredentialDef object that is written to the ledger
:param source_id: Institution's unique ID for the credential definition
:param name: Name of credential definition
:param schema... |
Create the object from a previously serialized object. | async def deserialize(data: dict):
"""
Create the object from a previously serialized object.
:param data: The output of the "serialize" call
Example:
source_id = 'foobar123'
schema_name = 'Schema Name'
payment_handle = 0
credential_def1 = await Credentia... |
Get the ledger ID of the object | async def get_cred_def_id(self):
"""
Get the ledger ID of the object
Example:
source_id = 'foobar123'
schema_name = 'Schema Name'
payment_handle = 0
credential_def1 = await CredentialDef.create(source_id, name, schema_id, payment_handle)
assert await cred... |
Creates a new local pool ledger configuration that can be used later to connect pool nodes. | async def create_pool_ledger_config(config_name: str,
config: Optional[str]) -> None:
"""
Creates a new local pool ledger configuration that can be used later to connect pool nodes.
:param config_name: Name of the pool ledger configuration.
:param config: (optional) ... |
Refreshes a local copy of a pool ledger and updates pool nodes connections. | async def refresh_pool_ledger(handle: int) -> None:
"""
Refreshes a local copy of a pool ledger and updates pool nodes connections.
:param handle: pool handle returned by indy_open_pool_ledger
:return: Error code
"""
logger = logging.getLogger(__name__)
logger.debug("refresh_pool_ledger: >... |
Lists names of created pool ledgers: return: Error code | async def list_pools() -> None:
"""
Lists names of created pool ledgers
:return: Error code
"""
logger = logging.getLogger(__name__)
logger.debug("list_pools: >>> ")
if not hasattr(list_pools, "cb"):
logger.debug("list_pools: Creating callback")
list_pools.cb = create_cb(CF... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.