latest.ipv8.REST.attestation_endpoint
Module Contents
Classes
This endpoint is responsible for handing all requests regarding attestation. |
- class latest.ipv8.REST.attestation_endpoint.AttestationEndpoint
Bases:
latest.ipv8.REST.base_endpoint.BaseEndpoint
[latest.ipv8.types.IPv8
]This endpoint is responsible for handing all requests regarding attestation.
- initialize(session: latest.ipv8.types.IPv8) None
Initialize this endpoint for the given IPv8 instance.
- on_request_attestation(peer: latest.ipv8.peer.Peer, attribute_name: str, metadata: dict) asyncio.Future
Return the measurement of an attribute for a certain peer.
- on_attestation_complete(for_peer: latest.ipv8.peer.Peer, attribute_name: str, attribute_hash: bytes, id_format: str, from_peer: latest.ipv8.peer.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.peer.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.
- get_peer_from_mid(mid_b64: str) latest.ipv8.peer.Peer | None
Find a peer by base64 encoded mid.
- _drop_identity_table_data(keys_to_keep: list[bytes]) list[bytes]
Remove all metadata from the identity community.
- Parameters:
keys_to_keep – list of keys to not remove for
- Returns:
the list of attestation hashes which have been removed
- _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 – hashes to remove
- Returns:
None
- async handle_get(request: aiohttp.abc.Request) latest.ipv8.REST.base_endpoint.Response
Get information from the AttestationCommunity.
- async handle_post(request: aiohttp.abc.Request) latest.ipv8.REST.base_endpoint.Response
Send a command to the AttestationCommunity.