market

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type BalanceTable

type BalanceTable interface {
	ForEach(cb func(address.Address, abi.TokenAmount) error) error
	Get(key address.Address) (abi.TokenAmount, error)
}

type ClientDealProposal

type ClientDealProposal = market3.ClientDealProposal

type DataIndex

type DataIndex = market3.DataIndex

type DataIndexes

type DataIndexes interface {
	ForEach(epoch abi.ChainEpoch, cb func(provider address.Address, index DataIndex) error) error
}

type DealIDState

type DealIDState struct {
	ID   abi.DealID
	Deal DealState
}

type DealProposal

type DealProposal struct {
	PieceCID  cid.Cid
	PieceSize abi.PaddedPieceSize
	/* VerifiedDeal         bool */
	Client     address.Address
	Provider   address.Address
	Label      string
	StartEpoch abi.ChainEpoch
}

type DealProposalChanges

type DealProposalChanges struct {
	Added   []ProposalIDState
	Removed []ProposalIDState
}

func DiffDealProposals

func DiffDealProposals(pre, cur DealProposals) (*DealProposalChanges, error)

type DealProposals

type DealProposals interface {
	ForEach(cb func(id abi.DealID, dp DealProposal) error) error
	Get(id abi.DealID) (*DealProposal, bool, error)
	// contains filtered or unexported methods
}

type DealState

type DealState struct {
	SectorStartEpoch abi.ChainEpoch // -1 if not yet included in proven sector
	LastUpdatedEpoch abi.ChainEpoch // -1 if deal state never updated
	SlashEpoch       abi.ChainEpoch // -1 if deal never slashed
}

func EmptyDealState

func EmptyDealState() *DealState

type DealStateChange

type DealStateChange struct {
	ID   abi.DealID
	From *DealState
	To   *DealState
}

DealStateChange is a change in deal state from -> to

type DealStateChanges

type DealStateChanges struct {
	Added    []DealIDState
	Modified []DealStateChange
	Removed  []DealIDState
}

func DiffDealStates

func DiffDealStates(pre, cur DealStates) (*DealStateChanges, error)

type DealStates

type DealStates interface {
	ForEach(cb func(id abi.DealID, ds DealState) error) error
	Get(id abi.DealID) (*DealState, bool, error)
	// contains filtered or unexported methods
}

type ProposalIDState

type ProposalIDState struct {
	ID       abi.DealID
	Proposal DealProposal
}

type PublishStorageDealsParams

type PublishStorageDealsParams = market3.PublishStorageDealsParams

type PublishStorageDealsReturn

type PublishStorageDealsReturn = market3.PublishStorageDealsReturn

type Quotas

type Quotas interface {
	InitialQuota() int64
	RemainingQuota(pieceCID cid.Cid) (int64, error)
}

type State

type State interface {
	cbor.Marshaler
	// BalancesChanged(State) (bool, error)
	// EscrowTable() (BalanceTable, error)
	// LockedTable() (BalanceTable, error)
	TotalLocked() (abi.TokenAmount, error)
	StatesChanged(State) (bool, error)
	States() (DealStates, error)
	ProposalsChanged(State) (bool, error)
	Proposals() (DealProposals, error)
	Quotas() (Quotas, error)
	DataIndexes() (DataIndexes, error)
	HasPendingPiece(address.Address, []cid.Cid) (bool, error)
}

func Load

func Load(store adt.Store, act *types.Actor) (st State, err error)

type StorageDataRef

type StorageDataRef = market3.StorageDataRef

type VerifyDealsForActivationParams

type VerifyDealsForActivationParams = market3.VerifyDealsForActivationParams

Jump to

Keyboard shortcuts

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