full

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0, MIT Imports: 55 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainAPI

type ChainAPI struct {
	fx.In

	WalletAPI

	Chain *store.ChainStore
}

func (*ChainAPI) ChainExport added in v0.2.6

func (a *ChainAPI) ChainExport(ctx context.Context, tsk types.TipSetKey) (<-chan []byte, error)

func (*ChainAPI) ChainGetBlock

func (a *ChainAPI) ChainGetBlock(ctx context.Context, msg cid.Cid) (*types.BlockHeader, error)

func (*ChainAPI) ChainGetBlockMessages

func (a *ChainAPI) ChainGetBlockMessages(ctx context.Context, msg cid.Cid) (*api.BlockMessages, error)

func (*ChainAPI) ChainGetGenesis

func (a *ChainAPI) ChainGetGenesis(ctx context.Context) (*types.TipSet, error)

func (*ChainAPI) ChainGetMessage added in v0.1.6

func (a *ChainAPI) ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error)

func (*ChainAPI) ChainGetNode added in v0.1.5

func (a *ChainAPI) ChainGetNode(ctx context.Context, p string) (*api.IpldObject, error)

func (*ChainAPI) ChainGetParentMessages

func (a *ChainAPI) ChainGetParentMessages(ctx context.Context, bcid cid.Cid) ([]api.Message, error)

func (*ChainAPI) ChainGetParentReceipts

func (a *ChainAPI) ChainGetParentReceipts(ctx context.Context, bcid cid.Cid) ([]*types.MessageReceipt, error)

func (*ChainAPI) ChainGetPath added in v0.2.5

func (a *ChainAPI) ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*api.HeadChange, error)

func (*ChainAPI) ChainGetRandomness

func (a *ChainAPI) ChainGetRandomness(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error)

func (*ChainAPI) ChainGetTipSet

func (a *ChainAPI) ChainGetTipSet(ctx context.Context, key types.TipSetKey) (*types.TipSet, error)

func (*ChainAPI) ChainGetTipSetByHeight

func (a *ChainAPI) ChainGetTipSetByHeight(ctx context.Context, h abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)

func (*ChainAPI) ChainHasObj added in v0.2.8

func (a *ChainAPI) ChainHasObj(ctx context.Context, obj cid.Cid) (bool, error)

func (*ChainAPI) ChainHead

func (a *ChainAPI) ChainHead(context.Context) (*types.TipSet, error)

func (*ChainAPI) ChainNotify

func (a *ChainAPI) ChainNotify(ctx context.Context) (<-chan []*api.HeadChange, error)

func (*ChainAPI) ChainReadObj

func (a *ChainAPI) ChainReadObj(ctx context.Context, obj cid.Cid) ([]byte, error)

func (*ChainAPI) ChainSetHead

func (a *ChainAPI) ChainSetHead(ctx context.Context, tsk types.TipSetKey) error

func (*ChainAPI) ChainStatObj added in v0.3.0

func (a *ChainAPI) ChainStatObj(ctx context.Context, obj cid.Cid, base cid.Cid) (api.ObjStat, error)

func (*ChainAPI) ChainTipSetWeight

func (a *ChainAPI) ChainTipSetWeight(ctx context.Context, tsk types.TipSetKey) (types.BigInt, error)

type MpoolAPI

type MpoolAPI struct {
	fx.In

	WalletAPI

	Chain *store.ChainStore

	Mpool *messagepool.MessagePool
}

func (*MpoolAPI) MpoolEstimateGasPrice added in v0.3.0

func (a *MpoolAPI) MpoolEstimateGasPrice(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (types.BigInt, error)

func (*MpoolAPI) MpoolGetNonce

func (a *MpoolAPI) MpoolGetNonce(ctx context.Context, addr address.Address) (uint64, error)

func (*MpoolAPI) MpoolPending

func (a *MpoolAPI) MpoolPending(ctx context.Context, tsk types.TipSetKey) ([]*types.SignedMessage, error)

func (*MpoolAPI) MpoolPush

func (a *MpoolAPI) MpoolPush(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error)

func (*MpoolAPI) MpoolPushMessage

func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message) (*types.SignedMessage, error)

func (*MpoolAPI) MpoolSub

func (a *MpoolAPI) MpoolSub(ctx context.Context) (<-chan api.MpoolUpdate, error)

type MsigAPI added in v0.3.0

type MsigAPI struct {
	fx.In

	WalletAPI WalletAPI
	StateAPI  StateAPI
	MpoolAPI  MpoolAPI
}

func (*MsigAPI) MsigApprove added in v0.3.0

func (a *MsigAPI) MsigApprove(ctx context.Context, msig address.Address, txID uint64, proposer address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error)

func (*MsigAPI) MsigCancel added in v0.3.0

func (a *MsigAPI) MsigCancel(ctx context.Context, msig address.Address, txID uint64, proposer address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error)

func (*MsigAPI) MsigCreate added in v0.3.0

func (a *MsigAPI) MsigCreate(ctx context.Context, req int64, addrs []address.Address, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error)

func (*MsigAPI) MsigPropose added in v0.3.0

func (a *MsigAPI) MsigPropose(ctx context.Context, msig address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error)

type StateAPI

type StateAPI struct {
	fx.In

	// TODO: the wallet here is only needed because we have the MinerCreateBlock
	// API attached to the state API. It probably should live somewhere better
	Wallet *wallet.Wallet

	ProofVerifier ffiwrapper.Verifier
	StateManager  *stmgr.StateManager
	Chain         *store.ChainStore
	Beacon        beacon.RandomBeacon
}

func (*StateAPI) MinerCreateBlock

func (a *StateAPI) MinerCreateBlock(ctx context.Context, bt *api.BlockTemplate) (*types.BlockMsg, error)

func (*StateAPI) MinerGetBaseInfo added in v0.3.0

func (a *StateAPI) MinerGetBaseInfo(ctx context.Context, maddr address.Address, epoch abi.ChainEpoch, tsk types.TipSetKey) (*api.MiningBaseInfo, error)

This is on StateAPI because miner.Miner requires this, and MinerAPI requires miner.Miner

func (*StateAPI) MsigGetAvailableBalance added in v0.2.8

func (a *StateAPI) MsigGetAvailableBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.BigInt, error)

func (*StateAPI) StateAccountKey added in v0.3.0

func (a *StateAPI) StateAccountKey(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)

func (*StateAPI) StateAllMinerFaults added in v0.3.1

func (a *StateAPI) StateAllMinerFaults(ctx context.Context, lookback abi.ChainEpoch, endTsk types.TipSetKey) ([]*api.Fault, error)

func (*StateAPI) StateCall

func (a *StateAPI) StateCall(ctx context.Context, msg *types.Message, tsk types.TipSetKey) (*api.InvocResult, error)

func (*StateAPI) StateChangedActors

func (a *StateAPI) StateChangedActors(ctx context.Context, old cid.Cid, new cid.Cid) (map[string]types.Actor, error)

func (*StateAPI) StateCompute added in v0.2.5

func (a *StateAPI) StateCompute(ctx context.Context, height abi.ChainEpoch, msgs []*types.Message, tsk types.TipSetKey) (*api.ComputeStateOutput, error)

func (*StateAPI) StateGetActor

func (a *StateAPI) StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error)

func (*StateAPI) StateGetReceipt

func (a *StateAPI) StateGetReceipt(ctx context.Context, msg cid.Cid, tsk types.TipSetKey) (*types.MessageReceipt, error)

func (*StateAPI) StateListActors

func (a *StateAPI) StateListActors(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)

func (*StateAPI) StateListMessages added in v0.1.6

func (a *StateAPI) StateListMessages(ctx context.Context, match *types.Message, tsk types.TipSetKey, toheight abi.ChainEpoch) ([]cid.Cid, error)

func (*StateAPI) StateListMiners

func (a *StateAPI) StateListMiners(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)

func (*StateAPI) StateLookupID

func (a *StateAPI) StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)

func (*StateAPI) StateMarketBalance

func (a *StateAPI) StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (api.MarketBalance, error)

func (*StateAPI) StateMarketDeals

func (a *StateAPI) StateMarketDeals(ctx context.Context, tsk types.TipSetKey) (map[string]api.MarketDeal, error)

func (*StateAPI) StateMarketParticipants

func (a *StateAPI) StateMarketParticipants(ctx context.Context, tsk types.TipSetKey) (map[string]api.MarketBalance, error)

func (*StateAPI) StateMarketStorageDeal

func (a *StateAPI) StateMarketStorageDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*api.MarketDeal, error)

func (*StateAPI) StateMinerAvailableBalance added in v0.3.0

func (a *StateAPI) StateMinerAvailableBalance(ctx context.Context, maddr address.Address, tsk types.TipSetKey) (types.BigInt, error)

func (*StateAPI) StateMinerDeadlines added in v0.3.0

func (a *StateAPI) StateMinerDeadlines(ctx context.Context, m address.Address, tsk types.TipSetKey) (*miner.Deadlines, error)

func (*StateAPI) StateMinerFaults added in v0.2.8

func (a *StateAPI) StateMinerFaults(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.BitField, error)

func (*StateAPI) StateMinerInfo added in v0.3.0

func (a *StateAPI) StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (api.MinerInfo, error)

func (*StateAPI) StateMinerInitialPledgeCollateral added in v0.3.0

func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr address.Address, snum abi.SectorNumber, tsk types.TipSetKey) (types.BigInt, error)

func (*StateAPI) StateMinerPower

func (a *StateAPI) StateMinerPower(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*api.MinerPower, error)

func (*StateAPI) StateMinerProvingDeadline added in v0.3.0

func (a *StateAPI) StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*miner.DeadlineInfo, error)

func (*StateAPI) StateMinerProvingSet

func (a *StateAPI) StateMinerProvingSet(ctx context.Context, addr address.Address, tsk types.TipSetKey) ([]*api.ChainSectorInfo, error)

func (*StateAPI) StateMinerRecoveries added in v0.3.1

func (a *StateAPI) StateMinerRecoveries(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.BitField, error)

func (*StateAPI) StateMinerSectorCount added in v0.1.5

func (a *StateAPI) StateMinerSectorCount(ctx context.Context, addr address.Address, tsk types.TipSetKey) (api.MinerSectors, error)

func (*StateAPI) StateMinerSectors

func (a *StateAPI) StateMinerSectors(ctx context.Context, addr address.Address, filter *abi.BitField, filterOut bool, tsk types.TipSetKey) ([]*api.ChainSectorInfo, error)

func (*StateAPI) StateNetworkName added in v0.3.0

func (a *StateAPI) StateNetworkName(ctx context.Context) (dtypes.NetworkName, error)

func (*StateAPI) StatePledgeCollateral

func (a *StateAPI) StatePledgeCollateral(ctx context.Context, tsk types.TipSetKey) (types.BigInt, error)

func (*StateAPI) StateReadState

func (a *StateAPI) StateReadState(ctx context.Context, act *types.Actor, tsk types.TipSetKey) (*api.ActorState, error)

func (*StateAPI) StateReplay

func (a *StateAPI) StateReplay(ctx context.Context, tsk types.TipSetKey, mc cid.Cid) (*api.InvocResult, error)

func (*StateAPI) StateSearchMsg added in v0.3.0

func (a *StateAPI) StateSearchMsg(ctx context.Context, msg cid.Cid) (*api.MsgLookup, error)

func (*StateAPI) StateSectorGetInfo added in v0.3.1

func (a *StateAPI) StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error)

func (*StateAPI) StateSectorPreCommitInfo added in v0.3.0

func (a *StateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error)

func (*StateAPI) StateWaitMsg

func (a *StateAPI) StateWaitMsg(ctx context.Context, msg cid.Cid, confidence uint64) (*api.MsgLookup, error)

type SyncAPI

type SyncAPI struct {
	fx.In

	Syncer  *chain.Syncer
	PubSub  *pubsub.PubSub
	NetName dtypes.NetworkName
}

func (*SyncAPI) SyncCheckBad added in v0.2.8

func (a *SyncAPI) SyncCheckBad(ctx context.Context, bcid cid.Cid) (string, error)

func (*SyncAPI) SyncIncomingBlocks

func (a *SyncAPI) SyncIncomingBlocks(ctx context.Context) (<-chan *types.BlockHeader, error)

func (*SyncAPI) SyncMarkBad added in v0.1.6

func (a *SyncAPI) SyncMarkBad(ctx context.Context, bcid cid.Cid) error

func (*SyncAPI) SyncState

func (a *SyncAPI) SyncState(ctx context.Context) (*api.SyncState, error)

func (*SyncAPI) SyncSubmitBlock

func (a *SyncAPI) SyncSubmitBlock(ctx context.Context, blk *types.BlockMsg) error

type WalletAPI

type WalletAPI struct {
	fx.In

	StateManager *stmgr.StateManager
	Wallet       *wallet.Wallet
}

func (*WalletAPI) WalletBalance

func (a *WalletAPI) WalletBalance(ctx context.Context, addr address.Address) (types.BigInt, error)

func (*WalletAPI) WalletDefaultAddress

func (a *WalletAPI) WalletDefaultAddress(ctx context.Context) (address.Address, error)

func (*WalletAPI) WalletDelete added in v0.4.0

func (a *WalletAPI) WalletDelete(ctx context.Context, addr address.Address) error

func (*WalletAPI) WalletExport

func (a *WalletAPI) WalletExport(ctx context.Context, addr address.Address) (*types.KeyInfo, error)

func (*WalletAPI) WalletHas

func (a *WalletAPI) WalletHas(ctx context.Context, addr address.Address) (bool, error)

func (*WalletAPI) WalletImport

func (a *WalletAPI) WalletImport(ctx context.Context, ki *types.KeyInfo) (address.Address, error)

func (*WalletAPI) WalletList

func (a *WalletAPI) WalletList(ctx context.Context) ([]address.Address, error)

func (*WalletAPI) WalletNew

func (a *WalletAPI) WalletNew(ctx context.Context, typ crypto.SigType) (address.Address, error)

func (*WalletAPI) WalletSetDefault

func (a *WalletAPI) WalletSetDefault(ctx context.Context, addr address.Address) error

func (*WalletAPI) WalletSign

func (a *WalletAPI) WalletSign(ctx context.Context, k address.Address, msg []byte) (*crypto.Signature, error)

func (*WalletAPI) WalletSignMessage

func (a *WalletAPI) WalletSignMessage(ctx context.Context, k address.Address, msg *types.Message) (*types.SignedMessage, error)

func (*WalletAPI) WalletVerify added in v0.2.10

func (a *WalletAPI) WalletVerify(ctx context.Context, k address.Address, msg []byte, sig *crypto.Signature) bool

Jump to

Keyboard shortcuts

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