3.0.ipv8.attestation.wallet.database
Attributes
Classes
Module Contents
- 3.0.ipv8.attestation.wallet.database.DATABASE_DIRECTORY
- class 3.0.ipv8.attestation.wallet.database.SecretKeyProtocol
Bases:
typing_extensions.ProtocolProtocol to detect key-like objects.
- public_key() Any
Get the associated public key.
- class 3.0.ipv8.attestation.wallet.database.AttestationsDB(working_directory: str, db_name: str)
Bases:
3.0.ipv8.database.DatabaseDatabase to store attestations.
- LATEST_DB_VERSION = 2
- db_name
- _get(query: str, params: _typeshed.SupportsLenAndGetItem | collections.abc.Mapping[str, Any]) list[bytes]
- get_attestation_by_hash(attestation_hash: bytes) list[bytes]
Retrieve a serialized attestation by hash.
- get_all() list[collections.abc.Sequence[bytes]]
Get all serialized attestations we know of.
- insert_attestation(attestation: 3.0.ipv8.attestation.identity_formats.Attestation, attestation_hash: bytes, secret_key: SecretKeyProtocol, id_format: str) None
Insert an attestation into the database.