latest.ipv8.attestation.communication_manager
Module Contents
Classes
A communication channel for business and proving logic of a single pseudonym. |
|
Perform file management of pseudonyms. |
|
Manager of pseudonym managers, usually operated from the REST API by a user app. |
Attributes
- latest.ipv8.attestation.communication_manager.AttributePointer
- latest.ipv8.attestation.communication_manager.MetadataDict
- class latest.ipv8.attestation.communication_manager.CommunicationChannel(attestation_community: latest.ipv8.attestation.wallet.community.AttestationCommunity, identity_community: latest.ipv8.attestation.identity.community.IdentityCommunity)
A communication channel for business and proving logic of a single pseudonym.
- on_request_attestation(peer: latest.ipv8.types.Peer, attribute_name: str, metadata: MetadataDict) asyncio.Future
Return the measurement of an attribute for a certain peer.
- on_attestation_complete(for_peer: latest.ipv8.types.Peer, attribute_name: str, attribute_hash: bytes, id_format: str, from_peer: latest.ipv8.types.Peer | None = None) None
Callback for when an attestation has been completed for another peer. We can now sign for it.
- on_verify_request(peer: latest.ipv8.types.Peer, attribute_hash: bytes) asyncio.Future
Return the measurement of an attribute for a certain peer.
- on_verification_results(attribute_hash: bytes, values: list[float]) None
Callback for when verification has concluded.
- _drop_identity_table_data() list[bytes]
Remove all metadata from the identity community.
- Returns:
the list of attestation hashes which have been removed
- Return type:
[bytes]
- _drop_attestation_table_data(attestation_hashes: list[bytes]) None
Remove all attestation data (claim based keys and ZKP blobs) by list of attestation hashes.
- Parameters:
attestation_hashes ([bytes]) – hashes to remove
- Returns:
None
- get_my_attributes() dict[bytes, tuple[str, MetadataDict, list[bytes]]]
Get the known attributes for our pseudonym.
- get_attributes(peer: latest.ipv8.types.Peer) dict[bytes, tuple[str, MetadataDict, list[bytes]]]
Get the known attributes of a given peer.
- request_attestation(peer: latest.ipv8.types.Peer, attribute_name: str, id_format: str, metadata: MetadataDict) None
Request another peer to attest to our attribute.
- attest(peer: latest.ipv8.types.Peer, attribute_name: str, value: bytes) None
Attest to another peer’s attribute (if it’s value is what we expect).
- import_blob(attribute_name: str, id_format: str, metadata: MetadataDict, value: bytes) None
Import an external proof as a raw blob (advanced use only!).
- allow_verification(peer: latest.ipv8.types.Peer, attribute_name: str) None
Consent to verification of an attribute by a peer.
- class latest.ipv8.attestation.communication_manager.PseudonymFolderManager(directory: str)
Perform file management of pseudonyms.
- get_or_create_private_key(name: str) latest.ipv8.types.PrivateKey
Get the private key for a pseudonym by either reading it or generating it. In the latter case, write to a file.
- Parameters:
name – the name of the pseudonym to load or generate a private key for.
- Returns:
the private key for the given pseudonym.
- class latest.ipv8.attestation.communication_manager.CommunicationManager(ipv8_instance: latest.ipv8.types.IPv8, pseudonym_folder: str = 'pseudonyms', working_directory: str | None = None)
Manager of pseudonym managers, usually operated from the REST API by a user app.
- lazy_identity_manager() latest.ipv8.attestation.identity.manager.IdentityManager
Lazy load the IdentityManager.
- async load(name: str, rendezvous_token: str | None = None) CommunicationChannel
Load a pseudonym.