2020-09-29 15:25:45 +00:00
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/filecoin-project/go-address"
|
2020-10-02 14:14:30 +00:00
|
|
|
"github.com/filecoin-project/go-state-types/abi"
|
2020-09-29 15:25:45 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/types"
|
|
|
|
"github.com/ipfs/go-cid"
|
|
|
|
)
|
|
|
|
|
|
|
|
type GatewayAPI interface {
|
|
|
|
ChainHead(ctx context.Context) (*types.TipSet, error)
|
|
|
|
ChainGetTipSet(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error)
|
2020-10-02 14:14:30 +00:00
|
|
|
ChainGetTipSetByHeight(ctx context.Context, h abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)
|
2020-10-05 15:09:21 +00:00
|
|
|
GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *MessageSendSpec, tsk types.TipSetKey) (*types.Message, error)
|
2020-09-29 15:25:45 +00:00
|
|
|
MpoolPush(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error)
|
|
|
|
StateAccountKey(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
|
2020-09-30 14:36:16 +00:00
|
|
|
StateGetActor(ctx context.Context, actor address.Address, ts types.TipSetKey) (*types.Actor, error)
|
|
|
|
StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
|
2020-10-02 14:14:30 +00:00
|
|
|
StateWaitMsg(ctx context.Context, msg cid.Cid, confidence uint64) (*MsgLookup, error)
|
2020-09-29 15:25:45 +00:00
|
|
|
}
|