deals

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ImportPath string
}

Config contains configuration for storing deals.

type DealRecordsConfig added in v1.0.0

type DealRecordsConfig struct {
	FromAddrs      []string
	DataCids       []string
	IncludePending bool
	IncludeFinal   bool
	Ascending      bool
}

DealRecordsConfig specifies the options for DealsManager.List.

type DealRecordsOption added in v1.0.0

type DealRecordsOption func(*DealRecordsConfig)

DealRecordsOption updates a ListDealRecordsConfig.

func WithAscending

func WithAscending(ascending bool) DealRecordsOption

WithAscending specifies to sort the results in ascending order. Default is descending order. Records are sorted by timestamp.

func WithDataCids

func WithDataCids(cids ...string) DealRecordsOption

WithDataCids limits the results to deals for the provided data cids. If WithFromAddrs is also provided, this is an AND operation.

func WithFromAddrs

func WithFromAddrs(addrs ...string) DealRecordsOption

WithFromAddrs limits the results deals initiated from the provided wallet addresses. If WithDataCids is also provided, this is an AND operation.

func WithIncludeFinal

func WithIncludeFinal(includeFinal bool) DealRecordsOption

WithIncludeFinal specifies whether or not to include final deals in the results. Default is false. Ignored for ListRetrievalDealRecords.

func WithIncludePending

func WithIncludePending(includePending bool) DealRecordsOption

WithIncludePending specifies whether or not to include pending deals in the results. Default is false. Ignored for ListRetrievalDealRecords.

type Option

type Option func(*Config) error

Option sets values on a Config.

func WithImportPath

func WithImportPath(path string) Option

WithImportPath indicates the import path that will be used to store data to later be imported to Lotus.

type RetrievalDealInfo

type RetrievalDealInfo struct {
	RootCid                 cid.Cid
	Size                    uint64
	MinPrice                uint64
	PaymentInterval         uint64
	PaymentIntervalIncrease uint64
	Miner                   string
	MinerPeerID             string
}

RetrievalDealInfo contains information about a retrieval deal.

type RetrievalDealRecord

type RetrievalDealRecord struct {
	Addr     string
	DealInfo RetrievalDealInfo
	Time     int64
}

RetrievalDealRecord represents a retrieval deal log record.

type StorageDealConfig

type StorageDealConfig struct {
	Miner           string
	EpochPrice      uint64
	FastRetrieval   bool
	DealStartOffset int64
}

StorageDealConfig contains information about a storage proposal for a miner.

type StorageDealInfo

type StorageDealInfo struct {
	ProposalCid cid.Cid
	StateID     uint64
	StateName   string
	Miner       string

	PieceCID cid.Cid
	Size     uint64

	PricePerEpoch uint64
	StartEpoch    uint64
	Duration      uint64

	DealID          uint64
	ActivationEpoch int64
	Message         string
}

StorageDealInfo contains information about a proposed storage deal.

type StorageDealRecord

type StorageDealRecord struct {
	RootCid  cid.Cid
	Addr     string
	DealInfo StorageDealInfo
	Time     int64
	Pending  bool
}

StorageDealRecord represents a storage deal log record.

type StoreResult

type StoreResult struct {
	ProposalCid cid.Cid
	Config      StorageDealConfig
	Success     bool
	Message     string
}

StoreResult contains information about Executing deals.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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