market

package
v0.12.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0, MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AllCodes

func AllCodes() []cid.Cid

func NewMarketProposalsDiffContainer

func NewMarketProposalsDiffContainer(pre, cur DealProposals) *marketProposalsDiffContainer

func NewMarketStatesDiffContainer

func NewMarketStatesDiffContainer(pre, cur DealStates) *marketStatesDiffContainer

func VersionCodes added in v0.11.0

func VersionCodes() map[actors.Version]cid.Cid

Types

type DealIDState

type DealIDState struct {
	ID   abi.DealID
	Deal DealState
}

type DealProposal

type DealProposal = market8.DealProposal

type DealProposalChanges

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

func DiffDealProposals

func DiffDealProposals(ctx context.Context, store adt.Store, pre, cur State) (*DealProposalChanges, error)

type DealProposals

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

type DealState

type DealState = market8.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(ctx context.Context, store adt.Store, pre, cur State) (*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 market8.DealProposal
}

type State

type State interface {
	cbor.Marshaler

	Code() cid.Cid
	ActorKey() string
	ActorVersion() actors.Version

	StatesChanged(State) (bool, error)
	States() (DealStates, error)
	ProposalsChanged(State) (bool, error)
	Proposals() (DealProposals, error)

	DealProposalsAmtBitwidth() int
	DealStatesAmtBitwidth() int
}

func Load

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

Jump to

Keyboard shortcuts

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