Documentation ¶
Index ¶
- type Client
- func (r *Client) Fetch(didID string) (*bep44.Message, error)
- func (r *Client) FetchWithContext(ctx context.Context, didID string) (*bep44.Message, error)
- func (r *Client) Put(didID string, msg *bep44.Message) error
- func (r *Client) PutWithContext(ctx context.Context, didID string, msg *bep44.Message) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for publishing and fetching BEP44 messages to and from a Pkarr relay server.
func NewClient ¶
NewClient creates a new Pkarr relay client with the given relay URL and HTTP client.
func (*Client) FetchWithContext ¶
FetchWithContext fetches a signed BEP44 message from a Pkarr relay server.
func (*Client) Put ¶
Put Publishes a signed BEP44 message to a Pkarr relay server. https://github.com/Nuhvi/pkarr/blob/main/design/relays.md
didID - The DID identifier, used as the key in the DHT; it is the z-base-32 encoding of the Identity Key. bep44Message - The BEP44 message to be published, containing the signed DNS packet.
Returns an error if the request fails.
Click to show internal directories.
Click to hide internal directories.