// Code generated by github.com/filecoin-shipyard/js-lotus-client-schema/go-tsgen. DO NOT EDIT. declare type Cid = { '/': string } declare type AlertType = { System: string, Subsystem: string } declare type Time = {} declare type AlertEvent = { Type: string, Message: Array, Time: Time } declare type Alert = { Type: AlertType, Active: boolean, LastActive: AlertEvent, LastResolved: AlertEvent } declare type APIVersion = { Version: string, APIVersion: number, BlockDelay: number } declare type BeaconEntry = { Round: number, Data: string } declare type Ticket = { VRFProof: string } declare type ElectionProof = { WinCount: number, VRFProof: string } declare type PoStProof = { PoStProof: number, ProofBytes: string } declare type Signature = { Type: number, Data: string } declare type BlockHeader = { Miner: string, Ticket: Ticket, ElectionProof: ElectionProof, BeaconEntries: Array, WinPoStProof: Array, Parents: Array, ParentWeight: string, Height: number, ParentStateRoot: Cid, ParentMessageReceipts: Cid, Messages: Cid, BLSAggregate: Signature, Timestamp: number, BlockSig: Signature, ForkSignaling: number, ParentBaseFee: string } declare type Message = { Version: number, To: string, From: string, Nonce: number, Value: string, GasLimit: number, GasFeeCap: string, GasPremium: string, Method: number, Params: string } declare type SignedMessage = { Message: Message, Signature: Signature } declare type BlockMessages = { BlsMessages: Array, SecpkMessages: Array, Cids: Array } declare type ExpTipSet = { Cids: Array, Blocks: Array, Height: number } declare type TipSet = { Cids: Array, Blocks: Array, Height: number } declare type Message1 = { Cid: Cid, Message: Message } declare type IpldObject = { Cid: Cid, Obj: any } declare type MessageReceipt = { ExitCode: number, Return: string, GasUsed: number } declare type HeadChange = { Type: string, Val: TipSet } declare type ObjStat = { Size: number, Links: number } declare type CommPRet = { Root: Cid, Size: number } declare type CborTime = {} declare type Log = { Log: string, UpdatedTime: CborTime } declare type ChannelStage = { Name: string, Description: string, CreatedTime: CborTime, UpdatedTime: CborTime, Logs: Array } declare type ChannelStages = { Stages: Array } declare type DataTransferChannel = { TransferID: number, Status: number, BaseCID: Cid, IsInitiator: boolean, IsSender: boolean, Voucher: string, Message: string, OtherPeer: string, Transferred: number, Stages: ChannelStages } declare type DataCIDSize = { PayloadSize: number, PieceSize: number, PieceCID: Cid } declare type DataSize = { PayloadSize: number, PieceSize: number } declare type DagSpec = { DataSelector: string, ExportMerkleProof: boolean } declare type ExportRef = { Root: Cid, DAGs: Array, FromLocalCAR: string, DealID: number } declare type FileRef = { Path: string, IsCAR: boolean } declare type RetrievalPeer = { Address: string, ID: string, PieceCID: Cid } declare type QueryOffer = { Err: string, Root: Cid, Piece: Cid, Size: number, MinPrice: string, UnsealPrice: string, PricePerByte: string, PaymentInterval: number, PaymentIntervalIncrease: number, Miner: string, MinerPeer: RetrievalPeer } declare type Log1 = { Log: string, UpdatedTime: CborTime } declare type DealStage = { Name: string, Description: string, ExpectedDuration: string, CreatedTime: CborTime, UpdatedTime: CborTime, Logs: Array } declare type DealStages = { Stages: Array } declare type DataRef = { TransferType: string, Root: Cid, PieceCid: Cid, PieceSize: number, RawBlockSize: number } declare type ChannelID = { Initiator: string, Responder: string, ID: number } declare type DealInfo = { ProposalCid: Cid, State: number, Message: string, DealStages: DealStages, Provider: string, DataRef: DataRef, PieceCID: Cid, Size: number, PricePerEpoch: string, Duration: number, DealID: number, CreationTime: Time, Verified: boolean, TransferChannelID: ChannelID, DataTransfer: DataTransferChannel } declare type RetrievalInfo = { PayloadCID: Cid, ID: number, PieceCID: Cid, PricePerByte: string, UnsealPrice: string, Status: number, Message: string, Provider: string, BytesReceived: number, BytesPaidFor: number, TotalPaid: string, TransferChannelID: ChannelID, DataTransfer: DataTransferChannel, Event: number } declare type ImportRes = { Root: Cid, ImportID: number } declare type Import = { Key: number, Err: string, Root: Cid, Source: string, FilePath: string, CARPath: string } declare type StorageAsk = { Price: string, VerifiedPrice: string, MinPieceSize: number, MaxPieceSize: number, Miner: string, Timestamp: number, Expiry: number, SeqNo: number } declare type RestrievalRes = { DealID: number } declare type RetrievalOrder = { Root: Cid, Piece: Cid, DataSelector: string, Size: number, Total: string, UnsealPrice: string, PaymentInterval: number, PaymentIntervalIncrease: number, Client: string, Miner: string, MinerPeer: RetrievalPeer } declare type StartDealParams = { Data: DataRef, Wallet: string, Miner: string, EpochPrice: string, MinBlocksDuration: number, ProviderCollateral: string, DealStartEpoch: number, FastRetrieval: boolean, VerifiedDeal: boolean } declare type MessageSendSpec = { MaxFee: string } declare type BlockMsg = { Header: BlockHeader, BlsMessages: Array, SecpkMessages: Array } declare type BlockTemplate = { Miner: string, Parents: Cid[], Ticket: Ticket, Eproof: ElectionProof, BeaconValues: Array, Messages: Array, Epoch: number, Timestamp: number, WinningPoStProof: Array } declare type ExtendedSectorInfo = { SealProof: number, SectorNumber: number, SectorKey: Cid, SealedCID: Cid } declare type MiningBaseInfo = { MinerPower: string, NetworkPower: string, Sectors: Array, WorkerKey: string, SectorSize: number, PrevBeaconEntry: BeaconEntry, BeaconEntries: Array, EligibleForMining: boolean } declare type CheckStatus = { Code: number, OK: boolean, Err: string, Hint: { [k: string]: any } } declare type MessageCheckStatus = { Cid: Cid, CheckStatus: CheckStatus } declare type MessagePrototype = { Message: Message, ValidNonce: boolean } declare type MpoolConfig = { PriorityAddrs: Array, SizeLimitHigh: number, SizeLimitLow: number, ReplaceByFeeRatio: number, PruneCooldown: number, GasLimitOverestimation: number } declare type MpoolUpdate = { Type: number, Message: SignedMessage } declare type MsigTransaction = { ID: number, To: string, Value: string, Method: number, Params: string, Approved: Array } declare type MsigVesting = { InitialBalance: string, StartEpoch: number, UnlockDuration: number } declare type AddrInfo = { ID: string, Addrs: Array } declare type NatInfo = { Reachability: number, PublicAddr: string } declare type Stats = { TotalIn: number, TotalOut: number, RateIn: number, RateOut: number } declare type NetBlockList = { Peers: Array, IPAddrs: Array, IPSubnets: Array } declare type ConnMgrInfo = { FirstSeen: Time, Value: number, Tags: { [k: string]: number }, Conns: { [k: string]: Time } } declare type ExtendedPeerInfo = { ID: string, Agent: string, Addrs: Array, Protocols: Array, ConnMgrMeta: ConnMgrInfo } declare type TopicScoreSnapshot = { TimeInMesh: number, FirstMessageDeliveries: number, MeshMessageDeliveries: number, InvalidMessageDeliveries: number } declare type PeerScoreSnapshot = { Score: number, Topics: { [k: string]: TopicScoreSnapshot }, AppSpecificScore: number, IPColocationFactor: number, BehaviourPenalty: number } declare type PubsubScore = { ID: string, Score: PeerScoreSnapshot } declare type NodeSyncStatus = { Epoch: number, Behind: number } declare type NodePeerStatus = { PeersToPublishMsgs: number, PeersToPublishBlocks: number } declare type NodeChainStatus = { BlocksPerTipsetLast100: number, BlocksPerTipsetLastFinality: number } declare type NodeStatus = { SyncStatus: NodeSyncStatus, PeerStatus: NodePeerStatus, ChainStatus: NodeChainStatus } declare type ChannelAvailableFunds = { Channel: string, From: string, To: string, ConfirmedAmt: string, PendingAmt: string, PendingWaitSentinel: Cid, QueuedAmt: string, VoucherReedeemedAmt: string } declare type ChannelInfo = { Channel: string, WaitSentinel: Cid } declare type ModVerifyParams = { Actor: string, Method: number, Data: string } declare type Merge = { Lane: number, Nonce: number } declare type SignedVoucher = { ChannelAddr: string, TimeLockMin: number, TimeLockMax: number, SecretPreimage: string, Extra: ModVerifyParams, Lane: number, Nonce: number, Amount: string, MinSettleHeight: number, Merges: Array, Signature: Signature } declare type PaymentInfo = { Channel: string, WaitSentinel: Cid, Vouchers: Array } declare type VoucherSpec = { Amount: string, TimeLockMin: number, TimeLockMax: number, MinSettle: number, Extra: ModVerifyParams } declare type PaychStatus = { ControlAddr: string, Direction: number } declare type VoucherCreateResult = { Voucher: SignedVoucher, Shortfall: string } declare type Fault = { Miner: string, Epoch: number } declare type MsgGasCost = { Message: Cid, GasUsed: string, BaseFeeBurn: string, OverEstimationBurn: string, MinerPenalty: string, MinerTip: string, Refund: string, TotalCost: string } declare type Loc = { File: string, Line: number, Function: string } declare type GasTrace = { Name: string, Location: Array, TotalGas: number, ComputeGas: number, StorageGas: number, TotalVirtualGas: number, VirtualComputeGas: number, VirtualStorageGas: number, TimeTaken: number, Extra: any, Callers: Array } declare type ExecutionTrace = { Msg: Message, MsgRct: MessageReceipt, Error: string, Duration: number, GasCharges: Array, Subcalls: ExecutionTrace[] } declare type InvocResult = { MsgCid: Cid, Msg: Message, MsgRct: MessageReceipt, GasCost: MsgGasCost, ExecutionTrace: ExecutionTrace, Error: string, Duration: number } declare type Actor = { Code: Cid, Head: Cid, Nonce: number, Balance: string } declare type ComputeStateOutput = { Root: Cid, Trace: Array } declare type DealCollateralBounds = { Min: string, Max: string } declare type MessageMatch = { To: string, From: string } declare type MarketBalance = { Escrow: string, Locked: string } declare type DealProposal = { PieceCID: Cid, PieceSize: number, VerifiedDeal: boolean, Client: string, Provider: string, Label: string, StartEpoch: number, EndEpoch: number, StoragePricePerEpoch: string, ProviderCollateral: string, ClientCollateral: string } declare type DealState = { SectorStartEpoch: number, LastUpdatedEpoch: number, SlashEpoch: number } declare type MarketDeal = { Proposal: DealProposal, State: DealState } declare type SectorOnChainInfo = { SectorNumber: number, SealProof: number, SealedCID: Cid, DealIDs: Array, Activation: number, Expiration: number, DealWeight: string, VerifiedDealWeight: string, InitialPledge: string, ExpectedDayReward: string, ExpectedStoragePledge: string, SectorKeyCID: Cid } declare type BitField = {} declare type Deadline = { PostSubmissions: BitField, DisputableProofCount: number } declare type MinerInfo = { Owner: string, Worker: string, NewWorker: string, ControlAddresses: Array, WorkerChangeEpoch: number, PeerId: string, Multiaddrs: Array, WindowPoStProofType: number, SectorSize: number, WindowPoStPartitionSectors: number, ConsensusFaultElapsed: number } declare type SectorPreCommitInfo = { SealProof: number, SectorNumber: number, SealedCID: Cid, SealRandEpoch: number, DealIDs: Array, Expiration: number, ReplaceCapacity: boolean, ReplaceSectorDeadline: number, ReplaceSectorPartition: number, ReplaceSectorNumber: number } declare type Partition = { AllSectors: BitField, FaultySectors: BitField, RecoveringSectors: BitField, LiveSectors: BitField, ActiveSectors: BitField } declare type Claim = { RawBytePower: string, QualityAdjPower: string } declare type MinerPower = { MinerPower: Claim, TotalPower: Claim, HasMinPower: boolean } declare type Info = { CurrentEpoch: number, PeriodStart: number, Index: number, Open: number, Close: number, Challenge: number, FaultCutoff: number, WPoStPeriodDeadlines: number, WPoStProvingPeriod: number, WPoStChallengeWindow: number, WPoStChallengeLookback: number, FaultDeclarationCutoff: number } declare type MinerSectors = { Live: number, Active: number, Faulty: number } declare type ActorState = { Balance: string, Code: Cid, State: any } declare type MsgLookup = { Message: Cid, Receipt: MessageReceipt, ReturnDec: any, TipSet: Cid[], Height: number } declare type SectorExpiration = { OnTime: number, Early: number } declare type SectorLocation = { Deadline: number, Partition: number } declare type SectorPreCommitOnChainInfo = { Info: SectorPreCommitInfo, PreCommitDeposit: string, PreCommitEpoch: number, DealWeight: string, VerifiedDealWeight: string } declare type CirculatingSupply = { FilVested: string, FilMined: string, FilBurnt: string, FilLocked: string, FilCirculating: string, FilReserveDisbursed: string } declare type ActiveSync = { WorkerID: number, Base: TipSet, Target: TipSet, Stage: number, Height: number, Start: Time, End: Time, Message: string } declare type SyncState = { ActiveSyncs: Array, VMApplied: number } declare type KeyInfo = { Type: string, PrivateKey: string } declare type AddressConfig = { PreCommitControl: Array, CommitControl: Array, TerminateControl: Array, DealPublishControl: Array, DisableOwnerFallback: boolean, DisableWorkerFallback: boolean } declare type SectorID = { Miner: number, Number: number } declare type SectorRef = { ID: SectorID, ProofType: number } declare type DagstoreShardResult = { Key: string, Success: boolean, Error: string } declare type DagstoreInitializeAllEvent = { Key: string, Event: string, Success: boolean, Error: string, Total: number, Current: number } declare type DagstoreInitializeAllParams = { MaxConcurrency: number, IncludeSealed: boolean } declare type DagstoreShardInfo = { Key: string, State: string, Error: string } declare type GraphSyncDataTransfer = { RequestID: number, RequestState: string, IsCurrentChannelRequest: boolean, ChannelID: ChannelID, ChannelState: DataTransferChannel, Diagnostics: Array } declare type TransferDiagnostics = { ReceivingTransfers: Array, SendingTransfers: Array } declare type SignedStorageAsk = { Ask: StorageAsk, Signature: Signature } declare type DealProposal1 = { PieceCID: Cid, PieceSize: number, VerifiedDeal: boolean, Client: string, Provider: string, Label: string, StartEpoch: number, EndEpoch: number, StoragePricePerEpoch: string, ProviderCollateral: string, ClientCollateral: string } declare type ClientDealProposal = { Proposal: DealProposal1, ClientSignature: Signature } declare type MinerDeal = { ClientDealProposal: ClientDealProposal, ProposalCid: Cid, AddFundsCid: Cid, PublishCid: Cid, Miner: string, Client: string, State: number, PiecePath: string, MetadataPath: string, SlashEpoch: number, FastRetrieval: boolean, Message: string, FundsReserved: string, Ref: DataRef, AvailableForRetrieval: boolean, DealID: number, CreationTime: CborTime, TransferChannelId: ChannelID, SectorNumber: number, InboundCAR: string } declare type Ask = { PricePerByte: string, UnsealPrice: string, PaymentInterval: number, PaymentIntervalIncrease: number } declare type Deferred = { Raw: string } declare type Params = { Selector: Deferred, PieceCID: Cid, PricePerByte: string, PaymentInterval: number, PaymentIntervalIncrease: number, UnsealPrice: string } declare type DealProposal2 = { PayloadCID: Cid, ID: number, Params: Params } declare type DealInfo1 = { DealID: number, SectorID: number, Offset: number, Length: number } declare type PieceInfo = { PieceCID: Cid, Deals: Array } declare type ProviderDealState = { DealProposal: DealProposal2, StoreID: number, ChannelID: ChannelID, PieceInfo: PieceInfo, Status: number, Receiver: string, TotalSent: number, FundsReceived: string, Message: string, CurrentInterval: number, LegacyProtocol: boolean } declare type PendingDealInfo = { Deals: Array, PublishPeriodStart: Time, PublishPeriod: number } declare type BlockLocation = { RelOffset: number, BlockSize: number } declare type PieceBlockLocation = { BlockLocation: BlockLocation, PieceCID: Cid } declare type CIDInfo = { CID: Cid, PieceBlockLocations: Array } declare type CallID = { Sector: SectorID, ID: Array } declare type PieceInfo1 = { Size: number, PieceCID: Cid } declare type CallError = { Code: number, Message: string } declare type ReplicaUpdateOut = { NewSealed: Cid, NewUnsealed: Cid } declare type SectorCids = { Unsealed: Cid, Sealed: Cid } declare type SectorOffset = { Sector: number, Offset: number } declare type DealSchedule = { StartEpoch: number, EndEpoch: number } declare type PieceDealInfo = { PublishCid: Cid, DealID: number, DealProposal: DealProposal1, DealSchedule: DealSchedule, KeepUnsealed: boolean } declare type CommitBatchRes = { Sectors: Array, FailedSectors: { [k: string]: string }, Msg: Cid, Error: string } declare type PreCommitBatchRes = { Sectors: Array, Msg: Cid, Error: string } declare type SealedRef = { SectorID: number, Offset: number, Size: number } declare type SectorPiece = { Piece: PieceInfo1, DealInfo: PieceDealInfo } declare type SealTicket = { Value: Array, Epoch: number } declare type SealSeed = { Value: Array, Epoch: number } declare type SectorLog = { Kind: string, Timestamp: number, Trace: string, Message: string } declare type SectorInfo = { SectorID: number, State: string, CommD: Cid, CommR: Cid, Proof: string, Deals: Array, Pieces: Array, Ticket: SealTicket, Seed: SealSeed, PreCommitMsg: Cid, CommitMsg: Cid, Retries: number, ToUpgrade: boolean, LastErr: string, Log: Array, SealProof: number, Activation: number, Expiration: number, DealWeight: string, VerifiedDealWeight: string, InitialPledge: string, OnTime: number, Early: number } declare type StorageInfo = { ID: string, URLs: Array, Weight: number, MaxStorage: number, CanSeal: boolean, CanStore: boolean, Groups: Array, AllowTo: Array } declare type FsStat = { Capacity: number, Available: number, FSAvailable: number, Reserved: number, Max: number, Used: number } declare type SectorStorageInfo = { ID: string, URLs: Array, Weight: number, CanSeal: boolean, CanStore: boolean, Primary: boolean } declare type SectorLock = { Sector: SectorID, Write: Array, Read: Array } declare type SectorLocks = { Locks: Array } declare type Decl = { SectorID: SectorID, SectorFileType: number } declare type HealthReport = { Stat: FsStat, Err: string } declare type WorkerJob = { ID: CallID, Sector: SectorID, Task: string, RunWait: number, Start: Time, Hostname: string } declare type Resources = { MinMemory: number, MaxMemory: number, GPUUtilization: number, MaxParallelism: number, MaxParallelismGPU: number, BaseMinMemory: number } declare type WorkerResources = { MemPhysical: number, MemUsed: number, MemSwap: number, MemSwapUsed: number, CPUs: number, GPUs: Array, Resources: { [k: string]: { [k: string]: Resources } } } declare type WorkerInfo = { Hostname: string, IgnoreResources: boolean, Resources: WorkerResources } declare type WorkerStats = { Info: WorkerInfo, Enabled: boolean, MemUsedMin: number, MemUsedMax: number, GpuUsed: number, CpuUse: number } declare type Range = { Offset: number, Size: number } declare type StoragePath = { ID: string, Weight: number, LocalPath: string, CanSeal: boolean, CanStore: boolean } declare class LotusRPC { constructor (provider: any, options: { schema: any }) authNew (permission: Array): Promise authVerify (str: string): Promise> closing (handler: (data: {}) => void): [() => void, Promise] /** * discover returns an OpenRPC document describing an RPC API. */ discover (): Promise<{ [k: string]: any }> /** * logAlerts returns list of all, active and inactive alerts tracked by the * node */ logAlerts (): Promise> logList (): Promise> logSetLevel (str: string, str1: string): Promise /** * session returns a random UUID of api provider session */ session (): Promise> /** * trigger graceful shutdown */ shutdown (): Promise /** * version provides information about API provider */ version (): Promise /** * beaconGetEntry returns the beacon entry for the given filecoin epoch. If * the entry has not yet been produced, the call will block until the entry * becomes available */ beaconGetEntry (chainEpoch: number): Promise /** * chainBlockstoreInfo returns some basic information about the blockstore */ chainBlockstoreInfo (): Promise<{ [k: string]: any }> /** * chainCheckBlockstore performs an (asynchronous) health check on the chain/state blockstore * if supported by the underlying implementation. */ chainCheckBlockstore (): Promise /** * chainDeleteObj deletes node referenced by the given CID */ chainDeleteObj (cid: Cid): Promise /** * chainExport returns a stream of bytes with CAR dump of chain data. * The exported chain data includes the header chain from the given tipset * back to genesis, the entire genesis state, and the most recent 'nroots' * state trees. * If oldmsgskip is set, messages from before the requested roots are also not included. */ chainExport (handler: (data: string) => void, chainEpoch: number, bool: boolean, tipSetKey: Cid[]): [() => void, Promise] /** * chainGetBlock returns the block specified by the given CID. */ chainGetBlock (cid: Cid): Promise /** * chainGetBlockMessages returns messages stored in the specified block. * * Note: If there are multiple blocks in a tipset, it's likely that some * messages will be duplicated. It's also possible for blocks in a tipset to have * different messages from the same sender at the same nonce. When that happens, * only the first message (in a block with lowest ticket) will be considered * for execution * * NOTE: THIS METHOD SHOULD ONLY BE USED FOR GETTING MESSAGES IN A SPECIFIC BLOCK * * DO NOT USE THIS METHOD TO GET MESSAGES INCLUDED IN A TIPSET * Use ChainGetParentMessages, which will perform correct message deduplication */ chainGetBlockMessages (cid: Cid): Promise /** * chainGetGenesis returns the genesis tipset. */ chainGetGenesis (): Promise /** * chainGetMessage reads a message referenced by the specified CID from the * chain blockstore. */ chainGetMessage (cid: Cid): Promise /** * chainGetMessagesInTipset returns message stores in current tipset */ chainGetMessagesInTipset (tipSetKey: Cid[]): Promise> chainGetNode (str: string): Promise /** * chainGetParentMessages returns messages stored in parent tipset of the * specified block. */ chainGetParentMessages (cid: Cid): Promise> /** * chainGetParentReceipts returns receipts for messages in parent tipset of * the specified block. The receipts in the list returned is one-to-one with the * messages returned by a call to ChainGetParentMessages with the same blockCid. */ chainGetParentReceipts (cid: Cid): Promise> /** * chainGetPath returns a set of revert/apply operations needed to get from * one tipset to another, for example: * ``` * to * ^ * from tAA * ^ ^ * tBA tAB * ^---*--^ * ^ * tRR * ``` * Would return `[revert(tBA), apply(tAB), apply(tAA)]` */ chainGetPath (tipSetKey: Cid[], tipSetKey1: Cid[]): Promise> /** * chainGetTipSet returns the tipset specified by the given TipSetKey. */ chainGetTipSet (tipSetKey: Cid[]): Promise /** * chainGetTipSetAfterHeight looks back for a tipset at the specified epoch. * If there are no blocks at the specified epoch, the first non-nil tipset at a later epoch * will be returned. */ chainGetTipSetAfterHeight (chainEpoch: number, tipSetKey: Cid[]): Promise /** * chainGetTipSetByHeight looks back for a tipset at the specified epoch. * If there are no blocks at the specified epoch, a tipset at an earlier epoch * will be returned. */ chainGetTipSetByHeight (chainEpoch: number, tipSetKey: Cid[]): Promise /** * chainHasObj checks if a given CID exists in the chain blockstore. */ chainHasObj (cid: Cid): Promise /** * chainHead returns the current head of the chain. */ chainHead (): Promise /** * chainNotify returns channel with chain head updates. * First message is guaranteed to be of len == 1, and type == 'current'. */ chainNotify (handler: (data: Array) => void): [() => void, Promise] /** * chainReadObj reads ipld nodes referenced by the specified CID from chain * blockstore and returns raw bytes. */ chainReadObj (cid: Cid): Promise /** * chainSetHead forcefully sets current chain head. Use with caution. */ chainSetHead (tipSetKey: Cid[]): Promise /** * chainStatObj returns statistics about the graph referenced by 'obj'. * If 'base' is also specified, then the returned stat will be a diff * between the two objects. */ chainStatObj (cid: Cid, cid1: Cid): Promise /** * chainTipSetWeight computes weight for the specified tipset. */ chainTipSetWeight (tipSetKey: Cid[]): Promise /** * clientCalcCommP calculates the CommP for a specified file */ clientCalcCommP (str: string): Promise /** * clientCancelDataTransfer cancels a data transfer with the given transfer ID and other peer */ clientCancelDataTransfer (transferID: number, id: string, bool: boolean): Promise /** * clientCancelRetrievalDeal cancels an ongoing retrieval deal based on DealID */ clientCancelRetrievalDeal (dealID: number): Promise clientDataTransferUpdates (handler: (data: DataTransferChannel) => void): [() => void, Promise] /** * clientCalcCommP calculates the CommP and data size of the specified CID */ clientDealPieceCID (cid: Cid): Promise /** * clientDealSize calculates real deal data size */ clientDealSize (cid: Cid): Promise /** * clientExport exports a file stored in the local filestore to a system file */ clientExport (exportRef: ExportRef, fileRef: FileRef): Promise /** * clientFindData identifies peers that have a certain file, and returns QueryOffers (one per peer). */ clientFindData (cid: Cid, cid1: Cid): Promise> /** * clientGenCar generates a CAR file for the specified file. */ clientGenCar (fileRef: FileRef, str: string): Promise /** * clientGetDealInfo returns the latest information about a given deal. */ clientGetDealInfo (cid: Cid): Promise /** * clientGetDealStatus returns status given a code */ clientGetDealStatus (uint: number): Promise /** * clientGetDealUpdates returns the status of updated deals */ clientGetDealUpdates (handler: (data: DealInfo) => void): [() => void, Promise] /** * clientGetRetrievalUpdates returns status of updated retrieval deals */ clientGetRetrievalUpdates (handler: (data: RetrievalInfo) => void): [() => void, Promise] /** * clientHasLocal indicates whether a certain CID is locally stored. */ clientHasLocal (cid: Cid): Promise /** * clientImport imports file under the specified path into filestore. */ clientImport (fileRef: FileRef): Promise /** * clientListTransfers returns the status of all ongoing transfers of data */ clientListDataTransfers (): Promise> /** * clientListDeals returns information about the deals made by the local client. */ clientListDeals (): Promise> /** * clientListImports lists imported files and their root CIDs */ clientListImports (): Promise> /** * clientListRetrievals returns information about retrievals made by the local client */ clientListRetrievals (): Promise> /** * clientMinerQueryOffer returns a QueryOffer for the specific miner and file. */ clientMinerQueryOffer (address: string, cid: Cid, cid1: Cid): Promise /** * clientQueryAsk returns a signed StorageAsk from the specified miner. */ clientQueryAsk (id: string, address: string): Promise /** * clientRemoveImport removes file import */ clientRemoveImport (id: number): Promise /** * clientRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer */ clientRestartDataTransfer (transferID: number, id: string, bool: boolean): Promise /** * clientRetrieve initiates the retrieval of a file, as specified in the order. */ clientRetrieve (retrievalOrder: RetrievalOrder): Promise /** * clientRetrieveTryRestartInsufficientFunds attempts to restart stalled retrievals on a given payment channel * which are stuck due to insufficient funds */ clientRetrieveTryRestartInsufficientFunds (address: string): Promise /** * clientRetrieveWait waits for retrieval to be complete */ clientRetrieveWait (dealID: number): Promise /** * clientStartDeal proposes a deal with a miner. */ clientStartDeal (startDealParams: StartDealParams): Promise /** * clientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking. */ clientStatelessDeal (startDealParams: StartDealParams): Promise /** * createBackup creates node backup onder the specified file name. The * method requires that the lotus daemon is running with the * LOTUS_BACKUP_BASE_PATH environment variable set to some path, and that * the path specified when calling CreateBackup is within the base path */ createBackup (str: string): Promise /** * gasEstimateFeeCap estimates gas fee cap */ gasEstimateFeeCap (message: Message, int: number, tipSetKey: Cid[]): Promise /** * gasEstimateGasLimit estimates gas used by the message and returns it. * It fails if message fails to execute. */ gasEstimateGasLimit (message: Message, tipSetKey: Cid[]): Promise /** * gasEstimateGasPremium estimates what gas price should be used for a * message to have high likelihood of inclusion in `nblocksincl` epochs. */ gasEstimateGasPremium (uint: number, address: string, int: number, tipSetKey: Cid[]): Promise /** * gasEstimateMessageGas estimates gas values for unset message gas fields */ gasEstimateMessageGas (message: Message, messageSendSpec: MessageSendSpec, tipSetKey: Cid[]): Promise id (): Promise /** * marketAddBalance adds funds to the market actor */ marketAddBalance (address: string, address1: string, bigInt: string): Promise /** * marketGetReserved gets the amount of funds that are currently reserved for the address */ marketGetReserved (address: string): Promise /** * marketReleaseFunds releases funds reserved by MarketReserveFunds */ marketReleaseFunds (address: string, bigInt: string): Promise /** * marketReserveFunds reserves funds for a deal */ marketReserveFunds (address: string, address1: string, bigInt: string): Promise /** * marketWithdraw withdraws unlocked funds from the market actor */ marketWithdraw (address: string, address1: string, bigInt: string): Promise minerCreateBlock (blockTemplate: BlockTemplate): Promise minerGetBaseInfo (address: string, chainEpoch: number, tipSetKey: Cid[]): Promise /** * mpoolBatchPush batch pushes a signed message to mempool. */ mpoolBatchPush (signedMessage: Array): Promise> /** * mpoolBatchPushMessage batch pushes a unsigned message to mempool. */ mpoolBatchPushMessage (message: Array, messageSendSpec: MessageSendSpec): Promise> /** * mpoolBatchPushUntrusted batch pushes a signed message to mempool from untrusted sources. */ mpoolBatchPushUntrusted (signedMessage: Array): Promise> /** * mpoolCheckMessages performs logical checks on a batch of messages */ mpoolCheckMessages (messagePrototype: Array): Promise>> /** * mpoolCheckPendingMessages performs logical checks for all pending messages from a given address */ mpoolCheckPendingMessages (address: string): Promise>> /** * mpoolCheckReplaceMessages performs logical checks on pending messages with replacement */ mpoolCheckReplaceMessages (message: Array): Promise>> /** * mpoolClear clears pending messages from the mpool */ mpoolClear (bool: boolean): Promise /** * mpoolGetConfig returns (a copy of) the current mpool config */ mpoolGetConfig (): Promise /** * mpoolGetNonce gets next nonce for the specified sender. * Note that this method may not be atomic. Use MpoolPushMessage instead. */ mpoolGetNonce (address: string): Promise /** * mpoolPending returns pending mempool messages. */ mpoolPending (tipSetKey: Cid[]): Promise> /** * mpoolPush pushes a signed message to mempool. */ mpoolPush (signedMessage: SignedMessage): Promise /** * mpoolPushMessage atomically assigns a nonce, signs, and pushes a message * to mempool. * maxFee is only used when GasFeeCap/GasPremium fields aren't specified * * When maxFee is set to 0, MpoolPushMessage will guess appropriate fee * based on current chain conditions */ mpoolPushMessage (message: Message, messageSendSpec: MessageSendSpec): Promise /** * mpoolPushUntrusted pushes a signed message to mempool from untrusted sources. */ mpoolPushUntrusted (signedMessage: SignedMessage): Promise /** * mpoolSelect returns a list of pending messages for inclusion in the next block */ mpoolSelect (tipSetKey: Cid[], num: number): Promise> /** * mpoolSetConfig sets the mpool config to (a copy of) the supplied config */ mpoolSetConfig (mpoolConfig: MpoolConfig): Promise mpoolSub (handler: (data: MpoolUpdate) => void): [() => void, Promise] /** * msigAddApprove approves a previously proposed AddSigner message * It takes the following params: , , , * , , */ msigAddApprove (address: string, address1: string, uint: number, address2: string, address3: string, bool: boolean): Promise /** * msigAddCancel cancels a previously proposed AddSigner message * It takes the following params: , , , * , */ msigAddCancel (address: string, address1: string, uint: number, address2: string, bool: boolean): Promise /** * msigAddPropose proposes adding a signer in the multisig * It takes the following params: , , * , */ msigAddPropose (address: string, address1: string, address2: string, bool: boolean): Promise /** * msigApprove approves a previously-proposed multisig message by transaction ID * It takes the following params: , */ msigApprove (address: string, uint: number, address1: string): Promise /** * msigApproveTxnHash approves a previously-proposed multisig message, specified * using both transaction ID and a hash of the parameters used in the * proposal. This method of approval can be used to ensure you only approve * exactly the transaction you think you are. * It takes the following params: , , , , , * , , */ msigApproveTxnHash (address: string, uint: number, address1: string, address2: string, bigInt: string, address3: string, uint1: number, bytes: string): Promise /** * msigCancel cancels a previously-proposed multisig message * It takes the following params: , */ msigCancel (address: string, uint: number, address1: string): Promise /** * msigCancel cancels a previously-proposed multisig message * It takes the following params: , , , , * , , */ msigCancelTxnHash (address: string, uint: number, address1: string, bigInt: string, address2: string, uint1: number, bytes: string): Promise /** * msigCreate creates a multisig wallet * It takes the following params: , , * , , */ msigCreate (uint: number, address: Array, chainEpoch: number, bigInt: string, address1: string, bigInt1: string): Promise /** * msigGetAvailableBalance returns the portion of a multisig's balance that can be withdrawn or spent */ msigGetAvailableBalance (address: string, tipSetKey: Cid[]): Promise /** * msigGetPending returns pending transactions for the given multisig * wallet. Once pending transactions are fully approved, they will no longer * appear here. */ msigGetPending (address: string, tipSetKey: Cid[]): Promise> /** * msigGetVested returns the amount of FIL that vested in a multisig in a certain period. * It takes the following params: , , */ msigGetVested (address: string, tipSetKey: Cid[], tipSetKey1: Cid[]): Promise /** * msigGetVestingSchedule returns the vesting details of a given multisig. */ msigGetVestingSchedule (address: string, tipSetKey: Cid[]): Promise /** * msigPropose proposes a multisig message * It takes the following params: , , , * , , */ msigPropose (address: string, address1: string, bigInt: string, address2: string, uint: number, bytes: string): Promise /** * msigRemoveSigner proposes the removal of a signer from the multisig. * It accepts the multisig to make the change on, the proposer address to * send the message from, the address to be removed, and a boolean * indicating whether or not the signing threshold should be lowered by one * along with the address removal. */ msigRemoveSigner (address: string, address1: string, address2: string, bool: boolean): Promise /** * msigSwapApprove approves a previously proposed SwapSigner * It takes the following params: , , , * , , */ msigSwapApprove (address: string, address1: string, uint: number, address2: string, address3: string, address4: string): Promise /** * msigSwapCancel cancels a previously proposed SwapSigner message * It takes the following params: , , , * , */ msigSwapCancel (address: string, address1: string, uint: number, address2: string, address3: string): Promise /** * msigSwapPropose proposes swapping 2 signers in the multisig * It takes the following params: , , * , */ msigSwapPropose (address: string, address1: string, address2: string, address3: string): Promise netAddrsListen (): Promise netAgentVersion (id: string): Promise netAutoNatStatus (): Promise netBandwidthStats (): Promise netBandwidthStatsByPeer (): Promise<{ [k: string]: Stats }> netBandwidthStatsByProtocol (): Promise<{ [k: string]: Stats }> netBlockAdd (netBlockList: NetBlockList): Promise netBlockList (): Promise netBlockRemove (netBlockList: NetBlockList): Promise netConnect (addrInfo: AddrInfo): Promise netConnectedness (id: string): Promise netDisconnect (id: string): Promise netFindPeer (id: string): Promise netPeerInfo (id: string): Promise netPeers (): Promise> netPubsubScores (): Promise> nodeStatus (bool: boolean): Promise paychAllocateLane (address: string): Promise paychAvailableFunds (address: string): Promise paychAvailableFundsByFromTo (address: string, address1: string): Promise paychCollect (address: string): Promise paychGet (address: string, address1: string, bigInt: string): Promise paychGetWaitReady (cid: Cid): Promise paychList (): Promise> paychNewPayment (address: string, address1: string, voucherSpec: Array): Promise paychSettle (address: string): Promise paychStatus (address: string): Promise paychVoucherAdd (address: string, signedVoucher: SignedVoucher, bytes: string, bigInt: string): Promise paychVoucherCheckSpendable (address: string, signedVoucher: SignedVoucher, bytes: string, bytes1: string): Promise paychVoucherCheckValid (address: string, signedVoucher: SignedVoucher): Promise paychVoucherCreate (address: string, bigInt: string, uint: number): Promise paychVoucherList (address: string): Promise> paychVoucherSubmit (address: string, signedVoucher: SignedVoucher, bytes: string, bytes1: string): Promise /** * stateAccountKey returns the public key address of the given ID address */ stateAccountKey (address: string, tipSetKey: Cid[]): Promise /** * stateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset */ stateAllMinerFaults (chainEpoch: number, tipSetKey: Cid[]): Promise> /** * stateCall runs the given message and returns its result without any persisted changes. * * StateCall applies the message to the tipset's parent state. The * message is not applied on-top-of the messages in the passed-in * tipset. */ stateCall (message: Message, tipSetKey: Cid[]): Promise /** * stateChangedActors returns all the actors whose states change between the two given state CIDs * TODO: Should this take tipset keys instead? */ stateChangedActors (cid: Cid, cid1: Cid): Promise<{ [k: string]: Actor }> /** * stateCirculatingSupply returns the exact circulating supply of Filecoin at the given tipset. * This is not used anywhere in the protocol itself, and is only for external consumption. */ stateCirculatingSupply (tipSetKey: Cid[]): Promise /** * stateCompute is a flexible command that applies the given messages on the given tipset. * The messages are run as though the VM were at the provided height. * * When called, StateCompute will: * - Load the provided tipset, or use the current chain head if not provided * - Compute the tipset state of the provided tipset on top of the parent state * - (note that this step runs before vmheight is applied to the execution) * - Execute state upgrade if any were scheduled at the epoch, or in null * blocks preceding the tipset * - Call the cron actor on null blocks preceding the tipset * - For each block in the tipset * - Apply messages in blocks in the specified * - Award block reward by calling the reward actor * - Call the cron actor for the current epoch * - If the specified vmheight is higher than the current epoch, apply any * needed state upgrades to the state * - Apply the specified messages to the state * * The vmheight parameter sets VM execution epoch, and can be used to simulate * message execution in different network versions. If the specified vmheight * epoch is higher than the epoch of the specified tipset, any state upgrades * until the vmheight will be executed on the state before applying messages * specified by the user. * * Note that the initial tipset state computation is not affected by the * vmheight parameter - only the messages in the `apply` set are * * If the caller wants to simply compute the state, vmheight should be set to * the epoch of the specified tipset. * * Messages in the `apply` parameter must have the correct nonces, and gas * values set. */ stateCompute (chainEpoch: number, message: Array, tipSetKey: Cid[]): Promise /** * stateDealProviderCollateralBounds returns the min and max collateral a storage provider * can issue. It takes the deal size and verified status as parameters. */ stateDealProviderCollateralBounds (paddedPieceSize: number, bool: boolean, tipSetKey: Cid[]): Promise /** * stateDecodeParams attempts to decode the provided params, based on the recipient actor address and method number. */ stateDecodeParams (address: string, methodNum: number, bytes: string, tipSetKey: Cid[]): Promise /** * stateEncodeParams attempts to encode the provided json params to the binary from */ stateEncodeParams (cid: Cid, methodNum: number, uint: Array): Promise /** * stateGetActor returns the indicated actor's nonce and balance. */ stateGetActor (address: string, tipSetKey: Cid[]): Promise /** * stateGetRandomnessFromBeacon is used to sample the beacon for randomness. */ stateGetRandomnessFromBeacon (domainSeparationTag: number, chainEpoch: number, bytes: string, tipSetKey: Cid[]): Promise /** * stateGetRandomnessFromTickets is used to sample the chain for randomness. */ stateGetRandomnessFromTickets (domainSeparationTag: number, chainEpoch: number, bytes: string, tipSetKey: Cid[]): Promise /** * stateListActors returns the addresses of every actor in the state */ stateListActors (tipSetKey: Cid[]): Promise> /** * stateListMessages looks back and returns all messages with a matching to or from address, stopping at the given height. */ stateListMessages (messageMatch: MessageMatch, tipSetKey: Cid[], chainEpoch: number): Promise> /** * stateListMiners returns the addresses of every miner that has claimed power in the Power Actor */ stateListMiners (tipSetKey: Cid[]): Promise> /** * stateLookupID retrieves the ID address of the given address */ stateLookupID (address: string, tipSetKey: Cid[]): Promise /** * stateMarketBalance looks up the Escrow and Locked balances of the given address in the Storage Market */ stateMarketBalance (address: string, tipSetKey: Cid[]): Promise /** * stateMarketDeals returns information about every deal in the Storage Market */ stateMarketDeals (tipSetKey: Cid[]): Promise<{ [k: string]: MarketDeal }> /** * stateMarketParticipants returns the Escrow and Locked balances of every participant in the Storage Market */ stateMarketParticipants (tipSetKey: Cid[]): Promise<{ [k: string]: MarketBalance }> /** * stateMarketStorageDeal returns information about the indicated deal */ stateMarketStorageDeal (dealID: number, tipSetKey: Cid[]): Promise /** * stateMinerActiveSectors returns info about sectors that a given miner is actively proving. */ stateMinerActiveSectors (address: string, tipSetKey: Cid[]): Promise> /** * stateMinerAvailableBalance returns the portion of a miner's balance that can be withdrawn or spent */ stateMinerAvailableBalance (address: string, tipSetKey: Cid[]): Promise /** * stateMinerDeadlines returns all the proving deadlines for the given miner */ stateMinerDeadlines (address: string, tipSetKey: Cid[]): Promise> /** * stateMinerFaults returns a bitfield indicating the faulty sectors of the given miner */ stateMinerFaults (address: string, tipSetKey: Cid[]): Promise /** * stateMinerInfo returns info about the indicated miner */ stateMinerInfo (address: string, tipSetKey: Cid[]): Promise /** * stateMinerInitialPledgeCollateral returns the initial pledge collateral for the specified miner's sector */ stateMinerInitialPledgeCollateral (address: string, sectorPreCommitInfo: SectorPreCommitInfo, tipSetKey: Cid[]): Promise /** * stateMinerPartitions returns all partitions in the specified deadline */ stateMinerPartitions (address: string, uint: number, tipSetKey: Cid[]): Promise> /** * stateMinerPower returns the power of the indicated miner */ stateMinerPower (address: string, tipSetKey: Cid[]): Promise /** * stateMinerInitialPledgeCollateral returns the precommit deposit for the specified miner's sector */ stateMinerPreCommitDepositForPower (address: string, sectorPreCommitInfo: SectorPreCommitInfo, tipSetKey: Cid[]): Promise /** * stateMinerProvingDeadline calculates the deadline at some epoch for a proving period * and returns the deadline-related calculations. */ stateMinerProvingDeadline (address: string, tipSetKey: Cid[]): Promise /** * stateMinerRecoveries returns a bitfield indicating the recovering sectors of the given miner */ stateMinerRecoveries (address: string, tipSetKey: Cid[]): Promise /** * stateMinerSectorAllocated checks if a sector is allocated */ stateMinerSectorAllocated (address: string, sectorNumber: number, tipSetKey: Cid[]): Promise /** * stateMinerSectorCount returns the number of sectors in a miner's sector set and proving set */ stateMinerSectorCount (address: string, tipSetKey: Cid[]): Promise /** * stateMinerSectors returns info about the given miner's sectors. If the filter bitfield is nil, all sectors are included. */ stateMinerSectors (address: string, bitField: BitField, tipSetKey: Cid[]): Promise> /** * stateNetworkName returns the name of the network the node is synced to */ stateNetworkName (): Promise /** * stateNetworkVersion returns the network version at the given tipset */ stateNetworkVersion (tipSetKey: Cid[]): Promise /** * stateReadState returns the indicated actor's state. */ stateReadState (address: string, tipSetKey: Cid[]): Promise /** * stateReplay replays a given message, assuming it was included in a block in the specified tipset. * * If a tipset key is provided, and a replacing message is found on chain, * the method will return an error saying that the message wasn't found * * If no tipset key is provided, the appropriate tipset is looked up, and if * the message was gas-repriced, the on-chain message will be replayed - in * that case the returned InvocResult.MsgCid will not match the Cid param * * If the caller wants to ensure that exactly the requested message was executed, * they MUST check that InvocResult.MsgCid is equal to the provided Cid. * Without this check both the requested and original message may appear as * successfully executed on-chain, which may look like a double-spend. * * A replacing message is a message with a different CID, any of Gas values, and * different signature, but with all other parameters matching (source/destination, * nonce, params, etc.) */ stateReplay (tipSetKey: Cid[], cid: Cid): Promise /** * stateSearchMsg looks back up to limit epochs in the chain for a message, and returns its receipt and the tipset where it was executed * * NOTE: If a replacing message is found on chain, this method will return * a MsgLookup for the replacing message - the MsgLookup.Message will be a different * CID than the one provided in the 'cid' param, MsgLookup.Receipt will contain the * result of the execution of the replacing message. * * If the caller wants to ensure that exactly the requested message was executed, * they must check that MsgLookup.Message is equal to the provided 'cid', or set the * `allowReplaced` parameter to false. Without this check, and with `allowReplaced` * set to true, both the requested and original message may appear as * successfully executed on-chain, which may look like a double-spend. * * A replacing message is a message with a different CID, any of Gas values, and * different signature, but with all other parameters matching (source/destination, * nonce, params, etc.) */ stateSearchMsg (tipSetKey: Cid[], cid: Cid, chainEpoch: number, bool: boolean): Promise /** * stateSectorExpiration returns epoch at which given sector will expire */ stateSectorExpiration (address: string, sectorNumber: number, tipSetKey: Cid[]): Promise /** * stateSectorGetInfo returns the on-chain info for the specified miner's sector. Returns null in case the sector info isn't found * NOTE: returned info.Expiration may not be accurate in some cases, use StateSectorExpiration to get accurate * expiration epoch */ stateSectorGetInfo (address: string, sectorNumber: number, tipSetKey: Cid[]): Promise /** * stateSectorPartition finds deadline/partition with the specified sector */ stateSectorPartition (address: string, sectorNumber: number, tipSetKey: Cid[]): Promise /** * stateSectorPreCommitInfo returns the PreCommit info for the specified miner's sector */ stateSectorPreCommitInfo (address: string, sectorNumber: number, tipSetKey: Cid[]): Promise /** * stateVMCirculatingSupplyInternal returns an approximation of the circulating supply of Filecoin at the given tipset. * This is the value reported by the runtime interface to actors code. */ stateVMCirculatingSupplyInternal (tipSetKey: Cid[]): Promise /** * stateVerifiedClientStatus returns the data cap for the given address. * Returns nil if there is no entry in the data cap table for the * address. */ stateVerifiedClientStatus (address: string, tipSetKey: Cid[]): Promise /** * stateVerifiedClientStatus returns the address of the Verified Registry's root key */ stateVerifiedRegistryRootKey (tipSetKey: Cid[]): Promise /** * stateVerifierStatus returns the data cap for the given address. * Returns nil if there is no entry in the data cap table for the * address. */ stateVerifierStatus (address: string, tipSetKey: Cid[]): Promise /** * stateWaitMsg looks back up to limit epochs in the chain for a message. * If not found, it blocks until the message arrives on chain, and gets to the * indicated confidence depth. * * NOTE: If a replacing message is found on chain, this method will return * a MsgLookup for the replacing message - the MsgLookup.Message will be a different * CID than the one provided in the 'cid' param, MsgLookup.Receipt will contain the * result of the execution of the replacing message. * * If the caller wants to ensure that exactly the requested message was executed, * they must check that MsgLookup.Message is equal to the provided 'cid', or set the * `allowReplaced` parameter to false. Without this check, and with `allowReplaced` * set to true, both the requested and original message may appear as * successfully executed on-chain, which may look like a double-spend. * * A replacing message is a message with a different CID, any of Gas values, and * different signature, but with all other parameters matching (source/destination, * nonce, params, etc.) */ stateWaitMsg (cid: Cid, uint: number, chainEpoch: number, bool: boolean): Promise /** * syncCheckBad checks if a block was marked as bad, and if it was, returns * the reason. */ syncCheckBad (cid: Cid): Promise /** * syncCheckpoint marks a blocks as checkpointed, meaning that it won't ever fork away from it. */ syncCheckpoint (tipSetKey: Cid[]): Promise /** * syncIncomingBlocks returns a channel streaming incoming, potentially not * yet synced block headers. */ syncIncomingBlocks (handler: (data: BlockHeader) => void): [() => void, Promise] /** * syncMarkBad marks a blocks as bad, meaning that it won't ever by synced. * Use with extreme caution. */ syncMarkBad (cid: Cid): Promise /** * syncState returns the current status of the lotus sync system. */ syncState (): Promise /** * syncSubmitBlock can be used to submit a newly created block to the. * network through this node */ syncSubmitBlock (blockMsg: BlockMsg): Promise /** * syncUnmarkAllBad purges bad block cache, making it possible to sync to chains previously marked as bad */ syncUnmarkAllBad (): Promise /** * syncUnmarkBad unmarks a blocks as bad, making it possible to be validated and synced again. */ syncUnmarkBad (cid: Cid): Promise /** * syncValidateTipset indicates whether the provided tipset is valid or not */ syncValidateTipset (tipSetKey: Cid[]): Promise /** * walletBalance returns the balance of the given address at the current head of the chain. */ walletBalance (address: string): Promise /** * walletDefaultAddress returns the address marked as default in the wallet. */ walletDefaultAddress (): Promise /** * walletDelete deletes an address from the wallet. */ walletDelete (address: string): Promise /** * walletExport returns the private key of an address in the wallet. */ walletExport (address: string): Promise /** * walletHas indicates whether the given address is in the wallet. */ walletHas (address: string): Promise /** * walletImport receives a KeyInfo, which includes a private key, and imports it into the wallet. */ walletImport (keyInfo: KeyInfo): Promise /** * walletList lists all the addresses in the wallet. */ walletList (): Promise> /** * walletNew creates a new address in the wallet with the given sigType. * Available key types: bls, secp256k1, secp256k1-ledger * Support for numerical types: 1 - secp256k1, 2 - BLS is deprecated */ walletNew (keyType: string): Promise /** * walletSetDefault marks the given address as as the default one. */ walletSetDefault (address: string): Promise /** * walletSign signs the given bytes using the given address. */ walletSign (address: string, bytes: string): Promise /** * walletSignMessage signs the given message using the given address. */ walletSignMessage (address: string, message: Message): Promise /** * walletValidateAddress validates whether a given string can be decoded as a well-formed address */ walletValidateAddress (str: string): Promise /** * walletVerify takes an address, a signature, and some bytes, and indicates whether the signature is valid. * The address does not have to be in the wallet. */ walletVerify (address: string, bytes: string, signature: Signature): Promise actorAddress (): Promise actorAddressConfig (): Promise actorSectorSize (address: string): Promise checkProvable (registeredPoStProof: number, sectorRef: Array, bool: Array, bool1: boolean): Promise<{ [k: string]: string }> computeProof (extendedSectorInfo: Array, uint: Array, chainEpoch: number, version: number): Promise> /** * dagstoreGC runs garbage collection on the DAG store. */ dagstoreGC (): Promise> /** * dagstoreInitializeAll initializes all uninitialized shards in bulk, * according to the policy passed in the parameters. * * It is recommended to set a maximum concurrency to avoid extreme * IO pressure if the storage subsystem has a large amount of deals. * * It returns a stream of events to report progress. */ dagstoreInitializeAll (handler: (data: DagstoreInitializeAllEvent) => void, dagstoreInitializeAllParams: DagstoreInitializeAllParams): [() => void, Promise] /** * dagstoreInitializeShard initializes an uninitialized shard. * * Initialization consists of fetching the shard's data (deal payload) from * the storage subsystem, generating an index, and persisting the index * to facilitate later retrievals, and/or to publish to external sources. * * This operation is intended to complement the initial migration. The * migration registers a shard for every unique piece CID, with lazy * initialization. Thus, shards are not initialized immediately to avoid * IO activity competing with proving. Instead, shard are initialized * when first accessed. This method forces the initialization of a shard by * accessing it and immediately releasing it. This is useful to warm up the * cache to facilitate subsequent retrievals, and to generate the indexes * to publish them externally. * * This operation fails if the shard is not in ShardStateNew state. * It blocks until initialization finishes. */ dagstoreInitializeShard (str: string): Promise /** * dagstoreListShards returns information about all shards known to the * DAG store. Only available on nodes running the markets subsystem. */ dagstoreListShards (): Promise> /** * dagstoreRecoverShard attempts to recover a failed shard. * * This operation fails if the shard is not in ShardStateErrored state. * It blocks until recovery finishes. If recovery failed, it returns the * error. */ dagstoreRecoverShard (str: string): Promise dealsConsiderOfflineRetrievalDeals (): Promise dealsConsiderOfflineStorageDeals (): Promise dealsConsiderOnlineRetrievalDeals (): Promise dealsConsiderOnlineStorageDeals (): Promise dealsConsiderUnverifiedStorageDeals (): Promise dealsConsiderVerifiedStorageDeals (): Promise dealsImportData (cid: Cid, str: string): Promise dealsList (): Promise> dealsPieceCidBlocklist (): Promise> dealsSetConsiderOfflineRetrievalDeals (bool: boolean): Promise dealsSetConsiderOfflineStorageDeals (bool: boolean): Promise dealsSetConsiderOnlineRetrievalDeals (bool: boolean): Promise dealsSetConsiderOnlineStorageDeals (bool: boolean): Promise dealsSetConsiderUnverifiedStorageDeals (bool: boolean): Promise dealsSetConsiderVerifiedStorageDeals (bool: boolean): Promise dealsSetPieceCidBlocklist (cid: Array): Promise /** * marketCancelDataTransfer cancels a data transfer with the given transfer ID and other peer */ marketCancelDataTransfer (transferID: number, id: string, bool: boolean): Promise /** * marketDataTransferDiagnostics generates debugging information about current data transfers over graphsync */ marketDataTransferDiagnostics (id: string): Promise marketDataTransferUpdates (handler: (data: DataTransferChannel) => void): [() => void, Promise] marketGetAsk (): Promise marketGetDealUpdates (handler: (data: MinerDeal) => void): [() => void, Promise] marketGetRetrievalAsk (): Promise marketImportDealData (cid: Cid, str: string): Promise marketListDataTransfers (): Promise> marketListDeals (): Promise> marketListIncompleteDeals (): Promise> marketListRetrievalDeals (): Promise> marketPendingDeals (): Promise marketPublishPendingDeals (): Promise /** * marketRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer */ marketRestartDataTransfer (transferID: number, id: string, bool: boolean): Promise marketRetryPublishDeal (cid: Cid): Promise marketSetAsk (bigInt: string, bigInt1: string, chainEpoch: number, paddedPieceSize: number, paddedPieceSize1: number): Promise marketSetRetrievalAsk (ask: Ask): Promise miningBase (): Promise piecesGetCIDInfo (cid: Cid): Promise piecesGetPieceInfo (cid: Cid): Promise piecesListCidInfos (): Promise> piecesListPieces (): Promise> /** * temp api for testing */ pledgeSector (): Promise /** * storiface.WorkerReturn */ returnAddPiece (callID: CallID, pieceInfo: PieceInfo1, callError: CallError): Promise returnFetch (callID: CallID, callError: CallError): Promise returnFinalizeReplicaUpdate (callID: CallID, callError: CallError): Promise returnFinalizeSector (callID: CallID, callError: CallError): Promise returnGenerateSectorKeyFromData (callID: CallID, callError: CallError): Promise returnMoveStorage (callID: CallID, callError: CallError): Promise returnProveReplicaUpdate1 (callID: CallID, bytes: Array, callError: CallError): Promise returnProveReplicaUpdate2 (callID: CallID, uint: Array, callError: CallError): Promise returnReadPiece (callID: CallID, bool: boolean, callError: CallError): Promise returnReleaseUnsealed (callID: CallID, callError: CallError): Promise returnReplicaUpdate (callID: CallID, replicaUpdateOut: ReplicaUpdateOut, callError: CallError): Promise returnSealCommit1 (callID: CallID, uint: Array, callError: CallError): Promise returnSealCommit2 (callID: CallID, uint: Array, callError: CallError): Promise returnSealPreCommit1 (callID: CallID, uint: Array, callError: CallError): Promise returnSealPreCommit2 (callID: CallID, sectorCids: SectorCids, callError: CallError): Promise returnUnsealPiece (callID: CallID, callError: CallError): Promise /** * runtimeSubsystems returns the subsystems that are enabled * in this instance. */ runtimeSubsystems (): Promise> sealingAbort (callID: CallID): Promise /** * sealingSchedDiag dumps internal sealing scheduler state */ sealingSchedDiag (bool: boolean): Promise /** * sectorAbortUpgrade can be called on sectors that are in the process of being upgraded to abort it */ sectorAbortUpgrade (sectorNumber: number): Promise /** * add piece to an open sector. If no sectors with enough space are open, * either a new sector will be created, or this call will block until more * sectors can be created. */ sectorAddPieceToAny (unpaddedPieceSize: number, reader: any, pieceDealInfo: PieceDealInfo): Promise /** * sectorCommitFlush immediately sends a Commit message with sectors aggregated for Commit. * Returns null if message wasn't sent */ sectorCommitFlush (): Promise> /** * sectorCommitPending returns a list of pending Commit sectors to be sent in the next aggregate message */ sectorCommitPending (): Promise> /** * sectorGetExpectedSealDuration gets the expected time for a sector to seal */ sectorGetExpectedSealDuration (): Promise /** * sectorGetSealDelay gets the time that a newly-created sector * waits for more deals before it starts sealing */ sectorGetSealDelay (): Promise sectorMarkForUpgrade (sectorNumber: number, bool: boolean): Promise sectorMatchPendingPiecesToOpenSectors (): Promise /** * sectorPreCommitFlush immediately sends a PreCommit message with sectors batched for PreCommit. * Returns null if message wasn't sent */ sectorPreCommitFlush (): Promise> /** * sectorPreCommitPending returns a list of pending PreCommit sectors to be sent in the next batch message */ sectorPreCommitPending (): Promise> /** * sectorRemove removes the sector from storage. It doesn't terminate it on-chain, which can * be done with SectorTerminate. Removing and not terminating live sectors will cause additional penalties. */ sectorRemove (sectorNumber: number): Promise /** * sectorSetExpectedSealDuration sets the expected time for a sector to seal */ sectorSetExpectedSealDuration (duration: number): Promise /** * sectorSetSealDelay sets the time that a newly-created sector * waits for more deals before it starts sealing */ sectorSetSealDelay (duration: number): Promise /** * sectorStartSealing can be called on sectors in Empty or WaitDeals states * to trigger sealing early */ sectorStartSealing (sectorNumber: number): Promise /** * sectorTerminate terminates the sector on-chain (adding it to a termination batch first), then * automatically removes it from storage */ sectorTerminate (sectorNumber: number): Promise /** * sectorTerminateFlush immediately sends a terminate message with sectors batched for termination. * Returns null if message wasn't sent */ sectorTerminateFlush (): Promise /** * sectorTerminatePending returns a list of pending sector terminations to be sent in the next batch message */ sectorTerminatePending (): Promise> /** * list all staged sectors */ sectorsList (): Promise> /** * list sectors in particular states */ sectorsListInStates (sectorState: Array): Promise> sectorsRefs (): Promise<{ [k: string]: Array }> /** * get the status of a given sector by ID */ sectorsStatus (sectorNumber: number, bool: boolean): Promise /** * get summary info of sectors */ sectorsSummary (): Promise<{ [k: string]: number }> sectorsUnsealPiece (sectorRef: SectorRef, unpaddedByteIndex: number, unpaddedPieceSize: number, uint: Array, cid: Cid): Promise sectorsUpdate (sectorNumber: number, sectorState: string): Promise storageAddLocal (str: string): Promise /** * stores.SectorIndex */ storageAttach (storageInfo: StorageInfo, fsStat: FsStat): Promise storageBestAlloc (sectorFileType: number, sectorSize: number, pathType: string): Promise> storageDeclareSector (id: string, sectorID: SectorID, sectorFileType: number, bool: boolean): Promise storageDropSector (id: string, sectorID: SectorID, sectorFileType: number): Promise storageFindSector (sectorID: SectorID, sectorFileType: number, sectorSize: number, bool: boolean): Promise> storageGetLocks (): Promise storageInfo (id: string): Promise storageList (): Promise<{ [k: string]: Array }> storageLocal (): Promise<{ [k: string]: string }> storageLock (sectorID: SectorID, sectorFileType: number, sectorFileType1: number): Promise storageReportHealth (id: string, healthReport: HealthReport): Promise storageStat (id: string): Promise storageTryLock (sectorID: SectorID, sectorFileType: number, sectorFileType1: number): Promise /** * workerConnect tells the node to connect to workers RPC */ workerConnect (str: string): Promise workerJobs (): Promise<{ [k: string]: Array }> workerStats (): Promise<{ [k: string]: WorkerStats }> /** * storiface.WorkerCalls */ addPiece (sectorRef: SectorRef, unpaddedPieceSize: Array, unpaddedPieceSize1: number, reader: any): Promise enabled (): Promise fetch (sectorRef: SectorRef, sectorFileType: number, pathType: string, acquireMode: string): Promise finalizeReplicaUpdate (sectorRef: SectorRef, range: Array): Promise finalizeSector (sectorRef: SectorRef, range: Array): Promise generateSectorKeyFromData (sectorRef: SectorRef, cid: Cid): Promise info (): Promise moveStorage (sectorRef: SectorRef, sectorFileType: number): Promise paths (): Promise> /** * returns a random UUID of worker session, generated randomly when worker * process starts */ processSession (): Promise> proveReplicaUpdate1 (sectorRef: SectorRef, cid: Cid, cid1: Cid, cid2: Cid): Promise proveReplicaUpdate2 (sectorRef: SectorRef, cid: Cid, cid1: Cid, cid2: Cid, bytes: Array): Promise releaseUnsealed (sectorRef: SectorRef, range: Array): Promise /** * storage / Other */ remove (sectorID: SectorID): Promise replicaUpdate (sectorRef: SectorRef, pieceInfo: Array): Promise sealCommit1 (sectorRef: SectorRef, uint: Array, uint1: Array, pieceInfo: Array, sectorCids: SectorCids): Promise sealCommit2 (sectorRef: SectorRef, uint: Array): Promise sealPreCommit1 (sectorRef: SectorRef, uint: Array, pieceInfo: Array): Promise sealPreCommit2 (sectorRef: SectorRef, uint: Array): Promise /** * setEnabled marks the worker as enabled/disabled. Not that this setting * may take a few seconds to propagate to task scheduler */ setEnabled (bool: boolean): Promise taskDisable (taskType: string): Promise taskEnable (taskType: string): Promise /** * taskType -> Weight */ taskTypes (): Promise<{ [k: string]: {} }> unsealPiece (sectorRef: SectorRef, unpaddedByteIndex: number, unpaddedPieceSize: number, uint: Array, cid: Cid): Promise /** * waitQuiet blocks until there are no tasks running */ waitQuiet (): Promise importFile (body: Blob | BufferSource | FormData | URLSearchParams | string | ReadableStream): string destroy (code?: number): void } export { LotusRPC, Cid, AlertType, Time, AlertEvent, Alert, APIVersion, BeaconEntry, Ticket, ElectionProof, PoStProof, Signature, BlockHeader, Message, SignedMessage, BlockMessages, ExpTipSet, TipSet, Message1, IpldObject, MessageReceipt, HeadChange, ObjStat, CommPRet, CborTime, Log, ChannelStage, ChannelStages, DataTransferChannel, DataCIDSize, DataSize, DagSpec, ExportRef, FileRef, RetrievalPeer, QueryOffer, Log1, DealStage, DealStages, DataRef, ChannelID, DealInfo, RetrievalInfo, ImportRes, Import, StorageAsk, RestrievalRes, RetrievalOrder, StartDealParams, MessageSendSpec, BlockMsg, BlockTemplate, ExtendedSectorInfo, MiningBaseInfo, CheckStatus, MessageCheckStatus, MessagePrototype, MpoolConfig, MpoolUpdate, MsigTransaction, MsigVesting, AddrInfo, NatInfo, Stats, NetBlockList, ConnMgrInfo, ExtendedPeerInfo, TopicScoreSnapshot, PeerScoreSnapshot, PubsubScore, NodeSyncStatus, NodePeerStatus, NodeChainStatus, NodeStatus, ChannelAvailableFunds, ChannelInfo, ModVerifyParams, Merge, SignedVoucher, PaymentInfo, VoucherSpec, PaychStatus, VoucherCreateResult, Fault, MsgGasCost, Loc, GasTrace, ExecutionTrace, InvocResult, Actor, ComputeStateOutput, DealCollateralBounds, MessageMatch, MarketBalance, DealProposal, DealState, MarketDeal, SectorOnChainInfo, BitField, Deadline, MinerInfo, SectorPreCommitInfo, Partition, Claim, MinerPower, Info, MinerSectors, ActorState, MsgLookup, SectorExpiration, SectorLocation, SectorPreCommitOnChainInfo, CirculatingSupply, ActiveSync, SyncState, KeyInfo, AddressConfig, SectorID, SectorRef, DagstoreShardResult, DagstoreInitializeAllEvent, DagstoreInitializeAllParams, DagstoreShardInfo, GraphSyncDataTransfer, TransferDiagnostics, SignedStorageAsk, DealProposal1, ClientDealProposal, MinerDeal, Ask, Deferred, Params, DealProposal2, DealInfo1, PieceInfo, ProviderDealState, PendingDealInfo, BlockLocation, PieceBlockLocation, CIDInfo, CallID, PieceInfo1, CallError, ReplicaUpdateOut, SectorCids, SectorOffset, DealSchedule, PieceDealInfo, CommitBatchRes, PreCommitBatchRes, SealedRef, SectorPiece, SealTicket, SealSeed, SectorLog, SectorInfo, StorageInfo, FsStat, SectorStorageInfo, SectorLock, SectorLocks, Decl, HealthReport, WorkerJob, Resources, WorkerResources, WorkerInfo, WorkerStats, Range, StoragePath }