text
stringlengths
81
112k
Creates IssuerCredential object from a dict. :param data: dict representing a serialized IssuerCredential Object :return: IssuerCredential object Example: source_id = '1' cred_def_id = 'cred_def_id1' attrs = {'key': 'value', 'key2': 'value2', 'key...
Sends an offer to a prover. Once accepted, a request will be recieved. :param connection: vcx.api.connection.Connection :return: None Example: source_id = '1' cred_def_id = 'cred_def_id1' attrs = {'key': 'value', 'key2': 'value2', 'key3': 'value3'} name = 'Crede...
Revokes a credential. :return: None Example: credential.revoke_credential() async def revoke_credential(self): """ Revokes a credential. :return: None Example: credential.revoke_credential() """ if not hasattr(IssuerCredent...
Creates a new secure wallet with the given unique name. :param config: Wallet configuration json. { "id": string, Identifier of the wallet. Configured storage uses this identifier to lookup exact wallet data placement. "storage_type": optional<string>, Type of the wallet storage. De...
Closes opened wallet and frees allocated resources. :param handle: wallet handle returned by indy_open_wallet. :return: Error code async def close_wallet(handle: int) -> None: """ Closes opened wallet and frees allocated resources. :param handle: wallet handle returned by indy_open_wallet. :r...
Exports opened wallet to the file. :param handle: wallet handle returned by indy_open_wallet. :param export_config_json: JSON containing settings for input operation. { "path": path of the file that contains exported wallet content "key": string, Key or passphrase used for wallet exp...
Creates a new secure wallet with the given unique name and then imports its content according to fields provided in import_config This can be seen as an indy_create_wallet call with additional content import :param config: Wallet configuration json. { "id": string, Identifier of the wallet. ...
Generate wallet master key. Returned key is compatible with "RAW" key derivation method. It allows to avoid expensive key derivation for use cases when wallet keys can be stored in a secure enclave. :param config: (optional) key configuration json. { "seed": string, (optional) Seed that allows...
Create credential schema entity that describes credential attributes list and allows credentials interoperability. Schema is public and intended to be shared with all anoncreds workflow actors usually by publishing SCHEMA transaction to Indy distributed ledger. It is IMPORTANT for current version POST...
Create credential definition entity that encapsulates credentials issuer DID, credential schema, secrets used for signing credentials and secrets used for credentials revocation. Credential definition entity contains private and public parts. Private part will be stored in the wallet. Public part will be r...
Create a new revocation registry for the given credential definition as tuple of entities: - Revocation registry definition that encapsulates credentials definition reference, revocation type specific configuration and secrets used for credentials revocation - Revocation registry state that stores the inf...
Create credential offer that will be used by Prover for credential request creation. Offer includes nonce and key correctness proof for authentication between protocol steps and integrity checking. :param wallet_handle: wallet handler (created by open_wallet). :param cred_def_id: id of credential defin...
Check Cred Request for the given Cred Offer and issue Credential for the given Cred Request. Cred Request must match Cred Offer. The credential definition and revocation registry definition referenced in Cred Offer and Cred Request must be already created and stored into the wallet. Information for this c...
Revoke a credential identified by a cred_revoc_id (returned by issuer_create_credential). The corresponding credential definition and revocation registry must be already created an stored into the wallet. This call returns revoc registry delta as json file intended to be shared as REVOC_REG_ENTRY transact...
Merge two revocation registry deltas (returned by issuer_create_credential or issuer_revoke_credential) to accumulate common delta. Send common delta to ledger to reduce the load. :param rev_reg_delta_json: revocation registry delta json :param other_rev_reg_delta_json: revocation registry delta for which ...
Creates a master secret with a given name and stores it in the wallet. The name must be unique. :param wallet_handle: wallet handler (created by open_wallet). :param master_secret_name: (optional, if not present random one will be generated) new master id :return: id of generated master secret. async ...
Creates a clam request for the given credential offer. The method creates a blinded master secret for a master secret identified by a provided name. The master secret identified by the name must be already stored in the secure wallet (see prover_create_master_secret) The blinded master secret is a part of ...
Check credential provided by Issuer for the given credential request, updates the credential by a master secret and stores in a secure wallet. To support efficient search the following tags will be created for stored credential: { "schema_id": <credential schema id>, "schema...
Gets human readable credential by the given id. :param wallet_handle: wallet handler (created by open_wallet). :param cred_id: Identifier by which requested credential is stored in the wallet :return: credential json { "referent": string, // cred_id in the wallet "attrs": {"key1":"r...
Gets human readable credentials according to the filter. If filter is NULL, then all credentials are returned. Credentials can be filtered by tags created during saving of credential. NOTE: This method is deprecated because immediately returns all fetched credentials. Use <prover_search_credentials> to...
Search for credentials stored in wallet. Credentials can be filtered by tags created during saving of credential. Instead of immediately returning of fetched credentials this call returns search_handle that can be used later to fetch records by small batches (with prover_credentials_search_fetch_records). ...
Fetch next credentials for search. :param search_handle: Search handle (created by prover_open_credentials_search) :param count: Count of records to fetch :return: credentials_json: List of credentials: [{ "referent": string, // cred_id in the wallet "attrs": {"key1":"raw_value1", "key2...
Close credentials search (make search handle invalid) :param search_handle: Search handle (created by prover_open_credentials_search) :return: None async def prover_close_credentials_search(search_handle: int) -> None: """ Close credentials search (make search handle invalid) :param search_handle...
Gets human readable credentials matching the given proof request. NOTE: This method is deprecated because immediately returns all fetched credentials. Use <prover_search_credentials_for_proof_req> to fetch records by small batches. :param wallet_handle: wallet handler (created by open_wallet). :param ...
Search for credentials matching the given proof request. Instead of immediately returning of fetched credentials this call returns search_handle that can be used later to fetch records by small batches (with prover_fetch_credentials_for_proof_req). :param wallet_handle: wallet handler (created by open_wal...
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 ...
Verifies a proof (of multiple credential). All required schemas, public keys and revocation registries must be provided. :param proof_request_json: { "name": string, "version": string, "nonce": string, "requested_attributes": { // set of requested a...
Create revocation state for a credential in the particular time moment. :param blob_storage_reader_handle: configuration of blob storage reader handle that will allow to read revocation tails :param rev_reg_def_json: revocation registry definition json :param rev_reg_delta_json: revocation registry definit...
Signs and submits request message to validator pool. Adds submitter information to passed request json, signs it with submitter sign key (see wallet_sign), and sends signed request message to validator pool (see write_request). :param pool_handle: pool handle (created by open_pool_ledger). :param ...
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 handle (created by open_pool_ledger). :param request_json: Request data json. :return: Request res...
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. :param pool_handle: pool handle (created by open_pool_ledger). :param request_js...
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 Identity stored in secured Wallet. :return: Request result as json. async def build_get_ddo_request(submitter_did: Optional[str],...
Builds a NYM request. :param submitter_did: DID of the submitter stored in secured Wallet. :param target_did: Target DID as base58-encoded string for 16 or 32 bit DID value. :param ver_key: Target identity verification key as base58-encoded string. :param alias: NYM's alias. :param role: Role of a ...
Builds an ATTRIB request. Request to add attribute to a NYM record. :param submitter_did: DID of the submitter stored in secured Wallet. :param target_did: Target DID as base58-encoded string for 16 or 32 bit DID value. :param xhash: (Optional) Hash of attribute data. :param raw: (Optional) Json, where...
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 attrNames: array of attribute name strings name: Schema's name string ...
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: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). :param id_: Credential Definitio...
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 Definition json. { id: string - identifier of credential definition ...
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...
Builds a GET_TXN request. Request to get any transaction by its seq_no. :param submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). :param ledger_type: (Optional) type of the ledger the requested transaction belongs to: DOMAIN - used default,...
Builds a POOL_CONFIG request. Request to change Pool's configuration. :param submitter_did: DID of the submitter stored in secured Wallet. :param writes: Whether any write requests can be processed by the pool (if false, then pool goes to read-only state). True by default. :param force: ...
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 "start" or "cancel" :param datetime : Time when pool must be restarted. async def build_pool_re...
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). :param submitter_did: DID of the submitter stored in secured Wallet. :param name: Human-readable name for the upgrade. :param version: The...
Builds a GET_REVOC_REG_DEF request. Request to get a revocation registry definition, that Issuer creates for a particular Credential Definition. :param submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). :param rev_reg_def_id: ID of Revocation R...
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: Revocation Registry Definition Id and Revocation Registry Definition json. { "id": string - ID...
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. :param submitter_did: DID of the submitter stored in se...
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. :param submitter_did: (Optional) DID of the read request sender (if not provided then default Libindy DID will be used). :param revoc_reg_def_id: ID of the co...
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, Revocation Registry json and Timestamp. { "value": Registry-specific data { ...
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. :param submitter_did: (Optional) DID of the read request sender ...
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. :return: Revocation Registry Definition Id, Revocation Registry Delta json and Timestamp. { "value": R...
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 pool load libindy sends read requests to one random node in the pool...
Builds a AUTH_RULE request. Request to change authentication rules for a ledger transaction. :param submitter_did: DID of the submitter stored in secured Wallet. :param txn_type: ledger transaction alias or associated value. :param action: type of an action. Can be either "ADD" (to add a new rule) o...
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. :p...
Generated new keys (signing and encryption keys) for an existing DID (owned by the caller of the library). :param wallet_handle: wallet handler (created by open_wallet). :param did: signing DID :param identity_json: Identity information as json. Example: { "seed": string, (optional) Se...
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: Error code async def replace_keys_apply(wallet_handle: int, did: 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: Identity information as json. Example: { "did": string, (required) "verkey": string...
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 allows deterministic key creation (if not set random one will be created). ...
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 metadata. :param metadata: the meta information that will be store with the key. :return: Error code async def set_key_metadata(wallet_handle: int,...
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: metadata: The meta information stored with the key; Can be null if no metadata was saved for this key. async...
Set/replaces endpoint information for the given DID. :param wallet_handle: Wallet handle (created by open_wallet). :param did: The DID to resolve endpoint. :param address: The DIDs endpoint address. :param transport_key: The DIDs transport key (ver key, key id). :return: Error code async def set_e...
Returns endpoint information for the given DID. :param wallet_handle: Wallet handle (created by open_wallet). :param pool_handle: Pool handle (created by open_pool). :param did: The DID to resolve endpoint. :return: (endpoint, transport_vk) async def get_endpoint_for_did(wallet_handle: int, ...
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 metadata. :param metadata: the meta information that will be store with the DID. :return: Error code async def set_did_metadata(wallet_handle...
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. async def get_my_did_with_meta(wallet_handle: int, did: str) -> str: """ Get DID metadata and verkey sto...
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. async def abbreviate_verkey(did: str, full_verkey: str) -> str: """ Retri...
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"...
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 = ...
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...
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...
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(sourc...
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 b...
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() a...
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: connection = await Connection.create(source_id) async def c...
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 generally pulled from a provided QRCode. :param source_id: Institution's unique ID...
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 object async def deserialize(data: dict): """...
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: {"connection_type":"QR"} Example code: connection = awa...
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: ...
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:...
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 """ ...
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') invite_details = await connection.connect(phone_number) inivt...
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 = { "@topic": { "mid": 9, "tid": 1 ...
: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_...
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(co...
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) ...
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...
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_pro...
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...
Builds Indy request for getting sources list for payment address according to this payment method. :param wallet_handle: wallet handle (created by open_wallet). :param submitter_did : (Option) DID of request sender :param payment_address: target payment address :return: get_sources_txn_json: Indy r...
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. ...
Builds Indy request for setting fees for transactions in the ledger :param wallet_handle: wallet handle (created by open_wallet). :param submitter_did : (Option) DID of request sender :param payment_method: Payment method to use (for example, 'sov'). :param fees_json: { txnType1: amount1, ...
Builds Indy request for getting fees for transactions in the ledger :param wallet_handle: wallet handle (created by open_wallet). :param submitter_did : (Option) DID of request sender :param payment_method: Payment method to use (for example, 'sov'). :return: set_txn_fees_json: Indy request for setting...
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 :return: fees_json: { txnType1: amount1, txnType2: amount2, ................. txnTypeN: amountN, ...
Builds Indy request for information to verify the payment receipt :param wallet_handle: wallet handle (created by open_wallet). :param submitter_did : (Option) DID of request sender :param receipt: payment receipt to verify :return: verify_txn_json: Indy request for verification receipt for transactio...
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 :param attrs: Atttributes of the schema :param payment_handle: NYI - payment of ledger fee is take...
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'] payment_handle = 0 schema1 = await Schema....
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' name = 'Address Schema' version = '1.0' attrs = ['addre...
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, version, attrs, payment_handle) id1 = await sch...
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 async def is_pairwise_exists(wallet_handle: int, their_did: str) -> bool: """ Check if pa...
Get list of saved pairwise. :param wallet_handle: wallet handler (created by open_wallet). :return: pairwise_list: 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:...
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 did async def get_pairwise(wallet_handle: int, their_did: str) -> None: """ ...
Save some data in the Wallet for pairwise associated with Did. :param wallet_handle: wallet handler (created by open_wallet). :param their_did: encoded DID :param metadata: some extra information for pairwise :return: Error code async def set_pairwise_metadata(wallet_handle: int, ...
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))