acapy_agent.kanon package

Subpackages

Submodules

acapy_agent.kanon.profile_anon_kanon module

Manage Aries-Askar profile interaction.

class acapy_agent.kanon.profile_anon_kanon.KanonAnonCredsProfile(opened: KanonOpenStore, context: InjectionContext | None = None, *, profile_id: str | None = None)[source]

Bases: Profile

Kanon AnonCreds profile implementation.

BACKEND_NAME: str | None = 'kanon-anoncreds'
TEST_PROFILE_NAME = 'test-profile'
bind_providers()[source]

Initialize the profile-level instance providers.

async close()[source]

Close both stores.

init_ledger_pool()[source]

Initialize the ledger pool.

property name: str

Accessor for the profile name.

async remove()[source]

Remove profile.

session(context: InjectionContext | None = None) ProfileSession[source]

Create a new session.

property store: DBStore

Accessor for the opened Store instance.

transaction(context: InjectionContext | None = None) ProfileSession[source]

Create a new transaction.

class acapy_agent.kanon.profile_anon_kanon.KanonAnonCredsProfileSession(profile: KanonAnonCredsProfile, is_txn: bool, *, context: InjectionContext | None = None, settings: Mapping[str, Any] = None)[source]

Bases: ProfileSession

An active connection to the profile management backend.

property askar_handle: aries_askar.Session

Accessor for Askar session.

property dbstore_handle: DBStoreSession

Accessor for DBStore session.

property handle: DBStoreSession

Accessor for the Session instance.

property is_transaction: bool

Check if this is a transaction.

property store: DBStore

Get store instance.

class acapy_agent.kanon.profile_anon_kanon.KanonAnonProfileManager[source]

Bases: ProfileManager

Manager for Aries-Askar stores.

async classmethod generate_store_key(seed: str | None = None) str[source]

Generate a raw store key.

async open(context: InjectionContext, config: Mapping[str, Any] = None) Profile[source]

Open an instance of an existing profile.

async provision(context: InjectionContext, config: Mapping[str, Any] = None) Profile[source]

Provision a new profile.

acapy_agent.kanon.store_kanon module

Module docstring.

class acapy_agent.kanon.store_kanon.KanonOpenStore(config: KanonStoreConfig, created, db_store: DBStore, askar_store: aries_askar.Store)[source]

Bases: object

Kanon open store.

async close()[source]

Close store.

property name: str

Get store name.

class acapy_agent.kanon.store_kanon.KanonStoreConfig(config: dict | None = None, store_class: str = 'dbstore')[source]

Bases: object

A helper class for handling Kanon store configuration.

CURRENT_SCHEMA_RELEASE_NUMBER = 'release_0_1'
DEFAULT_KEY = ''
DEFAULT_KEY_DERIVATION = 'kdf:argon2i:mod'
DEFAULT_SCHEMA_CONFIG = 'normalize'
DEFAULT_STORAGE_TYPE = None
KEY_DERIVATION_ARGON2I_INT = 'kdf:argon2i:int'
KEY_DERIVATION_ARGON2I_MOD = 'kdf:argon2i:mod'
KEY_DERIVATION_RAW = 'RAW'
get_askar_uri(create: bool = False, in_memory: bool | None = False) str[source]

Get Askar URI.

get_dbstore_uri(create: bool = False, in_memory: bool | None = False) str[source]

Get DBStore URI.

async open_store(provision: bool = False, in_memory: bool | None = False) KanonOpenStore[source]

Open or provision both DBStore and Askar Store with separate error handling.

async remove_store()[source]

Remove store.

static validate_base58_key(key: str)[source]

Validate base58 key.