aries_cloudagent.did package¶
Submodules¶
aries_cloudagent.did.did_key module¶
DID Key class and resolver methods.
-
class
aries_cloudagent.did.did_key.
DIDKey
(public_key: bytes, key_type: aries_cloudagent.wallet.key_type.KeyType)[source]¶ Bases:
object
DID Key parser and resolver.
-
did
¶ key string.
Type: Getter for full did
-
did_doc
¶ key.
Type: Getter for did document associated with did
-
fingerprint
¶ Getter for did key fingerprint.
-
classmethod
from_did
(did: str) → aries_cloudagent.did.did_key.DIDKey[source]¶ Initialize a new DIDKey instance from a fully qualified did:key string.
Extracts the fingerprint from the did:key and uses that to constrcut the did:key.
-
classmethod
from_fingerprint
(fingerprint: str, key_types=None) → aries_cloudagent.did.did_key.DIDKey[source]¶ Initialize new DIDKey instance from multibase encoded fingerprint.
The fingerprint contains both the public key and key type.
-
classmethod
from_public_key
(public_key: bytes, key_type: aries_cloudagent.wallet.key_type.KeyType) → aries_cloudagent.did.did_key.DIDKey[source]¶ Initialize new DIDKey instance from public key and key type.
-
classmethod
from_public_key_b58
(public_key: str, key_type: aries_cloudagent.wallet.key_type.KeyType) → aries_cloudagent.did.did_key.DIDKey[source]¶ Initialize new DIDKey instance from base58 encoded public key and key type.
-
key_id
¶ Getter for key id.
-
key_type
¶ Getter for key type.
-
prefixed_public_key
¶ Getter for multicodec prefixed public key.
-
public_key
¶ Getter for public key.
-
public_key_b58
¶ Getter for base58 encoded public key.
-
-
aries_cloudagent.did.did_key.
construct_did_key_bls12381g1
(did_key: aries_cloudagent.did.did_key.DIDKey) → dict[source]¶ Construct BLS12381G1 did:key.
Parameters: did_key (DIDKey) – did key instance to parse bls12381g1 did:key document from Returns: The bls12381g1 did:key did document Return type: dict
-
aries_cloudagent.did.did_key.
construct_did_key_bls12381g1g2
(did_key: aries_cloudagent.did.did_key.DIDKey) → dict[source]¶ Construct BLS12381G1G2 did:key.
Parameters: did_key (DIDKey) – did key instance to parse bls12381g1g2 did:key document from Returns: The bls12381g1g2 did:key did document Return type: dict
-
aries_cloudagent.did.did_key.
construct_did_key_bls12381g2
(did_key: aries_cloudagent.did.did_key.DIDKey) → dict[source]¶ Construct BLS12381G2 did:key.
Parameters: did_key (DIDKey) – did key instance to parse bls12381g2 did:key document from Returns: The bls12381g2 did:key did document Return type: dict
-
aries_cloudagent.did.did_key.
construct_did_key_ed25519
(did_key: aries_cloudagent.did.did_key.DIDKey) → dict[source]¶ Construct Ed25519 did:key.
Parameters: did_key (DIDKey) – did key instance to parse ed25519 did:key document from Returns: The ed25519 did:key did document Return type: dict