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
(session: aries_cloudagent.core.profile.ProfileSession)[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
= (<class 'pydid.verification_method.Ed25519VerificationKey2018'>,)¶
-
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
-
create_did_document
(did_info: aries_cloudagent.wallet.did_info.DIDInfo, inbound_connection_id: str = None, svc_endpoints: Sequence[str] = None, mediation_records: 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: 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
-
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
-
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
-
find_did_for_key
(key: str) → str[source]¶ Find the DID previously associated with a key.
Parameters: key – The verkey to look up
-
remove_keys_for_did
(did: str)[source]¶ Remove all keys associated with a DID.
Parameters: did – The DID for which to remove keys
-
-
exception
aries_cloudagent.connections.base_manager.
BaseConnectionManagerError
(*args, error_code: str = None, **kwargs)[source]¶ Bases:
aries_cloudagent.core.error.BaseError
BaseConnectionManager error.
aries_cloudagent.connections.util module¶
Class for providing base utilities for Mediator support.
-
aries_cloudagent.connections.util.
mediation_record_if_id
(session: aries_cloudagent.core.profile.ProfileSession, mediation_id: str = None, or_default: bool = False)[source]¶ Validate mediation and return record.
If mediation_id is not None, validate mediation record state and return record else, return None