filecoin

package
v0.0.0-...-4eea697 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 14 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(cfg *Config) (*Client, error)

func (*Client) BaseURL

func (c *Client) BaseURL() string

func (*Client) Close

func (c *Client) Close()

func (*Client) FindMiner

func (c *Client) FindMiner(ctx context.Context) (*address.Address, error)

func (*Client) GetDealStatus

func (c *Client) GetDealStatus(ctx context.Context, CID *cid.Cid) (storagemarket.StorageDealStatus, uint64, error)

func (*Client) GetRetrieveStatus

func (c *Client) GetRetrieveStatus(ctx context.Context, dealID retrievalmarket.DealID) (retrievalmarket.DealStatus, error)

func (*Client) SaveFile

func (c *Client) SaveFile(ctx context.Context, CID *cid.Cid, dealID retrievalmarket.DealID) error

func (*Client) StartDeal

func (c *Client) StartDeal(ctx context.Context, CID *cid.Cid, dataSizeBytes uint64) (*cid.Cid, string, error)

func (*Client) StartRetrieve

func (c *Client) StartRetrieve(ctx context.Context, CID *cid.Cid) (retrievalmarket.DealID, error)

type Config

type Config struct {
	LotusRPCEndpoint string
	BaseURL          string
	AuthToken        string
	DealsMaxPrice    uint64
	Miners           []string
	VerifiedDeals    bool
}

type DealStatus

type DealStatus = storagemarket.StorageDealStatus

Jump to

Keyboard shortcuts

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