2.12.ipv8.attestation.identity.database
Module Contents
Classes
Functions
- class 2.12.ipv8.attestation.identity.database.Credential(metadata: 2.12.ipv8.attestation.identity.metadata.Metadata, attestations: Set[2.12.ipv8.attestation.identity.attestation.Attestation])
Cache for Metadata <- [Attestation] mappings.
- 2.12.ipv8.attestation.identity.database.to_list(obj: Any | None) list
If no results are found in the database, the cursor will return None. This function always returns a list.
- class 2.12.ipv8.attestation.identity.database.IdentityDatabase(file_path: str)
Bases:
2.12.ipv8.database.Database
Database to store identity layer data.
This database stores: meta information of different pseudonyms, both ours and those of others. This database does not store: commitments and schemes for proving knowledge of data.
- LATEST_DB_VERSION = 1
- insert_token(public_key: 2.12.ipv8.types.PublicKey, token: 2.12.ipv8.attestation.tokentree.token.Token) None
Inject a Token belonging to a certain public key into this database.
- insert_metadata(public_key: 2.12.ipv8.types.PublicKey, metadata: 2.12.ipv8.attestation.identity.metadata.Metadata) None
Inject Metadata belonging to a certain public key into this database.
- insert_attestation(public_key: 2.12.ipv8.types.PublicKey, authority_key: 2.12.ipv8.types.PublicKey, attestation: 2.12.ipv8.attestation.identity.attestation.Attestation) None
Inject an Attestation made by some authority for a certain public key into this database.
- get_tokens_for(public_key: 2.12.ipv8.types.PublicKey) Set[2.12.ipv8.attestation.tokentree.token.Token]
Get all tokens in the tree of a certain public key.
- get_metadata_for(public_key: 2.12.ipv8.types.PublicKey) Set[2.12.ipv8.attestation.identity.metadata.Metadata]
Get all known metadata for a certain public key.
- get_attestations_for(public_key: 2.12.ipv8.types.PublicKey) Set[2.12.ipv8.attestation.identity.attestation.Attestation]
Get all known attestations (made by others) for a certain public key.
- get_attestations_by(public_key: 2.12.ipv8.types.PublicKey) Set[2.12.ipv8.attestation.identity.attestation.Attestation]
Get all attestations made by a certain public key (for others).
This is the signing authority.
- get_attestations_over(metadata: 2.12.ipv8.attestation.identity.metadata.Metadata) Set[2.12.ipv8.attestation.identity.attestation.Attestation]
Get all known attestations for given metadata.
- get_authority(attestation: 2.12.ipv8.attestation.identity.attestation.Attestation) bytes
Retrieve the authority that created a certain attestation.
- get_credential_over(metadata: 2.12.ipv8.attestation.identity.metadata.Metadata) Credential
Collect all attestations for the given metadata, forming a credential.
- get_credentials_for(public_key: 2.12.ipv8.types.PublicKey) list[Credential]
Get all credentials for a given public key.