3.0.ipv8.dht.provider ===================== .. py:module:: 3.0.ipv8.dht.provider Classes ------- .. autoapisummary:: 3.0.ipv8.dht.provider.DHTIntroPointPayload 3.0.ipv8.dht.provider.DHTCommunityProvider Module Contents --------------- .. py:class:: DHTIntroPointPayload Bases: :py:obj:`3.0.ipv8.messaging.lazy_payload.VariablePayload` Payload to pack an introduction point's address, most recent time of response, public key and associated seeder public key. .. py:attribute:: names :value: ['address', 'last_seen', 'intro_pk', 'seeder_pk'] .. py:attribute:: format_list :value: ['ip_address', 'I', 'varlenH', 'varlenH'] .. py:attribute:: address :type: 3.0.ipv8.types.Address .. py:attribute:: last_seen :type: int .. py:attribute:: intro_pk :type: bytes .. py:attribute:: seeder_pk :type: bytes .. py:class:: DHTCommunityProvider(dht_community: 3.0.ipv8.dht.discovery.DHTDiscoveryCommunity, port: int) This class is a wrapper around the DHTDiscoveryCommunity and is used to discover introduction points for hidden services. .. py:attribute:: dht_community .. py:attribute:: port .. py:attribute:: logger .. py:method:: peer_lookup(mid: bytes, peer: 3.0.ipv8.peer.Peer | None = None) -> None :async: Attempt to find and connect to the given mid. If provided, the given peer will be pinged first to potentially avoid an expensive lookup. .. py:method:: lookup(info_hash: bytes) -> tuple[bytes, list[3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint]] | None :async: Attempt to find introduction points for the given info hash (SHA-1 hash). .. py:method:: announce(info_hash: bytes, intro_point: 3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint) -> None :async: Annonce the given introduction point to server the given info hash (SHA-1).