aries_cloudagent.ledger package

Submodules

aries_cloudagent.ledger.base module

Ledger base class.

class aries_cloudagent.ledger.base.BaseLedger[source]

Bases: abc.ABC

Base class for ledger.

BACKEND_NAME = None
accept_txn_author_agreement(taa_record: dict, mechanism: str, accept_time: int = None)[source]

Save a new record recording the acceptance of the TAA.

backend

Accessor for the ledger backend name.

create_and_send_credential_definition(issuer: aries_cloudagent.indy.issuer.IndyIssuer, schema_id: str, signature_type: str = None, tag: str = None, support_revocation: bool = False, write_ledger: bool = True, endorser_did: str = None) → Tuple[str, dict, bool][source]

Send credential definition to ledger and store relevant key matter in wallet.

Parameters:
  • issuer – The issuer instance to use for credential definition creation
  • schema_id – The schema id of the schema to create cred def for
  • signature_type – The signature type to use on the credential definition
  • tag – Optional tag to distinguish multiple credential definitions
  • support_revocation – Optional flag to enable revocation for this cred def
Returns:

Tuple with cred def id, cred def structure, and whether it’s novel

create_and_send_schema(issuer: aries_cloudagent.indy.issuer.IndyIssuer, schema_name: str, schema_version: str, attribute_names: Sequence[str], write_ledger: bool = True, endorser_did: str = None) → Tuple[str, dict][source]

Send schema to ledger.

Parameters:
  • issuer – The issuer instance to use for schema creation
  • schema_name – The schema name
  • schema_version – The schema version
  • attribute_names – A list of schema attributes
did_to_nym(did: str) → str[source]

Remove the ledger’s DID prefix to produce a nym.

fetch_txn_author_agreement()[source]

Fetch the current AML and TAA from the ledger.

get_all_endpoints_for_did(did: str) → dict[source]

Fetch all endpoints for a ledger DID.

Parameters:did – The DID to look up on the ledger or in the cache
get_credential_definition(credential_definition_id: str) → dict[source]

Get a credential definition from the cache if available, otherwise the ledger.

Parameters:credential_definition_id – The schema id of the schema to fetch cred def for
get_endpoint_for_did(did: str, endpoint_type: aries_cloudagent.ledger.endpoint_type.EndpointType = <EndpointType.ENDPOINT: EndpointTypeName(w3c='Endpoint', indy='endpoint')>) → str[source]

Fetch the endpoint for a ledger DID.

Parameters:
  • did – The DID to look up on the ledger or in the cache
  • endpoint_type – The type of the endpoint (default ‘endpoint’)
get_key_for_did(did: str) → str[source]

Fetch the verkey for a ledger DID.

Parameters:did – The DID to look up on the ledger or in the cache
get_latest_txn_author_acceptance()[source]

Look up the latest TAA acceptance.

get_nym_role(did: str)[source]

Return the role registered to input public DID on the ledger.

Parameters:did – DID to register on the ledger.
get_revoc_reg_def(revoc_reg_id: str) → dict[source]

Look up a revocation registry definition by ID.

get_revoc_reg_delta(revoc_reg_id: str, timestamp_from=0, timestamp_to=None) → Tuple[dict, int][source]

Look up a revocation registry delta by ID.

get_revoc_reg_entry(revoc_reg_id: str, timestamp: int) → Tuple[dict, int][source]

Get revocation registry entry by revocation registry ID and timestamp.

get_schema(schema_id: str) → dict[source]

Get a schema from the cache if available, otherwise fetch from the ledger.

Parameters:schema_id – The schema id (or stringified sequence number) to retrieve
get_txn_author_agreement(reload: bool = False)[source]

Get the current transaction author agreement, fetching it if necessary.

nym_to_did(nym: str) → str[source]

Format a nym with the ledger’s DID prefix.

read_only

Accessor for the ledger read-only flag.

register_nym(did: str, verkey: str, alias: str = None, role: str = None)[source]

Register a nym on the ledger.

Parameters:
  • did – DID to register on the ledger.
  • verkey – The verification key of the keypair.
  • alias – Human-friendly alias to assign to the DID.
  • role – For permissioned ledgers, what role should the new DID have.
rotate_public_did_keypair(next_seed: str = None) → None[source]

Rotate keypair for public DID: create new key, submit to ledger, update wallet.

Parameters:next_seed – seed for incoming ed25519 keypair (default random)
send_revoc_reg_def(revoc_reg_def: dict, issuer_did: str = None, write_ledger: bool = True, endorser_did: str = None)[source]

Publish a revocation registry definition to the ledger.

send_revoc_reg_entry(revoc_reg_id: str, revoc_def_type: str, revoc_reg_entry: dict, issuer_did: str = None, write_ledger: bool = True, endorser_did: str = None)[source]

Publish a revocation registry entry to the ledger.

taa_digest(version: str, text: str)[source]

Generate the digest of a TAA record.

txn_endorse(request_json: str) → str[source]

Endorse (sign) the provided transaction.

txn_submit(request_json: str, sign: bool, taa_accept: bool, sign_did: aries_cloudagent.wallet.did_info.DIDInfo = <object object>) → str[source]

Write the provided (signed and possibly endorsed) transaction to the ledger.

update_endpoint_for_did(did: str, endpoint: str, endpoint_type: aries_cloudagent.ledger.endpoint_type.EndpointType = <EndpointType.ENDPOINT: EndpointTypeName(w3c='Endpoint', indy='endpoint')>) → bool[source]

Check and update the endpoint on the ledger.

Parameters:
  • did – The ledger DID
  • endpoint – The endpoint address
  • endpoint_type – The type of the endpoint (default ‘endpoint’)
class aries_cloudagent.ledger.base.Role[source]

Bases: enum.Enum

Enum for indy roles.

ENDORSER = (101,)
NETWORK_MONITOR = (201,)
ROLE_REMOVE = ('',)
STEWARD = (2,)
TRUSTEE = (0,)
USER = (None, '')
get = <function Role.get>[source]
to_indy_num_str() → str[source]

Return (typically, numeric) string value that indy-sdk associates with role.

Recall that None signifies USER and “” signifies a role undergoing reset.

token() → str[source]

Return token identifying role to indy-sdk.

aries_cloudagent.ledger.endpoint_type module

Ledger utilities.

class aries_cloudagent.ledger.endpoint_type.EndpointType[source]

Bases: enum.Enum

Enum for endpoint/service types.

ENDPOINT = EndpointTypeName(w3c='Endpoint', indy='endpoint')
LINKED_DOMAINS = EndpointTypeName(w3c='LinkedDomains', indy='linked_domains')
PROFILE = EndpointTypeName(w3c='Profile', indy='profile')
get = <function EndpointType.get>[source]
indy

internally-facing, on ledger and in wallet.

Type:Indy name of endpoint type
w3c

externally-facing.

Type:W3C name of endpoint type
class aries_cloudagent.ledger.endpoint_type.EndpointTypeName(w3c, indy)

Bases: tuple

indy

Alias for field number 1

w3c

Alias for field number 0

aries_cloudagent.ledger.error module

Ledger related errors.

exception aries_cloudagent.ledger.error.BadLedgerRequestError(*args, error_code: str = None, **kwargs)[source]

Bases: aries_cloudagent.ledger.error.LedgerError

The current request cannot proceed.

exception aries_cloudagent.ledger.error.ClosedPoolError(*args, error_code: str = None, **kwargs)[source]

Bases: aries_cloudagent.ledger.error.LedgerError

Indy pool is closed.

exception aries_cloudagent.ledger.error.LedgerConfigError(*args, error_code: str = None, **kwargs)[source]

Bases: aries_cloudagent.ledger.error.LedgerError

Base class for ledger configuration errors.

exception aries_cloudagent.ledger.error.LedgerError(*args, error_code: str = None, **kwargs)[source]

Bases: aries_cloudagent.core.error.BaseError

Base class for ledger errors.

exception aries_cloudagent.ledger.error.LedgerTransactionError(*args, error_code: str = None, **kwargs)[source]

Bases: aries_cloudagent.ledger.error.LedgerError

The ledger rejected the transaction.

aries_cloudagent.ledger.indy module

Indy ledger implementation.

class aries_cloudagent.ledger.indy.IndySdkLedger(pool: aries_cloudagent.ledger.indy.IndySdkLedgerPool, wallet: aries_cloudagent.wallet.indy.IndySdkWallet)[source]

Bases: aries_cloudagent.ledger.base.BaseLedger

Indy ledger class.

BACKEND_NAME = 'indy'
accept_txn_author_agreement(taa_record: dict, mechanism: str, accept_time: int = None)[source]

Save a new record recording the acceptance of the TAA.

check_existing_schema(public_did: str, schema_name: str, schema_version: str, attribute_names: Sequence[str]) → Tuple[str, dict][source]

Check if a schema has already been published.

create_and_send_credential_definition(issuer: aries_cloudagent.indy.issuer.IndyIssuer, schema_id: str, signature_type: str = None, tag: str = None, support_revocation: bool = False, write_ledger: bool = True, endorser_did: str = None) → Tuple[str, dict, bool][source]

Send credential definition to ledger and store relevant key matter in wallet.

Parameters:
  • issuer – The issuer instance to use for credential definition creation
  • schema_id – The schema id of the schema to create cred def for
  • signature_type – The signature type to use on the credential definition
  • tag – Optional tag to distinguish multiple credential definitions
  • support_revocation – Optional flag to enable revocation for this cred def
Returns:

Tuple with cred def id, cred def structure, and whether it’s novel

create_and_send_schema(issuer: aries_cloudagent.indy.issuer.IndyIssuer, schema_name: str, schema_version: str, attribute_names: Sequence[str], write_ledger: bool = True, endorser_did: str = None) → Tuple[str, dict][source]

Send schema to ledger.

Parameters:
  • issuer – The issuer instance creating the schema
  • schema_name – The schema name
  • schema_version – The schema version
  • attribute_names – A list of schema attributes
credential_definition_id2schema_id(credential_definition_id)[source]

From a credential definition, get the identifier for its schema.

Parameters:credential_definition_id – The identifier of the credential definition from which to identify a schema
fetch_credential_definition(credential_definition_id: str) → dict[source]

Get a credential definition from the ledger by id.

Parameters:credential_definition_id – The cred def id of the cred def to fetch
fetch_schema_by_id(schema_id: str) → dict[source]

Get schema from ledger.

Parameters:schema_id – The schema id (or stringified sequence number) to retrieve
Returns:Indy schema dict
fetch_schema_by_seq_no(seq_no: int)[source]

Fetch a schema by its sequence number.

Parameters:seq_no – schema ledger sequence number
Returns:Indy schema dict
fetch_txn_author_agreement() → dict[source]

Fetch the current AML and TAA from the ledger.

get_all_endpoints_for_did(did: str) → dict[source]

Fetch all endpoints for a ledger DID.

Parameters:did – The DID to look up on the ledger or in the cache
get_credential_definition(credential_definition_id: str) → dict[source]

Get a credential definition from the cache if available, otherwise the ledger.

Parameters:credential_definition_id – The schema id of the schema to fetch cred def for
get_endpoint_for_did(did: str, endpoint_type: aries_cloudagent.ledger.endpoint_type.EndpointType = None) → str[source]

Fetch the endpoint for a ledger DID.

Parameters:
  • did – The DID to look up on the ledger or in the cache
  • endpoint_type – The type of the endpoint. If none given, returns all
get_indy_storage() → aries_cloudagent.storage.indy.IndySdkStorage[source]

Get an IndySdkStorage instance for the current wallet.

get_key_for_did(did: str) → str[source]

Fetch the verkey for a ledger DID.

Parameters:did – The DID to look up on the ledger or in the cache
get_latest_txn_author_acceptance() → dict[source]

Look up the latest TAA acceptance.

get_nym_role(did: str) → aries_cloudagent.ledger.base.Role[source]

Return the role of the input public DID’s NYM on the ledger.

Parameters:did – DID to query for role on the ledger.
get_revoc_reg_def(revoc_reg_id: str) → dict[source]

Get revocation registry definition by ID; augment with ledger timestamp.

get_revoc_reg_delta(revoc_reg_id: str, fro=0, to=None) → Tuple[dict, int][source]

Look up a revocation registry delta by ID.

:param revoc_reg_id revocation registry id :param fro earliest EPOCH time of interest :param to latest EPOCH time of interest

:returns delta response, delta timestamp

get_revoc_reg_entry(revoc_reg_id: str, timestamp: int)[source]

Get revocation registry entry by revocation registry ID and timestamp.

get_schema(schema_id: str) → dict[source]

Get a schema from the cache if available, otherwise fetch from the ledger.

Parameters:schema_id – The schema id (or stringified sequence number) to retrieve
get_txn_author_agreement(reload: bool = False) → dict[source]

Get the current transaction author agreement, fetching it if necessary.

nym_to_did(nym: str) → str[source]

Format a nym with the ledger’s DID prefix.

pool_handle

Accessor for the ledger pool handle.

pool_name

Accessor for the ledger pool name.

read_only

Accessor for the ledger read-only flag.

register_nym(did: str, verkey: str, alias: str = None, role: str = None)[source]

Register a nym on the ledger.

Parameters:
  • did – DID to register on the ledger.
  • verkey – The verification key of the keypair.
  • alias – Human-friendly alias to assign to the DID.
  • role – For permissioned ledgers, what role should the new DID have.
rotate_public_did_keypair(next_seed: str = None) → None[source]

Rotate keypair for public DID: create new key, submit to ledger, update wallet.

Parameters:next_seed – seed for incoming ed25519 keypair (default random)
send_revoc_reg_def(revoc_reg_def: dict, issuer_did: str = None, write_ledger: bool = True, endorser_did: str = None)[source]

Publish a revocation registry definition to the ledger.

send_revoc_reg_entry(revoc_reg_id: str, revoc_def_type: str, revoc_reg_entry: dict, issuer_did: str = None, write_ledger: bool = True, endorser_did: str = None)[source]

Publish a revocation registry entry to the ledger.

taa_rough_timestamp() → int[source]

Get a timestamp accurate to the day.

Anything more accurate is a privacy concern.

txn_endorse(request_json: str) → str[source]

Endorse a (signed) ledger transaction.

txn_submit(request_json: str, sign: bool = None, taa_accept: bool = None, sign_did: aries_cloudagent.wallet.did_info.DIDInfo = <object object>) → str[source]

Submit a signed (and endorsed) transaction to the ledger.

update_endpoint_for_did(did: str, endpoint: str, endpoint_type: aries_cloudagent.ledger.endpoint_type.EndpointType = None) → bool[source]

Check and update the endpoint on the ledger.

Parameters:
  • did – The ledger DID
  • endpoint – The endpoint address
  • endpoint_type – The type of the endpoint
class aries_cloudagent.ledger.indy.IndySdkLedgerPool(name: str, *, checked: bool = False, keepalive: int = 0, cache: aries_cloudagent.cache.base.BaseCache = None, cache_duration: int = 600, genesis_transactions: str = None, read_only: bool = False)[source]

Bases: object

Indy ledger manager class.

check_pool_config() → bool[source]

Check if a pool config has been created.

close()[source]

Close the pool ledger.

context_close()[source]

Release the reference and schedule closing of the pool ledger.

context_open()[source]

Open the ledger if necessary and increase the number of active references.

create_pool_config(genesis_transactions: str, recreate: bool = False)[source]

Create the pool ledger configuration.

open()[source]

Open the pool ledger, creating it if necessary.

class aries_cloudagent.ledger.indy.IndySdkLedgerPoolProvider[source]

Bases: aries_cloudagent.config.base.BaseProvider

Indy ledger pool provider which keys off the selected pool name.

provide(settings: aries_cloudagent.config.base.BaseSettings, injector: aries_cloudagent.config.base.BaseInjector)[source]

Create and open the pool instance.

aries_cloudagent.ledger.routes module

Ledger admin routes.

class aries_cloudagent.ledger.routes.AMLRecordSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Ledger AML record.

aml = <fields.Dict(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid mapping type.'})>
amlContext = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
version = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.GetDIDEndpointResponseSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Response schema to get DID endpoint.

endpoint = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.Endpoint object>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=True, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.GetDIDVerkeyResponseSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Response schema to get DID verkey.

verkey = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.IndyRawPublicKey object>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=True, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.GetNymRoleResponseSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Response schema to get nym role operation.

role = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<OneOf(choices=['STEWARD', 'TRUSTEE', 'ENDORSER', 'NETWORK_MONITOR', 'USER', 'ROLE_REMOVE'], labels=[], error='Must be one of: {choices}.')>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.LedgerModulesResultSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Schema for the modules endpoint.

class aries_cloudagent.ledger.routes.QueryStringDIDSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Parameters and validators for query string with DID only.

did = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.IndyDID object>, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.QueryStringEndpointSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Parameters and validators for query string with DID and endpoint type.

did = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.IndyDID object>, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
endpoint_type = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.EndpointType object>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.RegisterLedgerNymQueryStringSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Query string parameters and validators for register ledger nym request.

alias = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
did = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.IndyDID object>, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
role = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<OneOf(choices=['STEWARD', 'TRUSTEE', 'ENDORSER', 'NETWORK_MONITOR', 'reset'], labels=[], error='Must be one of: {choices}.')>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
verkey = <fields.String(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.IndyRawPublicKey object>, required=True, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.RegisterLedgerNymResponseSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Response schema for ledger nym registration.

success = <fields.Boolean(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>
class aries_cloudagent.ledger.routes.TAAAcceptSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Input schema for accepting the TAA.

mechanism = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
text = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
version = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.TAAAcceptanceSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

TAA acceptance record.

mechanism = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
time = <fields.Integer(default=<marshmallow.missing>, attribute=None, validate=<aries_cloudagent.messaging.valid.IntEpoch object>, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid integer.', 'too_large': 'Number too large.'})>
class aries_cloudagent.ledger.routes.TAAInfoSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Transaction author agreement info.

aml_record = <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>
taa_accepted = <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>
taa_record = <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>
taa_required = <fields.Boolean(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid boolean.'})>
class aries_cloudagent.ledger.routes.TAARecordSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Ledger TAA record.

digest = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
text = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
version = <fields.String(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'invalid': 'Not a valid string.', 'invalid_utf8': 'Not a valid utf-8 string.'})>
class aries_cloudagent.ledger.routes.TAAResultSchema(*args, **kwargs)[source]

Bases: aries_cloudagent.messaging.models.openapi.OpenAPISchema

Result schema for a transaction author agreement.

result = <fields.Nested(default=<marshmallow.missing>, attribute=None, validate=None, required=False, load_only=False, dump_only=False, missing=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.', 'type': 'Invalid type.'})>
aries_cloudagent.ledger.routes.get_did_endpoint(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Request handler for getting a verkey for a DID from the ledger.

Parameters:request – aiohttp request object
aries_cloudagent.ledger.routes.get_did_verkey(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Request handler for getting a verkey for a DID from the ledger.

Parameters:request – aiohttp request object
aries_cloudagent.ledger.routes.get_nym_role(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Request handler for getting the role from the NYM registration of a public DID.

Parameters:request – aiohttp request object
aries_cloudagent.ledger.routes.ledger_accept_taa(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Request handler for accepting the current transaction author agreement.

Parameters:request – aiohttp request object
Returns:The DID list response
aries_cloudagent.ledger.routes.ledger_get_taa(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Request handler for fetching the transaction author agreement.

Parameters:request – aiohttp request object
Returns:The TAA information including the AML
aries_cloudagent.ledger.routes.post_process_routes(app: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Amend swagger API.

aries_cloudagent.ledger.routes.register(app: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Register routes.

aries_cloudagent.ledger.routes.register_ledger_nym(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Request handler for registering a NYM with the ledger.

Parameters:request – aiohttp request object
aries_cloudagent.ledger.routes.rotate_public_did_keypair(request: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb0548881d0>)[source]

Request handler for rotating key pair associated with public DID.

Parameters:request – aiohttp request object

aries_cloudagent.ledger.util module

Ledger utilities.