client

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Index

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
}

func NewClient

func NewClient(privateKey crypto.PrivKey, relays []peer.AddrInfo) (*Client, error)

NewClient creates a new client with the default relays @param privateKey the private key to use for the libp2p host

func NewClientWithHost

func NewClientWithHost(host host.Host, relays []peer.AddrInfo) (*Client, error)

NewClientWithHost creates a new client with the default relays @param libp2p the libp2p host. This libp2p instance must have Relay enabled

func (Client) SignProposal

func (c Client) SignProposal(ctx context.Context, dest peer.ID, proposal filmarket.DealProposal) (*filcrypto.Signature, error)

type RequestError

type RequestError struct {
	StatusCode model.StatusCode
	Message    string
}

func (*RequestError) Error

func (e *RequestError) Error() string

type Signer

type Signer interface {
	SignProposal(ctx context.Context, dest peer.ID, proposal filmarket.DealProposal) (*crypto.Signature, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL