market

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0, MIT Imports: 16 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v0.5.0

type API struct {
	fx.In

	full.ChainAPI
	full.StateAPI
	full.MpoolAPI
}

API is the dependencies need to run a fund manager

type FundMgr

type FundMgr struct {
	// contains filtered or unexported fields
}

FundMgr monitors available balances and adds funds when EnsureAvailable is called

func StartFundManager added in v0.5.0

func StartFundManager(lc fx.Lifecycle, api API) *FundMgr

StartFundManager creates a new fund manager and sets up event hooks to manage state changes

func (*FundMgr) EnsureAvailable

func (fm *FundMgr) EnsureAvailable(ctx context.Context, addr, wallet address.Address, amt types.BigInt) (cid.Cid, error)

EnsureAvailable looks at the available balance in escrow for a given address, and if less than the passed in amount, adds the difference

Jump to

Keyboard shortcuts

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