acapy_agent.wallet.keys package

Submodules

acapy_agent.wallet.keys.manager module

Multikey class.

class acapy_agent.wallet.keys.manager.MultikeyManager(session: ProfileSession)[source]

Bases: object

Class for managing wallet keys.

async bind_key_id(multikey: str, kid: str)[source]

Bind a new key id to a key pair.

async create(seed: str = None, kid: str = None, alg: str = 'ed25519')[source]

Create a new key pair.

async from_kid(kid: str)[source]

Fetch a single key.

async from_multikey(multikey: str)[source]

Fetch a single key.

key_type_from_multikey(multikey: str) KeyType[source]

Derive key_type class from multikey prefix.

async kid_exists(kid: str)[source]

Check if kid exists.

async multikey_exists(multikey: str)[source]

Check if a multikey exists in the wallet.

async resolve_and_bind_kid(kid: str)[source]

Fetch key if exists, otherwise resolve and bind it.

This function is idempotent.

async resolve_multikey_from_verification_method_id(kid: str)[source]

Derive a multikey from the verification method ID.

async unbind_key_id(multikey: str, kid: str)[source]

Unbind a key id from a key pair.

async update(multikey: str, kid: str, unbind=False)[source]

Bind or unbind a kid with a key pair.

exception acapy_agent.wallet.keys.manager.MultikeyManagerError[source]

Bases: Exception

Generic MultikeyManager Error.

acapy_agent.wallet.keys.manager.key_type_from_multikey(multikey: str) KeyType[source]

Derive key_type class from multikey prefix.

acapy_agent.wallet.keys.manager.multikey_from_verification_method(verification_method: pydid.VerificationMethod) str[source]

Derive a multikey from a VerificationMethod.

acapy_agent.wallet.keys.manager.multikey_to_verkey(multikey: str)[source]

Transform multikey to verkey.

acapy_agent.wallet.keys.manager.verkey_to_multikey(verkey: str, alg: str)[source]

Transform verkey to multikey.

acapy_agent.wallet.keys.routes module