api

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Overview

Package api declares the Lotus-compatible JSON-RPC interface and its shared result types.

Lantern targets `CurioChainRPC` (Curio's `-tags forest` interface). The methods listed here are the 71 entries in CURIO-RPC-SURFACE.md. Each is declared as a method on the FullNode interface so the go-jsonrpc dispatcher can bind handlers under the `Filecoin.` namespace, matching what every Lotus / Curio / sptool client expects.

Types are mostly re-exported from go-state-types or chain/types so we don't drift from on-wire shape.

Index

Constants

View Source
const (
	PermRead  auth.Permission = "read"
	PermWrite auth.Permission = "write"
	PermSign  auth.Permission = "sign"
	PermAdmin auth.Permission = "admin"
)

Permissions match Lotus.

Variables

AllPerms is the canonical permission list for token issuance.

View Source
var DefaultPerms = []auth.Permission{PermRead}

DefaultPerms is the permission set assumed for unauthenticated requests (none — every method requires at least read).

Functions

This section is empty.

Types

type Actor

type Actor = types.Actor

Re-exports for ergonomic handler signatures.

type ActorState

type ActorState struct {
	Balance big.Int
	Code    cid.Cid
	State   interface{}
}

ActorState mirrors api.ActorState.

type ApiMsg

type ApiMsg struct {
	Cid     cid.Cid
	Message *types.Message
}

ApiMsg mirrors api.Message — a (cid, Message) pair returned by ChainGetMessagesInTipset.

type BlockHeader

type BlockHeader = types.BlockHeader

Re-exports for ergonomic handler signatures.

type BlockTemplate

type BlockTemplate struct {
	Miner            address.Address
	Parents          types.TipSetKey
	Ticket           *types.Ticket
	Eproof           *types.ElectionProof
	BeaconValues     []types.BeaconEntry
	Messages         []*types.SignedMessage
	Epoch            abi.ChainEpoch
	Timestamp        uint64
	WinningPoStProof []interface{}
}

BlockTemplate mirrors api.BlockTemplate.

type ChannelAvailableFunds

type ChannelAvailableFunds struct {
	Channel             *address.Address
	From                address.Address
	To                  address.Address
	ConfirmedAmt        big.Int
	PendingAmt          big.Int
	NonReservedAmt      big.Int
	PendingAvailableAmt big.Int
	PendingWaitSentinel *cid.Cid
	QueuedAmt           big.Int
	VoucherReedeemedAmt big.Int
}

ChannelAvailableFunds mirrors paychapi.ChannelAvailableFunds.

type ChannelInfo

type ChannelInfo struct {
	Channel      address.Address
	WaitSentinel cid.Cid
}

ChannelInfo mirrors paychapi.ChannelInfo.

type CirculatingSupply

type CirculatingSupply struct {
	FilVested           abi.TokenAmount
	FilMined            abi.TokenAmount
	FilBurnt            abi.TokenAmount
	FilLocked           abi.TokenAmount
	FilCirculating      abi.TokenAmount
	FilReserveDisbursed abi.TokenAmount
}

CirculatingSupply mirrors api.CirculatingSupply.

type Claim

type Claim struct {
	RawBytePower    abi.StoragePower
	QualityAdjPower abi.StoragePower
}

Claim mirrors power.Claim (raw + quality-adjusted byte power).

type Deadline

type Deadline = dline.Info

Deadline mirrors miner.Deadline (subset used by StateMinerProvingDeadline).

type DealCollateralBounds

type DealCollateralBounds struct {
	Min abi.TokenAmount
	Max abi.TokenAmount
}

DealCollateralBounds mirrors api.DealCollateralBounds.

type ExecutionTrace

type ExecutionTrace struct {
	Msg        *types.Message
	MsgRct     *types.MessageReceipt
	Error      string
	Duration   int64
	GasCharges []interface{}
	Subcalls   []ExecutionTrace
}

ExecutionTrace is the trace from StateCall — stub for now.

type FullNode

type FullNode interface {
	// --- Node admin (N) ---
	AuthVerify(ctx context.Context, token string) ([]auth.Permission, error)
	AuthNew(ctx context.Context, perms []auth.Permission) ([]byte, error)
	Version(ctx context.Context) (Version, error)
	Shutdown(ctx context.Context) error
	Session(ctx context.Context) (string, error)

	// --- Chain reads (R) ---
	ChainHead(ctx context.Context) (*types.TipSet, error)
	ChainGetTipSet(ctx context.Context, key types.TipSetKey) (*types.TipSet, error)
	ChainGetTipSetByHeight(ctx context.Context, h abi.ChainEpoch, key types.TipSetKey) (*types.TipSet, error)
	ChainGetTipSetAfterHeight(ctx context.Context, h abi.ChainEpoch, key types.TipSetKey) (*types.TipSet, error)
	ChainGetBlock(ctx context.Context, c cid.Cid) (*types.BlockHeader, error)
	ChainGetMessage(ctx context.Context, c cid.Cid) (*types.Message, error)
	ChainGetMessagesInTipset(ctx context.Context, key types.TipSetKey) ([]ApiMsg, error)
	ChainReadObj(ctx context.Context, c cid.Cid) ([]byte, error)
	ChainHasObj(ctx context.Context, c cid.Cid) (bool, error)
	ChainPutObj(ctx context.Context, blk []byte) (cid.Cid, error)
	ChainTipSetWeight(ctx context.Context, key types.TipSetKey) (big.Int, error)
	ChainNotify(ctx context.Context) (<-chan []HeadChange, error)

	// --- State (R) ---
	StateGetActor(ctx context.Context, a address.Address, key types.TipSetKey) (*types.Actor, error)
	StateLookupID(ctx context.Context, a address.Address, key types.TipSetKey) (address.Address, error)
	StateAccountKey(ctx context.Context, a address.Address, key types.TipSetKey) (address.Address, error)
	StateNetworkVersion(ctx context.Context, key types.TipSetKey) (network.Version, error)
	StateNetworkName(ctx context.Context) (string, error)
	StateReadState(ctx context.Context, a address.Address, key types.TipSetKey) (*ActorState, error)
	StateGetRandomnessFromBeacon(ctx context.Context, pers gscrypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, key types.TipSetKey) (abi.Randomness, error)
	StateGetRandomnessFromTickets(ctx context.Context, pers gscrypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, key types.TipSetKey) (abi.Randomness, error)
	StateGetRandomnessDigestFromBeacon(ctx context.Context, randEpoch abi.ChainEpoch, key types.TipSetKey) (abi.Randomness, error)
	StateGetBeaconEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error)

	// Miner-specific reads
	StateMinerInfo(ctx context.Context, m address.Address, key types.TipSetKey) (MinerInfo, error)
	StateMinerPower(ctx context.Context, m address.Address, key types.TipSetKey) (*MinerPower, error)
	StateMinerSectors(ctx context.Context, m address.Address, sectors *bitfield.BitField, key types.TipSetKey) ([]*SectorOnChainInfo, error)
	StateMinerActiveSectors(ctx context.Context, m address.Address, key types.TipSetKey) ([]*SectorOnChainInfo, error)
	StateMinerProvingDeadline(ctx context.Context, m address.Address, key types.TipSetKey) (*dline.Info, error)
	StateMinerDeadlines(ctx context.Context, m address.Address, key types.TipSetKey) ([]MinerDeadline, error)
	StateMinerPartitions(ctx context.Context, m address.Address, dlIdx uint64, key types.TipSetKey) ([]Partition, error)
	StateMinerAvailableBalance(ctx context.Context, m address.Address, key types.TipSetKey) (big.Int, error)
	StateMinerAllocated(ctx context.Context, m address.Address, key types.TipSetKey) (*bitfield.BitField, error)
	StateMinerFaults(ctx context.Context, m address.Address, key types.TipSetKey) (bitfield.BitField, error)
	StateMinerRecoveries(ctx context.Context, m address.Address, key types.TipSetKey) (bitfield.BitField, error)
	StateMinerSectorCount(ctx context.Context, m address.Address, key types.TipSetKey) (MinerSectors, error)
	StateMinerPreCommitDepositForPower(ctx context.Context, m address.Address, pci SectorPreCommitInfo, key types.TipSetKey) (big.Int, error)
	StateMinerInitialPledgeForSector(ctx context.Context, sectorDuration abi.ChainEpoch, sectorSize abi.SectorSize, verifiedSize uint64, key types.TipSetKey) (big.Int, error)
	StateMinerInitialPledgeCollateral(ctx context.Context, m address.Address, pci SectorPreCommitInfo, key types.TipSetKey) (big.Int, error)
	StateMinerSectorAllocated(ctx context.Context, m address.Address, s abi.SectorNumber, key types.TipSetKey) (bool, error)
	StateSectorPreCommitInfo(ctx context.Context, m address.Address, sector abi.SectorNumber, key types.TipSetKey) (*SectorPreCommitOnChainInfo, error)
	StateSectorGetInfo(ctx context.Context, m address.Address, sector abi.SectorNumber, key types.TipSetKey) (*SectorOnChainInfo, error)
	StateSectorPartition(ctx context.Context, m address.Address, sector abi.SectorNumber, key types.TipSetKey) (*SectorLocation, error)
	StateMinerCreationDeposit(ctx context.Context, key types.TipSetKey) (big.Int, error)

	// Market & verified-registry reads
	StateMarketBalance(ctx context.Context, a address.Address, key types.TipSetKey) (MarketBalance, error)
	StateMarketStorageDeal(ctx context.Context, dealID abi.DealID, key types.TipSetKey) (*MarketDeal, error)
	StateGetAllocation(ctx context.Context, client address.Address, allocID verifreg.AllocationId, key types.TipSetKey) (*verifreg.Allocation, error)
	StateGetAllocationIdForPendingDeal(ctx context.Context, dealID abi.DealID, key types.TipSetKey) (verifreg.AllocationId, error)
	StateGetAllocationForPendingDeal(ctx context.Context, dealID abi.DealID, key types.TipSetKey) (*verifreg.Allocation, error)
	StateVerifiedClientStatus(ctx context.Context, a address.Address, key types.TipSetKey) (*big.Int, error)
	StateDealProviderCollateralBounds(ctx context.Context, size abi.PaddedPieceSize, verified bool, key types.TipSetKey) (DealCollateralBounds, error)
	StateListMessages(ctx context.Context, match *MessageMatch, key types.TipSetKey, fromEpoch abi.ChainEpoch) ([]cid.Cid, error)
	StateListMiners(ctx context.Context, key types.TipSetKey) ([]address.Address, error)
	StateCirculatingSupply(ctx context.Context, key types.TipSetKey) (abi.TokenAmount, error)
	StateVMCirculatingSupplyInternal(ctx context.Context, key types.TipSetKey) (CirculatingSupply, error)

	// Wait / search
	StateWaitMsg(ctx context.Context, c cid.Cid, confidence uint64, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error)
	StateSearchMsg(ctx context.Context, from types.TipSetKey, c cid.Cid, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error)

	// Compute (read-only VM eval) — Tier 4 stubs for now.
	StateCall(ctx context.Context, msg *types.Message, key types.TipSetKey) (*InvocResult, error)

	// Gas estimation
	GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *MessageSendSpec, key types.TipSetKey) (*types.Message, error)
	GasEstimateFeeCap(ctx context.Context, msg *types.Message, maxqueueblks int64, key types.TipSetKey) (abi.TokenAmount, error)
	GasEstimateGasPremium(ctx context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, key types.TipSetKey) (abi.TokenAmount, error)

	// Wallet (W)
	WalletNew(ctx context.Context, kt KeyType) (address.Address, error)
	WalletList(ctx context.Context) ([]address.Address, error)
	WalletHas(ctx context.Context, a address.Address) (bool, error)
	WalletDelete(ctx context.Context, a address.Address) error
	WalletExport(ctx context.Context, a address.Address) (*KeyInfo, error)
	WalletImport(ctx context.Context, ki *KeyInfo) (address.Address, error)
	WalletSetDefault(ctx context.Context, a address.Address) error
	WalletDefaultAddress(ctx context.Context) (address.Address, error)
	WalletSign(ctx context.Context, a address.Address, msg []byte) (*gscrypto.Signature, error)
	WalletSignMessage(ctx context.Context, a address.Address, msg *types.Message) (*types.SignedMessage, error)
	WalletBalance(ctx context.Context, a address.Address) (big.Int, error)

	// Mpool (G+W+C)
	MpoolPush(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error)
	MpoolPushMessage(ctx context.Context, msg *types.Message, spec *MessageSendSpec) (*types.SignedMessage, error)
	MpoolGetNonce(ctx context.Context, a address.Address) (uint64, error)
	MpoolPending(ctx context.Context, tsk []types.TipSetKey) ([]*types.SignedMessage, error)

	// SP block production (SP) — Tier 4 stubs.
	MinerGetBaseInfo(ctx context.Context, m address.Address, epoch abi.ChainEpoch, key types.TipSetKey) (*MiningBaseInfo, error)
	MinerCreateBlock(ctx context.Context, template *BlockTemplate) (*types.BlockMsg, error)
	MpoolSelect(ctx context.Context, key types.TipSetKey, ticketQuality float64) ([]*types.SignedMessage, error)
	SyncSubmitBlock(ctx context.Context, blk *types.BlockMsg) error

	// Market convenience (composes Mpool/Wallet) — Tier 3 stub.
	MarketAddBalance(ctx context.Context, wallet, addr address.Address, amt big.Int) (cid.Cid, error)

	// Payment channels (Tier 3) — Phase 7 read-only + sign.
	PaychGet(ctx context.Context, from, to address.Address, amt big.Int, opts PaychGetOpts) (*ChannelInfo, error)
	PaychAvailableFunds(ctx context.Context, ch address.Address) (*ChannelAvailableFunds, error)
	PaychVoucherCreate(ctx context.Context, ch address.Address, amt big.Int, lane uint64) (*VoucherCreateResult, error)
	PaychVoucherCheckValid(ctx context.Context, ch address.Address, sv *PaychSignedVoucher) error
	PaychVoucherCheckSpendable(ctx context.Context, ch address.Address, sv *PaychSignedVoucher, secret []byte, proof []byte) (bool, error)
	PaychVoucherList(ctx context.Context, ch address.Address) ([]*PaychSignedVoucher, error)

	// Net + Eth health probes (Curio polls these for status display).
	// V1 returns stubs; Phase 10 wires them to the live libp2p host.
	NetPeers(ctx context.Context) ([]struct {
		ID    string
		Addrs []string
	}, error)
	NetAgentVersion(ctx context.Context, peerID string) (string, error)
	NetConnectedness(ctx context.Context, peerID string) (int, error)
	NetListening(ctx context.Context) (bool, error)
	NetBandwidthStats(ctx context.Context) (NetBandwidthStats, error)
	NetAutoNatStatus(ctx context.Context) (NatInfo, error)
	EthBlockNumber(ctx context.Context) (string, error)
	EthChainId(ctx context.Context) (string, error)
	EthAccounts(ctx context.Context) ([]string, error)
	EthMaxPriorityFeePerGas(ctx context.Context) (string, error)
	EthGasPrice(ctx context.Context) (string, error)
	EthSyncing(ctx context.Context) (any, error)
	EthGetBalance(ctx context.Context, address string, blockParam any) (string, error)
	EthGetBlockByNumber(ctx context.Context, blockParam string, fullTx bool) (any, error)
	EthCall(ctx context.Context, callObj any, blockParam any) (string, error)
	EthEstimateGas(ctx context.Context, callObj any) (string, error)
	EthSendRawTransaction(ctx context.Context, signedTxHex string) (string, error)
	EthGetTransactionCount(ctx context.Context, addr string, blockParam any) (string, error)
	EthGetTransactionReceipt(ctx context.Context, txHash string) (any, error)
	EthFeeHistory(ctx context.Context, blockCount string, newestBlock string, rewardPercentiles []float64) (any, error)
	// EthBaseFee returns the base fee for the next block as a hex-quantity
	// string (lotus #13615). No params.
	EthBaseFee(ctx context.Context) (string, error)
	EthGetTransactionByHash(ctx context.Context, txHash string) (any, error)
	EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blockParam string, index string) (any, error)
	EthGetCode(ctx context.Context, addr string, blockParam any) (string, error)
	EthGetStorageAt(ctx context.Context, addr string, key string, blockParam any) (string, error)
	EthGetBlockByHash(ctx context.Context, blockHash string, fullTx bool) (any, error)
	EthGetLogs(ctx context.Context, filter any) (any, error)

	// EthSubscribe (EIP-1193) registers an event subscription on the
	// current WebSocket connection. Returns a subscription ID; events
	// flow back as eth_subscription notifications via the reverse
	// client (see rpc/handlers/eth_subscribe.go for the wire shape).
	// V1 supports event type "newHeads" only; "logs",
	// "newPendingTransactions" and "syncing" return method-supported-
	// but-event-type-not-supported. Requires WebSocket transport;
	// returns an error on plain HTTP requests.
	EthSubscribe(ctx context.Context, params jsonrpc.RawParams) (string, error)

	// EthUnsubscribe cancels the subscription with the given ID.
	// Returns true if a subscription was found and cancelled, false
	// if no such subscription was active.
	EthUnsubscribe(ctx context.Context, id string) (bool, error)
}

FullNode is the interface name go-jsonrpc binds under namespace `Filecoin`. We use a Permission-tagged proxy struct (FullNodeStruct, below) so `auth.PermissionedProxy` can enforce method-level perms.

type HeadChange

type HeadChange struct {
	Type string
	Val  *types.TipSet
}

HeadChange mirrors api.HeadChange.

{"Type": "apply"|"revert"|"current", "Val": <TipSet>}

type InvocResult

type InvocResult struct {
	MsgCid         cid.Cid
	Msg            *types.Message
	MsgRct         *types.MessageReceipt
	GasCost        MessageGasCost
	ExecutionTrace ExecutionTrace
	Error          string
	Duration       int64
}

InvocResult mirrors api.InvocResult (return value of StateCall). Lantern V1 always returns ErrNotImplemented for StateCall, so we keep the shape minimal but JSON-compatible.

type KeyInfo

type KeyInfo struct {
	Type       KeyType
	PrivateKey []byte
}

KeyInfo is the on-wire shape for WalletExport/WalletImport (matches Lotus types.KeyInfo).

type KeyType

type KeyType string

KeyType is wallet.KeyType, re-exported so callers don't pull wallet into their import graph when they only need the RPC interface.

type MarketBalance

type MarketBalance struct {
	Escrow big.Int
	Locked big.Int
}

MarketBalance is the result of Filecoin.StateMarketBalance.

type MarketDeal

type MarketDeal struct {
	Proposal MarketDealProposal
	State    MarketDealState
}

MarketDeal is the API view of a deal proposal+state pair from the market actor.

type MarketDealProposal

type MarketDealProposal struct {
	PieceCID             cid.Cid `json:"PieceCID"`
	PieceSize            abi.PaddedPieceSize
	VerifiedDeal         bool
	Client               address.Address
	Provider             address.Address
	Label                string
	StartEpoch           abi.ChainEpoch
	EndEpoch             abi.ChainEpoch
	StoragePricePerEpoch big.Int
	ProviderCollateral   big.Int
	ClientCollateral     big.Int
}

MarketDealProposal lifted-shape of market.DealProposal (with API quirks: stringified BigInts, etc., are handled by chain/types' JSON codecs upstream).

type MarketDealState

type MarketDealState struct {
	SectorStartEpoch abi.ChainEpoch
	LastUpdatedEpoch abi.ChainEpoch
	SlashEpoch       abi.ChainEpoch
}

MarketDealState lifted-shape of market.DealState.

type Message

type Message = types.Message

Re-exports for ergonomic handler signatures.

type MessageGasCost

type MessageGasCost struct {
	Message            cid.Cid
	GasUsed            abi.TokenAmount
	BaseFeeBurn        abi.TokenAmount
	OverEstimationBurn abi.TokenAmount
	MinerPenalty       abi.TokenAmount
	MinerTip           abi.TokenAmount
	Refund             abi.TokenAmount
	TotalCost          abi.TokenAmount
}

MessageGasCost mirrors api.MessageGasCost.

type MessageMatch

type MessageMatch struct {
	To   address.Address
	From address.Address
}

MessageMatch mirrors api.MessageMatch (selector for StateListMessages).

type MessageSendSpec

type MessageSendSpec struct {
	MaxFee            abi.TokenAmount
	MsgUuid           string
	MaximizeFeeCap    bool
	GasOverEstimation float64
}

MessageSendSpec mirrors api.MessageSendSpec used by MpoolPushMessage.

type MinerDeadline

type MinerDeadline struct {
	PostSubmissions      bitfield.BitField
	DisputableProofCount uint64
}

MinerDeadline mirrors api.MinerDeadline.

type MinerInfo

type MinerInfo struct {
	Owner                      address.Address
	Worker                     address.Address
	NewWorker                  address.Address
	ControlAddresses           []address.Address
	WorkerChangeEpoch          abi.ChainEpoch
	PeerId                     *string `json:"PeerId"` // base58
	Multiaddrs                 [][]byte
	WindowPoStProofType        abi.RegisteredPoStProof
	SectorSize                 abi.SectorSize
	WindowPoStPartitionSectors uint64
	ConsensusFaultElapsed      abi.ChainEpoch
	Beneficiary                address.Address
	BeneficiaryTerm            *miner.BeneficiaryTerm
	PendingBeneficiaryTerm     *miner.PendingBeneficiaryChange
}

MinerInfo is the API view of the StorageMinerActor's MinerInfo struct.

Mirrors api.MinerInfo from lotus/api/types.go. JSON tags match Lotus.

type MinerPower

type MinerPower struct {
	MinerPower  Claim
	TotalPower  Claim
	HasMinPower bool
}

MinerPower mirrors api.MinerPower.

type MinerSectors

type MinerSectors struct {
	Live   uint64
	Active uint64
	Faulty uint64
}

MinerSectors mirrors api.MinerSectors.

type MiningBaseInfo

type MiningBaseInfo struct {
	MinerPower        abi.StoragePower
	NetworkPower      abi.StoragePower
	Sectors           []SectorInfo
	WorkerKey         address.Address
	SectorSize        abi.SectorSize
	PrevBeaconEntry   types.BeaconEntry
	BeaconEntries     []types.BeaconEntry
	EligibleForMining bool
}

MiningBaseInfo mirrors api.MiningBaseInfo (block production).

type MsgLookup

type MsgLookup struct {
	Message   cid.Cid              // the message CID we searched for
	Receipt   types.MessageReceipt // execution receipt
	ReturnDec interface{}          // decoded return value (nil for Lantern V1)
	TipSet    types.TipSetKey      // tipset the message was included in
	Height    abi.ChainEpoch
}

MsgLookup is the result of Filecoin.StateWaitMsg / StateSearchMsg.

type NatInfo

type NatInfo struct {
	Reachability int
	PublicAddrs  []string
}

NatInfo mirrors lotus api.NatInfo. Reachability is the integer value of libp2p network.Reachability (0=Unknown, 1=Public, 2=Private).

type NetBandwidthStats

type NetBandwidthStats struct {
	TotalIn  int64
	TotalOut int64
	RateIn   float64
	RateOut  float64
}

NetBandwidthStats mirrors libp2p/core/metrics.Stats. Re-declared here so the API interface doesn't pull libp2p into every consumer's import graph.

type NetworkVersionResp

type NetworkVersionResp = network.Version

NetworkVersionResp is a small wrapper so handler signature matches.

type Partition

type Partition struct {
	AllSectors        bitfield.BitField
	FaultySectors     bitfield.BitField
	RecoveringSectors bitfield.BitField
	LiveSectors       bitfield.BitField
	ActiveSectors     bitfield.BitField
}

Partition mirrors api.Partition.

type PaychGetOpts

type PaychGetOpts struct {
	OffChain bool
}

PaychGetOpts mirrors paychapi.PaychGetOpts.

type PaychMerge

type PaychMerge struct {
	Lane  uint64
	Nonce uint64
}

PaychMerge mirrors paych.Merge.

type PaychModVerifyParams

type PaychModVerifyParams struct {
	Actor  address.Address
	Method abi.MethodNum
	Data   []byte
}

PaychModVerifyParams mirrors paych.ModVerifyParams.

type PaychSignature

type PaychSignature struct {
	Type uint8
	Data []byte
}

PaychSignature is a thin alias for crypto.Signature; declared here so callers don't have to import go-state-types/crypto.

type PaychSignedVoucher

type PaychSignedVoucher struct {
	ChannelAddr     address.Address
	TimeLockMin     abi.ChainEpoch
	TimeLockMax     abi.ChainEpoch
	SecretHash      []byte
	Extra           *PaychModVerifyParams
	Lane            uint64
	Nonce           uint64
	Amount          big.Int
	MinSettleHeight abi.ChainEpoch
	Merges          []PaychMerge
	Signature       *PaychSignature
}

PaychSignedVoucher is a Lantern-side mirror of paych.SignedVoucher from go-state-types/builtin/v18/paych. Re-declaring it here keeps the api package free of go-state-types/v18 imports in handler signatures.

type SectorInfo

type SectorInfo struct {
	SealProof    abi.RegisteredSealProof
	SectorNumber abi.SectorNumber
	SealedCID    cid.Cid
}

SectorInfo is a (RegisteredPoStProof, SectorNumber, SealedCID) tuple.

type SectorLocation

type SectorLocation struct {
	Deadline  uint64
	Partition uint64
}

SectorLocation is the result of StateSectorPartition.

type SectorOnChainInfo

type SectorOnChainInfo = miner.SectorOnChainInfo

SectorOnChainInfo mirrors miner.SectorOnChainInfo (latest network version).

type SectorPreCommitInfo

type SectorPreCommitInfo struct {
	SealProof     abi.RegisteredSealProof
	SectorNumber  abi.SectorNumber
	SealedCID     cid.Cid
	SealRandEpoch abi.ChainEpoch
	DealIDs       []abi.DealID
	Expiration    abi.ChainEpoch
	UnsealedCid   *cid.Cid
}

SectorPreCommitInfo mirrors miner.SectorPreCommitInfo (parameter type).

type SectorPreCommitOnChainInfo

type SectorPreCommitOnChainInfo = miner.SectorPreCommitOnChainInfo

SectorPreCommitOnChainInfo mirrors miner.SectorPreCommitOnChainInfo.

type SignedMessage

type SignedMessage = types.SignedMessage

Re-exports for ergonomic handler signatures.

type TipSet

type TipSet = types.TipSet

Re-exports for ergonomic handler signatures.

type TipSetKey

type TipSetKey = types.TipSetKey

Re-exports for ergonomic handler signatures.

type Version

type Version struct {
	Version    string
	APIVersion uint32
	BlockDelay uint64
}

Version is the response shape of Filecoin.Version.

Mirrors api.APIVersion in lotus/api/api_common.go.

type VoucherCreateResult

type VoucherCreateResult struct {
	Voucher   *PaychSignedVoucher
	Shortfall big.Int
}

VoucherCreateResult mirrors paychapi.VoucherCreateResult.

Jump to

Keyboard shortcuts

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