aries_cloudagent.connections package

Subpackages

Submodules

aries_cloudagent.connections.base_manager module

Class to provide some common utilities.

For Connection, DIDExchange and OutOfBand Manager.

class aries_cloudagent.connections.base_manager.BaseConnectionManager(profile: aries_cloudagent.core.profile.Profile)[source]

Bases: object

Class to provide utilities regarding connection_targets.

RECORD_TYPE_DID_DOC = 'did_doc'
RECORD_TYPE_DID_KEY = 'did_key'
SUPPORTED_KEY_TYPES = (pydid.verification_method.Ed25519VerificationKey2018,)
async add_key_for_did(did: str, key: str)[source]

Store a verkey for lookup against a DID.

Parameters
  • did – The DID to associate with this key

  • key – The verkey to be added

async create_did_document(did_info: aries_cloudagent.wallet.did_info.DIDInfo, inbound_connection_id: Optional[str] = None, svc_endpoints: Optional[Sequence[str]] = None, mediation_records: Optional[List[aries_cloudagent.protocols.coordinate_mediation.v1_0.models.mediation_record.MediationRecord]] = None) aries_cloudagent.connections.models.diddoc.diddoc.DIDDoc[source]

Create our DID doc for a given DID.

Parameters
  • did_info – The DID information (DID and verkey) used in the connection

  • inbound_connection_id – The ID of the inbound routing connection to use

  • svc_endpoints – Custom endpoints for the DID Document

  • mediation_record – The record for mediation that contains routing_keys and service endpoint

Returns

The prepared DIDDoc instance

diddoc_connection_targets(doc: aries_cloudagent.connections.models.diddoc.diddoc.DIDDoc, sender_verkey: str, their_label: Optional[str] = None) Sequence[aries_cloudagent.connections.models.connection_target.ConnectionTarget][source]

Get a list of connection targets from a DID Document.

Parameters
  • doc – The DID Document to create the target from

  • sender_verkey – The verkey we are using

  • their_label – The connection label they are using

async fetch_connection_targets(connection: aries_cloudagent.connections.models.conn_record.ConnRecord) Sequence[aries_cloudagent.connections.models.connection_target.ConnectionTarget][source]

Get a list of connection targets from a ConnRecord.

Parameters

connection – The connection record (with associated DIDDoc) used to generate the connection target

async fetch_did_document(did: str) Tuple[aries_cloudagent.connections.models.diddoc.diddoc.DIDDoc, aries_cloudagent.storage.record.StorageRecord][source]

Retrieve a DID Document for a given DID.

Parameters

did – The DID to search for

async find_did_for_key(key: str) str[source]

Find the DID previously associated with a key.

Parameters

key – The verkey to look up

async remove_keys_for_did(did: str)[source]

Remove all keys associated with a DID.

Parameters

did – The DID for which to remove keys

async resolve_invitation(did: str, service_accept: Optional[Sequence[str]] = None)[source]

Resolve invitation with the DID Resolver.

Parameters

did – Document ID to resolve

async store_did_document(did_doc: aries_cloudagent.connections.models.diddoc.diddoc.DIDDoc)[source]

Store a DID document.

Parameters

did_doc – The DIDDoc instance to persist

exception aries_cloudagent.connections.base_manager.BaseConnectionManagerError(*args, error_code: Optional[str] = None, **kwargs)[source]

Bases: aries_cloudagent.core.error.BaseError

BaseConnectionManager error.