2019-12-09 17:08:32 +00:00
|
|
|
package apistruct
|
2019-06-29 09:19:06 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2019-12-05 04:43:54 +00:00
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
"github.com/filecoin-project/specs-actors/actors/abi"
|
2020-02-12 23:52:36 +00:00
|
|
|
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
|
|
|
"github.com/filecoin-project/specs-actors/actors/crypto"
|
2020-02-09 06:06:32 +00:00
|
|
|
|
|
|
|
sectorbuilder "github.com/filecoin-project/go-sectorbuilder"
|
2019-06-29 09:19:06 +00:00
|
|
|
|
2019-09-24 21:13:47 +00:00
|
|
|
"github.com/ipfs/go-cid"
|
2019-07-25 00:55:19 +00:00
|
|
|
"github.com/libp2p/go-libp2p-core/network"
|
2019-09-24 21:13:47 +00:00
|
|
|
"github.com/libp2p/go-libp2p-core/peer"
|
2019-07-25 00:55:19 +00:00
|
|
|
|
2019-12-19 20:13:17 +00:00
|
|
|
"github.com/filecoin-project/go-address"
|
2020-02-08 02:18:32 +00:00
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
"github.com/filecoin-project/lotus/api"
|
2019-10-18 04:47:41 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/store"
|
|
|
|
"github.com/filecoin-project/lotus/chain/types"
|
2019-06-29 09:19:06 +00:00
|
|
|
)
|
|
|
|
|
2019-07-23 20:05:44 +00:00
|
|
|
// All permissions are listed in permissioned.go
|
|
|
|
var _ = AllPermissions
|
|
|
|
|
2019-07-24 00:09:34 +00:00
|
|
|
type CommonStruct struct {
|
2019-07-24 01:10:26 +00:00
|
|
|
Internal struct {
|
2019-12-09 17:08:32 +00:00
|
|
|
AuthVerify func(ctx context.Context, token string) ([]api.Permission, error) `perm:"read"`
|
|
|
|
AuthNew func(ctx context.Context, perms []api.Permission) ([]byte, error) `perm:"admin"`
|
2019-07-23 17:27:45 +00:00
|
|
|
|
2019-07-25 00:55:19 +00:00
|
|
|
NetConnectedness func(context.Context, peer.ID) (network.Connectedness, error) `perm:"read"`
|
|
|
|
NetPeers func(context.Context) ([]peer.AddrInfo, error) `perm:"read"`
|
|
|
|
NetConnect func(context.Context, peer.AddrInfo) error `perm:"write"`
|
|
|
|
NetAddrsListen func(context.Context) (peer.AddrInfo, error) `perm:"read"`
|
|
|
|
NetDisconnect func(context.Context, peer.ID) error `perm:"write"`
|
2019-07-24 00:09:34 +00:00
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
ID func(context.Context) (peer.ID, error) `perm:"read"`
|
|
|
|
Version func(context.Context) (api.Version, error) `perm:"read"`
|
2019-07-24 00:09:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// FullNodeStruct implements API passing calls to user-provided function values.
|
|
|
|
type FullNodeStruct struct {
|
|
|
|
CommonStruct
|
2019-07-08 19:07:16 +00:00
|
|
|
|
2019-07-24 00:09:34 +00:00
|
|
|
Internal struct {
|
2020-01-15 00:24:08 +00:00
|
|
|
ChainNotify func(context.Context) (<-chan []*store.HeadChange, error) `perm:"read"`
|
|
|
|
ChainHead func(context.Context) (*types.TipSet, error) `perm:"read"`
|
|
|
|
ChainGetRandomness func(context.Context, types.TipSetKey, int64) ([]byte, error) `perm:"read"`
|
|
|
|
ChainGetBlock func(context.Context, cid.Cid) (*types.BlockHeader, error) `perm:"read"`
|
|
|
|
ChainGetTipSet func(context.Context, types.TipSetKey) (*types.TipSet, error) `perm:"read"`
|
|
|
|
ChainGetBlockMessages func(context.Context, cid.Cid) (*api.BlockMessages, error) `perm:"read"`
|
|
|
|
ChainGetParentReceipts func(context.Context, cid.Cid) ([]*types.MessageReceipt, error) `perm:"read"`
|
|
|
|
ChainGetParentMessages func(context.Context, cid.Cid) ([]api.Message, error) `perm:"read"`
|
2020-02-08 02:18:37 +00:00
|
|
|
ChainGetTipSetByHeight func(context.Context, abi.ChainEpoch, *types.TipSet) (*types.TipSet, error) `perm:"read"`
|
2020-01-15 00:24:08 +00:00
|
|
|
ChainReadObj func(context.Context, cid.Cid) ([]byte, error) `perm:"read"`
|
2020-02-04 02:45:20 +00:00
|
|
|
ChainHasObj func(context.Context, cid.Cid) (bool, error) `perm:"read"`
|
2020-01-15 00:24:08 +00:00
|
|
|
ChainSetHead func(context.Context, *types.TipSet) error `perm:"admin"`
|
|
|
|
ChainGetGenesis func(context.Context) (*types.TipSet, error) `perm:"read"`
|
|
|
|
ChainTipSetWeight func(context.Context, *types.TipSet) (types.BigInt, error) `perm:"read"`
|
|
|
|
ChainGetNode func(ctx context.Context, p string) (interface{}, error) `perm:"read"`
|
|
|
|
ChainGetMessage func(context.Context, cid.Cid) (*types.Message, error) `perm:"read"`
|
|
|
|
ChainGetPath func(context.Context, types.TipSetKey, types.TipSetKey) ([]*store.HeadChange, error) `perm:"read"`
|
2020-01-20 23:51:02 +00:00
|
|
|
ChainExport func(context.Context, *types.TipSet) (<-chan []byte, error) `perm:"read"`
|
2019-07-09 15:19:27 +00:00
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
SyncState func(context.Context) (*api.SyncState, error) `perm:"read"`
|
2019-11-18 21:39:07 +00:00
|
|
|
SyncSubmitBlock func(ctx context.Context, blk *types.BlockMsg) error `perm:"write"`
|
|
|
|
SyncIncomingBlocks func(ctx context.Context) (<-chan *types.BlockHeader, error) `perm:"read"`
|
2020-01-08 12:34:53 +00:00
|
|
|
SyncMarkBad func(ctx context.Context, bcid cid.Cid) error `perm:"admin"`
|
2019-09-30 21:06:47 +00:00
|
|
|
|
2019-09-16 21:26:19 +00:00
|
|
|
MpoolPending func(context.Context, *types.TipSet) ([]*types.SignedMessage, error) `perm:"read"`
|
2020-01-07 16:44:55 +00:00
|
|
|
MpoolPush func(context.Context, *types.SignedMessage) (cid.Cid, error) `perm:"write"`
|
2019-09-17 08:15:26 +00:00
|
|
|
MpoolPushMessage func(context.Context, *types.Message) (*types.SignedMessage, error) `perm:"sign"`
|
2019-11-17 07:44:06 +00:00
|
|
|
MpoolGetNonce func(context.Context, address.Address) (uint64, error) `perm:"read"`
|
2019-12-09 17:08:32 +00:00
|
|
|
MpoolSub func(context.Context) (<-chan api.MpoolUpdate, error) `perm:"read"`
|
2019-07-11 02:36:43 +00:00
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
MinerCreateBlock func(context.Context, address.Address, *types.TipSet, *types.Ticket, *types.EPostProof, []*types.SignedMessage, abi.ChainEpoch, uint64) (*types.BlockMsg, error) `perm:"write"`
|
2019-07-09 22:58:51 +00:00
|
|
|
|
2020-02-13 00:15:33 +00:00
|
|
|
WalletNew func(context.Context, crypto.SigType) (address.Address, error) `perm:"write"`
|
2019-08-09 15:59:12 +00:00
|
|
|
WalletHas func(context.Context, address.Address) (bool, error) `perm:"write"`
|
|
|
|
WalletList func(context.Context) ([]address.Address, error) `perm:"write"`
|
|
|
|
WalletBalance func(context.Context, address.Address) (types.BigInt, error) `perm:"read"`
|
2020-02-13 00:15:33 +00:00
|
|
|
WalletSign func(context.Context, address.Address, []byte) (*crypto.Signature, error) `perm:"sign"`
|
2019-08-09 15:59:12 +00:00
|
|
|
WalletSignMessage func(context.Context, address.Address, *types.Message) (*types.SignedMessage, error) `perm:"sign"`
|
|
|
|
WalletDefaultAddress func(context.Context) (address.Address, error) `perm:"write"`
|
2019-10-17 10:18:40 +00:00
|
|
|
WalletSetDefault func(context.Context, address.Address) error `perm:"admin"`
|
2019-10-08 09:46:36 +00:00
|
|
|
WalletExport func(context.Context, address.Address) (*types.KeyInfo, error) `perm:"admin"`
|
|
|
|
WalletImport func(context.Context, *types.KeyInfo) (address.Address, error) `perm:"admin"`
|
2019-10-08 09:17:03 +00:00
|
|
|
|
2019-12-13 19:15:56 +00:00
|
|
|
ClientImport func(ctx context.Context, path string) (cid.Cid, error) `perm:"admin"`
|
|
|
|
ClientListImports func(ctx context.Context) ([]api.Import, error) `perm:"write"`
|
|
|
|
ClientHasLocal func(ctx context.Context, root cid.Cid) (bool, error) `perm:"write"`
|
|
|
|
ClientFindData func(ctx context.Context, root cid.Cid) ([]api.QueryOffer, error) `perm:"read"`
|
|
|
|
ClientStartDeal func(ctx context.Context, data cid.Cid, addr address.Address, miner address.Address, price types.BigInt, blocksDuration uint64) (*cid.Cid, error) `perm:"admin"`
|
|
|
|
ClientGetDealInfo func(context.Context, cid.Cid) (*api.DealInfo, error) `perm:"read"`
|
|
|
|
ClientListDeals func(ctx context.Context) ([]api.DealInfo, error) `perm:"write"`
|
|
|
|
ClientRetrieve func(ctx context.Context, order api.RetrievalOrder, path string) error `perm:"admin"`
|
|
|
|
ClientQueryAsk func(ctx context.Context, p peer.ID, miner address.Address) (*types.SignedStorageAsk, error) `perm:"read"`
|
2019-08-07 06:35:57 +00:00
|
|
|
|
2020-02-13 00:15:33 +00:00
|
|
|
StateMinerSectors func(context.Context, address.Address, *types.TipSet) ([]*api.ChainSectorInfo, error) `perm:"read"`
|
|
|
|
StateMinerProvingSet func(context.Context, address.Address, *types.TipSet) ([]*api.ChainSectorInfo, error) `perm:"read"`
|
|
|
|
StateMinerPower func(context.Context, address.Address, *types.TipSet) (api.MinerPower, error) `perm:"read"`
|
|
|
|
StateMinerWorker func(context.Context, address.Address, *types.TipSet) (address.Address, error) `perm:"read"`
|
|
|
|
StateMinerPeerID func(ctx context.Context, m address.Address, ts *types.TipSet) (peer.ID, error) `perm:"read"`
|
|
|
|
StateMinerPostState func(ctx context.Context, actor address.Address, ts *types.TipSet) (*miner.PoStState, error) `perm:"read"`
|
|
|
|
StateMinerSectorSize func(context.Context, address.Address, *types.TipSet) (abi.SectorSize, error) `perm:"read"`
|
|
|
|
StateMinerFaults func(context.Context, address.Address, *types.TipSet) ([]abi.SectorNumber, error) `perm:"read"`
|
|
|
|
StateCall func(context.Context, *types.Message, *types.TipSet) (*api.MethodCall, error) `perm:"read"`
|
|
|
|
StateReplay func(context.Context, *types.TipSet, cid.Cid) (*api.ReplayResults, error) `perm:"read"`
|
|
|
|
StateGetActor func(context.Context, address.Address, *types.TipSet) (*types.Actor, error) `perm:"read"`
|
|
|
|
StateReadState func(context.Context, *types.Actor, *types.TipSet) (*api.ActorState, error) `perm:"read"`
|
|
|
|
StatePledgeCollateral func(context.Context, *types.TipSet) (types.BigInt, error) `perm:"read"`
|
|
|
|
StateWaitMsg func(context.Context, cid.Cid) (*api.MsgWait, error) `perm:"read"`
|
|
|
|
StateListMiners func(context.Context, *types.TipSet) ([]address.Address, error) `perm:"read"`
|
|
|
|
StateListActors func(context.Context, *types.TipSet) ([]address.Address, error) `perm:"read"`
|
|
|
|
StateMarketBalance func(context.Context, address.Address, *types.TipSet) (api.MarketBalance, error) `perm:"read"`
|
|
|
|
StateMarketParticipants func(context.Context, *types.TipSet) (map[string]api.MarketBalance, error) `perm:"read"`
|
|
|
|
StateMarketDeals func(context.Context, *types.TipSet) (map[string]api.MarketDeal, error) `perm:"read"`
|
|
|
|
StateMarketStorageDeal func(context.Context, abi.DealID, *types.TipSet) (*api.MarketDeal, error) `perm:"read"`
|
|
|
|
StateLookupID func(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) `perm:"read"`
|
|
|
|
StateChangedActors func(context.Context, cid.Cid, cid.Cid) (map[string]types.Actor, error) `perm:"read"`
|
|
|
|
StateGetReceipt func(context.Context, cid.Cid, *types.TipSet) (*types.MessageReceipt, error) `perm:"read"`
|
|
|
|
StateMinerSectorCount func(context.Context, address.Address, *types.TipSet) (api.MinerSectors, error) `perm:"read"`
|
|
|
|
StateListMessages func(ctx context.Context, match *types.Message, ts *types.TipSet, toht abi.ChainEpoch) ([]cid.Cid, error) `perm:"read"`
|
|
|
|
StateCompute func(context.Context, abi.ChainEpoch, []*types.Message, *types.TipSet) (cid.Cid, error) `perm:"read"`
|
2019-08-09 21:41:50 +00:00
|
|
|
|
2020-01-30 01:23:16 +00:00
|
|
|
MsigGetAvailableBalance func(context.Context, address.Address, *types.TipSet) (types.BigInt, error) `perm:"read"`
|
|
|
|
|
2019-11-08 17:15:38 +00:00
|
|
|
MarketEnsureAvailable func(context.Context, address.Address, types.BigInt) error `perm:"sign"`
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
PaychGet func(ctx context.Context, from, to address.Address, ensureFunds types.BigInt) (*api.ChannelInfo, error) `perm:"sign"`
|
|
|
|
PaychList func(context.Context) ([]address.Address, error) `perm:"read"`
|
|
|
|
PaychStatus func(context.Context, address.Address) (*api.PaychStatus, error) `perm:"read"`
|
|
|
|
PaychClose func(context.Context, address.Address) (cid.Cid, error) `perm:"sign"`
|
2020-02-21 19:28:20 +00:00
|
|
|
PaychAllocateLane func(context.Context, address.Address) (uint64, error) `perm:"sign"`
|
2019-12-09 17:08:32 +00:00
|
|
|
PaychNewPayment func(ctx context.Context, from, to address.Address, vouchers []api.VoucherSpec) (*api.PaymentInfo, error) `perm:"sign"`
|
|
|
|
PaychVoucherCheck func(context.Context, *types.SignedVoucher) error `perm:"read"`
|
|
|
|
PaychVoucherCheckValid func(context.Context, address.Address, *types.SignedVoucher) error `perm:"read"`
|
|
|
|
PaychVoucherCheckSpendable func(context.Context, address.Address, *types.SignedVoucher, []byte, []byte) (bool, error) `perm:"read"`
|
|
|
|
PaychVoucherAdd func(context.Context, address.Address, *types.SignedVoucher, []byte, types.BigInt) (types.BigInt, error) `perm:"write"`
|
2019-12-09 23:02:35 +00:00
|
|
|
PaychVoucherCreate func(context.Context, address.Address, types.BigInt, uint64) (*types.SignedVoucher, error) `perm:"sign"`
|
|
|
|
PaychVoucherList func(context.Context, address.Address) ([]*types.SignedVoucher, error) `perm:"write"`
|
2019-12-09 17:08:32 +00:00
|
|
|
PaychVoucherSubmit func(context.Context, address.Address, *types.SignedVoucher) (cid.Cid, error) `perm:"sign"`
|
2019-06-29 09:19:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-11 23:31:59 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerSectorCount(ctx context.Context, addr address.Address, ts *types.TipSet) (api.MinerSectors, error) {
|
|
|
|
return c.Internal.StateMinerSectorCount(ctx, addr, ts)
|
|
|
|
}
|
|
|
|
|
2019-07-24 00:09:34 +00:00
|
|
|
type StorageMinerStruct struct {
|
|
|
|
CommonStruct
|
2019-07-23 17:27:45 +00:00
|
|
|
|
2019-07-24 01:10:26 +00:00
|
|
|
Internal struct {
|
2020-02-09 06:06:32 +00:00
|
|
|
ActorAddress func(context.Context) (address.Address, error) `perm:"read"`
|
|
|
|
ActorSectorSize func(context.Context, address.Address) (abi.SectorSize, error) `perm:"read"`
|
2019-08-10 01:54:45 +00:00
|
|
|
|
2019-12-08 21:48:20 +00:00
|
|
|
PledgeSector func(context.Context) error `perm:"write"`
|
2019-07-27 21:08:10 +00:00
|
|
|
|
2020-02-09 06:06:32 +00:00
|
|
|
SectorsStatus func(context.Context, abi.SectorNumber) (api.SectorInfo, error) `perm:"read"`
|
|
|
|
SectorsList func(context.Context) ([]abi.SectorNumber, error) `perm:"read"`
|
|
|
|
SectorsRefs func(context.Context) (map[string][]api.SealedRef, error) `perm:"read"`
|
|
|
|
SectorsUpdate func(context.Context, abi.SectorNumber, api.SectorState) error `perm:"write"`
|
2019-08-26 10:04:57 +00:00
|
|
|
|
2019-11-21 16:23:42 +00:00
|
|
|
WorkerStats func(context.Context) (sectorbuilder.WorkerStats, error) `perm:"read"`
|
2019-11-21 00:52:59 +00:00
|
|
|
|
2019-12-06 00:27:32 +00:00
|
|
|
WorkerQueue func(ctx context.Context, cfg sectorbuilder.WorkerCfg) (<-chan sectorbuilder.WorkerTask, error) `perm:"admin"` // TODO: worker perm
|
|
|
|
WorkerDone func(ctx context.Context, task uint64, res sectorbuilder.SealRes) error `perm:"admin"`
|
2019-07-24 00:09:34 +00:00
|
|
|
}
|
2019-07-23 17:27:45 +00:00
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *CommonStruct) AuthVerify(ctx context.Context, token string) ([]api.Permission, error) {
|
2019-07-24 00:58:31 +00:00
|
|
|
return c.Internal.AuthVerify(ctx, token)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *CommonStruct) AuthNew(ctx context.Context, perms []api.Permission) ([]byte, error) {
|
2019-07-24 00:58:31 +00:00
|
|
|
return c.Internal.AuthNew(ctx, perms)
|
|
|
|
}
|
|
|
|
|
2019-07-25 00:55:19 +00:00
|
|
|
func (c *CommonStruct) NetConnectedness(ctx context.Context, pid peer.ID) (network.Connectedness, error) {
|
|
|
|
return c.Internal.NetConnectedness(ctx, pid)
|
|
|
|
}
|
|
|
|
|
2019-07-24 00:58:31 +00:00
|
|
|
func (c *CommonStruct) NetPeers(ctx context.Context) ([]peer.AddrInfo, error) {
|
|
|
|
return c.Internal.NetPeers(ctx)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *CommonStruct) NetConnect(ctx context.Context, p peer.AddrInfo) error {
|
|
|
|
return c.Internal.NetConnect(ctx, p)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *CommonStruct) NetAddrsListen(ctx context.Context) (peer.AddrInfo, error) {
|
|
|
|
return c.Internal.NetAddrsListen(ctx)
|
2019-07-25 00:55:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *CommonStruct) NetDisconnect(ctx context.Context, p peer.ID) error {
|
|
|
|
return c.Internal.NetDisconnect(ctx, p)
|
2019-07-24 00:58:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ID implements API.ID
|
|
|
|
func (c *CommonStruct) ID(ctx context.Context) (peer.ID, error) {
|
|
|
|
return c.Internal.ID(ctx)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Version implements API.Version
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *CommonStruct) Version(ctx context.Context) (api.Version, error) {
|
2019-07-24 00:58:31 +00:00
|
|
|
return c.Internal.Version(ctx)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) ClientListImports(ctx context.Context) ([]api.Import, error) {
|
2019-07-12 10:44:01 +00:00
|
|
|
return c.Internal.ClientListImports(ctx)
|
|
|
|
}
|
|
|
|
|
2019-07-24 00:09:34 +00:00
|
|
|
func (c *FullNodeStruct) ClientImport(ctx context.Context, path string) (cid.Cid, error) {
|
2019-07-12 09:59:18 +00:00
|
|
|
return c.Internal.ClientImport(ctx, path)
|
|
|
|
}
|
|
|
|
|
2019-08-26 13:45:36 +00:00
|
|
|
func (c *FullNodeStruct) ClientHasLocal(ctx context.Context, root cid.Cid) (bool, error) {
|
|
|
|
return c.Internal.ClientHasLocal(ctx, root)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) ClientFindData(ctx context.Context, root cid.Cid) ([]api.QueryOffer, error) {
|
2019-08-26 13:45:36 +00:00
|
|
|
return c.Internal.ClientFindData(ctx, root)
|
|
|
|
}
|
|
|
|
|
2019-12-13 19:15:56 +00:00
|
|
|
func (c *FullNodeStruct) ClientStartDeal(ctx context.Context, data cid.Cid, addr address.Address, miner address.Address, price types.BigInt, blocksDuration uint64) (*cid.Cid, error) {
|
|
|
|
return c.Internal.ClientStartDeal(ctx, data, addr, miner, price, blocksDuration)
|
2019-08-01 17:12:41 +00:00
|
|
|
}
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) ClientGetDealInfo(ctx context.Context, deal cid.Cid) (*api.DealInfo, error) {
|
2019-11-06 19:44:28 +00:00
|
|
|
return c.Internal.ClientGetDealInfo(ctx, deal)
|
|
|
|
}
|
2019-08-27 18:45:21 +00:00
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) ClientListDeals(ctx context.Context) ([]api.DealInfo, error) {
|
2019-09-10 14:13:24 +00:00
|
|
|
return c.Internal.ClientListDeals(ctx)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) ClientRetrieve(ctx context.Context, order api.RetrievalOrder, path string) error {
|
2019-08-27 22:10:23 +00:00
|
|
|
return c.Internal.ClientRetrieve(ctx, order, path)
|
2019-08-27 18:45:21 +00:00
|
|
|
}
|
2019-08-01 17:12:41 +00:00
|
|
|
|
2019-09-13 21:00:36 +00:00
|
|
|
func (c *FullNodeStruct) ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*types.SignedStorageAsk, error) {
|
|
|
|
return c.Internal.ClientQueryAsk(ctx, p, miner)
|
|
|
|
}
|
|
|
|
|
2019-07-26 04:54:22 +00:00
|
|
|
func (c *FullNodeStruct) MpoolPending(ctx context.Context, ts *types.TipSet) ([]*types.SignedMessage, error) {
|
2019-07-11 02:36:43 +00:00
|
|
|
return c.Internal.MpoolPending(ctx, ts)
|
|
|
|
}
|
|
|
|
|
2020-01-07 16:44:55 +00:00
|
|
|
func (c *FullNodeStruct) MpoolPush(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error) {
|
2019-07-17 06:15:07 +00:00
|
|
|
return c.Internal.MpoolPush(ctx, smsg)
|
2019-07-17 03:05:55 +00:00
|
|
|
}
|
|
|
|
|
2019-09-17 08:15:26 +00:00
|
|
|
func (c *FullNodeStruct) MpoolPushMessage(ctx context.Context, msg *types.Message) (*types.SignedMessage, error) {
|
2019-09-16 14:17:08 +00:00
|
|
|
return c.Internal.MpoolPushMessage(ctx, msg)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) MpoolSub(ctx context.Context) (<-chan api.MpoolUpdate, error) {
|
2019-11-17 07:44:06 +00:00
|
|
|
return c.Internal.MpoolSub(ctx)
|
|
|
|
}
|
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
func (c *FullNodeStruct) MinerCreateBlock(ctx context.Context, addr address.Address, base *types.TipSet, ticket *types.Ticket, eproof *types.EPostProof, msgs []*types.SignedMessage, height abi.ChainEpoch, ts uint64) (*types.BlockMsg, error) {
|
2019-11-19 15:53:00 +00:00
|
|
|
return c.Internal.MinerCreateBlock(ctx, addr, base, ticket, eproof, msgs, height, ts)
|
2019-07-09 22:58:51 +00:00
|
|
|
}
|
|
|
|
|
2019-07-26 04:54:22 +00:00
|
|
|
func (c *FullNodeStruct) ChainHead(ctx context.Context) (*types.TipSet, error) {
|
2019-07-09 15:19:27 +00:00
|
|
|
return c.Internal.ChainHead(ctx)
|
|
|
|
}
|
|
|
|
|
2019-11-19 15:53:00 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetRandomness(ctx context.Context, pts types.TipSetKey, round int64) ([]byte, error) {
|
|
|
|
return c.Internal.ChainGetRandomness(ctx, pts, round)
|
2019-07-11 02:36:43 +00:00
|
|
|
}
|
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetTipSetByHeight(ctx context.Context, h abi.ChainEpoch, ts *types.TipSet) (*types.TipSet, error) {
|
2019-09-18 00:08:49 +00:00
|
|
|
return c.Internal.ChainGetTipSetByHeight(ctx, h, ts)
|
|
|
|
}
|
|
|
|
|
2020-02-12 23:52:36 +00:00
|
|
|
func (c *FullNodeStruct) WalletNew(ctx context.Context, typ crypto.SigType) (address.Address, error) {
|
2019-07-13 00:41:32 +00:00
|
|
|
return c.Internal.WalletNew(ctx, typ)
|
|
|
|
}
|
|
|
|
|
2019-08-08 17:29:23 +00:00
|
|
|
func (c *FullNodeStruct) WalletHas(ctx context.Context, addr address.Address) (bool, error) {
|
|
|
|
return c.Internal.WalletHas(ctx, addr)
|
|
|
|
}
|
|
|
|
|
2019-07-24 00:09:34 +00:00
|
|
|
func (c *FullNodeStruct) WalletList(ctx context.Context) ([]address.Address, error) {
|
2019-07-13 00:41:32 +00:00
|
|
|
return c.Internal.WalletList(ctx)
|
|
|
|
}
|
|
|
|
|
2019-07-24 00:09:34 +00:00
|
|
|
func (c *FullNodeStruct) WalletBalance(ctx context.Context, a address.Address) (types.BigInt, error) {
|
2019-07-18 20:26:04 +00:00
|
|
|
return c.Internal.WalletBalance(ctx, a)
|
|
|
|
}
|
|
|
|
|
2020-02-12 23:52:36 +00:00
|
|
|
func (c *FullNodeStruct) WalletSign(ctx context.Context, k address.Address, msg []byte) (*crypto.Signature, error) {
|
2019-07-17 03:05:55 +00:00
|
|
|
return c.Internal.WalletSign(ctx, k, msg)
|
|
|
|
}
|
|
|
|
|
2019-08-09 15:59:12 +00:00
|
|
|
func (c *FullNodeStruct) WalletSignMessage(ctx context.Context, k address.Address, msg *types.Message) (*types.SignedMessage, error) {
|
|
|
|
return c.Internal.WalletSignMessage(ctx, k, msg)
|
|
|
|
}
|
|
|
|
|
2019-07-24 00:09:34 +00:00
|
|
|
func (c *FullNodeStruct) WalletDefaultAddress(ctx context.Context) (address.Address, error) {
|
2019-07-17 03:05:55 +00:00
|
|
|
return c.Internal.WalletDefaultAddress(ctx)
|
|
|
|
}
|
|
|
|
|
2019-10-17 10:18:40 +00:00
|
|
|
func (c *FullNodeStruct) WalletSetDefault(ctx context.Context, a address.Address) error {
|
|
|
|
return c.Internal.WalletSetDefault(ctx, a)
|
|
|
|
}
|
|
|
|
|
2019-10-08 09:46:36 +00:00
|
|
|
func (c *FullNodeStruct) WalletExport(ctx context.Context, a address.Address) (*types.KeyInfo, error) {
|
2019-10-08 09:17:03 +00:00
|
|
|
return c.Internal.WalletExport(ctx, a)
|
|
|
|
}
|
|
|
|
|
2019-10-08 09:46:36 +00:00
|
|
|
func (c *FullNodeStruct) WalletImport(ctx context.Context, ki *types.KeyInfo) (address.Address, error) {
|
|
|
|
return c.Internal.WalletImport(ctx, ki)
|
2019-10-08 09:17:03 +00:00
|
|
|
}
|
|
|
|
|
2019-07-24 00:09:34 +00:00
|
|
|
func (c *FullNodeStruct) MpoolGetNonce(ctx context.Context, addr address.Address) (uint64, error) {
|
2019-07-17 06:05:11 +00:00
|
|
|
return c.Internal.MpoolGetNonce(ctx, addr)
|
2019-07-17 03:05:55 +00:00
|
|
|
}
|
|
|
|
|
2019-07-25 22:15:03 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetBlock(ctx context.Context, b cid.Cid) (*types.BlockHeader, error) {
|
2019-07-23 00:54:27 +00:00
|
|
|
return c.Internal.ChainGetBlock(ctx, b)
|
|
|
|
}
|
|
|
|
|
2019-11-08 05:36:50 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetTipSet(ctx context.Context, key types.TipSetKey) (*types.TipSet, error) {
|
|
|
|
return c.Internal.ChainGetTipSet(ctx, key)
|
2019-10-11 06:25:25 +00:00
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetBlockMessages(ctx context.Context, b cid.Cid) (*api.BlockMessages, error) {
|
2019-07-23 00:54:27 +00:00
|
|
|
return c.Internal.ChainGetBlockMessages(ctx, b)
|
|
|
|
}
|
|
|
|
|
2019-10-03 20:22:21 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetParentReceipts(ctx context.Context, b cid.Cid) ([]*types.MessageReceipt, error) {
|
|
|
|
return c.Internal.ChainGetParentReceipts(ctx, b)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetParentMessages(ctx context.Context, b cid.Cid) ([]api.Message, error) {
|
2019-10-03 20:22:21 +00:00
|
|
|
return c.Internal.ChainGetParentMessages(ctx, b)
|
2019-08-07 23:22:35 +00:00
|
|
|
}
|
|
|
|
|
2019-09-18 11:01:52 +00:00
|
|
|
func (c *FullNodeStruct) ChainNotify(ctx context.Context) (<-chan []*store.HeadChange, error) {
|
2019-07-28 19:19:33 +00:00
|
|
|
return c.Internal.ChainNotify(ctx)
|
|
|
|
}
|
|
|
|
|
2019-10-01 16:28:07 +00:00
|
|
|
func (c *FullNodeStruct) ChainReadObj(ctx context.Context, obj cid.Cid) ([]byte, error) {
|
|
|
|
return c.Internal.ChainReadObj(ctx, obj)
|
|
|
|
}
|
|
|
|
|
2020-02-04 02:45:20 +00:00
|
|
|
func (c *FullNodeStruct) ChainHasObj(ctx context.Context, o cid.Cid) (bool, error) {
|
|
|
|
return c.Internal.ChainHasObj(ctx, o)
|
|
|
|
}
|
|
|
|
|
2019-10-10 03:50:50 +00:00
|
|
|
func (c *FullNodeStruct) ChainSetHead(ctx context.Context, ts *types.TipSet) error {
|
|
|
|
return c.Internal.ChainSetHead(ctx, ts)
|
|
|
|
}
|
|
|
|
|
2019-10-11 02:14:22 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetGenesis(ctx context.Context) (*types.TipSet, error) {
|
|
|
|
return c.Internal.ChainGetGenesis(ctx)
|
|
|
|
}
|
|
|
|
|
2019-10-15 05:00:30 +00:00
|
|
|
func (c *FullNodeStruct) ChainTipSetWeight(ctx context.Context, ts *types.TipSet) (types.BigInt, error) {
|
|
|
|
return c.Internal.ChainTipSetWeight(ctx, ts)
|
|
|
|
}
|
|
|
|
|
2019-12-19 15:50:18 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetNode(ctx context.Context, p string) (interface{}, error) {
|
|
|
|
return c.Internal.ChainGetNode(ctx, p)
|
|
|
|
}
|
|
|
|
|
2020-01-07 19:03:11 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error) {
|
|
|
|
return c.Internal.ChainGetMessage(ctx, mc)
|
|
|
|
}
|
|
|
|
|
2020-01-15 00:24:08 +00:00
|
|
|
func (c *FullNodeStruct) ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*store.HeadChange, error) {
|
|
|
|
return c.Internal.ChainGetPath(ctx, from, to)
|
|
|
|
}
|
|
|
|
|
2020-01-20 23:51:02 +00:00
|
|
|
func (c *FullNodeStruct) ChainExport(ctx context.Context, ts *types.TipSet) (<-chan []byte, error) {
|
|
|
|
return c.Internal.ChainExport(ctx, ts)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) SyncState(ctx context.Context) (*api.SyncState, error) {
|
2019-09-30 21:06:47 +00:00
|
|
|
return c.Internal.SyncState(ctx)
|
|
|
|
}
|
|
|
|
|
2019-10-14 14:21:37 +00:00
|
|
|
func (c *FullNodeStruct) SyncSubmitBlock(ctx context.Context, blk *types.BlockMsg) error {
|
|
|
|
return c.Internal.SyncSubmitBlock(ctx, blk)
|
|
|
|
}
|
|
|
|
|
2019-11-18 21:39:07 +00:00
|
|
|
func (c *FullNodeStruct) SyncIncomingBlocks(ctx context.Context) (<-chan *types.BlockHeader, error) {
|
|
|
|
return c.Internal.SyncIncomingBlocks(ctx)
|
|
|
|
}
|
|
|
|
|
2019-12-21 06:10:40 +00:00
|
|
|
func (c *FullNodeStruct) SyncMarkBad(ctx context.Context, bcid cid.Cid) error {
|
|
|
|
return c.Internal.SyncMarkBad(ctx, bcid)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerSectors(ctx context.Context, addr address.Address, ts *types.TipSet) ([]*api.ChainSectorInfo, error) {
|
2019-10-27 10:27:21 +00:00
|
|
|
return c.Internal.StateMinerSectors(ctx, addr, ts)
|
2019-08-07 06:35:57 +00:00
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerProvingSet(ctx context.Context, addr address.Address, ts *types.TipSet) ([]*api.ChainSectorInfo, error) {
|
2019-09-18 02:50:03 +00:00
|
|
|
return c.Internal.StateMinerProvingSet(ctx, addr, ts)
|
2019-08-07 06:35:57 +00:00
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerPower(ctx context.Context, a address.Address, ts *types.TipSet) (api.MinerPower, error) {
|
2019-08-21 16:31:14 +00:00
|
|
|
return c.Internal.StateMinerPower(ctx, a, ts)
|
|
|
|
}
|
|
|
|
|
2019-09-03 04:36:07 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerWorker(ctx context.Context, m address.Address, ts *types.TipSet) (address.Address, error) {
|
|
|
|
return c.Internal.StateMinerWorker(ctx, m, ts)
|
|
|
|
}
|
|
|
|
|
2019-09-16 20:11:17 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerPeerID(ctx context.Context, m address.Address, ts *types.TipSet) (peer.ID, error) {
|
|
|
|
return c.Internal.StateMinerPeerID(ctx, m, ts)
|
|
|
|
}
|
2019-10-16 07:07:16 +00:00
|
|
|
|
2020-02-12 23:52:36 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerPostState(ctx context.Context, actor address.Address, ts *types.TipSet) (*miner.PoStState, error) {
|
|
|
|
return c.Internal.StateMinerPostState(ctx, actor, ts)
|
2019-09-18 00:08:49 +00:00
|
|
|
}
|
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerSectorSize(ctx context.Context, actor address.Address, ts *types.TipSet) (abi.SectorSize, error) {
|
2019-10-16 07:07:16 +00:00
|
|
|
return c.Internal.StateMinerSectorSize(ctx, actor, ts)
|
|
|
|
}
|
|
|
|
|
2020-02-09 06:06:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMinerFaults(ctx context.Context, actor address.Address, ts *types.TipSet) ([]abi.SectorNumber, error) {
|
2020-01-30 00:50:58 +00:00
|
|
|
return c.Internal.StateMinerFaults(ctx, actor, ts)
|
|
|
|
}
|
|
|
|
|
2020-01-15 21:24:01 +00:00
|
|
|
func (c *FullNodeStruct) StateCall(ctx context.Context, msg *types.Message, ts *types.TipSet) (*api.MethodCall, error) {
|
2019-09-06 06:26:02 +00:00
|
|
|
return c.Internal.StateCall(ctx, msg, ts)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) StateReplay(ctx context.Context, ts *types.TipSet, mc cid.Cid) (*api.ReplayResults, error) {
|
2019-09-19 20:25:18 +00:00
|
|
|
return c.Internal.StateReplay(ctx, ts, mc)
|
|
|
|
}
|
|
|
|
|
2019-09-06 06:26:02 +00:00
|
|
|
func (c *FullNodeStruct) StateGetActor(ctx context.Context, actor address.Address, ts *types.TipSet) (*types.Actor, error) {
|
|
|
|
return c.Internal.StateGetActor(ctx, actor, ts)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) StateReadState(ctx context.Context, act *types.Actor, ts *types.TipSet) (*api.ActorState, error) {
|
2019-09-06 06:26:02 +00:00
|
|
|
return c.Internal.StateReadState(ctx, act, ts)
|
|
|
|
}
|
|
|
|
|
2019-09-25 23:32:33 +00:00
|
|
|
func (c *FullNodeStruct) StatePledgeCollateral(ctx context.Context, ts *types.TipSet) (types.BigInt, error) {
|
|
|
|
return c.Internal.StatePledgeCollateral(ctx, ts)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) StateWaitMsg(ctx context.Context, msgc cid.Cid) (*api.MsgWait, error) {
|
2019-10-08 05:51:34 +00:00
|
|
|
return c.Internal.StateWaitMsg(ctx, msgc)
|
|
|
|
}
|
2019-10-12 06:45:48 +00:00
|
|
|
func (c *FullNodeStruct) StateListMiners(ctx context.Context, ts *types.TipSet) ([]address.Address, error) {
|
|
|
|
return c.Internal.StateListMiners(ctx, ts)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *FullNodeStruct) StateListActors(ctx context.Context, ts *types.TipSet) ([]address.Address, error) {
|
|
|
|
return c.Internal.StateListActors(ctx, ts)
|
|
|
|
}
|
2019-10-08 05:51:34 +00:00
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMarketBalance(ctx context.Context, addr address.Address, ts *types.TipSet) (api.MarketBalance, error) {
|
2019-10-22 10:09:36 +00:00
|
|
|
return c.Internal.StateMarketBalance(ctx, addr, ts)
|
|
|
|
}
|
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMarketParticipants(ctx context.Context, ts *types.TipSet) (map[string]api.MarketBalance, error) {
|
2019-10-22 19:29:05 +00:00
|
|
|
return c.Internal.StateMarketParticipants(ctx, ts)
|
|
|
|
}
|
|
|
|
|
2020-02-09 06:06:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMarketDeals(ctx context.Context, ts *types.TipSet) (map[string]api.MarketDeal, error) {
|
2019-10-22 19:29:05 +00:00
|
|
|
return c.Internal.StateMarketDeals(ctx, ts)
|
|
|
|
}
|
|
|
|
|
2020-02-09 06:06:32 +00:00
|
|
|
func (c *FullNodeStruct) StateMarketStorageDeal(ctx context.Context, dealid abi.DealID, ts *types.TipSet) (*api.MarketDeal, error) {
|
2019-11-07 07:57:10 +00:00
|
|
|
return c.Internal.StateMarketStorageDeal(ctx, dealid, ts)
|
|
|
|
}
|
|
|
|
|
2019-11-15 16:39:43 +00:00
|
|
|
func (c *FullNodeStruct) StateLookupID(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) {
|
|
|
|
return c.Internal.StateLookupID(ctx, addr, ts)
|
|
|
|
}
|
|
|
|
|
2019-11-15 18:38:09 +00:00
|
|
|
func (c *FullNodeStruct) StateChangedActors(ctx context.Context, olnstate cid.Cid, newstate cid.Cid) (map[string]types.Actor, error) {
|
|
|
|
return c.Internal.StateChangedActors(ctx, olnstate, newstate)
|
|
|
|
}
|
|
|
|
|
2019-11-19 21:27:25 +00:00
|
|
|
func (c *FullNodeStruct) StateGetReceipt(ctx context.Context, msg cid.Cid, ts *types.TipSet) (*types.MessageReceipt, error) {
|
|
|
|
return c.Internal.StateGetReceipt(ctx, msg, ts)
|
|
|
|
}
|
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
func (c *FullNodeStruct) StateListMessages(ctx context.Context, match *types.Message, ts *types.TipSet, toht abi.ChainEpoch) ([]cid.Cid, error) {
|
2020-01-07 19:03:11 +00:00
|
|
|
return c.Internal.StateListMessages(ctx, match, ts, toht)
|
|
|
|
}
|
|
|
|
|
2020-02-08 02:18:32 +00:00
|
|
|
func (c *FullNodeStruct) StateCompute(ctx context.Context, height abi.ChainEpoch, msgs []*types.Message, ts *types.TipSet) (cid.Cid, error) {
|
2020-01-17 02:33:43 +00:00
|
|
|
return c.Internal.StateCompute(ctx, height, msgs, ts)
|
|
|
|
}
|
|
|
|
|
2020-01-30 01:23:16 +00:00
|
|
|
func (c *FullNodeStruct) MsigGetAvailableBalance(ctx context.Context, a address.Address, ts *types.TipSet) (types.BigInt, error) {
|
|
|
|
return c.Internal.MsigGetAvailableBalance(ctx, a, ts)
|
|
|
|
}
|
|
|
|
|
2019-11-08 17:15:38 +00:00
|
|
|
func (c *FullNodeStruct) MarketEnsureAvailable(ctx context.Context, addr address.Address, amt types.BigInt) error {
|
|
|
|
return c.Internal.MarketEnsureAvailable(ctx, addr, amt)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) PaychGet(ctx context.Context, from, to address.Address, ensureFunds types.BigInt) (*api.ChannelInfo, error) {
|
2019-09-16 13:46:05 +00:00
|
|
|
return c.Internal.PaychGet(ctx, from, to, ensureFunds)
|
2019-08-09 21:41:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *FullNodeStruct) PaychList(ctx context.Context) ([]address.Address, error) {
|
|
|
|
return c.Internal.PaychList(ctx)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) PaychStatus(ctx context.Context, pch address.Address) (*api.PaychStatus, error) {
|
2019-08-09 21:41:50 +00:00
|
|
|
return c.Internal.PaychStatus(ctx, pch)
|
|
|
|
}
|
|
|
|
|
2019-08-12 17:09:56 +00:00
|
|
|
func (c *FullNodeStruct) PaychVoucherCheckValid(ctx context.Context, addr address.Address, sv *types.SignedVoucher) error {
|
|
|
|
return c.Internal.PaychVoucherCheckValid(ctx, addr, sv)
|
2019-08-09 21:41:50 +00:00
|
|
|
}
|
|
|
|
|
2019-08-12 17:09:56 +00:00
|
|
|
func (c *FullNodeStruct) PaychVoucherCheckSpendable(ctx context.Context, addr address.Address, sv *types.SignedVoucher, secret []byte, proof []byte) (bool, error) {
|
|
|
|
return c.Internal.PaychVoucherCheckSpendable(ctx, addr, sv, secret, proof)
|
|
|
|
}
|
|
|
|
|
2019-09-16 21:25:23 +00:00
|
|
|
func (c *FullNodeStruct) PaychVoucherAdd(ctx context.Context, addr address.Address, sv *types.SignedVoucher, proof []byte, minDelta types.BigInt) (types.BigInt, error) {
|
|
|
|
return c.Internal.PaychVoucherAdd(ctx, addr, sv, proof, minDelta)
|
2019-08-09 21:41:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *FullNodeStruct) PaychVoucherCreate(ctx context.Context, pch address.Address, amt types.BigInt, lane uint64) (*types.SignedVoucher, error) {
|
|
|
|
return c.Internal.PaychVoucherCreate(ctx, pch, amt, lane)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *FullNodeStruct) PaychVoucherList(ctx context.Context, pch address.Address) ([]*types.SignedVoucher, error) {
|
|
|
|
return c.Internal.PaychVoucherList(ctx, pch)
|
|
|
|
}
|
|
|
|
|
2019-08-13 04:27:54 +00:00
|
|
|
func (c *FullNodeStruct) PaychClose(ctx context.Context, a address.Address) (cid.Cid, error) {
|
2019-08-09 21:41:50 +00:00
|
|
|
return c.Internal.PaychClose(ctx, a)
|
|
|
|
}
|
|
|
|
|
2020-02-21 17:26:44 +00:00
|
|
|
func (c *FullNodeStruct) PaychAllocateLane(ctx context.Context, ch address.Address) (uint64, error) {
|
2019-09-16 13:46:05 +00:00
|
|
|
return c.Internal.PaychAllocateLane(ctx, ch)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *FullNodeStruct) PaychNewPayment(ctx context.Context, from, to address.Address, vouchers []api.VoucherSpec) (*api.PaymentInfo, error) {
|
2019-09-24 21:13:47 +00:00
|
|
|
return c.Internal.PaychNewPayment(ctx, from, to, vouchers)
|
|
|
|
}
|
|
|
|
|
2019-08-13 04:27:54 +00:00
|
|
|
func (c *FullNodeStruct) PaychVoucherSubmit(ctx context.Context, ch address.Address, sv *types.SignedVoucher) (cid.Cid, error) {
|
|
|
|
return c.Internal.PaychVoucherSubmit(ctx, ch, sv)
|
|
|
|
}
|
|
|
|
|
2019-10-14 02:32:32 +00:00
|
|
|
func (c *StorageMinerStruct) ActorAddress(ctx context.Context) (address.Address, error) {
|
|
|
|
return c.Internal.ActorAddress(ctx)
|
2019-08-10 01:54:45 +00:00
|
|
|
}
|
|
|
|
|
2020-02-09 06:06:32 +00:00
|
|
|
func (c *StorageMinerStruct) ActorSectorSize(ctx context.Context, addr address.Address) (abi.SectorSize, error) {
|
2019-11-21 14:10:51 +00:00
|
|
|
return c.Internal.ActorSectorSize(ctx, addr)
|
|
|
|
}
|
|
|
|
|
2019-12-08 21:48:20 +00:00
|
|
|
func (c *StorageMinerStruct) PledgeSector(ctx context.Context) error {
|
|
|
|
return c.Internal.PledgeSector(ctx)
|
2019-07-27 01:54:03 +00:00
|
|
|
}
|
|
|
|
|
2019-07-27 21:08:10 +00:00
|
|
|
// Get the status of a given sector by ID
|
2020-02-09 06:06:32 +00:00
|
|
|
func (c *StorageMinerStruct) SectorsStatus(ctx context.Context, sid abi.SectorNumber) (api.SectorInfo, error) {
|
2019-07-27 21:08:10 +00:00
|
|
|
return c.Internal.SectorsStatus(ctx, sid)
|
|
|
|
}
|
|
|
|
|
|
|
|
// List all staged sectors
|
2020-02-09 06:06:32 +00:00
|
|
|
func (c *StorageMinerStruct) SectorsList(ctx context.Context) ([]abi.SectorNumber, error) {
|
2019-10-14 02:32:32 +00:00
|
|
|
return c.Internal.SectorsList(ctx)
|
2019-07-27 21:08:10 +00:00
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
func (c *StorageMinerStruct) SectorsRefs(ctx context.Context) (map[string][]api.SealedRef, error) {
|
2019-08-26 10:04:57 +00:00
|
|
|
return c.Internal.SectorsRefs(ctx)
|
|
|
|
}
|
|
|
|
|
2020-02-09 06:06:32 +00:00
|
|
|
func (c *StorageMinerStruct) SectorsUpdate(ctx context.Context, id abi.SectorNumber, state api.SectorState) error {
|
2019-12-05 04:43:54 +00:00
|
|
|
return c.Internal.SectorsUpdate(ctx, id, state)
|
|
|
|
}
|
|
|
|
|
2019-11-21 16:23:42 +00:00
|
|
|
func (c *StorageMinerStruct) WorkerStats(ctx context.Context) (sectorbuilder.WorkerStats, error) {
|
2019-11-08 18:15:13 +00:00
|
|
|
return c.Internal.WorkerStats(ctx)
|
|
|
|
}
|
|
|
|
|
2019-12-06 00:27:32 +00:00
|
|
|
func (c *StorageMinerStruct) WorkerQueue(ctx context.Context, cfg sectorbuilder.WorkerCfg) (<-chan sectorbuilder.WorkerTask, error) {
|
|
|
|
return c.Internal.WorkerQueue(ctx, cfg)
|
2019-11-21 00:52:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (c *StorageMinerStruct) WorkerDone(ctx context.Context, task uint64, res sectorbuilder.SealRes) error {
|
|
|
|
return c.Internal.WorkerDone(ctx, task, res)
|
|
|
|
}
|
|
|
|
|
2019-12-09 17:08:32 +00:00
|
|
|
var _ api.Common = &CommonStruct{}
|
|
|
|
var _ api.FullNode = &FullNodeStruct{}
|
|
|
|
var _ api.StorageMiner = &StorageMinerStruct{}
|