View Source MyspaceIPFS.Dht (Myspace IPFS v0.2.0-alpha.1)
MyspaceIPFS.Dht is where the dht commands of the IPFS API reside.
Link to this section Summary
Types
The response from the DHT Query command.
The response addresses list in the response from the DHT Query command.
Functions
Find the closest peers to a given key.
Link to this section Types
@type query_response() :: %MyspaceIPFS.DhtQueryResponse{ extra: binary(), id: MyspaceIPFS.peer_id(), responses: [query_response_addrs()], type: binary() }
The response from the DHT Query command.
@type query_response_addrs() :: %MyspaceIPFS.DhtQueryResponseAddrs{ addrs: [Path.t()], id: MyspaceIPFS.peer_id() }
The response addresses list in the response from the DHT Query command.
Link to this section Functions
@spec query(MyspaceIPFS.peer_id(), list()) :: {:ok, query_response()} | MyspaceIPFS.Api.error_response()
Find the closest peers to a given key.
https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-dht-query
parameters
Parameters
peer_id
- The peer ID to find the closest peers to.
options
Options
[
`timeout` - <string>, # The timeout for the request.
]