|  | 
|  | 1 | +package v2api | 
|  | 2 | + | 
|  | 3 | +import ( | 
|  | 4 | +	"context" | 
|  | 5 | + | 
|  | 6 | +	"github.com/ipfs/go-cid" | 
|  | 7 | + | 
|  | 8 | +	"github.com/filecoin-project/go-address" | 
|  | 9 | +	"github.com/filecoin-project/go-jsonrpc" | 
|  | 10 | +	"github.com/filecoin-project/go-state-types/abi" | 
|  | 11 | + | 
|  | 12 | +	apitypes "github.com/filecoin-project/lotus/api/types" | 
|  | 13 | +	"github.com/filecoin-project/lotus/chain/types" | 
|  | 14 | +	"github.com/filecoin-project/lotus/chain/types/ethtypes" | 
|  | 15 | +) | 
|  | 16 | + | 
|  | 17 | +var _ FullNode = (Gateway)(nil) | 
|  | 18 | + | 
|  | 19 | +type Gateway interface { | 
|  | 20 | +	ChainGetTipSet(context.Context, types.TipSetSelector) (*types.TipSet, error) | 
|  | 21 | +	StateGetActor(context.Context, address.Address, types.TipSetSelector) (*types.Actor, error) | 
|  | 22 | +	StateGetID(context.Context, address.Address, types.TipSetSelector) (*address.Address, error) | 
|  | 23 | +	EthAddressToFilecoinAddress(ctx context.Context, ethAddress ethtypes.EthAddress) (address.Address, error) | 
|  | 24 | +	FilecoinAddressToEthAddress(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthAddress, error) | 
|  | 25 | +	Web3ClientVersion(ctx context.Context) (string, error) | 
|  | 26 | +	EthChainId(ctx context.Context) (ethtypes.EthUint64, error) | 
|  | 27 | +	NetVersion(ctx context.Context) (string, error) | 
|  | 28 | +	NetListening(ctx context.Context) (bool, error) | 
|  | 29 | +	EthProtocolVersion(ctx context.Context) (ethtypes.EthUint64, error) | 
|  | 30 | +	EthSyncing(ctx context.Context) (ethtypes.EthSyncingResult, error) | 
|  | 31 | +	EthAccounts(ctx context.Context) ([]ethtypes.EthAddress, error) | 
|  | 32 | +	EthSendRawTransaction(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) | 
|  | 33 | +	EthSendRawTransactionUntrusted(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) | 
|  | 34 | +	EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) | 
|  | 35 | +	EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum string) (ethtypes.EthUint64, error) | 
|  | 36 | +	EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) | 
|  | 37 | +	EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) | 
|  | 38 | +	EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) | 
|  | 39 | +	EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) | 
|  | 40 | +	EthGetTransactionByHashLimited(ctx context.Context, txHash *ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTx, error) | 
|  | 41 | +	EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) | 
|  | 42 | +	EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum string, txIndex ethtypes.EthUint64) (*ethtypes.EthTx, error) | 
|  | 43 | +	EthGetMessageCidByTransactionHash(ctx context.Context, txHash *ethtypes.EthHash) (*cid.Cid, error) | 
|  | 44 | +	EthGetTransactionHashByCid(ctx context.Context, cid cid.Cid) (*ethtypes.EthHash, error) | 
|  | 45 | +	EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthUint64, error) | 
|  | 46 | +	EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*ethtypes.EthTxReceipt, error) | 
|  | 47 | +	EthGetTransactionReceiptLimited(ctx context.Context, txHash ethtypes.EthHash, limit abi.ChainEpoch) (*ethtypes.EthTxReceipt, error) | 
|  | 48 | +	EthGetBlockReceipts(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash) ([]*ethtypes.EthTxReceipt, error) | 
|  | 49 | +	EthGetBlockReceiptsLimited(ctx context.Context, blkParam ethtypes.EthBlockNumberOrHash, limit abi.ChainEpoch) ([]*ethtypes.EthTxReceipt, error) | 
|  | 50 | +	EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) | 
|  | 51 | +	EthGetStorageAt(ctx context.Context, address ethtypes.EthAddress, position ethtypes.EthBytes, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) | 
|  | 52 | +	EthGetBalance(ctx context.Context, address ethtypes.EthAddress, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBigInt, error) | 
|  | 53 | +	EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) | 
|  | 54 | +	EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) | 
|  | 55 | +	EthTraceTransaction(ctx context.Context, txHash string) ([]*ethtypes.EthTraceTransaction, error) | 
|  | 56 | +	EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) | 
|  | 57 | +	EthGasPrice(ctx context.Context) (ethtypes.EthBigInt, error) | 
|  | 58 | +	EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthFeeHistory, error) | 
|  | 59 | +	EthMaxPriorityFeePerGas(ctx context.Context) (ethtypes.EthBigInt, error) | 
|  | 60 | +	EthEstimateGas(ctx context.Context, p jsonrpc.RawParams) (ethtypes.EthUint64, error) | 
|  | 61 | +	EthCall(ctx context.Context, tx ethtypes.EthCall, blkParam ethtypes.EthBlockNumberOrHash) (ethtypes.EthBytes, error) | 
|  | 62 | +	EthGetLogs(ctx context.Context, filter *ethtypes.EthFilterSpec) (*ethtypes.EthFilterResult, error) | 
|  | 63 | +	EthNewBlockFilter(ctx context.Context) (ethtypes.EthFilterID, error) | 
|  | 64 | +	EthNewPendingTransactionFilter(ctx context.Context) (ethtypes.EthFilterID, error) | 
|  | 65 | +	EthNewFilter(ctx context.Context, filter *ethtypes.EthFilterSpec) (ethtypes.EthFilterID, error) | 
|  | 66 | +	EthUninstallFilter(ctx context.Context, id ethtypes.EthFilterID) (bool, error) | 
|  | 67 | +	EthGetFilterChanges(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) | 
|  | 68 | +	EthGetFilterLogs(ctx context.Context, id ethtypes.EthFilterID) (*ethtypes.EthFilterResult, error) | 
|  | 69 | +	EthSubscribe(ctx context.Context, params jsonrpc.RawParams) (ethtypes.EthSubscriptionID, error) | 
|  | 70 | +	EthUnsubscribe(ctx context.Context, id ethtypes.EthSubscriptionID) (bool, error) | 
|  | 71 | + | 
|  | 72 | +	Discover(context.Context) (apitypes.OpenRPCDocument, error) | 
|  | 73 | +} | 
0 commit comments