forked from filecoin-shipyard/js-lotus-client-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
1694 lines (1694 loc) · 96.8 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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<number>, Time: Time }
declare type Alert = { Type: AlertType, Active: boolean, LastActive: AlertEvent, LastResolved: AlertEvent }
declare type APIVersion = { Version: string, APIVersion: number, BlockDelay: number }
declare type ChainExportConfig = { WriteBufferSize: number, NumWorkers: number, IncludeMessages: boolean, IncludeReceipts: boolean, IncludeStateRoots: boolean }
declare type Ticket = { VRFProof: string }
declare type ElectionProof = { WinCount: number, VRFProof: string }
declare type BeaconEntry = { Round: number, Data: 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<BeaconEntry>, WinPoStProof: Array<PoStProof>, Parents: Array<Cid>, 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<Message>, SecpkMessages: Array<SignedMessage>, Cids: Array<Cid> }
declare type EventEntry = { Flags: number, Key: string, Codec: number, Value: string }
declare type Event = { Emitter: number, Entries: Array<EventEntry> }
declare type ExpTipSet = { Cids: Array<Cid>, Blocks: Array<BlockHeader>, Height: number }
declare type TipSet = { Cids: Array<Cid>, Blocks: Array<BlockHeader>, 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, EventsRoot: Cid }
declare type HeadChange = { Type: string, Val: TipSet }
declare type HotGCOpts = { Threshold: number, Periodic: boolean, Moving: boolean }
declare type PruneOpts = { MovingGC: boolean, RetainState: number }
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<Log> }
declare type ChannelStages = { Stages: Array<ChannelStage> }
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<DagSpec>, 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<Log1> }
declare type DealStages = { Stages: Array<DealStage> }
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 StorageAsk1 = { Response: StorageAsk, DealProtocols: Array<string> }
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, RemoteStore: Array<number> }
declare type StartDealParams = { Data: DataRef, Wallet: string, Miner: string, EpochPrice: string, MinBlocksDuration: number, ProviderCollateral: string, DealStartEpoch: number, FastRetrieval: boolean, VerifiedDeal: boolean }
declare type Int = {}
declare type EthBigInt = { Int: Int }
declare type EthCall = { From: Array<number>, To: Array<number>, Gas: number, GasPrice: EthBigInt, Value: EthBigInt, Data: Array<number> }
declare type EthFeeHistory = { OldestBlock: number, BaseFeePerGas: Array<EthBigInt>, GasUsedRatio: Array<number>, Reward: Array<Array<EthBigInt>> }
declare type EthBlock = { Hash: Array<number>, ParentHash: Array<number>, Sha3Uncles: Array<number>, Miner: Array<number>, StateRoot: Array<number>, TransactionsRoot: Array<number>, ReceiptsRoot: Array<number>, LogsBloom: Array<number>, Difficulty: number, TotalDifficulty: number, Number: number, GasLimit: number, GasUsed: number, Timestamp: number, Extradata: Array<number>, MixHash: Array<number>, Nonce: Array<number>, BaseFeePerGas: EthBigInt, Size: number, Transactions: Array<any>, Uncles: Array<Array<number>> }
declare type EthFilterResult = { Results: Array<any> }
declare type EthFilterSpec = { FromBlock: string, ToBlock: string, Address: Array<Array<number>>, Topics: Array<Array<Array<number>>>, BlockHash: Array<number> }
declare type EthTx = { ChainID: number, Nonce: number, Hash: Array<number>, BlockHash: Array<number>, BlockNumber: number, TransactionIndex: number, From: Array<number>, To: Array<number>, Value: EthBigInt, Type: number, Input: Array<number>, Gas: number, MaxFeePerGas: EthBigInt, MaxPriorityFeePerGas: EthBigInt, AccessList: Array<Array<number>>, V: EthBigInt, R: EthBigInt, S: EthBigInt }
declare type EthLog = { Address: Array<number>, Data: Array<number>, Topics: Array<Array<number>>, Removed: boolean, LogIndex: number, TransactionIndex: number, TransactionHash: Array<number>, BlockHash: Array<number>, BlockNumber: number }
declare type EthTxReceipt = { TransactionHash: Array<number>, TransactionIndex: number, BlockHash: Array<number>, BlockNumber: number, From: Array<number>, To: Array<number>, StateRoot: Array<number>, Status: number, ContractAddress: Array<number>, CumulativeGasUsed: number, GasUsed: number, EffectiveGasPrice: EthBigInt, LogsBloom: Array<number>, Logs: Array<EthLog>, Type: number }
declare type MessageSendSpec = { MaxFee: string, MsgUuid: Array<number> }
declare type BlockMsg = { Header: BlockHeader, BlsMessages: Array<Cid>, SecpkMessages: Array<Cid> }
declare type BlockTemplate = { Miner: string, Parents: Cid[], Ticket: Ticket, Eproof: ElectionProof, BeaconValues: Array<BeaconEntry>, Messages: Array<SignedMessage>, Epoch: number, Timestamp: number, WinningPoStProof: Array<PoStProof> }
declare type ExtendedSectorInfo = { SealProof: number, SectorNumber: number, SectorKey: Cid, SealedCID: Cid }
declare type MiningBaseInfo = { MinerPower: string, NetworkPower: string, Sectors: Array<ExtendedSectorInfo>, WorkerKey: string, SectorSize: number, PrevBeaconEntry: BeaconEntry, BeaconEntries: Array<BeaconEntry>, 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<string>, 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<string> }
declare type MsigVesting = { InitialBalance: string, StartEpoch: number, UnlockDuration: number }
declare type AddrInfo = { ID: string, Addrs: Array<any> }
declare type NatInfo = { Reachability: number, PublicAddr: string }
declare type Stats = { TotalIn: number, TotalOut: number, RateIn: number, RateOut: number }
declare type NetBlockList = { Peers: Array<string>, IPAddrs: Array<string>, IPSubnets: Array<string> }
declare type NetLimit = { Memory: number, Streams: number, StreamsInbound: number, StreamsOutbound: number, Conns: number, ConnsInbound: number, ConnsOutbound: number, FD: number }
declare type ConnMgrInfo = { FirstSeen: Time, Value: number, Tags: { [k: string]: number }, Conns: { [k: string]: Time } }
declare type ExtendedPeerInfo = { ID: string, Agent: string, Addrs: Array<string>, Protocols: Array<string>, 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 ScopeStat = { NumStreamsInbound: number, NumStreamsOutbound: number, NumConnsInbound: number, NumConnsOutbound: number, NumFD: number, Memory: number }
declare type NetStat = { System: ScopeStat, Transient: ScopeStat, Services: { [k: string]: ScopeStat }, Protocols: { [k: string]: ScopeStat }, Peers: { [k: string]: ScopeStat } }
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, NonReservedAmt: string, PendingAvailableAmt: string, PendingWaitSentinel: Cid, QueuedAmt: string, VoucherReedeemedAmt: string }
declare type ChannelInfo = { Channel: string, WaitSentinel: Cid }
declare type PaychGetOpts = { OffChain: boolean }
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, SecretHash: string, Extra: ModVerifyParams, Lane: number, Nonce: number, Amount: string, MinSettleHeight: number, Merges: Array<Merge>, Signature: Signature }
declare type PaymentInfo = { Channel: string, WaitSentinel: Cid, Vouchers: Array<SignedVoucher> }
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 RaftStateData = { NonceMap: { [k: string]: number }, MsgUuids: { [k: string]: SignedMessage } }
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 MessageTrace = { From: string, To: string, Value: string, Method: number, Params: string, ParamsCodec: number }
declare type ReturnTrace = { ExitCode: number, Return: string, ReturnCodec: number }
declare type GasTrace = { Name: string, TotalGas: number, ComputeGas: number, StorageGas: number, TimeTaken: number }
declare type ExecutionTrace = { Msg: MessageTrace, MsgRct: ReturnTrace, GasCharges: Array<GasTrace>, Subcalls: ExecutionTrace[] }
declare type InvocResult = { MsgCid: Cid, Msg: Message, MsgRct: MessageReceipt, GasCost: MsgGasCost, ExecutionTrace: ExecutionTrace, Error: string, Duration: number }
declare type ActorV5 = { Code: Cid, Head: Cid, Nonce: number, Balance: string, Address: string }
declare type ComputeStateOutput = { Root: Cid, Trace: Array<InvocResult> }
declare type DealCollateralBounds = { Min: string, Max: string }
declare type Allocation = { Client: number, Provider: number, Data: Cid, Size: number, TermMin: number, TermMax: number, Expiration: number }
declare type Claim = { Provider: number, Client: number, Data: Cid, Size: number, TermMin: number, TermMax: number, TermStart: number, Sector: number }
declare type ForkUpgradeParams = { UpgradeSmokeHeight: number, UpgradeBreezeHeight: number, UpgradeIgnitionHeight: number, UpgradeLiftoffHeight: number, UpgradeAssemblyHeight: number, UpgradeRefuelHeight: number, UpgradeTapeHeight: number, UpgradeKumquatHeight: number, UpgradePriceListOopsHeight: number, BreezeGasTampingDuration: number, UpgradeCalicoHeight: number, UpgradePersianHeight: number, UpgradeOrangeHeight: number, UpgradeClausHeight: number, UpgradeTrustHeight: number, UpgradeNorwegianHeight: number, UpgradeTurboHeight: number, UpgradeHyperdriveHeight: number, UpgradeChocolateHeight: number, UpgradeOhSnapHeight: number, UpgradeSkyrHeight: number, UpgradeSharkHeight: number, UpgradeHyggeHeight: number, UpgradeLightningHeight: number, UpgradeThunderHeight: number }
declare type NetworkParams = { NetworkName: string, BlockDelaySecs: number, ConsensusMinerMinPower: string, SupportedProofTypes: Array<number>, PreCommitChallengeDelay: number, ForkUpgradeParams: ForkUpgradeParams }
declare type MessageMatch = { To: string, From: string }
declare type MarketBalance = { Escrow: string, Locked: string }
declare type DealLabel = {}
declare type DealProposal = { PieceCID: Cid, PieceSize: number, VerifiedDeal: boolean, Client: string, Provider: string, Label: DealLabel, StartEpoch: number, EndEpoch: number, StoragePricePerEpoch: string, ProviderCollateral: string, ClientCollateral: string }
declare type DealState = { SectorStartEpoch: number, LastUpdatedEpoch: number, SlashEpoch: number, VerifiedClaim: number }
declare type MarketDeal = { Proposal: DealProposal, State: DealState }
declare type SectorOnChainInfo = { SectorNumber: number, SealProof: number, SealedCID: Cid, DealIDs: Array<number>, Activation: number, Expiration: number, DealWeight: string, VerifiedDealWeight: string, InitialPledge: string, ExpectedDayReward: string, ExpectedStoragePledge: string, ReplacedSectorAge: number, ReplacedDayReward: string, SectorKeyCID: Cid, SimpleQAPower: boolean }
declare type BitField = {}
declare type Deadline = { PostSubmissions: BitField, DisputableProofCount: number }
declare type BeneficiaryTerm = { Quota: string, UsedQuota: string, Expiration: number }
declare type PendingBeneficiaryChange = { NewBeneficiary: string, NewQuota: string, NewExpiration: number, ApprovedByBeneficiary: boolean, ApprovedByNominee: boolean }
declare type MinerInfo = { Owner: string, Worker: string, NewWorker: string, ControlAddresses: Array<string>, WorkerChangeEpoch: number, PeerId: string, Multiaddrs: Array<string>, WindowPoStProofType: number, SectorSize: number, WindowPoStPartitionSectors: number, ConsensusFaultElapsed: number, Beneficiary: string, BeneficiaryTerm: BeneficiaryTerm, PendingBeneficiaryTerm: PendingBeneficiaryChange }
declare type SectorPreCommitInfo = { SealProof: number, SectorNumber: number, SealedCID: Cid, SealRandEpoch: number, DealIDs: Array<number>, Expiration: number, UnsealedCid: Cid }
declare type Partition = { AllSectors: BitField, FaultySectors: BitField, RecoveringSectors: BitField, LiveSectors: BitField, ActiveSectors: BitField }
declare type Claim1 = { RawBytePower: string, QualityAdjPower: string }
declare type MinerPower = { MinerPower: Claim1, TotalPower: Claim1, 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 }
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<ActiveSync>, VMApplied: number }
declare type KeyInfo = { Type: string, PrivateKey: string }
declare type AddressConfig = { PreCommitControl: Array<string>, CommitControl: Array<string>, TerminateControl: Array<string>, DealPublishControl: Array<string>, DisableOwnerFallback: boolean, DisableWorkerFallback: boolean }
declare type SectorID = { Miner: number, Number: number }
declare type SectorRef = { ID: SectorID, ProofType: number }
declare type PieceInfo = { Size: number, PieceCID: Cid }
declare type PoStPartition = { Index: number, Skipped: BitField }
declare type SubmitWindowedPoStParams = { Deadline: number, Partitions: Array<PoStPartition>, Proofs: Array<PoStProof>, ChainCommitEpoch: number, ChainCommitRand: string }
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 RequestID = {}
declare type GraphSyncDataTransfer = { RequestID: RequestID, RequestState: string, IsCurrentChannelRequest: boolean, ChannelID: ChannelID, ChannelState: DataTransferChannel, Diagnostics: Array<string> }
declare type TransferDiagnostics = { ReceivingTransfers: Array<GraphSyncDataTransfer>, SendingTransfers: Array<GraphSyncDataTransfer> }
declare type SignedStorageAsk = { Ask: StorageAsk, Signature: Signature }
declare type ClientDealProposal = { Proposal: DealProposal, 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 PendingDealInfo = { Deals: Array<ClientDealProposal>, 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<PieceBlockLocation> }
declare type DealInfo1 = { DealID: number, SectorID: number, Offset: number, Length: number }
declare type PieceInfo1 = { PieceCID: Cid, Deals: Array<DealInfo1> }
declare type CallID = { Sector: SectorID, ID: Array<number> }
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: DealProposal, DealSchedule: DealSchedule, KeepUnsealed: boolean }
declare type CommitBatchRes = { Sectors: Array<number>, FailedSectors: { [k: string]: string }, Msg: Cid, Error: string }
declare type NumAssignerMeta = { Reserved: BitField, Allocated: BitField, InUse: BitField, Next: number }
declare type PreCommitBatchRes = { Sectors: Array<number>, Msg: Cid, Error: string }
declare type SectorPiece = { Piece: PieceInfo, DealInfo: PieceDealInfo }
declare type SectorLog = { Kind: string, Timestamp: number, Trace: string, Message: string }
declare type SecDataHttpHeader = { Key: string, Value: string }
declare type SectorLocation1 = { Local: boolean, URL: string, Headers: Array<SecDataHttpHeader> }
declare type RemoteSectorMeta = { State: string, Sector: SectorID, Type: number, Pieces: Array<SectorPiece>, TicketValue: Array<number>, TicketEpoch: number, PreCommit1Out: Array<number>, CommD: Cid, CommR: Cid, PreCommitInfo: SectorPreCommitInfo, PreCommitDeposit: string, PreCommitMessage: Cid, PreCommitTipSet: Cid[], SeedValue: Array<number>, SeedEpoch: number, CommitProof: string, CommitMessage: Cid, Log: Array<SectorLog>, DataUnsealed: SectorLocation1, DataSealed: SectorLocation1, DataCache: SectorLocation1, RemoteCommit1Endpoint: string, RemoteCommit2Endpoint: string, RemoteSealingDoneEndpoint: string }
declare type SealedRef = { SectorID: number, Offset: number, Size: number }
declare type SealTicket = { Value: Array<number>, Epoch: number }
declare type SealSeed = { Value: Array<number>, Epoch: number }
declare type SectorInfo = { SectorID: number, State: string, CommD: Cid, CommR: Cid, Proof: string, Deals: Array<number>, Pieces: Array<SectorPiece>, Ticket: SealTicket, Seed: SealSeed, PreCommitMsg: Cid, CommitMsg: Cid, Retries: number, ToUpgrade: boolean, ReplicaUpdateMessage: Cid, LastErr: string, Log: Array<SectorLog>, SealProof: number, Activation: number, Expiration: number, DealWeight: string, VerifiedDealWeight: string, InitialPledge: string, OnTime: number, Early: number }
declare type StorageInfo = { ID: string, URLs: Array<string>, Weight: number, MaxStorage: number, CanSeal: boolean, CanStore: boolean, Groups: Array<string>, AllowTo: Array<string>, AllowTypes: Array<string>, DenyTypes: Array<string> }
declare type FsStat = { Capacity: number, Available: number, FSAvailable: number, Reserved: number, Max: number, Used: number }
declare type SectorStorageInfo = { ID: string, URLs: Array<string>, BaseURLs: Array<string>, Weight: number, CanSeal: boolean, CanStore: boolean, Primary: boolean, AllowTypes: Array<string>, DenyTypes: Array<string> }
declare type SectorLock = { Sector: SectorID, Write: Array<number>, Read: Array<number> }
declare type SectorLocks = { Locks: Array<SectorLock> }
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, MaxConcurrent: number }
declare type WorkerResources = { MemPhysical: number, MemUsed: number, MemSwap: number, MemSwapUsed: number, CPUs: number, GPUs: Array<string>, Resources: { [k: string]: { [k: string]: Resources } } }
declare type WorkerInfo = { Hostname: string, IgnoreResources: boolean, Resources: WorkerResources }
declare type WorkerStats = { Info: WorkerInfo, Tasks: Array<string>, Enabled: boolean, MemUsedMin: number, MemUsedMax: number, GpuUsed: number, CpuUse: number, TaskCounts: { [k: string]: number } }
declare type WindowPoStResult = { PoStProofs: PoStProof, Skipped: Array<SectorID> }
declare type PostSectorChallenge = { SealProof: number, SectorNumber: number, SealedCID: Cid, Challenge: Array<number>, Update: boolean }
declare type StoragePath = { ID: string, Weight: number, LocalPath: string, CanSeal: boolean, CanStore: boolean }
declare type Range = { Offset: number, Size: number }
declare class LotusRPC {
constructor (provider: any, options: { schema: any })
authNew (permission: Array<string>): Promise<string>
authVerify (str: string): Promise<Array<string>>
closing (handler: (data: {}) => void): [() => void, Promise<void>]
/**
* 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<Array<Alert>>
logList (): Promise<Array<string>>
logSetLevel (str: string, str1: string): Promise<void>
/**
* session returns a random UUID of api provider session
*/
session (): Promise<Array<number>>
/**
* trigger graceful shutdown
*/
shutdown (): Promise<void>
/**
* startTime returns node start time
*/
startTime (): Promise<Time>
/**
* version provides information about API provider
*/
version (): Promise<APIVersion>
/**
* 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<void>
/**
* chainDeleteObj deletes node referenced by the given CID
*/
chainDeleteObj (cid: Cid): Promise<void>
/**
* 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<void>]
/**
* chainExportRangeInternal triggers the export of a chain
* CAR-snapshot directly to disk. It is similar to ChainExport,
* except, depending on options, the snapshot can include receipts,
* messages and stateroots for the length between the specified head
* and tail, thus producing "archival-grade" snapshots that include
* all the on-chain data. The header chain is included back to
* genesis and these snapshots can be used to initialize Filecoin
* nodes.
*/
chainExportRangeInternal (tipSetKey: Cid[], tipSetKey1: Cid[], chainExportConfig: ChainExportConfig): Promise<void>
/**
* chainGetBlock returns the block specified by the given CID.
*/
chainGetBlock (cid: Cid): Promise<BlockHeader>
/**
* 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<BlockMessages>
/**
* chainGetEvents returns the events under an event AMT root CID.
*/
chainGetEvents (cid: Cid): Promise<Array<Event>>
/**
* chainGetGenesis returns the genesis tipset.
*/
chainGetGenesis (): Promise<TipSet>
/**
* chainGetMessage reads a message referenced by the specified CID from the
* chain blockstore.
*/
chainGetMessage (cid: Cid): Promise<Message>
/**
* chainGetMessagesInTipset returns message stores in current tipset
*/
chainGetMessagesInTipset (tipSetKey: Cid[]): Promise<Array<Message1>>
chainGetNode (str: string): Promise<IpldObject>
/**
* chainGetParentMessages returns messages stored in parent tipset of the
* specified block.
*/
chainGetParentMessages (cid: Cid): Promise<Array<Message1>>
/**
* 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<Array<MessageReceipt>>
/**
* 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<Array<HeadChange>>
/**
* chainGetTipSet returns the tipset specified by the given TipSetKey.
*/
chainGetTipSet (tipSetKey: Cid[]): Promise<TipSet>
/**
* 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<TipSet>
/**
* 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<TipSet>
/**
* chainHasObj checks if a given CID exists in the chain blockstore.
*/
chainHasObj (cid: Cid): Promise<boolean>
/**
* chainHead returns the current head of the chain.
*/
chainHead (): Promise<TipSet>
/**
* chainHotGC does online (badger) GC on the hot store; only supported if you are using
* the splitstore
*/
chainHotGC (hotGCOpts: HotGCOpts): Promise<void>
/**
* chainNotify returns channel with chain head updates.
* First message is guaranteed to be of len == 1, and type == 'current'.
*/
chainNotify (handler: (data: Array<HeadChange>) => void): [() => void, Promise<void>]
/**
* chainPrune forces compaction on cold store and garbage collects; only supported if you
* are using the splitstore
*/
chainPrune (pruneOpts: PruneOpts): Promise<void>
/**
* chainPutObj puts a given object into the block store
*/
chainPutObj (block: any): Promise<void>
/**
* chainReadObj reads ipld nodes referenced by the specified CID from chain
* blockstore and returns raw bytes.
*/
chainReadObj (cid: Cid): Promise<string>
/**
* chainSetHead forcefully sets current chain head. Use with caution.
*/
chainSetHead (tipSetKey: Cid[]): Promise<void>
/**
* 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<ObjStat>
/**
* chainTipSetWeight computes weight for the specified tipset.
*/
chainTipSetWeight (tipSetKey: Cid[]): Promise<string>
/**
* clientCalcCommP calculates the CommP for a specified file
*/
clientCalcCommP (str: string): Promise<CommPRet>
/**
* clientCancelDataTransfer cancels a data transfer with the given transfer ID and other peer
*/
clientCancelDataTransfer (transferID: number, id: string, bool: boolean): Promise<void>
/**
* clientCancelRetrievalDeal cancels an ongoing retrieval deal based on DealID
*/
clientCancelRetrievalDeal (dealID: number): Promise<void>
clientDataTransferUpdates (handler: (data: DataTransferChannel) => void): [() => void, Promise<void>]
/**
* clientCalcCommP calculates the CommP and data size of the specified CID
*/
clientDealPieceCID (cid: Cid): Promise<DataCIDSize>
/**
* clientDealSize calculates real deal data size
*/
clientDealSize (cid: Cid): Promise<DataSize>
/**
* clientExport exports a file stored in the local filestore to a system file
*/
clientExport (exportRef: ExportRef, fileRef: FileRef): Promise<void>
/**
* clientFindData identifies peers that have a certain file, and returns QueryOffers (one per peer).
*/
clientFindData (cid: Cid, cid1: Cid): Promise<Array<QueryOffer>>
/**
* clientGenCar generates a CAR file for the specified file.
*/
clientGenCar (fileRef: FileRef, str: string): Promise<void>
/**
* clientGetDealInfo returns the latest information about a given deal.
*/
clientGetDealInfo (cid: Cid): Promise<DealInfo>
/**
* clientGetDealStatus returns status given a code
*/
clientGetDealStatus (uint: number): Promise<string>
/**
* clientGetDealUpdates returns the status of updated deals
*/
clientGetDealUpdates (handler: (data: DealInfo) => void): [() => void, Promise<void>]
/**
* clientGetRetrievalUpdates returns status of updated retrieval deals
*/
clientGetRetrievalUpdates (handler: (data: RetrievalInfo) => void): [() => void, Promise<void>]
/**
* clientHasLocal indicates whether a certain CID is locally stored.
*/
clientHasLocal (cid: Cid): Promise<boolean>
/**
* clientImport imports file under the specified path into filestore.
*/
clientImport (fileRef: FileRef): Promise<ImportRes>
/**
* clientListTransfers returns the status of all ongoing transfers of data
*/
clientListDataTransfers (): Promise<Array<DataTransferChannel>>
/**
* clientListDeals returns information about the deals made by the local client.
*/
clientListDeals (): Promise<Array<DealInfo>>
/**
* clientListImports lists imported files and their root CIDs
*/
clientListImports (): Promise<Array<Import>>
/**
* clientListRetrievals returns information about retrievals made by the local client
*/
clientListRetrievals (): Promise<Array<RetrievalInfo>>
/**
* clientMinerQueryOffer returns a QueryOffer for the specific miner and file.
*/
clientMinerQueryOffer (address: string, cid: Cid, cid1: Cid): Promise<QueryOffer>
/**
* clientQueryAsk returns a signed StorageAsk from the specified miner.
*/
clientQueryAsk (id: string, address: string): Promise<StorageAsk1>
/**
* clientRemoveImport removes file import
*/
clientRemoveImport (id: number): Promise<void>
/**
* clientRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer
*/
clientRestartDataTransfer (transferID: number, id: string, bool: boolean): Promise<void>
/**
* clientRetrieve initiates the retrieval of a file, as specified in the order.
*/
clientRetrieve (retrievalOrder: RetrievalOrder): Promise<RestrievalRes>
/**
* clientRetrieveTryRestartInsufficientFunds attempts to restart stalled retrievals on a given payment channel
* which are stuck due to insufficient funds
*/
clientRetrieveTryRestartInsufficientFunds (address: string): Promise<void>
/**
* clientRetrieveWait waits for retrieval to be complete
*/
clientRetrieveWait (dealID: number): Promise<void>
/**
* clientStartDeal proposes a deal with a miner.
*/
clientStartDeal (startDealParams: StartDealParams): Promise<Cid>
/**
* clientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
*/
clientStatelessDeal (startDealParams: StartDealParams): Promise<Cid>
/**
* createBackup creates node backup onder the specified file name. The
* method requires that the lotus-miner 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<void>
ethAccounts (): Promise<Array<Array<number>>>
/**
* ethAddressToFilecoinAddress converts an EthAddress into an f410 Filecoin Address
*/
ethAddressToFilecoinAddress (ethAddress: Array<number>): Promise<string>
/**
* ethBlockNumber returns the height of the latest (heaviest) TipSet
*/
ethBlockNumber (): Promise<number>
ethCall (ethCall: EthCall, str: string): Promise<Array<number>>
ethChainId (): Promise<number>
ethEstimateGas (ethCall: EthCall): Promise<number>
ethFeeHistory (uint: Array<number>): Promise<EthFeeHistory>
ethGasPrice (): Promise<EthBigInt>
ethGetBalance (ethAddress: Array<number>, str: string): Promise<EthBigInt>
ethGetBlockByHash (ethHash: Array<number>, bool: boolean): Promise<EthBlock>
ethGetBlockByNumber (str: string, bool: boolean): Promise<EthBlock>
/**
* ethGetBlockTransactionCountByHash returns the number of messages in the TipSet
*/
ethGetBlockTransactionCountByHash (ethHash: Array<number>): Promise<number>
/**
* ethGetBlockTransactionCountByNumber returns the number of messages in the TipSet
*/
ethGetBlockTransactionCountByNumber (ethUint64: number): Promise<number>
ethGetCode (ethAddress: Array<number>, str: string): Promise<Array<number>>
/**
* polling method for a filter, returns event logs which occurred since last poll.
* (requires write perm since timestamp of last filter execution will be written)
*/
ethGetFilterChanges (ethFilterID: Array<number>): Promise<EthFilterResult>
/**
* returns event logs matching filter with given id.
* (requires write perm since timestamp of last filter execution will be written)
*/
ethGetFilterLogs (ethFilterID: Array<number>): Promise<EthFilterResult>
/**
* returns event logs matching given filter spec.
*/
ethGetLogs (ethFilterSpec: EthFilterSpec): Promise<EthFilterResult>
ethGetMessageCidByTransactionHash (ethHash: Array<number>): Promise<Cid>
ethGetStorageAt (ethAddress: Array<number>, uint: Array<number>, str: string): Promise<Array<number>>
ethGetTransactionByBlockHashAndIndex (ethHash: Array<number>, ethUint64: number): Promise<EthTx>
ethGetTransactionByBlockNumberAndIndex (ethUint64: number, ethUint641: number): Promise<EthTx>
ethGetTransactionByHash (ethHash: Array<number>): Promise<EthTx>
ethGetTransactionByHashLimited (ethHash: Array<number>, chainEpoch: number): Promise<EthTx>
ethGetTransactionCount (ethAddress: Array<number>, str: string): Promise<number>
ethGetTransactionHashByCid (cid: Cid): Promise<Array<number>>
ethGetTransactionReceipt (ethHash: Array<number>): Promise<EthTxReceipt>
ethGetTransactionReceiptLimited (ethHash: Array<number>, chainEpoch: number): Promise<EthTxReceipt>
ethMaxPriorityFeePerGas (): Promise<EthBigInt>
/**
* installs a persistent filter to notify when a new block arrives.
*/
ethNewBlockFilter (): Promise<Array<number>>
/**
* installs a persistent filter based on given filter spec.
*/
ethNewFilter (ethFilterSpec: EthFilterSpec): Promise<Array<number>>
/**
* installs a persistent filter to notify when new messages arrive in the message pool.
*/
ethNewPendingTransactionFilter (): Promise<Array<number>>
ethProtocolVersion (): Promise<number>
ethSendRawTransaction (uint: Array<number>): Promise<Array<number>>
/**
* subscribe to different event types using websockets
* eventTypes is one or more of:
* - newHeads: notify when new blocks arrive.
* - pendingTransactions: notify when new messages arrive in the message pool.
* - logs: notify new event logs that match a criteria
* params contains additional parameters used with the log event type
* The client will receive a stream of EthSubscriptionResponse values until EthUnsubscribe is called.
*/
ethSubscribe (uint: Array<number>): Promise<Array<number>>
/**
* uninstalls a filter with given id.
*/
ethUninstallFilter (ethFilterID: Array<number>): Promise<boolean>
/**
* unsubscribe from a websocket subscription
*/
ethUnsubscribe (ethSubscriptionID: Array<number>): Promise<boolean>
/**
* filecoinAddressToEthAddress converts an f410 or f0 Filecoin Address to an EthAddress
*/
filecoinAddressToEthAddress (address: string): Promise<Array<number>>
/**
* gasEstimateFeeCap estimates gas fee cap
*/
gasEstimateFeeCap (message: Message, int: number, tipSetKey: Cid[]): Promise<string>
/**
* gasEstimateGasLimit estimates gas used by the message and returns it.
* It fails if message fails to execute.
*/
gasEstimateGasLimit (message: Message, tipSetKey: Cid[]): Promise<number>
/**
* 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<string>
/**
* gasEstimateMessageGas estimates gas values for unset message gas fields
*/
gasEstimateMessageGas (message: Message, messageSendSpec: MessageSendSpec, tipSetKey: Cid[]): Promise<Message>
id (): Promise<string>
/**
* marketAddBalance adds funds to the market actor
*/
marketAddBalance (address: string, address1: string, bigInt: string): Promise<Cid>
/**
* marketGetReserved gets the amount of funds that are currently reserved for the address
*/
marketGetReserved (address: string): Promise<string>
/**
* marketReleaseFunds releases funds reserved by MarketReserveFunds
*/
marketReleaseFunds (address: string, bigInt: string): Promise<void>
/**
* marketReserveFunds reserves funds for a deal
*/
marketReserveFunds (address: string, address1: string, bigInt: string): Promise<Cid>
/**
* marketWithdraw withdraws unlocked funds from the market actor
*/
marketWithdraw (address: string, address1: string, bigInt: string): Promise<Cid>
minerCreateBlock (blockTemplate: BlockTemplate): Promise<BlockMsg>
minerGetBaseInfo (address: string, chainEpoch: number, tipSetKey: Cid[]): Promise<MiningBaseInfo>
/**
* mpoolBatchPush batch pushes a signed message to mempool.
*/
mpoolBatchPush (signedMessage: Array<SignedMessage>): Promise<Array<Cid>>
/**
* mpoolBatchPushMessage batch pushes a unsigned message to mempool.
*/
mpoolBatchPushMessage (message: Array<Message>, messageSendSpec: MessageSendSpec): Promise<Array<SignedMessage>>
/**
* mpoolBatchPushUntrusted batch pushes a signed message to mempool from untrusted sources.
*/
mpoolBatchPushUntrusted (signedMessage: Array<SignedMessage>): Promise<Array<Cid>>
/**
* mpoolCheckMessages performs logical checks on a batch of messages
*/
mpoolCheckMessages (messagePrototype: Array<MessagePrototype>): Promise<Array<Array<MessageCheckStatus>>>
/**
* mpoolCheckPendingMessages performs logical checks for all pending messages from a given address
*/
mpoolCheckPendingMessages (address: string): Promise<Array<Array<MessageCheckStatus>>>
/**
* mpoolCheckReplaceMessages performs logical checks on pending messages with replacement
*/
mpoolCheckReplaceMessages (message: Array<Message>): Promise<Array<Array<MessageCheckStatus>>>
/**
* mpoolClear clears pending messages from the mpool
*/
mpoolClear (bool: boolean): Promise<void>
/**
* mpoolGetConfig returns (a copy of) the current mpool config
*/
mpoolGetConfig (): Promise<MpoolConfig>
/**
* mpoolGetNonce gets next nonce for the specified sender.
* Note that this method may not be atomic. Use MpoolPushMessage instead.
*/
mpoolGetNonce (address: string): Promise<number>
/**
* mpoolPending returns pending mempool messages.
*/
mpoolPending (tipSetKey: Cid[]): Promise<Array<SignedMessage>>
/**
* mpoolPush pushes a signed message to mempool.
*/
mpoolPush (signedMessage: SignedMessage): Promise<Cid>
/**
* 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<SignedMessage>
/**
* mpoolPushUntrusted pushes a signed message to mempool from untrusted sources.
*/
mpoolPushUntrusted (signedMessage: SignedMessage): Promise<Cid>
/**
* mpoolSelect returns a list of pending messages for inclusion in the next block
*/
mpoolSelect (tipSetKey: Cid[], num: number): Promise<Array<SignedMessage>>
/**
* mpoolSetConfig sets the mpool config to (a copy of) the supplied config
*/
mpoolSetConfig (mpoolConfig: MpoolConfig): Promise<void>
mpoolSub (handler: (data: MpoolUpdate) => void): [() => void, Promise<void>]
/**
* msigAddApprove approves a previously proposed AddSigner message
* It takes the following params: <multisig address>, <sender address of the approve msg>, <proposed message ID>,
* <proposer address>, <new signer>, <whether the number of required signers should be increased>
*/
msigAddApprove (address: string, address1: string, uint: number, address2: string, address3: string, bool: boolean): Promise<MessagePrototype>
/**
* msigAddCancel cancels a previously proposed AddSigner message
* It takes the following params: <multisig address>, <sender address of the cancel msg>, <proposed message ID>,
* <new signer>, <whether the number of required signers should be increased>
*/
msigAddCancel (address: string, address1: string, uint: number, address2: string, bool: boolean): Promise<MessagePrototype>
/**
* msigAddPropose proposes adding a signer in the multisig
* It takes the following params: <multisig address>, <sender address of the propose msg>,
* <new signer>, <whether the number of required signers should be increased>
*/
msigAddPropose (address: string, address1: string, address2: string, bool: boolean): Promise<MessagePrototype>
/**
* msigApprove approves a previously-proposed multisig message by transaction ID
* It takes the following params: <multisig address>, <proposed transaction ID> <signer address>
*/
msigApprove (address: string, uint: number, address1: string): Promise<MessagePrototype>
/**
* 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: <multisig address>, <proposed message ID>, <proposer address>, <recipient address>, <value to transfer>,
* <sender address of the approve msg>, <method to call in the proposed message>, <params to include in the proposed message>
*/
msigApproveTxnHash (address: string, uint: number, address1: string, address2: string, bigInt: string, address3: string, uint1: number, bytes: string): Promise<MessagePrototype>
/**
* msigCancel cancels a previously-proposed multisig message
* It takes the following params: <multisig address>, <proposed transaction ID> <signer address>
*/
msigCancel (address: string, uint: number, address1: string): Promise<MessagePrototype>
/**
* msigCancel cancels a previously-proposed multisig message
* It takes the following params: <multisig address>, <proposed transaction ID>, <recipient address>, <value to transfer>,
* <sender address of the cancel msg>, <method to call in the proposed message>, <params to include in the proposed message>
*/
msigCancelTxnHash (address: string, uint: number, address1: string, bigInt: string, address2: string, uint1: number, bytes: string): Promise<MessagePrototype>
/**
* msigCreate creates a multisig wallet
* It takes the following params: <required number of senders>, <approving addresses>, <unlock duration>
* <initial balance>, <sender address of the create msg>, <gas price>
*/
msigCreate (uint: number, address: Array<string>, chainEpoch: number, bigInt: string, address1: string, bigInt1: string): Promise<MessagePrototype>
/**
* msigGetAvailableBalance returns the portion of a multisig's balance that can be withdrawn or spent
*/
msigGetAvailableBalance (address: string, tipSetKey: Cid[]): Promise<string>
/**
* 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<Array<MsigTransaction>>
/**
* msigGetVested returns the amount of FIL that vested in a multisig in a certain period.
* It takes the following params: <multisig address>, <start epoch>, <end epoch>
*/
msigGetVested (address: string, tipSetKey: Cid[], tipSetKey1: Cid[]): Promise<string>
/**
* msigGetVestingSchedule returns the vesting details of a given multisig.
*/
msigGetVestingSchedule (address: string, tipSetKey: Cid[]): Promise<MsigVesting>
/**
* msigPropose proposes a multisig message
* It takes the following params: <multisig address>, <recipient address>, <value to transfer>,
* <sender address of the propose msg>, <method to call in the proposed message>, <params to include in the proposed message>
*/
msigPropose (address: string, address1: string, bigInt: string, address2: string, uint: number, bytes: string): Promise<MessagePrototype>
/**
* 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<MessagePrototype>
/**
* msigSwapApprove approves a previously proposed SwapSigner
* It takes the following params: <multisig address>, <sender address of the approve msg>, <proposed message ID>,
* <proposer address>, <old signer>, <new signer>
*/
msigSwapApprove (address: string, address1: string, uint: number, address2: string, address3: string, address4: string): Promise<MessagePrototype>
/**
* msigSwapCancel cancels a previously proposed SwapSigner message
* It takes the following params: <multisig address>, <sender address of the cancel msg>, <proposed message ID>,
* <old signer>, <new signer>
*/
msigSwapCancel (address: string, address1: string, uint: number, address2: string, address3: string): Promise<MessagePrototype>
/**
* msigSwapPropose proposes swapping 2 signers in the multisig
* It takes the following params: <multisig address>, <sender address of the propose msg>,
* <old signer>, <new signer>
*/
msigSwapPropose (address: string, address1: string, address2: string, address3: string): Promise<MessagePrototype>
netAddrsListen (): Promise<AddrInfo>
netAgentVersion (id: string): Promise<string>
netAutoNatStatus (): Promise<NatInfo>
netBandwidthStats (): Promise<Stats>
netBandwidthStatsByPeer (): Promise<{ [k: string]: Stats }>
netBandwidthStatsByProtocol (): Promise<{ [k: string]: Stats }>
netBlockAdd (netBlockList: NetBlockList): Promise<void>
netBlockList (): Promise<NetBlockList>
netBlockRemove (netBlockList: NetBlockList): Promise<void>
netConnect (addrInfo: AddrInfo): Promise<void>
netConnectedness (id: string): Promise<number>
netDisconnect (id: string): Promise<void>
netFindPeer (id: string): Promise<AddrInfo>
netLimit (str: string): Promise<NetLimit>
netListening (): Promise<boolean>
netPeerInfo (id: string): Promise<ExtendedPeerInfo>
netPeers (): Promise<Array<AddrInfo>>
netPing (id: string): Promise<number>
netProtectAdd (id: Array<string>): Promise<void>
netProtectList (): Promise<Array<string>>
netProtectRemove (id: Array<string>): Promise<void>
netPubsubScores (): Promise<Array<PubsubScore>>
netSetLimit (str: string, netLimit: NetLimit): Promise<void>
netStat (str: string): Promise<NetStat>
netVersion (): Promise<string>
nodeStatus (bool: boolean): Promise<NodeStatus>
paychAllocateLane (address: string): Promise<number>
paychAvailableFunds (address: string): Promise<ChannelAvailableFunds>
paychAvailableFundsByFromTo (address: string, address1: string): Promise<ChannelAvailableFunds>
paychCollect (address: string): Promise<Cid>
/**
* paychFund gets or creates a payment channel between address pair.
* The specified amount will be added to the channel through on-chain send for future use
*/
paychFund (address: string, address1: string, bigInt: string): Promise<ChannelInfo>
/**
* paychGet gets or creates a payment channel between address pair
* The specified amount will be reserved for use. If there aren't enough non-reserved funds
* available, funds will be added through an on-chain message.
* - When opts.OffChain is true, this call will not cause any messages to be sent to the chain (no automatic
* channel creation/funds adding). If the operation can't be performed without sending a message an error will be
* returned. Note that even when this option is specified, this call can be blocked by previous operations on the
* channel waiting for on-chain operations.
*/
paychGet (address: string, address1: string, bigInt: string, paychGetOpts: PaychGetOpts): Promise<ChannelInfo>
paychGetWaitReady (cid: Cid): Promise<string>
paychList (): Promise<Array<string>>
paychNewPayment (address: string, address1: string, voucherSpec: Array<VoucherSpec>): Promise<PaymentInfo>
paychSettle (address: string): Promise<Cid>
paychStatus (address: string): Promise<PaychStatus>
paychVoucherAdd (address: string, signedVoucher: SignedVoucher, bytes: string, bigInt: string): Promise<string>
paychVoucherCheckSpendable (address: string, signedVoucher: SignedVoucher, bytes: string, bytes1: string): Promise<boolean>
paychVoucherCheckValid (address: string, signedVoucher: SignedVoucher): Promise<void>
paychVoucherCreate (address: string, bigInt: string, uint: number): Promise<VoucherCreateResult>
paychVoucherList (address: string): Promise<Array<SignedVoucher>>
paychVoucherSubmit (address: string, signedVoucher: SignedVoucher, bytes: string, bytes1: string): Promise<Cid>
raftLeader (): Promise<string>
raftState (): Promise<RaftStateData>
/**
* stateAccountKey returns the public key address of the given ID address for secp and bls accounts
*/
stateAccountKey (address: string, tipSetKey: Cid[]): Promise<string>
/**
* stateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version
*/
stateActorCodeCIDs (version: number): Promise<{ [k: string]: Cid }>
/**
* stateActorManifestCID returns the CID of the builtin actors manifest for the given network version
*/
stateActorManifestCID (version: number): Promise<Cid>
/**
* stateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset
*/
stateAllMinerFaults (chainEpoch: number, tipSetKey: Cid[]): Promise<Array<Fault>>
/**
* 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<InvocResult>
/**
* 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]: ActorV5 }>
/**
* 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<string>
/**
* 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<Message>, tipSetKey: Cid[]): Promise<ComputeStateOutput>
/**
* stateComputeDataCID computes DataCID from a set of on-chain deals
*/
stateComputeDataCID (address: string, registeredSealProof: number, dealID: Array<number>, tipSetKey: Cid[]): Promise<Cid>
/**
* 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<DealCollateralBounds>
/**
* 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<any>
/**
* stateEncodeParams attempts to encode the provided json params to the binary from
*/
stateEncodeParams (cid: Cid, methodNum: number, uint: Array<number>): Promise<string>
/**
* stateGetActor returns the indicated actor's nonce and balance.
*/
stateGetActor (address: string, tipSetKey: Cid[]): Promise<ActorV5>
/**
* stateGetAllocation returns the allocation for a given address and allocation ID.
*/
stateGetAllocation (address: string, allocationId: number, tipSetKey: Cid[]): Promise<Allocation>
/**
* stateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal. Returns nil if
* pending allocation is not found.
*/
stateGetAllocationForPendingDeal (dealID: number, tipSetKey: Cid[]): Promise<Allocation>
/**
* stateGetAllocations returns the all the allocations for a given client.
*/
stateGetAllocations (address: string, tipSetKey: Cid[]): Promise<{ [k: string]: Allocation }>
/**
* stateGetBeaconEntry 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
*/
stateGetBeaconEntry (chainEpoch: number): Promise<BeaconEntry>
/**
* stateGetClaim returns the claim for a given address and claim ID.
*/
stateGetClaim (address: string, claimId: number, tipSetKey: Cid[]): Promise<Claim>
/**
* stateGetClaims returns the all the claims for a given provider.
*/
stateGetClaims (address: string, tipSetKey: Cid[]): Promise<{ [k: string]: Claim }>
/**
* stateGetNetworkParams return current network params
*/
stateGetNetworkParams (): Promise<NetworkParams>
/**
* stateGetRandomnessFromBeacon is used to sample the beacon for randomness.
*/
stateGetRandomnessFromBeacon (domainSeparationTag: number, chainEpoch: number, bytes: string, tipSetKey: Cid[]): Promise<string>
/**
* stateGetRandomnessFromTickets is used to sample the chain for randomness.
*/
stateGetRandomnessFromTickets (domainSeparationTag: number, chainEpoch: number, bytes: string, tipSetKey: Cid[]): Promise<string>
/**
* stateListActors returns the addresses of every actor in the state
*/
stateListActors (tipSetKey: Cid[]): Promise<Array<string>>
/**
* 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<Array<Cid>>