lotus_client_schema_rs/gen/
fullnode.rs

1// Code generated by github.com/tangle-network/lotus-client-schema-rs/rust-schemagen. DO NOT EDIT.
2
3// Code generated by go-schemagen. DO NOT EDIT.
4
5use crate::client::LotusClient;
6use crate::gen::types::{Cid, TipSetKey};
7use jsonrpc_core::Error;
8use serde::{Deserialize, Serialize};
9use serde_json::Value;
10use std::collections::HashMap;
11use tokio::sync::mpsc;
12use uuid::Uuid;
13
14#[derive(Debug, Clone, Serialize, Deserialize)]
15pub struct ChainExportConfig {
16    pub write_buffer_size: i32,
17    pub num_workers: i32,
18    pub include_messages: bool,
19    pub include_receipts: bool,
20    pub include_state_roots: bool,
21}
22
23#[derive(Debug, Clone, Serialize, Deserialize)]
24pub struct Address {
25    pub str: String,
26}
27
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct Ticket {
30    pub vrf_proof: Vec<u8>,
31}
32
33#[derive(Debug, Clone, Serialize, Deserialize)]
34pub struct ElectionProof {
35    pub win_count: i64,
36    pub vrf_proof: Vec<u8>,
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
40pub struct BeaconEntry {
41    pub round: u64,
42    pub data: Vec<u8>,
43}
44
45#[derive(Debug, Clone, Serialize, Deserialize)]
46pub struct PoStProof {
47    pub po_st_proof: i64,
48    pub proof_bytes: Vec<u8>,
49}
50
51#[derive(Debug, Clone, Serialize, Deserialize)]
52pub struct Int {
53    pub neg: bool,
54    pub abs: Vec<u32>,
55}
56
57#[derive(Debug, Clone, Serialize, Deserialize)]
58pub struct Int1 {
59    pub int: Option<Int>,
60}
61
62#[derive(Debug, Clone, Serialize, Deserialize)]
63pub struct Signature {
64    #[serde(rename = "type")]
65    pub type_: u8,
66    pub data: Vec<u8>,
67}
68
69#[derive(Debug, Clone, Serialize, Deserialize)]
70pub struct BlockHeader {
71    pub miner: String,
72    pub ticket: Option<Ticket>,
73    pub election_proof: Option<ElectionProof>,
74    pub beacon_entries: Vec<BeaconEntry>,
75    pub win_po_st_proof: Vec<PoStProof>,
76    pub parents: Vec<Cid>,
77    pub parent_weight: String,
78    pub height: i64,
79    pub parent_state_root: Cid,
80    pub parent_message_receipts: Cid,
81    pub messages: Cid,
82    pub bls_aggregate: Option<Signature>,
83    pub timestamp: u64,
84    pub block_sig: Option<Signature>,
85    pub fork_signaling: u64,
86    pub parent_base_fee: String,
87    pub validated: bool,
88}
89
90#[derive(Debug, Clone, Serialize, Deserialize)]
91pub struct Message {
92    pub version: u64,
93    pub to: String,
94    pub from: String,
95    pub nonce: u64,
96    pub value: String,
97    pub gas_limit: i64,
98    pub gas_fee_cap: String,
99    pub gas_premium: String,
100    pub method: u64,
101    pub params: Vec<u8>,
102}
103
104#[derive(Debug, Clone, Serialize, Deserialize)]
105pub struct SignedMessage {
106    pub message: Message,
107    pub signature: Signature,
108}
109
110#[derive(Debug, Clone, Serialize, Deserialize)]
111pub struct BlockMessages {
112    pub bls_messages: Vec<Option<Message>>,
113    pub secpk_messages: Vec<Option<SignedMessage>>,
114    pub cids: Vec<Cid>,
115}
116
117#[derive(Debug, Clone, Serialize, Deserialize)]
118pub struct EventEntry {
119    pub flags: u8,
120    pub key: String,
121    pub codec: u64,
122    pub value: Vec<u8>,
123}
124
125#[derive(Debug, Clone, Serialize, Deserialize)]
126pub struct Event {
127    pub emitter: u64,
128    pub entries: Vec<EventEntry>,
129}
130
131#[derive(Debug, Clone, Serialize, Deserialize)]
132pub struct TipSet {
133    pub cids: Vec<Cid>,
134    pub blks: Vec<Option<BlockHeader>>,
135    pub height: i64,
136}
137
138#[derive(Debug, Clone, Serialize, Deserialize)]
139pub struct Message1 {
140    pub cid: Cid,
141    pub message: Option<Message>,
142}
143
144#[derive(Debug, Clone, Serialize, Deserialize)]
145pub struct IpldObject {
146    pub cid: Cid,
147    pub obj: Value,
148}
149
150#[derive(Debug, Clone, Serialize, Deserialize)]
151pub struct MessageReceipt {
152    pub version: u8,
153    pub exit_code: i64,
154    #[serde(rename = "return")]
155    pub return_: Vec<u8>,
156    pub gas_used: i64,
157    pub events_root: Option<Cid>,
158}
159
160#[derive(Debug, Clone, Serialize, Deserialize)]
161pub struct HeadChange {
162    #[serde(rename = "type")]
163    pub type_: String,
164    pub val: Option<TipSet>,
165}
166
167#[derive(Debug, Clone, Serialize, Deserialize)]
168pub struct HotGCOpts {
169    pub threshold: f64,
170    pub periodic: bool,
171    pub moving: bool,
172}
173
174#[derive(Debug, Clone, Serialize, Deserialize)]
175pub struct PruneOpts {
176    pub moving_gc: bool,
177    pub retain_state: i64,
178}
179
180#[derive(Debug, Clone, Serialize, Deserialize)]
181pub struct ObjStat {
182    pub size: u64,
183    pub links: u64,
184}
185
186#[derive(Debug, Clone, Serialize, Deserialize)]
187pub struct EthBigInt {
188    pub int: Option<Int>,
189}
190
191#[derive(Debug, Clone, Serialize, Deserialize)]
192pub struct EthCall {
193    pub from: Option<[u8; 20]>,
194    pub to: Option<[u8; 20]>,
195    pub gas: u64,
196    #[serde(rename = "gasPrice")]
197    pub gas_price: EthBigInt,
198    pub value: EthBigInt,
199    pub data: Vec<u8>,
200}
201
202#[derive(Debug, Clone, Serialize, Deserialize)]
203pub struct EthBlockNumberOrHash {
204    #[serde(rename = "-")]
205    pub predefined_block: Option<String>,
206    #[serde(rename = "blockNumber")]
207    pub block_number: Option<u64>,
208    #[serde(rename = "blockHash")]
209    pub block_hash: Option<[u8; 32]>,
210    #[serde(rename = "requireCanonical")]
211    pub require_canonical: bool,
212}
213
214#[derive(Debug, Clone, Serialize, Deserialize)]
215pub struct EthFeeHistory {
216    #[serde(rename = "oldestBlock")]
217    pub oldest_block: u64,
218    #[serde(rename = "baseFeePerGas")]
219    pub base_fee_per_gas: Vec<EthBigInt>,
220    #[serde(rename = "gasUsedRatio")]
221    pub gas_used_ratio: Vec<f64>,
222    pub reward: Option<Vec<Vec<EthBigInt>>>,
223}
224
225#[derive(Debug, Clone, Serialize, Deserialize)]
226pub struct EthBlock {
227    pub hash: [u8; 32],
228    #[serde(rename = "parentHash")]
229    pub parent_hash: [u8; 32],
230    #[serde(rename = "sha3Uncles")]
231    pub sha3_uncles: [u8; 32],
232    pub miner: [u8; 20],
233    #[serde(rename = "stateRoot")]
234    pub state_root: [u8; 32],
235    #[serde(rename = "transactionsRoot")]
236    pub transactions_root: [u8; 32],
237    #[serde(rename = "receiptsRoot")]
238    pub receipts_root: [u8; 32],
239    #[serde(rename = "logsBloom")]
240    pub logs_bloom: Vec<u8>,
241    pub difficulty: u64,
242    #[serde(rename = "totalDifficulty")]
243    pub total_difficulty: u64,
244    pub number: u64,
245    #[serde(rename = "gasLimit")]
246    pub gas_limit: u64,
247    #[serde(rename = "gasUsed")]
248    pub gas_used: u64,
249    pub timestamp: u64,
250    #[serde(rename = "extraData")]
251    pub extradata: Vec<u8>,
252    #[serde(rename = "mixHash")]
253    pub mix_hash: [u8; 32],
254    pub nonce: [u8; 8],
255    #[serde(rename = "baseFeePerGas")]
256    pub base_fee_per_gas: EthBigInt,
257    pub size: u64,
258    pub transactions: Vec<Value>,
259    pub uncles: Vec<[u8; 32]>,
260}
261
262#[derive(Debug, Clone, Serialize, Deserialize)]
263pub struct EthLog {
264    pub address: [u8; 20],
265    pub data: Vec<u8>,
266    pub topics: Vec<[u8; 32]>,
267    pub removed: bool,
268    #[serde(rename = "logIndex")]
269    pub log_index: u64,
270    #[serde(rename = "transactionIndex")]
271    pub transaction_index: u64,
272    #[serde(rename = "transactionHash")]
273    pub transaction_hash: [u8; 32],
274    #[serde(rename = "blockHash")]
275    pub block_hash: [u8; 32],
276    #[serde(rename = "blockNumber")]
277    pub block_number: u64,
278}
279
280#[derive(Debug, Clone, Serialize, Deserialize)]
281pub struct EthTxReceipt {
282    #[serde(rename = "transactionHash")]
283    pub transaction_hash: [u8; 32],
284    #[serde(rename = "transactionIndex")]
285    pub transaction_index: u64,
286    #[serde(rename = "blockHash")]
287    pub block_hash: [u8; 32],
288    #[serde(rename = "blockNumber")]
289    pub block_number: u64,
290    pub from: [u8; 20],
291    pub to: Option<[u8; 20]>,
292    #[serde(rename = "root")]
293    pub state_root: [u8; 32],
294    pub status: u64,
295    #[serde(rename = "contractAddress")]
296    pub contract_address: Option<[u8; 20]>,
297    #[serde(rename = "cumulativeGasUsed")]
298    pub cumulative_gas_used: u64,
299    #[serde(rename = "gasUsed")]
300    pub gas_used: u64,
301    #[serde(rename = "effectiveGasPrice")]
302    pub effective_gas_price: EthBigInt,
303    #[serde(rename = "logsBloom")]
304    pub logs_bloom: Vec<u8>,
305    pub logs: Vec<EthLog>,
306    #[serde(rename = "type")]
307    pub type_: u64,
308}
309
310#[derive(Debug, Clone, Serialize, Deserialize)]
311pub struct EthFilterResult {
312    pub results: Vec<Value>,
313}
314
315#[derive(Debug, Clone, Serialize, Deserialize)]
316pub struct EthFilterSpec {
317    #[serde(rename = "fromBlock")]
318    pub from_block: Option<String>,
319    #[serde(rename = "toBlock")]
320    pub to_block: Option<String>,
321    pub address: Vec<[u8; 20]>,
322    pub topics: Vec<Vec<[u8; 32]>>,
323    #[serde(rename = "blockHash")]
324    pub block_hash: Option<[u8; 32]>,
325}
326
327#[derive(Debug, Clone, Serialize, Deserialize)]
328pub struct EthTx {
329    #[serde(rename = "chainId")]
330    pub chain_id: u64,
331    pub nonce: u64,
332    pub hash: [u8; 32],
333    #[serde(rename = "blockHash")]
334    pub block_hash: Option<[u8; 32]>,
335    #[serde(rename = "blockNumber")]
336    pub block_number: Option<u64>,
337    #[serde(rename = "transactionIndex")]
338    pub transaction_index: Option<u64>,
339    pub from: [u8; 20],
340    pub to: Option<[u8; 20]>,
341    pub value: EthBigInt,
342    #[serde(rename = "type")]
343    pub type_: u64,
344    pub input: Vec<u8>,
345    pub gas: u64,
346    #[serde(rename = "maxFeePerGas")]
347    pub max_fee_per_gas: Option<EthBigInt>,
348    #[serde(rename = "maxPriorityFeePerGas")]
349    pub max_priority_fee_per_gas: Option<EthBigInt>,
350    #[serde(rename = "gasPrice")]
351    pub gas_price: Option<EthBigInt>,
352    #[serde(rename = "accessList")]
353    pub access_list: Vec<[u8; 32]>,
354    pub v: EthBigInt,
355    pub r: EthBigInt,
356    pub s: EthBigInt,
357}
358
359#[derive(Debug, Clone, Serialize, Deserialize)]
360pub struct EthSyncingResult {
361    pub done_sync: bool,
362    pub starting_block: u64,
363    pub current_block: u64,
364    pub highest_block: u64,
365}
366
367#[derive(Debug, Clone, Serialize, Deserialize)]
368pub struct EthTrace {
369    #[serde(rename = "type")]
370    pub type_: String,
371    pub error: String,
372    pub subtraces: i32,
373    #[serde(rename = "traceAddress")]
374    pub trace_address: Vec<i32>,
375    pub action: Value,
376    pub result: Value,
377}
378
379#[derive(Debug, Clone, Serialize, Deserialize)]
380pub struct EthTraceBlock {
381    pub eth_trace: Option<EthTrace>,
382    #[serde(rename = "blockHash")]
383    pub block_hash: [u8; 32],
384    #[serde(rename = "blockNumber")]
385    pub block_number: i64,
386    #[serde(rename = "transactionHash")]
387    pub transaction_hash: [u8; 32],
388    #[serde(rename = "transactionPosition")]
389    pub transaction_position: i32,
390}
391
392#[derive(Debug, Clone, Serialize, Deserialize)]
393pub struct EthTraceFilterCriteria {
394    #[serde(rename = "fromBlock")]
395    pub from_block: Option<String>,
396    #[serde(rename = "toBlock")]
397    pub to_block: Option<String>,
398    #[serde(rename = "fromAddress")]
399    pub from_address: Vec<[u8; 20]>,
400    #[serde(rename = "toAddress")]
401    pub to_address: Vec<[u8; 20]>,
402    pub after: Option<u64>,
403    pub count: Option<u64>,
404}
405
406#[derive(Debug, Clone, Serialize, Deserialize)]
407pub struct EthTraceFilterResult {
408    pub eth_trace: Option<EthTrace>,
409    #[serde(rename = "blockHash")]
410    pub block_hash: [u8; 32],
411    #[serde(rename = "blockNumber")]
412    pub block_number: i64,
413    #[serde(rename = "transactionHash")]
414    pub transaction_hash: [u8; 32],
415    #[serde(rename = "transactionPosition")]
416    pub transaction_position: i32,
417}
418
419#[derive(Debug, Clone, Serialize, Deserialize)]
420pub struct EthTraceReplayBlockTransaction {
421    pub output: Vec<u8>,
422    #[serde(rename = "stateDiff")]
423    pub state_diff: Option<String>,
424    pub trace: Vec<Option<EthTrace>>,
425    #[serde(rename = "transactionHash")]
426    pub transaction_hash: [u8; 32],
427    #[serde(rename = "vmTrace")]
428    pub vm_trace: Option<String>,
429}
430
431#[derive(Debug, Clone, Serialize, Deserialize)]
432pub struct EthTraceTransaction {
433    pub eth_trace: Option<EthTrace>,
434    #[serde(rename = "blockHash")]
435    pub block_hash: [u8; 32],
436    #[serde(rename = "blockNumber")]
437    pub block_number: i64,
438    #[serde(rename = "transactionHash")]
439    pub transaction_hash: [u8; 32],
440    #[serde(rename = "transactionPosition")]
441    pub transaction_position: i32,
442}
443
444#[derive(Debug, Clone, Serialize, Deserialize)]
445pub struct TipSet1 {
446    pub epoch: i64,
447    pub key: Vec<u8>,
448    pub power_table: Cid,
449    pub commitments: [u8; 32],
450}
451
452#[derive(Debug, Clone, Serialize, Deserialize)]
453pub struct SupplementalData {
454    pub commitments: [u8; 32],
455    pub power_table: Cid,
456}
457
458#[derive(Debug, Clone, Serialize, Deserialize)]
459pub struct RLE {
460    pub buf: Vec<u8>,
461    pub validated: bool,
462}
463
464#[derive(Debug, Clone, Serialize, Deserialize)]
465pub struct BitField {
466    pub rle: RLE,
467    pub set: HashMap<u64, ()>,
468    pub unset: HashMap<u64, ()>,
469}
470
471#[derive(Debug, Clone, Serialize, Deserialize)]
472pub struct PowerTableDelta {
473    pub participant_id: u64,
474    pub power_delta: String,
475    pub signing_key: Vec<u8>,
476}
477
478#[derive(Debug, Clone, Serialize, Deserialize)]
479pub struct FinalityCertificate {
480    pub gpbft_instance: u64,
481    pub ec_chain: Vec<TipSet>,
482    pub supplemental_data: SupplementalData,
483    pub signers: BitField,
484    pub signature: Vec<u8>,
485    pub power_table_delta: Vec<PowerTableDelta>,
486}
487
488#[derive(Debug, Clone, Serialize, Deserialize)]
489pub struct PowerEntry {
490    pub id: u64,
491    pub power: String,
492    pub pub_key: Vec<u8>,
493}
494
495#[derive(Debug, Clone, Serialize, Deserialize)]
496pub struct GpbftConfig {
497    pub delta: i64,
498    pub delta_back_off_exponent: f64,
499    pub max_lookahead_rounds: u64,
500    pub rebroadcast_backoff_base: i64,
501    pub rebroadcast_backoff_exponent: f64,
502    pub rebroadcast_backoff_spread: f64,
503    pub rebroadcast_backoff_max: i64,
504}
505
506#[derive(Debug, Clone, Serialize, Deserialize)]
507pub struct EcConfig {
508    pub period: i64,
509    pub finality: i64,
510    pub delay_multiplier: f64,
511    pub base_decision_backoff_table: Vec<f64>,
512    pub head_lookback: i32,
513    pub finalize: bool,
514}
515
516#[derive(Debug, Clone, Serialize, Deserialize)]
517pub struct CxConfig {
518    pub client_request_timeout: i64,
519    pub server_request_timeout: i64,
520    pub minimum_poll_interval: i64,
521    pub maximum_poll_interval: i64,
522}
523
524#[derive(Debug, Clone, Serialize, Deserialize)]
525pub struct Manifest {
526    pub pause: bool,
527    pub protocol_version: u64,
528    pub initial_instance: u64,
529    pub bootstrap_epoch: i64,
530    pub network_name: String,
531    pub explicit_power: Vec<PowerEntry>,
532    pub ignore_ec_power: bool,
533    pub initial_power_table: Cid,
534    pub committee_lookback: u64,
535    pub catch_up_alignment: i64,
536    pub gpbft: GpbftConfig,
537    pub ec: EcConfig,
538    pub certificate_exchange: CxConfig,
539}
540
541#[derive(Debug, Clone, Serialize, Deserialize)]
542pub struct Instant {
543    pub id: u64,
544    pub round: u64,
545    pub phase: u8,
546}
547
548#[derive(Debug, Clone, Serialize, Deserialize)]
549pub struct F3Participant {
550    pub miner_id: u64,
551    pub from_instance: u64,
552    pub validity_term: u64,
553}
554
555#[derive(Debug, Clone, Serialize, Deserialize)]
556pub struct F3ParticipationLease {
557    pub network: String,
558    pub issuer: String,
559    pub miner_id: u64,
560    pub from_instance: u64,
561    pub validity_term: u64,
562}
563
564#[derive(Debug, Clone, Serialize, Deserialize)]
565pub struct MessageSendSpec {
566    pub max_fee: String,
567    pub msg_uuid: [u8; 16],
568    pub maximize_fee_cap: bool,
569}
570
571#[derive(Debug, Clone, Serialize, Deserialize)]
572pub struct ActorEventBlock {
573    pub codec: u64,
574    pub value: Vec<u8>,
575}
576
577#[derive(Debug, Clone, Serialize, Deserialize)]
578pub struct ActorEventFilter {
579    pub addresses: Vec<String>,
580    pub fields: HashMap<String, Vec<ActorEventBlock>>,
581    #[serde(rename = "fromHeight")]
582    pub from_height: Option<i64>,
583    #[serde(rename = "toHeight")]
584    pub to_height: Option<i64>,
585    #[serde(rename = "tipsetKey")]
586    pub tip_set_key: Option<TipSetKey>,
587}
588
589#[derive(Debug, Clone, Serialize, Deserialize)]
590pub struct ActorEvent {
591    pub entries: Vec<EventEntry>,
592    pub emitter: String,
593    pub reverted: bool,
594    pub height: i64,
595    #[serde(rename = "tipsetKey")]
596    pub tip_set_key: TipSetKey,
597    #[serde(rename = "msgCid")]
598    pub msg_cid: Cid,
599}
600
601#[derive(Debug, Clone, Serialize, Deserialize)]
602pub struct AlertType {
603    pub system: String,
604    pub subsystem: String,
605}
606
607#[derive(Debug, Clone, Serialize, Deserialize)]
608pub struct Zone {
609    pub name: String,
610    pub offset: i32,
611    pub is_dst: bool,
612}
613
614#[derive(Debug, Clone, Serialize, Deserialize)]
615pub struct ZoneTrans {
616    pub when: i64,
617    pub index: u8,
618    pub isstd: bool,
619    pub isutc: bool,
620}
621
622#[derive(Debug, Clone, Serialize, Deserialize)]
623pub struct Location {
624    pub name: String,
625    pub zone: Vec<Zone>,
626    pub tx: Vec<ZoneTrans>,
627    pub extend: String,
628    pub cache_start: i64,
629    pub cache_end: i64,
630    pub cache_zone: Option<Zone>,
631}
632
633#[derive(Debug, Clone, Serialize, Deserialize)]
634pub struct Time {
635    pub wall: u64,
636    pub ext: i64,
637    pub loc: Option<Location>,
638}
639
640#[derive(Debug, Clone, Serialize, Deserialize)]
641pub struct AlertEvent {
642    #[serde(rename = "type")]
643    pub type_: String,
644    pub message: Vec<u8>,
645    pub time: Time,
646}
647
648#[derive(Debug, Clone, Serialize, Deserialize)]
649pub struct EventType {
650    pub system: String,
651    pub event: String,
652    pub enabled: bool,
653    pub safe: bool,
654}
655
656#[derive(Debug, Clone, Serialize, Deserialize)]
657pub struct Alert {
658    #[serde(rename = "type")]
659    pub type_: AlertType,
660    pub active: bool,
661    pub last_active: Option<AlertEvent>,
662    pub last_resolved: Option<AlertEvent>,
663    pub journal_type: EventType,
664}
665
666#[derive(Debug, Clone, Serialize, Deserialize)]
667pub struct BlockTemplate {
668    pub miner: String,
669    pub parents: TipSetKey,
670    pub ticket: Option<Ticket>,
671    pub eproof: Option<ElectionProof>,
672    pub beacon_values: Vec<BeaconEntry>,
673    pub messages: Vec<Option<SignedMessage>>,
674    pub epoch: i64,
675    pub timestamp: u64,
676    pub winning_po_st_proof: Vec<PoStProof>,
677}
678
679#[derive(Debug, Clone, Serialize, Deserialize)]
680pub struct BlockMsg {
681    pub header: Option<BlockHeader>,
682    pub bls_messages: Vec<Cid>,
683    pub secpk_messages: Vec<Cid>,
684}
685
686#[derive(Debug, Clone, Serialize, Deserialize)]
687pub struct ExtendedSectorInfo {
688    pub seal_proof: i64,
689    pub sector_number: u64,
690    pub sector_key: Option<Cid>,
691    pub sealed_cid: Cid,
692}
693
694#[derive(Debug, Clone, Serialize, Deserialize)]
695pub struct MiningBaseInfo {
696    pub miner_power: String,
697    pub network_power: String,
698    pub sectors: Vec<ExtendedSectorInfo>,
699    pub worker_key: String,
700    pub sector_size: u64,
701    pub prev_beacon_entry: BeaconEntry,
702    pub beacon_entries: Vec<BeaconEntry>,
703    pub eligible_for_mining: bool,
704}
705
706#[derive(Debug, Clone, Serialize, Deserialize)]
707pub struct MessagePrototype {
708    pub message: Message,
709    pub valid_nonce: bool,
710}
711
712#[derive(Debug, Clone, Serialize, Deserialize)]
713pub struct CheckStatus {
714    pub code: i32,
715    pub ok: bool,
716    pub err: String,
717    pub hint: HashMap<String, Value>,
718}
719
720#[derive(Debug, Clone, Serialize, Deserialize)]
721pub struct MessageCheckStatus {
722    pub cid: Cid,
723    pub check_status: CheckStatus,
724}
725
726#[derive(Debug, Clone, Serialize, Deserialize)]
727pub struct MpoolConfig {
728    pub priority_addrs: Vec<String>,
729    pub size_limit_high: i32,
730    pub size_limit_low: i32,
731    pub replace_by_fee_ratio: i64,
732    pub prune_cooldown: i64,
733    pub gas_limit_overestimation: f64,
734}
735
736#[derive(Debug, Clone, Serialize, Deserialize)]
737pub struct MpoolUpdate {
738    #[serde(rename = "type")]
739    pub type_: i32,
740    pub message: Option<SignedMessage>,
741}
742
743#[derive(Debug, Clone, Serialize, Deserialize)]
744pub struct MsigTransaction {
745    pub id: i64,
746    pub to: String,
747    pub value: String,
748    pub method: u64,
749    pub params: Vec<u8>,
750    pub approved: Vec<String>,
751}
752
753#[derive(Debug, Clone, Serialize, Deserialize)]
754pub struct MsigVesting {
755    pub initial_balance: String,
756    pub start_epoch: i64,
757    pub unlock_duration: i64,
758}
759
760#[derive(Debug, Clone, Serialize, Deserialize)]
761pub struct AddrInfo {
762    pub id: String,
763    pub addrs: Vec<Value>,
764}
765
766#[derive(Debug, Clone, Serialize, Deserialize)]
767pub struct NatInfo {
768    pub reachability: i32,
769    pub public_addrs: Vec<String>,
770}
771
772#[derive(Debug, Clone, Serialize, Deserialize)]
773pub struct Stats {
774    pub total_in: i64,
775    pub total_out: i64,
776    pub rate_in: f64,
777    pub rate_out: f64,
778}
779
780#[derive(Debug, Clone, Serialize, Deserialize)]
781pub struct NetBlockList {
782    pub peers: Vec<String>,
783    pub ip_addrs: Vec<String>,
784    pub ip_subnets: Vec<String>,
785}
786
787#[derive(Debug, Clone, Serialize, Deserialize)]
788pub struct NetLimit {
789    #[serde(rename = "")]
790    pub memory: i64,
791    pub streams: i32,
792    pub streams_inbound: i32,
793    pub streams_outbound: i32,
794    pub conns: i32,
795    pub conns_inbound: i32,
796    pub conns_outbound: i32,
797    pub fd: i32,
798}
799
800#[derive(Debug, Clone, Serialize, Deserialize)]
801pub struct ConnMgrInfo {
802    pub first_seen: Time,
803    pub value: i32,
804    pub tags: HashMap<String, i32>,
805    pub conns: HashMap<String, Time>,
806}
807
808#[derive(Debug, Clone, Serialize, Deserialize)]
809pub struct ExtendedPeerInfo {
810    pub id: String,
811    pub agent: String,
812    pub addrs: Vec<String>,
813    pub protocols: Vec<String>,
814    pub conn_mgr_meta: Option<ConnMgrInfo>,
815}
816
817#[derive(Debug, Clone, Serialize, Deserialize)]
818pub struct TopicScoreSnapshot {
819    pub time_in_mesh: i64,
820    pub first_message_deliveries: f64,
821    pub mesh_message_deliveries: f64,
822    pub invalid_message_deliveries: f64,
823}
824
825#[derive(Debug, Clone, Serialize, Deserialize)]
826pub struct PeerScoreSnapshot {
827    pub score: f64,
828    pub topics: HashMap<String, Option<TopicScoreSnapshot>>,
829    pub app_specific_score: f64,
830    pub ip_colocation_factor: f64,
831    pub behaviour_penalty: f64,
832}
833
834#[derive(Debug, Clone, Serialize, Deserialize)]
835pub struct PubsubScore {
836    pub id: String,
837    pub score: Option<PeerScoreSnapshot>,
838}
839
840#[derive(Debug, Clone, Serialize, Deserialize)]
841pub struct ScopeStat {
842    pub num_streams_inbound: i32,
843    pub num_streams_outbound: i32,
844    pub num_conns_inbound: i32,
845    pub num_conns_outbound: i32,
846    pub num_fd: i32,
847    pub memory: i64,
848}
849
850#[derive(Debug, Clone, Serialize, Deserialize)]
851pub struct NetStat {
852    #[serde(rename = "")]
853    pub system: Option<ScopeStat>,
854    #[serde(rename = "")]
855    pub transient: Option<ScopeStat>,
856    #[serde(rename = "")]
857    pub services: HashMap<String, ScopeStat>,
858    #[serde(rename = "")]
859    pub protocols: HashMap<String, ScopeStat>,
860    #[serde(rename = "")]
861    pub peers: HashMap<String, ScopeStat>,
862}
863
864#[derive(Debug, Clone, Serialize, Deserialize)]
865pub struct NodeSyncStatus {
866    pub epoch: u64,
867    pub behind: u64,
868}
869
870#[derive(Debug, Clone, Serialize, Deserialize)]
871pub struct NodePeerStatus {
872    pub peers_to_publish_msgs: i32,
873    pub peers_to_publish_blocks: i32,
874}
875
876#[derive(Debug, Clone, Serialize, Deserialize)]
877pub struct NodeChainStatus {
878    pub blocks_per_tipset_last100: f64,
879    pub blocks_per_tipset_last_finality: f64,
880}
881
882#[derive(Debug, Clone, Serialize, Deserialize)]
883pub struct NodeStatus {
884    pub sync_status: NodeSyncStatus,
885    pub peer_status: NodePeerStatus,
886    pub chain_status: NodeChainStatus,
887}
888
889#[derive(Debug, Clone, Serialize, Deserialize)]
890pub struct ChannelAvailableFunds {
891    pub channel: Option<String>,
892    pub from: String,
893    pub to: String,
894    pub confirmed_amt: String,
895    pub pending_amt: String,
896    pub non_reserved_amt: String,
897    pub pending_available_amt: String,
898    pub pending_wait_sentinel: Option<Cid>,
899    pub queued_amt: String,
900    pub voucher_reedeemed_amt: String,
901}
902
903#[derive(Debug, Clone, Serialize, Deserialize)]
904pub struct ChannelInfo {
905    pub channel: String,
906    pub wait_sentinel: Cid,
907}
908
909#[derive(Debug, Clone, Serialize, Deserialize)]
910pub struct PaychGetOpts {
911    pub off_chain: bool,
912}
913
914#[derive(Debug, Clone, Serialize, Deserialize)]
915pub struct ModVerifyParams {
916    pub actor: String,
917    pub method: u64,
918    pub data: Vec<u8>,
919}
920
921#[derive(Debug, Clone, Serialize, Deserialize)]
922pub struct VoucherSpec {
923    pub amount: String,
924    pub time_lock_min: i64,
925    pub time_lock_max: i64,
926    pub min_settle: i64,
927    pub extra: Option<ModVerifyParams>,
928}
929
930#[derive(Debug, Clone, Serialize, Deserialize)]
931pub struct Merge {
932    pub lane: u64,
933    pub nonce: u64,
934}
935
936#[derive(Debug, Clone, Serialize, Deserialize)]
937pub struct SignedVoucher {
938    pub channel_addr: String,
939    pub time_lock_min: i64,
940    pub time_lock_max: i64,
941    pub secret_hash: Vec<u8>,
942    pub extra: Option<ModVerifyParams>,
943    pub lane: u64,
944    pub nonce: u64,
945    pub amount: String,
946    pub min_settle_height: i64,
947    pub merges: Vec<Merge>,
948    pub signature: Option<Signature>,
949}
950
951#[derive(Debug, Clone, Serialize, Deserialize)]
952pub struct PaymentInfo {
953    pub channel: String,
954    pub wait_sentinel: Cid,
955    pub vouchers: Vec<Option<SignedVoucher>>,
956}
957
958#[derive(Debug, Clone, Serialize, Deserialize)]
959pub struct PaychStatus {
960    pub control_addr: String,
961    pub direction: i32,
962}
963
964#[derive(Debug, Clone, Serialize, Deserialize)]
965pub struct VoucherCreateResult {
966    pub voucher: Option<SignedVoucher>,
967    pub shortfall: String,
968}
969
970#[derive(Debug, Clone, Serialize, Deserialize)]
971pub struct Fault {
972    pub miner: String,
973    pub epoch: i64,
974}
975
976#[derive(Debug, Clone, Serialize, Deserialize)]
977pub struct MsgGasCost {
978    pub message: Cid,
979    pub gas_used: String,
980    pub base_fee_burn: String,
981    pub over_estimation_burn: String,
982    pub miner_penalty: String,
983    pub miner_tip: String,
984    pub refund: String,
985    pub total_cost: String,
986}
987
988#[derive(Debug, Clone, Serialize, Deserialize)]
989pub struct MessageTrace {
990    pub from: String,
991    pub to: String,
992    pub value: String,
993    pub method: u64,
994    pub params: Vec<u8>,
995    pub params_codec: u64,
996    pub gas_limit: u64,
997    pub read_only: bool,
998}
999
1000#[derive(Debug, Clone, Serialize, Deserialize)]
1001pub struct ReturnTrace {
1002    pub exit_code: i64,
1003    #[serde(rename = "return")]
1004    pub return_: Vec<u8>,
1005    pub return_codec: u64,
1006}
1007
1008#[derive(Debug, Clone, Serialize, Deserialize)]
1009pub struct ActorV5 {
1010    pub code: Cid,
1011    pub head: Cid,
1012    pub nonce: u64,
1013    pub balance: String,
1014    pub delegated_address: Option<String>,
1015}
1016
1017#[derive(Debug, Clone, Serialize, Deserialize)]
1018pub struct ActorTrace {
1019    pub id: u64,
1020    pub state: ActorV5,
1021}
1022
1023#[derive(Debug, Clone, Serialize, Deserialize)]
1024pub struct GasTrace {
1025    pub name: String,
1026    #[serde(rename = "tg")]
1027    pub total_gas: i64,
1028    #[serde(rename = "cg")]
1029    pub compute_gas: i64,
1030    #[serde(rename = "sg")]
1031    pub storage_gas: i64,
1032    #[serde(rename = "tt")]
1033    pub time_taken: i64,
1034}
1035
1036#[derive(Debug, Clone, Serialize, Deserialize)]
1037pub struct ExecutionTrace {
1038    pub msg: MessageTrace,
1039    pub msg_rct: ReturnTrace,
1040    #[serde(rename = "")]
1041    pub invoked_actor: Option<ActorTrace>,
1042    pub gas_charges: Vec<Option<GasTrace>>,
1043    pub subcalls: Vec<ExecutionTrace>,
1044}
1045
1046#[derive(Debug, Clone, Serialize, Deserialize)]
1047pub struct InvocResult {
1048    pub msg_cid: Cid,
1049    pub msg: Option<Message>,
1050    pub msg_rct: Option<MessageReceipt>,
1051    pub gas_cost: MsgGasCost,
1052    pub execution_trace: ExecutionTrace,
1053    pub error: String,
1054    pub duration: i64,
1055}
1056
1057#[derive(Debug, Clone, Serialize, Deserialize)]
1058pub struct ComputeStateOutput {
1059    pub root: Cid,
1060    pub trace: Vec<Option<InvocResult>>,
1061}
1062
1063#[derive(Debug, Clone, Serialize, Deserialize)]
1064pub struct DealCollateralBounds {
1065    pub min: String,
1066    pub max: String,
1067}
1068
1069#[derive(Debug, Clone, Serialize, Deserialize)]
1070pub struct Allocation {
1071    pub client: u64,
1072    pub provider: u64,
1073    pub data: Cid,
1074    pub size: u64,
1075    pub term_min: i64,
1076    pub term_max: i64,
1077    pub expiration: i64,
1078}
1079
1080#[derive(Debug, Clone, Serialize, Deserialize)]
1081pub struct Claim {
1082    pub provider: u64,
1083    pub client: u64,
1084    pub data: Cid,
1085    pub size: u64,
1086    pub term_min: i64,
1087    pub term_max: i64,
1088    pub term_start: i64,
1089    pub sector: u64,
1090}
1091
1092#[derive(Debug, Clone, Serialize, Deserialize)]
1093pub struct ForkUpgradeParams {
1094    pub upgrade_smoke_height: i64,
1095    pub upgrade_breeze_height: i64,
1096    pub upgrade_ignition_height: i64,
1097    pub upgrade_liftoff_height: i64,
1098    pub upgrade_assembly_height: i64,
1099    pub upgrade_refuel_height: i64,
1100    pub upgrade_tape_height: i64,
1101    pub upgrade_kumquat_height: i64,
1102    pub breeze_gas_tamping_duration: i64,
1103    pub upgrade_calico_height: i64,
1104    pub upgrade_persian_height: i64,
1105    pub upgrade_orange_height: i64,
1106    pub upgrade_claus_height: i64,
1107    pub upgrade_trust_height: i64,
1108    pub upgrade_norwegian_height: i64,
1109    pub upgrade_turbo_height: i64,
1110    pub upgrade_hyperdrive_height: i64,
1111    pub upgrade_chocolate_height: i64,
1112    pub upgrade_oh_snap_height: i64,
1113    pub upgrade_skyr_height: i64,
1114    pub upgrade_shark_height: i64,
1115    pub upgrade_hygge_height: i64,
1116    pub upgrade_lightning_height: i64,
1117    pub upgrade_thunder_height: i64,
1118    pub upgrade_watermelon_height: i64,
1119    pub upgrade_dragon_height: i64,
1120    pub upgrade_phoenix_height: i64,
1121    pub upgrade_waffle_height: i64,
1122    pub upgrade_tuktuk_height: i64,
1123}
1124
1125#[derive(Debug, Clone, Serialize, Deserialize)]
1126pub struct NetworkParams {
1127    pub network_name: String,
1128    pub block_delay_secs: u64,
1129    pub consensus_miner_min_power: String,
1130    pub supported_proof_types: Vec<i64>,
1131    pub pre_commit_challenge_delay: i64,
1132    pub fork_upgrade_params: ForkUpgradeParams,
1133    pub eip155_chain_id: i32,
1134}
1135
1136#[derive(Debug, Clone, Serialize, Deserialize)]
1137pub struct MessageMatch {
1138    pub to: String,
1139    pub from: String,
1140}
1141
1142#[derive(Debug, Clone, Serialize, Deserialize)]
1143pub struct MarketBalance {
1144    pub escrow: String,
1145    pub locked: String,
1146}
1147
1148#[derive(Debug, Clone, Serialize, Deserialize)]
1149pub struct DealLabel {
1150    pub bs: Vec<u8>,
1151    pub not_string: bool,
1152}
1153
1154#[derive(Debug, Clone, Serialize, Deserialize)]
1155pub struct DealProposal {
1156    pub piece_cid: Cid,
1157    pub piece_size: u64,
1158    pub verified_deal: bool,
1159    pub client: String,
1160    pub provider: String,
1161    pub label: DealLabel,
1162    pub start_epoch: i64,
1163    pub end_epoch: i64,
1164    pub storage_price_per_epoch: String,
1165    pub provider_collateral: String,
1166    pub client_collateral: String,
1167}
1168
1169#[derive(Debug, Clone, Serialize, Deserialize)]
1170pub struct MarketDealState {
1171    pub sector_number: u64,
1172    pub sector_start_epoch: i64,
1173    pub last_updated_epoch: i64,
1174    pub slash_epoch: i64,
1175}
1176
1177#[derive(Debug, Clone, Serialize, Deserialize)]
1178pub struct MarketDeal {
1179    pub proposal: DealProposal,
1180    pub state: MarketDealState,
1181}
1182
1183#[derive(Debug, Clone, Serialize, Deserialize)]
1184pub struct SectorOnChainInfo {
1185    pub sector_number: u64,
1186    pub seal_proof: i64,
1187    pub sealed_cid: Cid,
1188    pub deal_i_ds: Vec<u64>,
1189    pub activation: i64,
1190    pub expiration: i64,
1191    pub deal_weight: String,
1192    pub verified_deal_weight: String,
1193    pub initial_pledge: String,
1194    pub expected_day_reward: String,
1195    pub expected_storage_pledge: String,
1196    pub power_base_epoch: i64,
1197    pub replaced_day_reward: String,
1198    pub sector_key_cid: Option<Cid>,
1199    pub flags: u64,
1200}
1201
1202#[derive(Debug, Clone, Serialize, Deserialize)]
1203pub struct Deadline {
1204    pub post_submissions: BitField,
1205    pub disputable_proof_count: u64,
1206}
1207
1208#[derive(Debug, Clone, Serialize, Deserialize)]
1209pub struct BeneficiaryTerm {
1210    pub quota: String,
1211    pub used_quota: String,
1212    pub expiration: i64,
1213}
1214
1215#[derive(Debug, Clone, Serialize, Deserialize)]
1216pub struct PendingBeneficiaryChange {
1217    pub new_beneficiary: String,
1218    pub new_quota: String,
1219    pub new_expiration: i64,
1220    pub approved_by_beneficiary: bool,
1221    pub approved_by_nominee: bool,
1222}
1223
1224#[derive(Debug, Clone, Serialize, Deserialize)]
1225pub struct MinerInfo {
1226    pub owner: String,
1227    pub worker: String,
1228    pub new_worker: String,
1229    pub control_addresses: Vec<String>,
1230    pub worker_change_epoch: i64,
1231    pub peer_id: Option<String>,
1232    pub multiaddrs: Vec<Vec<u8>>,
1233    pub window_po_st_proof_type: i64,
1234    pub sector_size: u64,
1235    pub window_po_st_partition_sectors: u64,
1236    pub consensus_fault_elapsed: i64,
1237    pub pending_owner_address: Option<String>,
1238    pub beneficiary: String,
1239    pub beneficiary_term: Option<BeneficiaryTerm>,
1240    pub pending_beneficiary_term: Option<PendingBeneficiaryChange>,
1241}
1242
1243#[derive(Debug, Clone, Serialize, Deserialize)]
1244pub struct SectorPreCommitInfo {
1245    pub seal_proof: i64,
1246    pub sector_number: u64,
1247    pub sealed_cid: Cid,
1248    pub seal_rand_epoch: i64,
1249    pub deal_i_ds: Vec<u64>,
1250    pub expiration: i64,
1251    pub unsealed_cid: Option<Cid>,
1252}
1253
1254#[derive(Debug, Clone, Serialize, Deserialize)]
1255pub struct Partition {
1256    pub all_sectors: BitField,
1257    pub faulty_sectors: BitField,
1258    pub recovering_sectors: BitField,
1259    pub live_sectors: BitField,
1260    pub active_sectors: BitField,
1261}
1262
1263#[derive(Debug, Clone, Serialize, Deserialize)]
1264pub struct Claim1 {
1265    pub raw_byte_power: String,
1266    pub quality_adj_power: String,
1267}
1268
1269#[derive(Debug, Clone, Serialize, Deserialize)]
1270pub struct MinerPower {
1271    pub miner_power: Claim,
1272    pub total_power: Claim,
1273    pub has_min_power: bool,
1274}
1275
1276#[derive(Debug, Clone, Serialize, Deserialize)]
1277pub struct Info {
1278    pub current_epoch: i64,
1279    pub period_start: i64,
1280    pub index: u64,
1281    pub open: i64,
1282    pub close: i64,
1283    pub challenge: i64,
1284    pub fault_cutoff: i64,
1285    pub w_po_st_period_deadlines: u64,
1286    pub w_po_st_proving_period: i64,
1287    pub w_po_st_challenge_window: i64,
1288    pub w_po_st_challenge_lookback: i64,
1289    pub fault_declaration_cutoff: i64,
1290}
1291
1292#[derive(Debug, Clone, Serialize, Deserialize)]
1293pub struct MinerSectors {
1294    pub live: u64,
1295    pub active: u64,
1296    pub faulty: u64,
1297}
1298
1299#[derive(Debug, Clone, Serialize, Deserialize)]
1300pub struct ActorState {
1301    pub balance: String,
1302    pub code: Cid,
1303    pub state: Value,
1304}
1305
1306#[derive(Debug, Clone, Serialize, Deserialize)]
1307pub struct MsgLookup {
1308    pub message: Cid,
1309    pub receipt: MessageReceipt,
1310    pub return_dec: Value,
1311    pub tip_set: TipSetKey,
1312    pub height: i64,
1313}
1314
1315#[derive(Debug, Clone, Serialize, Deserialize)]
1316pub struct SectorExpiration {
1317    pub on_time: i64,
1318    pub early: i64,
1319}
1320
1321#[derive(Debug, Clone, Serialize, Deserialize)]
1322pub struct SectorLocation {
1323    pub deadline: u64,
1324    pub partition: u64,
1325}
1326
1327#[derive(Debug, Clone, Serialize, Deserialize)]
1328pub struct SectorPreCommitOnChainInfo {
1329    pub info: SectorPreCommitInfo,
1330    pub pre_commit_deposit: String,
1331    pub pre_commit_epoch: i64,
1332}
1333
1334#[derive(Debug, Clone, Serialize, Deserialize)]
1335pub struct CirculatingSupply {
1336    pub fil_vested: String,
1337    pub fil_mined: String,
1338    pub fil_burnt: String,
1339    pub fil_locked: String,
1340    pub fil_circulating: String,
1341    pub fil_reserve_disbursed: String,
1342}
1343
1344#[derive(Debug, Clone, Serialize, Deserialize)]
1345pub struct ActiveSync {
1346    pub worker_id: u64,
1347    pub base: Option<TipSet>,
1348    pub target: Option<TipSet>,
1349    pub stage: i32,
1350    pub height: i64,
1351    pub start: Time,
1352    pub end: Time,
1353    pub message: String,
1354}
1355
1356#[derive(Debug, Clone, Serialize, Deserialize)]
1357pub struct SyncState {
1358    pub active_syncs: Vec<ActiveSync>,
1359    pub vm_applied: u64,
1360}
1361
1362#[derive(Debug, Clone, Serialize, Deserialize)]
1363pub struct APIVersion {
1364    pub version: String,
1365    pub api_version: u32,
1366    pub block_delay: u64,
1367}
1368
1369#[derive(Debug, Clone, Serialize, Deserialize)]
1370pub struct KeyInfo {
1371    #[serde(rename = "type")]
1372    pub type_: String,
1373    pub private_key: Vec<u8>,
1374}
1375
1376#[async_trait::async_trait]
1377pub trait FullNodeApi {
1378    async fn auth_new(&self, permissions: Vec<String>) -> Result<Vec<u8>, Error>;
1379    async fn auth_verify(&self, string: String) -> Result<Vec<String>, Error>;
1380    async fn chain_blockstore_info(&self) -> Result<HashMap<String, Value>, Error>;
1381    async fn chain_check_blockstore(&self) -> Result<(), Error>;
1382    async fn chain_delete_obj(&self, cid: Cid) -> Result<(), Error>;
1383    async fn chain_export(
1384        &self,
1385        chain_epoch: i64,
1386        bool: bool,
1387        tip_set_key: Option<TipSetKey>,
1388    ) -> Result<mpsc::Receiver<Vec<u8>>, Error>;
1389    async fn chain_export_range_internal(
1390        &self,
1391        tip_set_key: Option<TipSetKey>,
1392        tip_set_key1: Option<TipSetKey>,
1393        chain_export_config: ChainExportConfig,
1394    ) -> Result<(), Error>;
1395    async fn chain_get_block(&self, cid: Cid) -> Result<Option<BlockHeader>, Error>;
1396    async fn chain_get_block_messages(&self, cid: Cid) -> Result<Option<BlockMessages>, Error>;
1397    async fn chain_get_events(&self, cid: Cid) -> Result<Vec<Event>, Error>;
1398    async fn chain_get_genesis(&self) -> Result<Option<TipSet>, Error>;
1399    async fn chain_get_message(&self, cid: Cid) -> Result<Option<Message>, Error>;
1400    async fn chain_get_messages_in_tipset(
1401        &self,
1402        tip_set_key: Option<TipSetKey>,
1403    ) -> Result<Vec<Message>, Error>;
1404    async fn chain_get_node(&self, string: String) -> Result<Option<IpldObject>, Error>;
1405    async fn chain_get_parent_messages(&self, cid: Cid) -> Result<Vec<Message>, Error>;
1406    async fn chain_get_parent_receipts(
1407        &self,
1408        cid: Cid,
1409    ) -> Result<Vec<Option<MessageReceipt>>, Error>;
1410    async fn chain_get_path(
1411        &self,
1412        tip_set_key: Option<TipSetKey>,
1413        tip_set_key1: Option<TipSetKey>,
1414    ) -> Result<Vec<Option<HeadChange>>, Error>;
1415    async fn chain_get_tip_set(
1416        &self,
1417        tip_set_key: Option<TipSetKey>,
1418    ) -> Result<Option<TipSet>, Error>;
1419    async fn chain_get_tip_set_after_height(
1420        &self,
1421        chain_epoch: i64,
1422        tip_set_key: Option<TipSetKey>,
1423    ) -> Result<Option<TipSet>, Error>;
1424    async fn chain_get_tip_set_by_height(
1425        &self,
1426        chain_epoch: i64,
1427        tip_set_key: Option<TipSetKey>,
1428    ) -> Result<Option<TipSet>, Error>;
1429    async fn chain_has_obj(&self, cid: Cid) -> Result<bool, Error>;
1430    async fn chain_head(&self) -> Result<Option<TipSet>, Error>;
1431    async fn chain_hot_gc(&self, hot_gc_opts: HotGCOpts) -> Result<(), Error>;
1432    async fn chain_notify(&self) -> Result<mpsc::Receiver<Vec<Option<HeadChange>>>, Error>;
1433    async fn chain_prune(&self, prune_opts: PruneOpts) -> Result<(), Error>;
1434    async fn chain_put_obj(&self, block: Value) -> Result<(), Error>;
1435    async fn chain_read_obj(&self, cid: Cid) -> Result<Vec<u8>, Error>;
1436    async fn chain_set_head(&self, tip_set_key: Option<TipSetKey>) -> Result<(), Error>;
1437    async fn chain_stat_obj(&self, cid: Cid, cid1: Cid) -> Result<ObjStat, Error>;
1438    async fn chain_tip_set_weight(&self, tip_set_key: Option<TipSetKey>) -> Result<String, Error>;
1439    async fn closing(&self) -> Result<mpsc::Receiver<()>, Error>;
1440    async fn create_backup(&self, string: String) -> Result<(), Error>;
1441    async fn discover(&self) -> Result<HashMap<String, Value>, Error>;
1442    async fn eth_accounts(&self) -> Result<Vec<[u8; 20]>, Error>;
1443    async fn eth_address_to_filecoin_address(&self, eth_address: [u8; 20])
1444        -> Result<String, Error>;
1445    async fn eth_block_number(&self) -> Result<u64, Error>;
1446    async fn eth_call(
1447        &self,
1448        eth_call: EthCall,
1449        eth_block_number_or_hash: EthBlockNumberOrHash,
1450    ) -> Result<Vec<u8>, Error>;
1451    async fn eth_chain_id(&self) -> Result<u64, Error>;
1452    async fn eth_estimate_gas(&self, uint8s: Vec<u8>) -> Result<u64, Error>;
1453    async fn eth_fee_history(&self, uint8s: Vec<u8>) -> Result<EthFeeHistory, Error>;
1454    async fn eth_gas_price(&self) -> Result<EthBigInt, Error>;
1455    async fn eth_get_balance(
1456        &self,
1457        eth_address: [u8; 20],
1458        eth_block_number_or_hash: EthBlockNumberOrHash,
1459    ) -> Result<EthBigInt, Error>;
1460    async fn eth_get_block_by_hash(
1461        &self,
1462        eth_hash: [u8; 32],
1463        bool: bool,
1464    ) -> Result<EthBlock, Error>;
1465    async fn eth_get_block_by_number(&self, string: String, bool: bool) -> Result<EthBlock, Error>;
1466    async fn eth_get_block_receipts(
1467        &self,
1468        eth_block_number_or_hash: EthBlockNumberOrHash,
1469    ) -> Result<Vec<Option<EthTxReceipt>>, Error>;
1470    async fn eth_get_block_receipts_limited(
1471        &self,
1472        eth_block_number_or_hash: EthBlockNumberOrHash,
1473        chain_epoch: i64,
1474    ) -> Result<Vec<Option<EthTxReceipt>>, Error>;
1475    async fn eth_get_block_transaction_count_by_hash(
1476        &self,
1477        eth_hash: [u8; 32],
1478    ) -> Result<u64, Error>;
1479    async fn eth_get_block_transaction_count_by_number(
1480        &self,
1481        eth_uint64: u64,
1482    ) -> Result<u64, Error>;
1483    async fn eth_get_code(
1484        &self,
1485        eth_address: [u8; 20],
1486        eth_block_number_or_hash: EthBlockNumberOrHash,
1487    ) -> Result<Vec<u8>, Error>;
1488    async fn eth_get_filter_changes(
1489        &self,
1490        eth_filter_id: [u8; 32],
1491    ) -> Result<Option<EthFilterResult>, Error>;
1492    async fn eth_get_filter_logs(
1493        &self,
1494        eth_filter_id: [u8; 32],
1495    ) -> Result<Option<EthFilterResult>, Error>;
1496    async fn eth_get_logs(
1497        &self,
1498        eth_filter_spec: Option<EthFilterSpec>,
1499    ) -> Result<Option<EthFilterResult>, Error>;
1500    async fn eth_get_message_cid_by_transaction_hash(
1501        &self,
1502        eth_hash: Option<[u8; 32]>,
1503    ) -> Result<Option<Cid>, Error>;
1504    async fn eth_get_storage_at(
1505        &self,
1506        eth_address: [u8; 20],
1507        uint8s: Vec<u8>,
1508        eth_block_number_or_hash: EthBlockNumberOrHash,
1509    ) -> Result<Vec<u8>, Error>;
1510    async fn eth_get_transaction_by_block_hash_and_index(
1511        &self,
1512        eth_hash: [u8; 32],
1513        eth_uint64: u64,
1514    ) -> Result<EthTx, Error>;
1515    async fn eth_get_transaction_by_block_number_and_index(
1516        &self,
1517        eth_uint64: u64,
1518        eth_uint641: u64,
1519    ) -> Result<EthTx, Error>;
1520    async fn eth_get_transaction_by_hash(
1521        &self,
1522        eth_hash: Option<[u8; 32]>,
1523    ) -> Result<Option<EthTx>, Error>;
1524    async fn eth_get_transaction_by_hash_limited(
1525        &self,
1526        eth_hash: Option<[u8; 32]>,
1527        chain_epoch: i64,
1528    ) -> Result<Option<EthTx>, Error>;
1529    async fn eth_get_transaction_count(
1530        &self,
1531        eth_address: [u8; 20],
1532        eth_block_number_or_hash: EthBlockNumberOrHash,
1533    ) -> Result<u64, Error>;
1534    async fn eth_get_transaction_hash_by_cid(&self, cid: Cid) -> Result<Option<[u8; 32]>, Error>;
1535    async fn eth_get_transaction_receipt(
1536        &self,
1537        eth_hash: [u8; 32],
1538    ) -> Result<Option<EthTxReceipt>, Error>;
1539    async fn eth_get_transaction_receipt_limited(
1540        &self,
1541        eth_hash: [u8; 32],
1542        chain_epoch: i64,
1543    ) -> Result<Option<EthTxReceipt>, Error>;
1544    async fn eth_max_priority_fee_per_gas(&self) -> Result<EthBigInt, Error>;
1545    async fn eth_new_block_filter(&self) -> Result<[u8; 32], Error>;
1546    async fn eth_new_filter(
1547        &self,
1548        eth_filter_spec: Option<EthFilterSpec>,
1549    ) -> Result<[u8; 32], Error>;
1550    async fn eth_new_pending_transaction_filter(&self) -> Result<[u8; 32], Error>;
1551    async fn eth_protocol_version(&self) -> Result<u64, Error>;
1552    async fn eth_send_raw_transaction(&self, uint8s: Vec<u8>) -> Result<[u8; 32], Error>;
1553    async fn eth_send_raw_transaction_untrusted(&self, uint8s: Vec<u8>) -> Result<[u8; 32], Error>;
1554    async fn eth_subscribe(&self, uint8s: Vec<u8>) -> Result<[u8; 32], Error>;
1555    async fn eth_syncing(&self) -> Result<EthSyncingResult, Error>;
1556    async fn eth_trace_block(&self, string: String) -> Result<Vec<Option<EthTraceBlock>>, Error>;
1557    async fn eth_trace_filter(
1558        &self,
1559        eth_trace_filter_criteria: EthTraceFilterCriteria,
1560    ) -> Result<Vec<Option<EthTraceFilterResult>>, Error>;
1561    async fn eth_trace_replay_block_transactions(
1562        &self,
1563        string: String,
1564        strings: Vec<String>,
1565    ) -> Result<Vec<Option<EthTraceReplayBlockTransaction>>, Error>;
1566    async fn eth_trace_transaction(
1567        &self,
1568        string: String,
1569    ) -> Result<Vec<Option<EthTraceTransaction>>, Error>;
1570    async fn eth_uninstall_filter(&self, eth_filter_id: [u8; 32]) -> Result<bool, Error>;
1571    async fn eth_unsubscribe(&self, eth_subscription_id: [u8; 32]) -> Result<bool, Error>;
1572    async fn f3_get_certificate(&self, uint64: u64) -> Result<Option<FinalityCertificate>, Error>;
1573    async fn f3_get_ec_power_table(
1574        &self,
1575        tip_set_key: Option<TipSetKey>,
1576    ) -> Result<Vec<PowerEntry>, Error>;
1577    async fn f3_get_f3_power_table(
1578        &self,
1579        tip_set_key: Option<TipSetKey>,
1580    ) -> Result<Vec<PowerEntry>, Error>;
1581    async fn f3_get_latest_certificate(&self) -> Result<Option<FinalityCertificate>, Error>;
1582    async fn f3_get_manifest(&self) -> Result<Option<Manifest>, Error>;
1583    async fn f3_get_or_renew_participation_ticket(
1584        &self,
1585        address: String,
1586        uint8s: Vec<u8>,
1587        uint64: u64,
1588    ) -> Result<Vec<u8>, Error>;
1589    async fn f3_get_progress(&self) -> Result<Instant, Error>;
1590    async fn f3_is_running(&self) -> Result<bool, Error>;
1591    async fn f3_list_participants(&self) -> Result<Vec<F3Participant>, Error>;
1592    async fn f3_participate(&self, uint8s: Vec<u8>) -> Result<F3ParticipationLease, Error>;
1593    async fn filecoin_address_to_eth_address(&self, uint8s: Vec<u8>) -> Result<[u8; 20], Error>;
1594    async fn gas_estimate_fee_cap(
1595        &self,
1596        message: Option<Message>,
1597        int64: i64,
1598        tip_set_key: Option<TipSetKey>,
1599    ) -> Result<String, Error>;
1600    async fn gas_estimate_gas_limit(
1601        &self,
1602        message: Option<Message>,
1603        tip_set_key: Option<TipSetKey>,
1604    ) -> Result<i64, Error>;
1605    async fn gas_estimate_gas_premium(
1606        &self,
1607        uint64: u64,
1608        address: String,
1609        int64: i64,
1610        tip_set_key: Option<TipSetKey>,
1611    ) -> Result<String, Error>;
1612    async fn gas_estimate_message_gas(
1613        &self,
1614        message: Option<Message>,
1615        message_send_spec: Option<MessageSendSpec>,
1616        tip_set_key: Option<TipSetKey>,
1617    ) -> Result<Option<Message>, Error>;
1618    async fn get_actor_events_raw(
1619        &self,
1620        actor_event_filter: Option<ActorEventFilter>,
1621    ) -> Result<Vec<Option<ActorEvent>>, Error>;
1622    async fn id(&self) -> Result<String, Error>;
1623    async fn log_alerts(&self) -> Result<Vec<Alert>, Error>;
1624    async fn log_list(&self) -> Result<Vec<String>, Error>;
1625    async fn log_set_level(&self, string: String, string1: String) -> Result<(), Error>;
1626    async fn market_add_balance(
1627        &self,
1628        address: String,
1629        address1: String,
1630        int: String,
1631    ) -> Result<Cid, Error>;
1632    async fn market_get_reserved(&self, address: String) -> Result<String, Error>;
1633    async fn market_release_funds(&self, address: String, int: String) -> Result<(), Error>;
1634    async fn market_reserve_funds(
1635        &self,
1636        address: String,
1637        address1: String,
1638        int: String,
1639    ) -> Result<Cid, Error>;
1640    async fn market_withdraw(
1641        &self,
1642        address: String,
1643        address1: String,
1644        int: String,
1645    ) -> Result<Cid, Error>;
1646    async fn miner_create_block(
1647        &self,
1648        block_template: Option<BlockTemplate>,
1649    ) -> Result<Option<BlockMsg>, Error>;
1650    async fn miner_get_base_info(
1651        &self,
1652        address: String,
1653        chain_epoch: i64,
1654        tip_set_key: Option<TipSetKey>,
1655    ) -> Result<Option<MiningBaseInfo>, Error>;
1656    async fn mpool_batch_push(&self, s: Vec<Option<SignedMessage>>) -> Result<Vec<Cid>, Error>;
1657    async fn mpool_batch_push_message(
1658        &self,
1659        s: Vec<Option<Message>>,
1660        message_send_spec: Option<MessageSendSpec>,
1661    ) -> Result<Vec<Option<SignedMessage>>, Error>;
1662    async fn mpool_batch_push_untrusted(
1663        &self,
1664        s: Vec<Option<SignedMessage>>,
1665    ) -> Result<Vec<Cid>, Error>;
1666    async fn mpool_check_messages(
1667        &self,
1668        s: Vec<Option<MessagePrototype>>,
1669    ) -> Result<Vec<Vec<MessageCheckStatus>>, Error>;
1670    async fn mpool_check_pending_messages(
1671        &self,
1672        address: String,
1673    ) -> Result<Vec<Vec<MessageCheckStatus>>, Error>;
1674    async fn mpool_check_replace_messages(
1675        &self,
1676        s: Vec<Option<Message>>,
1677    ) -> Result<Vec<Vec<MessageCheckStatus>>, Error>;
1678    async fn mpool_clear(&self, bool: bool) -> Result<(), Error>;
1679    async fn mpool_get_config(&self) -> Result<Option<MpoolConfig>, Error>;
1680    async fn mpool_get_nonce(&self, address: String) -> Result<u64, Error>;
1681    async fn mpool_pending(
1682        &self,
1683        tip_set_key: Option<TipSetKey>,
1684    ) -> Result<Vec<Option<SignedMessage>>, Error>;
1685    async fn mpool_push(&self, signed_message: Option<SignedMessage>) -> Result<Cid, Error>;
1686    async fn mpool_push_message(
1687        &self,
1688        message: Option<Message>,
1689        message_send_spec: Option<MessageSendSpec>,
1690    ) -> Result<Option<SignedMessage>, Error>;
1691    async fn mpool_push_untrusted(
1692        &self,
1693        signed_message: Option<SignedMessage>,
1694    ) -> Result<Cid, Error>;
1695    async fn mpool_select(
1696        &self,
1697        tip_set_key: Option<TipSetKey>,
1698        float64: f64,
1699    ) -> Result<Vec<Option<SignedMessage>>, Error>;
1700    async fn mpool_set_config(&self, mpool_config: Option<MpoolConfig>) -> Result<(), Error>;
1701    async fn mpool_sub(&self) -> Result<mpsc::Receiver<MpoolUpdate>, Error>;
1702    async fn msig_add_approve(
1703        &self,
1704        address: String,
1705        address1: String,
1706        uint64: u64,
1707        address2: String,
1708        address3: String,
1709        bool: bool,
1710    ) -> Result<Option<MessagePrototype>, Error>;
1711    async fn msig_add_cancel(
1712        &self,
1713        address: String,
1714        address1: String,
1715        uint64: u64,
1716        address2: String,
1717        bool: bool,
1718    ) -> Result<Option<MessagePrototype>, Error>;
1719    async fn msig_add_propose(
1720        &self,
1721        address: String,
1722        address1: String,
1723        address2: String,
1724        bool: bool,
1725    ) -> Result<Option<MessagePrototype>, Error>;
1726    async fn msig_approve(
1727        &self,
1728        address: String,
1729        uint64: u64,
1730        address1: String,
1731    ) -> Result<Option<MessagePrototype>, Error>;
1732    async fn msig_approve_txn_hash(
1733        &self,
1734        address: String,
1735        uint64: u64,
1736        address1: String,
1737        address2: String,
1738        int: String,
1739        address3: String,
1740        uint641: u64,
1741        uint8s: Vec<u8>,
1742    ) -> Result<Option<MessagePrototype>, Error>;
1743    async fn msig_cancel(
1744        &self,
1745        address: String,
1746        uint64: u64,
1747        address1: String,
1748    ) -> Result<Option<MessagePrototype>, Error>;
1749    async fn msig_cancel_txn_hash(
1750        &self,
1751        address: String,
1752        uint64: u64,
1753        address1: String,
1754        int: String,
1755        address2: String,
1756        uint641: u64,
1757        uint8s: Vec<u8>,
1758    ) -> Result<Option<MessagePrototype>, Error>;
1759    async fn msig_create(
1760        &self,
1761        uint64: u64,
1762        addresss: Vec<String>,
1763        chain_epoch: i64,
1764        int: String,
1765        address: String,
1766        int1: String,
1767    ) -> Result<Option<MessagePrototype>, Error>;
1768    async fn msig_get_available_balance(
1769        &self,
1770        address: String,
1771        tip_set_key: Option<TipSetKey>,
1772    ) -> Result<String, Error>;
1773    async fn msig_get_pending(
1774        &self,
1775        address: String,
1776        tip_set_key: Option<TipSetKey>,
1777    ) -> Result<Vec<Option<MsigTransaction>>, Error>;
1778    async fn msig_get_vested(
1779        &self,
1780        address: String,
1781        tip_set_key: Option<TipSetKey>,
1782        tip_set_key1: Option<TipSetKey>,
1783    ) -> Result<String, Error>;
1784    async fn msig_get_vesting_schedule(
1785        &self,
1786        address: String,
1787        tip_set_key: Option<TipSetKey>,
1788    ) -> Result<MsigVesting, Error>;
1789    async fn msig_propose(
1790        &self,
1791        address: String,
1792        address1: String,
1793        int: String,
1794        address2: String,
1795        uint64: u64,
1796        uint8s: Vec<u8>,
1797    ) -> Result<Option<MessagePrototype>, Error>;
1798    async fn msig_remove_signer(
1799        &self,
1800        address: String,
1801        address1: String,
1802        address2: String,
1803        bool: bool,
1804    ) -> Result<Option<MessagePrototype>, Error>;
1805    async fn msig_swap_approve(
1806        &self,
1807        address: String,
1808        address1: String,
1809        uint64: u64,
1810        address2: String,
1811        address3: String,
1812        address4: String,
1813    ) -> Result<Option<MessagePrototype>, Error>;
1814    async fn msig_swap_cancel(
1815        &self,
1816        address: String,
1817        address1: String,
1818        uint64: u64,
1819        address2: String,
1820        address3: String,
1821    ) -> Result<Option<MessagePrototype>, Error>;
1822    async fn msig_swap_propose(
1823        &self,
1824        address: String,
1825        address1: String,
1826        address2: String,
1827        address3: String,
1828    ) -> Result<Option<MessagePrototype>, Error>;
1829    async fn net_addrs_listen(&self) -> Result<AddrInfo, Error>;
1830    async fn net_agent_version(&self, id: String) -> Result<String, Error>;
1831    async fn net_auto_nat_status(&self) -> Result<NatInfo, Error>;
1832    async fn net_bandwidth_stats(&self) -> Result<Stats, Error>;
1833    async fn net_bandwidth_stats_by_peer(&self) -> Result<HashMap<String, Stats>, Error>;
1834    async fn net_bandwidth_stats_by_protocol(&self) -> Result<HashMap<String, Stats>, Error>;
1835    async fn net_block_add(&self, net_block_list: NetBlockList) -> Result<(), Error>;
1836    async fn net_block_list(&self) -> Result<NetBlockList, Error>;
1837    async fn net_block_remove(&self, net_block_list: NetBlockList) -> Result<(), Error>;
1838    async fn net_connect(&self, addr_info: AddrInfo) -> Result<(), Error>;
1839    async fn net_connectedness(&self, id: String) -> Result<i32, Error>;
1840    async fn net_disconnect(&self, id: String) -> Result<(), Error>;
1841    async fn net_find_peer(&self, id: String) -> Result<AddrInfo, Error>;
1842    async fn net_limit(&self, string: String) -> Result<NetLimit, Error>;
1843    async fn net_listening(&self) -> Result<bool, Error>;
1844    async fn net_peer_info(&self, id: String) -> Result<Option<ExtendedPeerInfo>, Error>;
1845    async fn net_peers(&self) -> Result<Vec<AddrInfo>, Error>;
1846    async fn net_ping(&self, id: String) -> Result<i64, Error>;
1847    async fn net_protect_add(&self, ids: Vec<String>) -> Result<(), Error>;
1848    async fn net_protect_list(&self) -> Result<Vec<String>, Error>;
1849    async fn net_protect_remove(&self, ids: Vec<String>) -> Result<(), Error>;
1850    async fn net_pubsub_scores(&self) -> Result<Vec<PubsubScore>, Error>;
1851    async fn net_set_limit(&self, string: String, net_limit: NetLimit) -> Result<(), Error>;
1852    async fn net_stat(&self, string: String) -> Result<NetStat, Error>;
1853    async fn net_version(&self) -> Result<String, Error>;
1854    async fn node_status(&self, bool: bool) -> Result<NodeStatus, Error>;
1855    async fn paych_allocate_lane(&self, address: String) -> Result<u64, Error>;
1856    async fn paych_available_funds(
1857        &self,
1858        address: String,
1859    ) -> Result<Option<ChannelAvailableFunds>, Error>;
1860    async fn paych_available_funds_by_from_to(
1861        &self,
1862        address: String,
1863        address1: String,
1864    ) -> Result<Option<ChannelAvailableFunds>, Error>;
1865    async fn paych_collect(&self, address: String) -> Result<Cid, Error>;
1866    async fn paych_fund(
1867        &self,
1868        address: String,
1869        address1: String,
1870        int: String,
1871    ) -> Result<Option<ChannelInfo>, Error>;
1872    async fn paych_get(
1873        &self,
1874        address: String,
1875        address1: String,
1876        int: String,
1877        paych_get_opts: PaychGetOpts,
1878    ) -> Result<Option<ChannelInfo>, Error>;
1879    async fn paych_get_wait_ready(&self, cid: Cid) -> Result<String, Error>;
1880    async fn paych_list(&self) -> Result<Vec<String>, Error>;
1881    async fn paych_new_payment(
1882        &self,
1883        address: String,
1884        address1: String,
1885        voucher_specs: Vec<VoucherSpec>,
1886    ) -> Result<Option<PaymentInfo>, Error>;
1887    async fn paych_settle(&self, address: String) -> Result<Cid, Error>;
1888    async fn paych_status(&self, address: String) -> Result<Option<PaychStatus>, Error>;
1889    async fn paych_voucher_add(
1890        &self,
1891        address: String,
1892        signed_voucher: Option<SignedVoucher>,
1893        uint8s: Vec<u8>,
1894        int: String,
1895    ) -> Result<String, Error>;
1896    async fn paych_voucher_check_spendable(
1897        &self,
1898        address: String,
1899        signed_voucher: Option<SignedVoucher>,
1900        uint8s: Vec<u8>,
1901        uint8s1: Vec<u8>,
1902    ) -> Result<bool, Error>;
1903    async fn paych_voucher_check_valid(
1904        &self,
1905        address: String,
1906        signed_voucher: Option<SignedVoucher>,
1907    ) -> Result<(), Error>;
1908    async fn paych_voucher_create(
1909        &self,
1910        address: String,
1911        int: String,
1912        uint64: u64,
1913    ) -> Result<Option<VoucherCreateResult>, Error>;
1914    async fn paych_voucher_list(
1915        &self,
1916        address: String,
1917    ) -> Result<Vec<Option<SignedVoucher>>, Error>;
1918    async fn paych_voucher_submit(
1919        &self,
1920        address: String,
1921        signed_voucher: Option<SignedVoucher>,
1922        uint8s: Vec<u8>,
1923        uint8s1: Vec<u8>,
1924    ) -> Result<Cid, Error>;
1925    async fn session(&self) -> Result<[u8; 16], Error>;
1926    async fn shutdown(&self) -> Result<(), Error>;
1927    async fn start_time(&self) -> Result<Time, Error>;
1928    async fn state_account_key(
1929        &self,
1930        address: String,
1931        tip_set_key: Option<TipSetKey>,
1932    ) -> Result<String, Error>;
1933    async fn state_actor_code_ci_ds(&self, version: u32) -> Result<HashMap<String, Cid>, Error>;
1934    async fn state_actor_manifest_cid(&self, version: u32) -> Result<Cid, Error>;
1935    async fn state_all_miner_faults(
1936        &self,
1937        chain_epoch: i64,
1938        tip_set_key: Option<TipSetKey>,
1939    ) -> Result<Vec<Option<Fault>>, Error>;
1940    async fn state_call(
1941        &self,
1942        message: Option<Message>,
1943        tip_set_key: Option<TipSetKey>,
1944    ) -> Result<Option<InvocResult>, Error>;
1945    async fn state_changed_actors(
1946        &self,
1947        cid: Cid,
1948        cid1: Cid,
1949    ) -> Result<HashMap<String, ActorV5>, Error>;
1950    async fn state_circulating_supply(
1951        &self,
1952        tip_set_key: Option<TipSetKey>,
1953    ) -> Result<String, Error>;
1954    async fn state_compute(
1955        &self,
1956        chain_epoch: i64,
1957        s: Vec<Option<Message>>,
1958        tip_set_key: Option<TipSetKey>,
1959    ) -> Result<Option<ComputeStateOutput>, Error>;
1960    async fn state_compute_data_cid(
1961        &self,
1962        address: String,
1963        registered_seal_proof: i64,
1964        deal_ids: Vec<u64>,
1965        tip_set_key: Option<TipSetKey>,
1966    ) -> Result<Cid, Error>;
1967    async fn state_deal_provider_collateral_bounds(
1968        &self,
1969        padded_piece_size: u64,
1970        bool: bool,
1971        tip_set_key: Option<TipSetKey>,
1972    ) -> Result<DealCollateralBounds, Error>;
1973    async fn state_decode_params(
1974        &self,
1975        address: String,
1976        method_num: u64,
1977        uint8s: Vec<u8>,
1978        tip_set_key: Option<TipSetKey>,
1979    ) -> Result<Value, Error>;
1980    async fn state_encode_params(
1981        &self,
1982        cid: Cid,
1983        method_num: u64,
1984        uint8s: Vec<u8>,
1985    ) -> Result<Vec<u8>, Error>;
1986    async fn state_get_actor(
1987        &self,
1988        address: String,
1989        tip_set_key: Option<TipSetKey>,
1990    ) -> Result<Option<ActorV5>, Error>;
1991    async fn state_get_all_allocations(
1992        &self,
1993        tip_set_key: Option<TipSetKey>,
1994    ) -> Result<HashMap<u64, Allocation>, Error>;
1995    async fn state_get_all_claims(
1996        &self,
1997        tip_set_key: Option<TipSetKey>,
1998    ) -> Result<HashMap<u64, Claim>, Error>;
1999    async fn state_get_allocation(
2000        &self,
2001        address: String,
2002        allocation_id: u64,
2003        tip_set_key: Option<TipSetKey>,
2004    ) -> Result<Option<Allocation>, Error>;
2005    async fn state_get_allocation_for_pending_deal(
2006        &self,
2007        deal_id: u64,
2008        tip_set_key: Option<TipSetKey>,
2009    ) -> Result<Option<Allocation>, Error>;
2010    async fn state_get_allocation_id_for_pending_deal(
2011        &self,
2012        deal_id: u64,
2013        tip_set_key: Option<TipSetKey>,
2014    ) -> Result<u64, Error>;
2015    async fn state_get_allocations(
2016        &self,
2017        address: String,
2018        tip_set_key: Option<TipSetKey>,
2019    ) -> Result<HashMap<u64, Allocation>, Error>;
2020    async fn state_get_beacon_entry(&self, chain_epoch: i64) -> Result<Option<BeaconEntry>, Error>;
2021    async fn state_get_claim(
2022        &self,
2023        address: String,
2024        claim_id: u64,
2025        tip_set_key: Option<TipSetKey>,
2026    ) -> Result<Option<Claim>, Error>;
2027    async fn state_get_claims(
2028        &self,
2029        address: String,
2030        tip_set_key: Option<TipSetKey>,
2031    ) -> Result<HashMap<u64, Claim>, Error>;
2032    async fn state_get_network_params(&self) -> Result<Option<NetworkParams>, Error>;
2033    async fn state_get_randomness_digest_from_beacon(
2034        &self,
2035        chain_epoch: i64,
2036        tip_set_key: Option<TipSetKey>,
2037    ) -> Result<String, Error>;
2038    async fn state_get_randomness_digest_from_tickets(
2039        &self,
2040        chain_epoch: i64,
2041        tip_set_key: Option<TipSetKey>,
2042    ) -> Result<String, Error>;
2043    async fn state_get_randomness_from_beacon(
2044        &self,
2045        domain_separation_tag: i64,
2046        chain_epoch: i64,
2047        uint8s: Vec<u8>,
2048        tip_set_key: Option<TipSetKey>,
2049    ) -> Result<String, Error>;
2050    async fn state_get_randomness_from_tickets(
2051        &self,
2052        domain_separation_tag: i64,
2053        chain_epoch: i64,
2054        uint8s: Vec<u8>,
2055        tip_set_key: Option<TipSetKey>,
2056    ) -> Result<String, Error>;
2057    async fn state_list_actors(&self, tip_set_key: Option<TipSetKey>)
2058        -> Result<Vec<String>, Error>;
2059    async fn state_list_messages(
2060        &self,
2061        message_match: Option<MessageMatch>,
2062        tip_set_key: Option<TipSetKey>,
2063        chain_epoch: i64,
2064    ) -> Result<Vec<Cid>, Error>;
2065    async fn state_list_miners(&self, tip_set_key: Option<TipSetKey>)
2066        -> Result<Vec<String>, Error>;
2067    async fn state_lookup_id(
2068        &self,
2069        address: String,
2070        tip_set_key: Option<TipSetKey>,
2071    ) -> Result<String, Error>;
2072    async fn state_lookup_robust_address(
2073        &self,
2074        address: String,
2075        tip_set_key: Option<TipSetKey>,
2076    ) -> Result<String, Error>;
2077    async fn state_market_balance(
2078        &self,
2079        address: String,
2080        tip_set_key: Option<TipSetKey>,
2081    ) -> Result<MarketBalance, Error>;
2082    async fn state_market_deals(
2083        &self,
2084        tip_set_key: Option<TipSetKey>,
2085    ) -> Result<HashMap<String, Option<MarketDeal>>, Error>;
2086    async fn state_market_participants(
2087        &self,
2088        tip_set_key: Option<TipSetKey>,
2089    ) -> Result<HashMap<String, MarketBalance>, Error>;
2090    async fn state_market_storage_deal(
2091        &self,
2092        deal_id: u64,
2093        tip_set_key: Option<TipSetKey>,
2094    ) -> Result<Option<MarketDeal>, Error>;
2095    async fn state_miner_active_sectors(
2096        &self,
2097        address: String,
2098        tip_set_key: Option<TipSetKey>,
2099    ) -> Result<Vec<Option<SectorOnChainInfo>>, Error>;
2100    async fn state_miner_allocated(
2101        &self,
2102        address: String,
2103        tip_set_key: Option<TipSetKey>,
2104    ) -> Result<Option<BitField>, Error>;
2105    async fn state_miner_available_balance(
2106        &self,
2107        address: String,
2108        tip_set_key: Option<TipSetKey>,
2109    ) -> Result<String, Error>;
2110    async fn state_miner_deadlines(
2111        &self,
2112        address: String,
2113        tip_set_key: Option<TipSetKey>,
2114    ) -> Result<Vec<Deadline>, Error>;
2115    async fn state_miner_faults(
2116        &self,
2117        address: String,
2118        tip_set_key: Option<TipSetKey>,
2119    ) -> Result<BitField, Error>;
2120    async fn state_miner_info(
2121        &self,
2122        address: String,
2123        tip_set_key: Option<TipSetKey>,
2124    ) -> Result<MinerInfo, Error>;
2125    async fn state_miner_initial_pledge_collateral(
2126        &self,
2127        address: String,
2128        sector_pre_commit_info: SectorPreCommitInfo,
2129        tip_set_key: Option<TipSetKey>,
2130    ) -> Result<String, Error>;
2131    async fn state_miner_initial_pledge_for_sector(
2132        &self,
2133        chain_epoch: i64,
2134        sector_size: u64,
2135        uint64: u64,
2136        tip_set_key: Option<TipSetKey>,
2137    ) -> Result<String, Error>;
2138    async fn state_miner_partitions(
2139        &self,
2140        address: String,
2141        uint64: u64,
2142        tip_set_key: Option<TipSetKey>,
2143    ) -> Result<Vec<Partition>, Error>;
2144    async fn state_miner_power(
2145        &self,
2146        address: String,
2147        tip_set_key: Option<TipSetKey>,
2148    ) -> Result<Option<MinerPower>, Error>;
2149    async fn state_miner_pre_commit_deposit_for_power(
2150        &self,
2151        address: String,
2152        sector_pre_commit_info: SectorPreCommitInfo,
2153        tip_set_key: Option<TipSetKey>,
2154    ) -> Result<String, Error>;
2155    async fn state_miner_proving_deadline(
2156        &self,
2157        address: String,
2158        tip_set_key: Option<TipSetKey>,
2159    ) -> Result<Option<Info>, Error>;
2160    async fn state_miner_recoveries(
2161        &self,
2162        address: String,
2163        tip_set_key: Option<TipSetKey>,
2164    ) -> Result<BitField, Error>;
2165    async fn state_miner_sector_allocated(
2166        &self,
2167        address: String,
2168        sector_number: u64,
2169        tip_set_key: Option<TipSetKey>,
2170    ) -> Result<bool, Error>;
2171    async fn state_miner_sector_count(
2172        &self,
2173        address: String,
2174        tip_set_key: Option<TipSetKey>,
2175    ) -> Result<MinerSectors, Error>;
2176    async fn state_miner_sectors(
2177        &self,
2178        address: String,
2179        bit_field: Option<BitField>,
2180        tip_set_key: Option<TipSetKey>,
2181    ) -> Result<Vec<Option<SectorOnChainInfo>>, Error>;
2182    async fn state_network_name(&self) -> Result<String, Error>;
2183    async fn state_network_version(&self, tip_set_key: Option<TipSetKey>) -> Result<u32, Error>;
2184    async fn state_read_state(
2185        &self,
2186        address: String,
2187        tip_set_key: Option<TipSetKey>,
2188    ) -> Result<Option<ActorState>, Error>;
2189    async fn state_replay(
2190        &self,
2191        tip_set_key: Option<TipSetKey>,
2192        cid: Cid,
2193    ) -> Result<Option<InvocResult>, Error>;
2194    async fn state_search_msg(
2195        &self,
2196        tip_set_key: Option<TipSetKey>,
2197        cid: Cid,
2198        chain_epoch: i64,
2199        bool: bool,
2200    ) -> Result<Option<MsgLookup>, Error>;
2201    async fn state_sector_expiration(
2202        &self,
2203        address: String,
2204        sector_number: u64,
2205        tip_set_key: Option<TipSetKey>,
2206    ) -> Result<Option<SectorExpiration>, Error>;
2207    async fn state_sector_get_info(
2208        &self,
2209        address: String,
2210        sector_number: u64,
2211        tip_set_key: Option<TipSetKey>,
2212    ) -> Result<Option<SectorOnChainInfo>, Error>;
2213    async fn state_sector_partition(
2214        &self,
2215        address: String,
2216        sector_number: u64,
2217        tip_set_key: Option<TipSetKey>,
2218    ) -> Result<Option<SectorLocation>, Error>;
2219    async fn state_sector_pre_commit_info(
2220        &self,
2221        address: String,
2222        sector_number: u64,
2223        tip_set_key: Option<TipSetKey>,
2224    ) -> Result<Option<SectorPreCommitOnChainInfo>, Error>;
2225    async fn state_vm_circulating_supply_internal(
2226        &self,
2227        tip_set_key: Option<TipSetKey>,
2228    ) -> Result<CirculatingSupply, Error>;
2229    async fn state_verified_client_status(
2230        &self,
2231        address: String,
2232        tip_set_key: Option<TipSetKey>,
2233    ) -> Result<Option<String>, Error>;
2234    async fn state_verified_registry_root_key(
2235        &self,
2236        tip_set_key: Option<TipSetKey>,
2237    ) -> Result<String, Error>;
2238    async fn state_verifier_status(
2239        &self,
2240        address: String,
2241        tip_set_key: Option<TipSetKey>,
2242    ) -> Result<Option<String>, Error>;
2243    async fn state_wait_msg(
2244        &self,
2245        cid: Cid,
2246        uint64: u64,
2247        chain_epoch: i64,
2248        bool: bool,
2249    ) -> Result<Option<MsgLookup>, Error>;
2250    async fn subscribe_actor_events_raw(
2251        &self,
2252        actor_event_filter: Option<ActorEventFilter>,
2253    ) -> Result<mpsc::Receiver<Option<ActorEvent>>, Error>;
2254    async fn sync_check_bad(&self, cid: Cid) -> Result<String, Error>;
2255    async fn sync_checkpoint(&self, tip_set_key: Option<TipSetKey>) -> Result<(), Error>;
2256    async fn sync_incoming_blocks(&self) -> Result<mpsc::Receiver<Option<BlockHeader>>, Error>;
2257    async fn sync_mark_bad(&self, cid: Cid) -> Result<(), Error>;
2258    async fn sync_state(&self) -> Result<Option<SyncState>, Error>;
2259    async fn sync_submit_block(&self, block_msg: Option<BlockMsg>) -> Result<(), Error>;
2260    async fn sync_unmark_all_bad(&self) -> Result<(), Error>;
2261    async fn sync_unmark_bad(&self, cid: Cid) -> Result<(), Error>;
2262    async fn sync_validate_tipset(&self, tip_set_key: Option<TipSetKey>) -> Result<bool, Error>;
2263    async fn version(&self) -> Result<APIVersion, Error>;
2264    async fn wallet_balance(&self, address: String) -> Result<String, Error>;
2265    async fn wallet_default_address(&self) -> Result<String, Error>;
2266    async fn wallet_delete(&self, address: String) -> Result<(), Error>;
2267    async fn wallet_export(&self, address: String) -> Result<Option<KeyInfo>, Error>;
2268    async fn wallet_has(&self, address: String) -> Result<bool, Error>;
2269    async fn wallet_import(&self, key_info: Option<KeyInfo>) -> Result<String, Error>;
2270    async fn wallet_list(&self) -> Result<Vec<String>, Error>;
2271    async fn wallet_new(&self, key_type: String) -> Result<String, Error>;
2272    async fn wallet_set_default(&self, address: String) -> Result<(), Error>;
2273    async fn wallet_sign(
2274        &self,
2275        address: String,
2276        uint8s: Vec<u8>,
2277    ) -> Result<Option<Signature>, Error>;
2278    async fn wallet_sign_message(
2279        &self,
2280        address: String,
2281        message: Option<Message>,
2282    ) -> Result<Option<SignedMessage>, Error>;
2283    async fn wallet_validate_address(&self, string: String) -> Result<String, Error>;
2284    async fn wallet_verify(
2285        &self,
2286        address: String,
2287        uint8s: Vec<u8>,
2288        signature: Option<Signature>,
2289    ) -> Result<bool, Error>;
2290    async fn web3_client_version(&self) -> Result<String, Error>;
2291}
2292
2293#[derive(Debug, Clone)]
2294pub struct FullNodeClient {
2295    client: LotusClient,
2296}
2297
2298impl FullNodeClient {
2299    pub fn new(client: LotusClient) -> Self {
2300        Self { client }
2301    }
2302}
2303
2304#[async_trait::async_trait]
2305impl FullNodeApi for FullNodeClient {
2306    async fn auth_new(&self, permissions: Vec<String>) -> Result<Vec<u8>, Error> {
2307        let params =
2308            vec![serde_json::to_value(&permissions)
2309                .map_err(|e| Error::invalid_params(e.to_string()))?];
2310        self.client.request("Filecoin.AuthNew", params).await
2311    }
2312
2313    async fn auth_verify(&self, string: String) -> Result<Vec<String>, Error> {
2314        let params =
2315            vec![serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?];
2316        self.client.request("Filecoin.AuthVerify", params).await
2317    }
2318
2319    async fn chain_blockstore_info(&self) -> Result<HashMap<String, Value>, Error> {
2320        let params = vec![];
2321        self.client
2322            .request("Filecoin.ChainBlockstoreInfo", params)
2323            .await
2324    }
2325
2326    async fn chain_check_blockstore(&self) -> Result<(), Error> {
2327        let params = vec![];
2328        self.client
2329            .request::<()>("Filecoin.ChainCheckBlockstore", params)
2330            .await
2331    }
2332
2333    async fn chain_delete_obj(&self, cid: Cid) -> Result<(), Error> {
2334        let params =
2335            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2336        self.client
2337            .request::<()>("Filecoin.ChainDeleteObj", params)
2338            .await
2339    }
2340
2341    async fn chain_export(
2342        &self,
2343        chain_epoch: i64,
2344        bool: bool,
2345        tip_set_key: Option<TipSetKey>,
2346    ) -> Result<mpsc::Receiver<Vec<u8>>, Error> {
2347        let params = vec![
2348            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
2349            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
2350            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
2351        ];
2352        self.client.subscribe("Filecoin.ChainExport", params).await
2353    }
2354
2355    async fn chain_export_range_internal(
2356        &self,
2357        tip_set_key: Option<TipSetKey>,
2358        tip_set_key1: Option<TipSetKey>,
2359        chain_export_config: ChainExportConfig,
2360    ) -> Result<(), Error> {
2361        let params = vec![
2362            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
2363            serde_json::to_value(&tip_set_key1)
2364                .map_err(|e| Error::invalid_params(e.to_string()))?,
2365            serde_json::to_value(&chain_export_config)
2366                .map_err(|e| Error::invalid_params(e.to_string()))?,
2367        ];
2368        self.client
2369            .request::<()>("Filecoin.ChainExportRangeInternal", params)
2370            .await
2371    }
2372
2373    async fn chain_get_block(&self, cid: Cid) -> Result<Option<BlockHeader>, Error> {
2374        let params =
2375            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2376        self.client.request("Filecoin.ChainGetBlock", params).await
2377    }
2378
2379    async fn chain_get_block_messages(&self, cid: Cid) -> Result<Option<BlockMessages>, Error> {
2380        let params =
2381            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2382        self.client
2383            .request("Filecoin.ChainGetBlockMessages", params)
2384            .await
2385    }
2386
2387    async fn chain_get_events(&self, cid: Cid) -> Result<Vec<Event>, Error> {
2388        let params =
2389            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2390        self.client.request("Filecoin.ChainGetEvents", params).await
2391    }
2392
2393    async fn chain_get_genesis(&self) -> Result<Option<TipSet>, Error> {
2394        let params = vec![];
2395        self.client
2396            .request("Filecoin.ChainGetGenesis", params)
2397            .await
2398    }
2399
2400    async fn chain_get_message(&self, cid: Cid) -> Result<Option<Message>, Error> {
2401        let params =
2402            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2403        self.client
2404            .request("Filecoin.ChainGetMessage", params)
2405            .await
2406    }
2407
2408    async fn chain_get_messages_in_tipset(
2409        &self,
2410        tip_set_key: Option<TipSetKey>,
2411    ) -> Result<Vec<Message>, Error> {
2412        let params =
2413            vec![serde_json::to_value(&tip_set_key)
2414                .map_err(|e| Error::invalid_params(e.to_string()))?];
2415        self.client
2416            .request("Filecoin.ChainGetMessagesInTipset", params)
2417            .await
2418    }
2419
2420    async fn chain_get_node(&self, string: String) -> Result<Option<IpldObject>, Error> {
2421        let params =
2422            vec![serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?];
2423        self.client.request("Filecoin.ChainGetNode", params).await
2424    }
2425
2426    async fn chain_get_parent_messages(&self, cid: Cid) -> Result<Vec<Message>, Error> {
2427        let params =
2428            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2429        self.client
2430            .request("Filecoin.ChainGetParentMessages", params)
2431            .await
2432    }
2433
2434    async fn chain_get_parent_receipts(
2435        &self,
2436        cid: Cid,
2437    ) -> Result<Vec<Option<MessageReceipt>>, Error> {
2438        let params =
2439            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2440        self.client
2441            .request("Filecoin.ChainGetParentReceipts", params)
2442            .await
2443    }
2444
2445    async fn chain_get_path(
2446        &self,
2447        tip_set_key: Option<TipSetKey>,
2448        tip_set_key1: Option<TipSetKey>,
2449    ) -> Result<Vec<Option<HeadChange>>, Error> {
2450        let params = vec![
2451            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
2452            serde_json::to_value(&tip_set_key1)
2453                .map_err(|e| Error::invalid_params(e.to_string()))?,
2454        ];
2455        self.client.request("Filecoin.ChainGetPath", params).await
2456    }
2457
2458    async fn chain_get_tip_set(
2459        &self,
2460        tip_set_key: Option<TipSetKey>,
2461    ) -> Result<Option<TipSet>, Error> {
2462        let params =
2463            vec![serde_json::to_value(&tip_set_key)
2464                .map_err(|e| Error::invalid_params(e.to_string()))?];
2465        self.client.request("Filecoin.ChainGetTipSet", params).await
2466    }
2467
2468    async fn chain_get_tip_set_after_height(
2469        &self,
2470        chain_epoch: i64,
2471        tip_set_key: Option<TipSetKey>,
2472    ) -> Result<Option<TipSet>, Error> {
2473        let params = vec![
2474            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
2475            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
2476        ];
2477        self.client
2478            .request("Filecoin.ChainGetTipSetAfterHeight", params)
2479            .await
2480    }
2481
2482    async fn chain_get_tip_set_by_height(
2483        &self,
2484        chain_epoch: i64,
2485        tip_set_key: Option<TipSetKey>,
2486    ) -> Result<Option<TipSet>, Error> {
2487        let params = vec![
2488            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
2489            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
2490        ];
2491        self.client
2492            .request("Filecoin.ChainGetTipSetByHeight", params)
2493            .await
2494    }
2495
2496    async fn chain_has_obj(&self, cid: Cid) -> Result<bool, Error> {
2497        let params =
2498            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2499        self.client.request("Filecoin.ChainHasObj", params).await
2500    }
2501
2502    async fn chain_head(&self) -> Result<Option<TipSet>, Error> {
2503        let params = vec![];
2504        self.client.request("Filecoin.ChainHead", params).await
2505    }
2506
2507    async fn chain_hot_gc(&self, hot_gc_opts: HotGCOpts) -> Result<(), Error> {
2508        let params =
2509            vec![serde_json::to_value(&hot_gc_opts)
2510                .map_err(|e| Error::invalid_params(e.to_string()))?];
2511        self.client
2512            .request::<()>("Filecoin.ChainHotGC", params)
2513            .await
2514    }
2515
2516    async fn chain_notify(&self) -> Result<mpsc::Receiver<Vec<Option<HeadChange>>>, Error> {
2517        let params = vec![];
2518        self.client.subscribe("Filecoin.ChainNotify", params).await
2519    }
2520
2521    async fn chain_prune(&self, prune_opts: PruneOpts) -> Result<(), Error> {
2522        let params =
2523            vec![serde_json::to_value(&prune_opts)
2524                .map_err(|e| Error::invalid_params(e.to_string()))?];
2525        self.client
2526            .request::<()>("Filecoin.ChainPrune", params)
2527            .await
2528    }
2529
2530    async fn chain_put_obj(&self, block: Value) -> Result<(), Error> {
2531        let params =
2532            vec![serde_json::to_value(&block).map_err(|e| Error::invalid_params(e.to_string()))?];
2533        self.client
2534            .request::<()>("Filecoin.ChainPutObj", params)
2535            .await
2536    }
2537
2538    async fn chain_read_obj(&self, cid: Cid) -> Result<Vec<u8>, Error> {
2539        let params =
2540            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2541        self.client.request("Filecoin.ChainReadObj", params).await
2542    }
2543
2544    async fn chain_set_head(&self, tip_set_key: Option<TipSetKey>) -> Result<(), Error> {
2545        let params =
2546            vec![serde_json::to_value(&tip_set_key)
2547                .map_err(|e| Error::invalid_params(e.to_string()))?];
2548        self.client
2549            .request::<()>("Filecoin.ChainSetHead", params)
2550            .await
2551    }
2552
2553    async fn chain_stat_obj(&self, cid: Cid, cid1: Cid) -> Result<ObjStat, Error> {
2554        let params = vec![
2555            serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?,
2556            serde_json::to_value(&cid1).map_err(|e| Error::invalid_params(e.to_string()))?,
2557        ];
2558        self.client.request("Filecoin.ChainStatObj", params).await
2559    }
2560
2561    async fn chain_tip_set_weight(&self, tip_set_key: Option<TipSetKey>) -> Result<String, Error> {
2562        let params =
2563            vec![serde_json::to_value(&tip_set_key)
2564                .map_err(|e| Error::invalid_params(e.to_string()))?];
2565        self.client
2566            .request("Filecoin.ChainTipSetWeight", params)
2567            .await
2568    }
2569
2570    async fn closing(&self) -> Result<mpsc::Receiver<()>, Error> {
2571        let params = vec![];
2572        self.client.subscribe("Filecoin.Closing", params).await
2573    }
2574
2575    async fn create_backup(&self, string: String) -> Result<(), Error> {
2576        let params =
2577            vec![serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?];
2578        self.client
2579            .request::<()>("Filecoin.CreateBackup", params)
2580            .await
2581    }
2582
2583    async fn discover(&self) -> Result<HashMap<String, Value>, Error> {
2584        let params = vec![];
2585        self.client.request("Filecoin.Discover", params).await
2586    }
2587
2588    async fn eth_accounts(&self) -> Result<Vec<[u8; 20]>, Error> {
2589        let params = vec![];
2590        self.client.request("Filecoin.EthAccounts", params).await
2591    }
2592
2593    async fn eth_address_to_filecoin_address(
2594        &self,
2595        eth_address: [u8; 20],
2596    ) -> Result<String, Error> {
2597        let params =
2598            vec![serde_json::to_value(&eth_address)
2599                .map_err(|e| Error::invalid_params(e.to_string()))?];
2600        self.client
2601            .request("Filecoin.EthAddressToFilecoinAddress", params)
2602            .await
2603    }
2604
2605    async fn eth_block_number(&self) -> Result<u64, Error> {
2606        let params = vec![];
2607        self.client.request("Filecoin.EthBlockNumber", params).await
2608    }
2609
2610    async fn eth_call(
2611        &self,
2612        eth_call: EthCall,
2613        eth_block_number_or_hash: EthBlockNumberOrHash,
2614    ) -> Result<Vec<u8>, Error> {
2615        let params = vec![
2616            serde_json::to_value(&eth_call).map_err(|e| Error::invalid_params(e.to_string()))?,
2617            serde_json::to_value(&eth_block_number_or_hash)
2618                .map_err(|e| Error::invalid_params(e.to_string()))?,
2619        ];
2620        self.client.request("Filecoin.EthCall", params).await
2621    }
2622
2623    async fn eth_chain_id(&self) -> Result<u64, Error> {
2624        let params = vec![];
2625        self.client.request("Filecoin.EthChainId", params).await
2626    }
2627
2628    async fn eth_estimate_gas(&self, uint8s: Vec<u8>) -> Result<u64, Error> {
2629        let params =
2630            vec![serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?];
2631        self.client.request("Filecoin.EthEstimateGas", params).await
2632    }
2633
2634    async fn eth_fee_history(&self, uint8s: Vec<u8>) -> Result<EthFeeHistory, Error> {
2635        let params =
2636            vec![serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?];
2637        self.client.request("Filecoin.EthFeeHistory", params).await
2638    }
2639
2640    async fn eth_gas_price(&self) -> Result<EthBigInt, Error> {
2641        let params = vec![];
2642        self.client.request("Filecoin.EthGasPrice", params).await
2643    }
2644
2645    async fn eth_get_balance(
2646        &self,
2647        eth_address: [u8; 20],
2648        eth_block_number_or_hash: EthBlockNumberOrHash,
2649    ) -> Result<EthBigInt, Error> {
2650        let params = vec![
2651            serde_json::to_value(&eth_address).map_err(|e| Error::invalid_params(e.to_string()))?,
2652            serde_json::to_value(&eth_block_number_or_hash)
2653                .map_err(|e| Error::invalid_params(e.to_string()))?,
2654        ];
2655        self.client.request("Filecoin.EthGetBalance", params).await
2656    }
2657
2658    async fn eth_get_block_by_hash(
2659        &self,
2660        eth_hash: [u8; 32],
2661        bool: bool,
2662    ) -> Result<EthBlock, Error> {
2663        let params = vec![
2664            serde_json::to_value(&eth_hash).map_err(|e| Error::invalid_params(e.to_string()))?,
2665            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
2666        ];
2667        self.client
2668            .request("Filecoin.EthGetBlockByHash", params)
2669            .await
2670    }
2671
2672    async fn eth_get_block_by_number(&self, string: String, bool: bool) -> Result<EthBlock, Error> {
2673        let params = vec![
2674            serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?,
2675            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
2676        ];
2677        self.client
2678            .request("Filecoin.EthGetBlockByNumber", params)
2679            .await
2680    }
2681
2682    async fn eth_get_block_receipts(
2683        &self,
2684        eth_block_number_or_hash: EthBlockNumberOrHash,
2685    ) -> Result<Vec<Option<EthTxReceipt>>, Error> {
2686        let params = vec![serde_json::to_value(&eth_block_number_or_hash)
2687            .map_err(|e| Error::invalid_params(e.to_string()))?];
2688        self.client
2689            .request("Filecoin.EthGetBlockReceipts", params)
2690            .await
2691    }
2692
2693    async fn eth_get_block_receipts_limited(
2694        &self,
2695        eth_block_number_or_hash: EthBlockNumberOrHash,
2696        chain_epoch: i64,
2697    ) -> Result<Vec<Option<EthTxReceipt>>, Error> {
2698        let params = vec![
2699            serde_json::to_value(&eth_block_number_or_hash)
2700                .map_err(|e| Error::invalid_params(e.to_string()))?,
2701            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
2702        ];
2703        self.client
2704            .request("Filecoin.EthGetBlockReceiptsLimited", params)
2705            .await
2706    }
2707
2708    async fn eth_get_block_transaction_count_by_hash(
2709        &self,
2710        eth_hash: [u8; 32],
2711    ) -> Result<u64, Error> {
2712        let params =
2713            vec![serde_json::to_value(&eth_hash)
2714                .map_err(|e| Error::invalid_params(e.to_string()))?];
2715        self.client
2716            .request("Filecoin.EthGetBlockTransactionCountByHash", params)
2717            .await
2718    }
2719
2720    async fn eth_get_block_transaction_count_by_number(
2721        &self,
2722        eth_uint64: u64,
2723    ) -> Result<u64, Error> {
2724        let params =
2725            vec![serde_json::to_value(&eth_uint64)
2726                .map_err(|e| Error::invalid_params(e.to_string()))?];
2727        self.client
2728            .request("Filecoin.EthGetBlockTransactionCountByNumber", params)
2729            .await
2730    }
2731
2732    async fn eth_get_code(
2733        &self,
2734        eth_address: [u8; 20],
2735        eth_block_number_or_hash: EthBlockNumberOrHash,
2736    ) -> Result<Vec<u8>, Error> {
2737        let params = vec![
2738            serde_json::to_value(&eth_address).map_err(|e| Error::invalid_params(e.to_string()))?,
2739            serde_json::to_value(&eth_block_number_or_hash)
2740                .map_err(|e| Error::invalid_params(e.to_string()))?,
2741        ];
2742        self.client.request("Filecoin.EthGetCode", params).await
2743    }
2744
2745    async fn eth_get_filter_changes(
2746        &self,
2747        eth_filter_id: [u8; 32],
2748    ) -> Result<Option<EthFilterResult>, Error> {
2749        let params = vec![serde_json::to_value(&eth_filter_id)
2750            .map_err(|e| Error::invalid_params(e.to_string()))?];
2751        self.client
2752            .request("Filecoin.EthGetFilterChanges", params)
2753            .await
2754    }
2755
2756    async fn eth_get_filter_logs(
2757        &self,
2758        eth_filter_id: [u8; 32],
2759    ) -> Result<Option<EthFilterResult>, Error> {
2760        let params = vec![serde_json::to_value(&eth_filter_id)
2761            .map_err(|e| Error::invalid_params(e.to_string()))?];
2762        self.client
2763            .request("Filecoin.EthGetFilterLogs", params)
2764            .await
2765    }
2766
2767    async fn eth_get_logs(
2768        &self,
2769        eth_filter_spec: Option<EthFilterSpec>,
2770    ) -> Result<Option<EthFilterResult>, Error> {
2771        let params = vec![serde_json::to_value(&eth_filter_spec)
2772            .map_err(|e| Error::invalid_params(e.to_string()))?];
2773        self.client.request("Filecoin.EthGetLogs", params).await
2774    }
2775
2776    async fn eth_get_message_cid_by_transaction_hash(
2777        &self,
2778        eth_hash: Option<[u8; 32]>,
2779    ) -> Result<Option<Cid>, Error> {
2780        let params =
2781            vec![serde_json::to_value(&eth_hash)
2782                .map_err(|e| Error::invalid_params(e.to_string()))?];
2783        self.client
2784            .request("Filecoin.EthGetMessageCidByTransactionHash", params)
2785            .await
2786    }
2787
2788    async fn eth_get_storage_at(
2789        &self,
2790        eth_address: [u8; 20],
2791        uint8s: Vec<u8>,
2792        eth_block_number_or_hash: EthBlockNumberOrHash,
2793    ) -> Result<Vec<u8>, Error> {
2794        let params = vec![
2795            serde_json::to_value(&eth_address).map_err(|e| Error::invalid_params(e.to_string()))?,
2796            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
2797            serde_json::to_value(&eth_block_number_or_hash)
2798                .map_err(|e| Error::invalid_params(e.to_string()))?,
2799        ];
2800        self.client
2801            .request("Filecoin.EthGetStorageAt", params)
2802            .await
2803    }
2804
2805    async fn eth_get_transaction_by_block_hash_and_index(
2806        &self,
2807        eth_hash: [u8; 32],
2808        eth_uint64: u64,
2809    ) -> Result<EthTx, Error> {
2810        let params = vec![
2811            serde_json::to_value(&eth_hash).map_err(|e| Error::invalid_params(e.to_string()))?,
2812            serde_json::to_value(&eth_uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
2813        ];
2814        self.client
2815            .request("Filecoin.EthGetTransactionByBlockHashAndIndex", params)
2816            .await
2817    }
2818
2819    async fn eth_get_transaction_by_block_number_and_index(
2820        &self,
2821        eth_uint64: u64,
2822        eth_uint641: u64,
2823    ) -> Result<EthTx, Error> {
2824        let params = vec![
2825            serde_json::to_value(&eth_uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
2826            serde_json::to_value(&eth_uint641).map_err(|e| Error::invalid_params(e.to_string()))?,
2827        ];
2828        self.client
2829            .request("Filecoin.EthGetTransactionByBlockNumberAndIndex", params)
2830            .await
2831    }
2832
2833    async fn eth_get_transaction_by_hash(
2834        &self,
2835        eth_hash: Option<[u8; 32]>,
2836    ) -> Result<Option<EthTx>, Error> {
2837        let params =
2838            vec![serde_json::to_value(&eth_hash)
2839                .map_err(|e| Error::invalid_params(e.to_string()))?];
2840        self.client
2841            .request("Filecoin.EthGetTransactionByHash", params)
2842            .await
2843    }
2844
2845    async fn eth_get_transaction_by_hash_limited(
2846        &self,
2847        eth_hash: Option<[u8; 32]>,
2848        chain_epoch: i64,
2849    ) -> Result<Option<EthTx>, Error> {
2850        let params = vec![
2851            serde_json::to_value(&eth_hash).map_err(|e| Error::invalid_params(e.to_string()))?,
2852            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
2853        ];
2854        self.client
2855            .request("Filecoin.EthGetTransactionByHashLimited", params)
2856            .await
2857    }
2858
2859    async fn eth_get_transaction_count(
2860        &self,
2861        eth_address: [u8; 20],
2862        eth_block_number_or_hash: EthBlockNumberOrHash,
2863    ) -> Result<u64, Error> {
2864        let params = vec![
2865            serde_json::to_value(&eth_address).map_err(|e| Error::invalid_params(e.to_string()))?,
2866            serde_json::to_value(&eth_block_number_or_hash)
2867                .map_err(|e| Error::invalid_params(e.to_string()))?,
2868        ];
2869        self.client
2870            .request("Filecoin.EthGetTransactionCount", params)
2871            .await
2872    }
2873
2874    async fn eth_get_transaction_hash_by_cid(&self, cid: Cid) -> Result<Option<[u8; 32]>, Error> {
2875        let params =
2876            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
2877        self.client
2878            .request("Filecoin.EthGetTransactionHashByCid", params)
2879            .await
2880    }
2881
2882    async fn eth_get_transaction_receipt(
2883        &self,
2884        eth_hash: [u8; 32],
2885    ) -> Result<Option<EthTxReceipt>, Error> {
2886        let params =
2887            vec![serde_json::to_value(&eth_hash)
2888                .map_err(|e| Error::invalid_params(e.to_string()))?];
2889        self.client
2890            .request("Filecoin.EthGetTransactionReceipt", params)
2891            .await
2892    }
2893
2894    async fn eth_get_transaction_receipt_limited(
2895        &self,
2896        eth_hash: [u8; 32],
2897        chain_epoch: i64,
2898    ) -> Result<Option<EthTxReceipt>, Error> {
2899        let params = vec![
2900            serde_json::to_value(&eth_hash).map_err(|e| Error::invalid_params(e.to_string()))?,
2901            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
2902        ];
2903        self.client
2904            .request("Filecoin.EthGetTransactionReceiptLimited", params)
2905            .await
2906    }
2907
2908    async fn eth_max_priority_fee_per_gas(&self) -> Result<EthBigInt, Error> {
2909        let params = vec![];
2910        self.client
2911            .request("Filecoin.EthMaxPriorityFeePerGas", params)
2912            .await
2913    }
2914
2915    async fn eth_new_block_filter(&self) -> Result<[u8; 32], Error> {
2916        let params = vec![];
2917        self.client
2918            .request("Filecoin.EthNewBlockFilter", params)
2919            .await
2920    }
2921
2922    async fn eth_new_filter(
2923        &self,
2924        eth_filter_spec: Option<EthFilterSpec>,
2925    ) -> Result<[u8; 32], Error> {
2926        let params = vec![serde_json::to_value(&eth_filter_spec)
2927            .map_err(|e| Error::invalid_params(e.to_string()))?];
2928        self.client.request("Filecoin.EthNewFilter", params).await
2929    }
2930
2931    async fn eth_new_pending_transaction_filter(&self) -> Result<[u8; 32], Error> {
2932        let params = vec![];
2933        self.client
2934            .request("Filecoin.EthNewPendingTransactionFilter", params)
2935            .await
2936    }
2937
2938    async fn eth_protocol_version(&self) -> Result<u64, Error> {
2939        let params = vec![];
2940        self.client
2941            .request("Filecoin.EthProtocolVersion", params)
2942            .await
2943    }
2944
2945    async fn eth_send_raw_transaction(&self, uint8s: Vec<u8>) -> Result<[u8; 32], Error> {
2946        let params =
2947            vec![serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?];
2948        self.client
2949            .request("Filecoin.EthSendRawTransaction", params)
2950            .await
2951    }
2952
2953    async fn eth_send_raw_transaction_untrusted(&self, uint8s: Vec<u8>) -> Result<[u8; 32], Error> {
2954        let params =
2955            vec![serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?];
2956        self.client
2957            .request("Filecoin.EthSendRawTransactionUntrusted", params)
2958            .await
2959    }
2960
2961    async fn eth_subscribe(&self, uint8s: Vec<u8>) -> Result<[u8; 32], Error> {
2962        let params =
2963            vec![serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?];
2964        self.client.request("Filecoin.EthSubscribe", params).await
2965    }
2966
2967    async fn eth_syncing(&self) -> Result<EthSyncingResult, Error> {
2968        let params = vec![];
2969        self.client.request("Filecoin.EthSyncing", params).await
2970    }
2971
2972    async fn eth_trace_block(&self, string: String) -> Result<Vec<Option<EthTraceBlock>>, Error> {
2973        let params =
2974            vec![serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?];
2975        self.client.request("Filecoin.EthTraceBlock", params).await
2976    }
2977
2978    async fn eth_trace_filter(
2979        &self,
2980        eth_trace_filter_criteria: EthTraceFilterCriteria,
2981    ) -> Result<Vec<Option<EthTraceFilterResult>>, Error> {
2982        let params = vec![serde_json::to_value(&eth_trace_filter_criteria)
2983            .map_err(|e| Error::invalid_params(e.to_string()))?];
2984        self.client.request("Filecoin.EthTraceFilter", params).await
2985    }
2986
2987    async fn eth_trace_replay_block_transactions(
2988        &self,
2989        string: String,
2990        strings: Vec<String>,
2991    ) -> Result<Vec<Option<EthTraceReplayBlockTransaction>>, Error> {
2992        let params = vec![
2993            serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?,
2994            serde_json::to_value(&strings).map_err(|e| Error::invalid_params(e.to_string()))?,
2995        ];
2996        self.client
2997            .request("Filecoin.EthTraceReplayBlockTransactions", params)
2998            .await
2999    }
3000
3001    async fn eth_trace_transaction(
3002        &self,
3003        string: String,
3004    ) -> Result<Vec<Option<EthTraceTransaction>>, Error> {
3005        let params =
3006            vec![serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?];
3007        self.client
3008            .request("Filecoin.EthTraceTransaction", params)
3009            .await
3010    }
3011
3012    async fn eth_uninstall_filter(&self, eth_filter_id: [u8; 32]) -> Result<bool, Error> {
3013        let params = vec![serde_json::to_value(&eth_filter_id)
3014            .map_err(|e| Error::invalid_params(e.to_string()))?];
3015        self.client
3016            .request("Filecoin.EthUninstallFilter", params)
3017            .await
3018    }
3019
3020    async fn eth_unsubscribe(&self, eth_subscription_id: [u8; 32]) -> Result<bool, Error> {
3021        let params = vec![serde_json::to_value(&eth_subscription_id)
3022            .map_err(|e| Error::invalid_params(e.to_string()))?];
3023        self.client.request("Filecoin.EthUnsubscribe", params).await
3024    }
3025
3026    async fn f3_get_certificate(&self, uint64: u64) -> Result<Option<FinalityCertificate>, Error> {
3027        let params =
3028            vec![serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?];
3029        self.client
3030            .request("Filecoin.F3GetCertificate", params)
3031            .await
3032    }
3033
3034    async fn f3_get_ec_power_table(
3035        &self,
3036        tip_set_key: Option<TipSetKey>,
3037    ) -> Result<Vec<PowerEntry>, Error> {
3038        let params =
3039            vec![serde_json::to_value(&tip_set_key)
3040                .map_err(|e| Error::invalid_params(e.to_string()))?];
3041        self.client
3042            .request("Filecoin.F3GetECPowerTable", params)
3043            .await
3044    }
3045
3046    async fn f3_get_f3_power_table(
3047        &self,
3048        tip_set_key: Option<TipSetKey>,
3049    ) -> Result<Vec<PowerEntry>, Error> {
3050        let params =
3051            vec![serde_json::to_value(&tip_set_key)
3052                .map_err(|e| Error::invalid_params(e.to_string()))?];
3053        self.client
3054            .request("Filecoin.F3GetF3PowerTable", params)
3055            .await
3056    }
3057
3058    async fn f3_get_latest_certificate(&self) -> Result<Option<FinalityCertificate>, Error> {
3059        let params = vec![];
3060        self.client
3061            .request("Filecoin.F3GetLatestCertificate", params)
3062            .await
3063    }
3064
3065    async fn f3_get_manifest(&self) -> Result<Option<Manifest>, Error> {
3066        let params = vec![];
3067        self.client.request("Filecoin.F3GetManifest", params).await
3068    }
3069
3070    async fn f3_get_or_renew_participation_ticket(
3071        &self,
3072        address: String,
3073        uint8s: Vec<u8>,
3074        uint64: u64,
3075    ) -> Result<Vec<u8>, Error> {
3076        let params = vec![
3077            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3078            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
3079            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3080        ];
3081        self.client
3082            .request("Filecoin.F3GetOrRenewParticipationTicket", params)
3083            .await
3084    }
3085
3086    async fn f3_get_progress(&self) -> Result<Instant, Error> {
3087        let params = vec![];
3088        self.client.request("Filecoin.F3GetProgress", params).await
3089    }
3090
3091    async fn f3_is_running(&self) -> Result<bool, Error> {
3092        let params = vec![];
3093        self.client.request("Filecoin.F3IsRunning", params).await
3094    }
3095
3096    async fn f3_list_participants(&self) -> Result<Vec<F3Participant>, Error> {
3097        let params = vec![];
3098        self.client
3099            .request("Filecoin.F3ListParticipants", params)
3100            .await
3101    }
3102
3103    async fn f3_participate(&self, uint8s: Vec<u8>) -> Result<F3ParticipationLease, Error> {
3104        let params =
3105            vec![serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?];
3106        self.client.request("Filecoin.F3Participate", params).await
3107    }
3108
3109    async fn filecoin_address_to_eth_address(&self, uint8s: Vec<u8>) -> Result<[u8; 20], Error> {
3110        let params =
3111            vec![serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?];
3112        self.client
3113            .request("Filecoin.FilecoinAddressToEthAddress", params)
3114            .await
3115    }
3116
3117    async fn gas_estimate_fee_cap(
3118        &self,
3119        message: Option<Message>,
3120        int64: i64,
3121        tip_set_key: Option<TipSetKey>,
3122    ) -> Result<String, Error> {
3123        let params = vec![
3124            serde_json::to_value(&message).map_err(|e| Error::invalid_params(e.to_string()))?,
3125            serde_json::to_value(&int64).map_err(|e| Error::invalid_params(e.to_string()))?,
3126            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3127        ];
3128        self.client
3129            .request("Filecoin.GasEstimateFeeCap", params)
3130            .await
3131    }
3132
3133    async fn gas_estimate_gas_limit(
3134        &self,
3135        message: Option<Message>,
3136        tip_set_key: Option<TipSetKey>,
3137    ) -> Result<i64, Error> {
3138        let params = vec![
3139            serde_json::to_value(&message).map_err(|e| Error::invalid_params(e.to_string()))?,
3140            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3141        ];
3142        self.client
3143            .request("Filecoin.GasEstimateGasLimit", params)
3144            .await
3145    }
3146
3147    async fn gas_estimate_gas_premium(
3148        &self,
3149        uint64: u64,
3150        address: String,
3151        int64: i64,
3152        tip_set_key: Option<TipSetKey>,
3153    ) -> Result<String, Error> {
3154        let params = vec![
3155            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3156            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3157            serde_json::to_value(&int64).map_err(|e| Error::invalid_params(e.to_string()))?,
3158            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3159        ];
3160        self.client
3161            .request("Filecoin.GasEstimateGasPremium", params)
3162            .await
3163    }
3164
3165    async fn gas_estimate_message_gas(
3166        &self,
3167        message: Option<Message>,
3168        message_send_spec: Option<MessageSendSpec>,
3169        tip_set_key: Option<TipSetKey>,
3170    ) -> Result<Option<Message>, Error> {
3171        let params = vec![
3172            serde_json::to_value(&message).map_err(|e| Error::invalid_params(e.to_string()))?,
3173            serde_json::to_value(&message_send_spec)
3174                .map_err(|e| Error::invalid_params(e.to_string()))?,
3175            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3176        ];
3177        self.client
3178            .request("Filecoin.GasEstimateMessageGas", params)
3179            .await
3180    }
3181
3182    async fn get_actor_events_raw(
3183        &self,
3184        actor_event_filter: Option<ActorEventFilter>,
3185    ) -> Result<Vec<Option<ActorEvent>>, Error> {
3186        let params = vec![serde_json::to_value(&actor_event_filter)
3187            .map_err(|e| Error::invalid_params(e.to_string()))?];
3188        self.client
3189            .request("Filecoin.GetActorEventsRaw", params)
3190            .await
3191    }
3192
3193    async fn id(&self) -> Result<String, Error> {
3194        let params = vec![];
3195        self.client.request("Filecoin.ID", params).await
3196    }
3197
3198    async fn log_alerts(&self) -> Result<Vec<Alert>, Error> {
3199        let params = vec![];
3200        self.client.request("Filecoin.LogAlerts", params).await
3201    }
3202
3203    async fn log_list(&self) -> Result<Vec<String>, Error> {
3204        let params = vec![];
3205        self.client.request("Filecoin.LogList", params).await
3206    }
3207
3208    async fn log_set_level(&self, string: String, string1: String) -> Result<(), Error> {
3209        let params = vec![
3210            serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?,
3211            serde_json::to_value(&string1).map_err(|e| Error::invalid_params(e.to_string()))?,
3212        ];
3213        self.client
3214            .request::<()>("Filecoin.LogSetLevel", params)
3215            .await
3216    }
3217
3218    async fn market_add_balance(
3219        &self,
3220        address: String,
3221        address1: String,
3222        int: String,
3223    ) -> Result<Cid, Error> {
3224        let params = vec![
3225            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3226            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3227            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3228        ];
3229        self.client
3230            .request("Filecoin.MarketAddBalance", params)
3231            .await
3232    }
3233
3234    async fn market_get_reserved(&self, address: String) -> Result<String, Error> {
3235        let params =
3236            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
3237        self.client
3238            .request("Filecoin.MarketGetReserved", params)
3239            .await
3240    }
3241
3242    async fn market_release_funds(&self, address: String, int: String) -> Result<(), Error> {
3243        let params = vec![
3244            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3245            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3246        ];
3247        self.client
3248            .request::<()>("Filecoin.MarketReleaseFunds", params)
3249            .await
3250    }
3251
3252    async fn market_reserve_funds(
3253        &self,
3254        address: String,
3255        address1: String,
3256        int: String,
3257    ) -> Result<Cid, Error> {
3258        let params = vec![
3259            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3260            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3261            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3262        ];
3263        self.client
3264            .request("Filecoin.MarketReserveFunds", params)
3265            .await
3266    }
3267
3268    async fn market_withdraw(
3269        &self,
3270        address: String,
3271        address1: String,
3272        int: String,
3273    ) -> Result<Cid, Error> {
3274        let params = vec![
3275            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3276            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3277            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3278        ];
3279        self.client.request("Filecoin.MarketWithdraw", params).await
3280    }
3281
3282    async fn miner_create_block(
3283        &self,
3284        block_template: Option<BlockTemplate>,
3285    ) -> Result<Option<BlockMsg>, Error> {
3286        let params = vec![serde_json::to_value(&block_template)
3287            .map_err(|e| Error::invalid_params(e.to_string()))?];
3288        self.client
3289            .request("Filecoin.MinerCreateBlock", params)
3290            .await
3291    }
3292
3293    async fn miner_get_base_info(
3294        &self,
3295        address: String,
3296        chain_epoch: i64,
3297        tip_set_key: Option<TipSetKey>,
3298    ) -> Result<Option<MiningBaseInfo>, Error> {
3299        let params = vec![
3300            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3301            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
3302            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3303        ];
3304        self.client
3305            .request("Filecoin.MinerGetBaseInfo", params)
3306            .await
3307    }
3308
3309    async fn mpool_batch_push(&self, s: Vec<Option<SignedMessage>>) -> Result<Vec<Cid>, Error> {
3310        let params =
3311            vec![serde_json::to_value(&s).map_err(|e| Error::invalid_params(e.to_string()))?];
3312        self.client.request("Filecoin.MpoolBatchPush", params).await
3313    }
3314
3315    async fn mpool_batch_push_message(
3316        &self,
3317        s: Vec<Option<Message>>,
3318        message_send_spec: Option<MessageSendSpec>,
3319    ) -> Result<Vec<Option<SignedMessage>>, Error> {
3320        let params = vec![
3321            serde_json::to_value(&s).map_err(|e| Error::invalid_params(e.to_string()))?,
3322            serde_json::to_value(&message_send_spec)
3323                .map_err(|e| Error::invalid_params(e.to_string()))?,
3324        ];
3325        self.client
3326            .request("Filecoin.MpoolBatchPushMessage", params)
3327            .await
3328    }
3329
3330    async fn mpool_batch_push_untrusted(
3331        &self,
3332        s: Vec<Option<SignedMessage>>,
3333    ) -> Result<Vec<Cid>, Error> {
3334        let params =
3335            vec![serde_json::to_value(&s).map_err(|e| Error::invalid_params(e.to_string()))?];
3336        self.client
3337            .request("Filecoin.MpoolBatchPushUntrusted", params)
3338            .await
3339    }
3340
3341    async fn mpool_check_messages(
3342        &self,
3343        s: Vec<Option<MessagePrototype>>,
3344    ) -> Result<Vec<Vec<MessageCheckStatus>>, Error> {
3345        let params =
3346            vec![serde_json::to_value(&s).map_err(|e| Error::invalid_params(e.to_string()))?];
3347        self.client
3348            .request("Filecoin.MpoolCheckMessages", params)
3349            .await
3350    }
3351
3352    async fn mpool_check_pending_messages(
3353        &self,
3354        address: String,
3355    ) -> Result<Vec<Vec<MessageCheckStatus>>, Error> {
3356        let params =
3357            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
3358        self.client
3359            .request("Filecoin.MpoolCheckPendingMessages", params)
3360            .await
3361    }
3362
3363    async fn mpool_check_replace_messages(
3364        &self,
3365        s: Vec<Option<Message>>,
3366    ) -> Result<Vec<Vec<MessageCheckStatus>>, Error> {
3367        let params =
3368            vec![serde_json::to_value(&s).map_err(|e| Error::invalid_params(e.to_string()))?];
3369        self.client
3370            .request("Filecoin.MpoolCheckReplaceMessages", params)
3371            .await
3372    }
3373
3374    async fn mpool_clear(&self, bool: bool) -> Result<(), Error> {
3375        let params =
3376            vec![serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?];
3377        self.client
3378            .request::<()>("Filecoin.MpoolClear", params)
3379            .await
3380    }
3381
3382    async fn mpool_get_config(&self) -> Result<Option<MpoolConfig>, Error> {
3383        let params = vec![];
3384        self.client.request("Filecoin.MpoolGetConfig", params).await
3385    }
3386
3387    async fn mpool_get_nonce(&self, address: String) -> Result<u64, Error> {
3388        let params =
3389            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
3390        self.client.request("Filecoin.MpoolGetNonce", params).await
3391    }
3392
3393    async fn mpool_pending(
3394        &self,
3395        tip_set_key: Option<TipSetKey>,
3396    ) -> Result<Vec<Option<SignedMessage>>, Error> {
3397        let params =
3398            vec![serde_json::to_value(&tip_set_key)
3399                .map_err(|e| Error::invalid_params(e.to_string()))?];
3400        self.client.request("Filecoin.MpoolPending", params).await
3401    }
3402
3403    async fn mpool_push(&self, signed_message: Option<SignedMessage>) -> Result<Cid, Error> {
3404        let params = vec![serde_json::to_value(&signed_message)
3405            .map_err(|e| Error::invalid_params(e.to_string()))?];
3406        self.client.request("Filecoin.MpoolPush", params).await
3407    }
3408
3409    async fn mpool_push_message(
3410        &self,
3411        message: Option<Message>,
3412        message_send_spec: Option<MessageSendSpec>,
3413    ) -> Result<Option<SignedMessage>, Error> {
3414        let params = vec![
3415            serde_json::to_value(&message).map_err(|e| Error::invalid_params(e.to_string()))?,
3416            serde_json::to_value(&message_send_spec)
3417                .map_err(|e| Error::invalid_params(e.to_string()))?,
3418        ];
3419        self.client
3420            .request("Filecoin.MpoolPushMessage", params)
3421            .await
3422    }
3423
3424    async fn mpool_push_untrusted(
3425        &self,
3426        signed_message: Option<SignedMessage>,
3427    ) -> Result<Cid, Error> {
3428        let params = vec![serde_json::to_value(&signed_message)
3429            .map_err(|e| Error::invalid_params(e.to_string()))?];
3430        self.client
3431            .request("Filecoin.MpoolPushUntrusted", params)
3432            .await
3433    }
3434
3435    async fn mpool_select(
3436        &self,
3437        tip_set_key: Option<TipSetKey>,
3438        float64: f64,
3439    ) -> Result<Vec<Option<SignedMessage>>, Error> {
3440        let params = vec![
3441            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3442            serde_json::to_value(&float64).map_err(|e| Error::invalid_params(e.to_string()))?,
3443        ];
3444        self.client.request("Filecoin.MpoolSelect", params).await
3445    }
3446
3447    async fn mpool_set_config(&self, mpool_config: Option<MpoolConfig>) -> Result<(), Error> {
3448        let params = vec![serde_json::to_value(&mpool_config)
3449            .map_err(|e| Error::invalid_params(e.to_string()))?];
3450        self.client
3451            .request::<()>("Filecoin.MpoolSetConfig", params)
3452            .await
3453    }
3454
3455    async fn mpool_sub(&self) -> Result<mpsc::Receiver<MpoolUpdate>, Error> {
3456        let params = vec![];
3457        self.client.subscribe("Filecoin.MpoolSub", params).await
3458    }
3459
3460    async fn msig_add_approve(
3461        &self,
3462        address: String,
3463        address1: String,
3464        uint64: u64,
3465        address2: String,
3466        address3: String,
3467        bool: bool,
3468    ) -> Result<Option<MessagePrototype>, Error> {
3469        let params = vec![
3470            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3471            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3472            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3473            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3474            serde_json::to_value(&address3).map_err(|e| Error::invalid_params(e.to_string()))?,
3475            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
3476        ];
3477        self.client.request("Filecoin.MsigAddApprove", params).await
3478    }
3479
3480    async fn msig_add_cancel(
3481        &self,
3482        address: String,
3483        address1: String,
3484        uint64: u64,
3485        address2: String,
3486        bool: bool,
3487    ) -> Result<Option<MessagePrototype>, Error> {
3488        let params = vec![
3489            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3490            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3491            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3492            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3493            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
3494        ];
3495        self.client.request("Filecoin.MsigAddCancel", params).await
3496    }
3497
3498    async fn msig_add_propose(
3499        &self,
3500        address: String,
3501        address1: String,
3502        address2: String,
3503        bool: bool,
3504    ) -> Result<Option<MessagePrototype>, Error> {
3505        let params = vec![
3506            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3507            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3508            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3509            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
3510        ];
3511        self.client.request("Filecoin.MsigAddPropose", params).await
3512    }
3513
3514    async fn msig_approve(
3515        &self,
3516        address: String,
3517        uint64: u64,
3518        address1: String,
3519    ) -> Result<Option<MessagePrototype>, Error> {
3520        let params = vec![
3521            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3522            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3523            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3524        ];
3525        self.client.request("Filecoin.MsigApprove", params).await
3526    }
3527
3528    async fn msig_approve_txn_hash(
3529        &self,
3530        address: String,
3531        uint64: u64,
3532        address1: String,
3533        address2: String,
3534        int: String,
3535        address3: String,
3536        uint641: u64,
3537        uint8s: Vec<u8>,
3538    ) -> Result<Option<MessagePrototype>, Error> {
3539        let params = vec![
3540            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3541            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3542            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3543            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3544            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3545            serde_json::to_value(&address3).map_err(|e| Error::invalid_params(e.to_string()))?,
3546            serde_json::to_value(&uint641).map_err(|e| Error::invalid_params(e.to_string()))?,
3547            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
3548        ];
3549        self.client
3550            .request("Filecoin.MsigApproveTxnHash", params)
3551            .await
3552    }
3553
3554    async fn msig_cancel(
3555        &self,
3556        address: String,
3557        uint64: u64,
3558        address1: String,
3559    ) -> Result<Option<MessagePrototype>, Error> {
3560        let params = vec![
3561            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3562            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3563            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3564        ];
3565        self.client.request("Filecoin.MsigCancel", params).await
3566    }
3567
3568    async fn msig_cancel_txn_hash(
3569        &self,
3570        address: String,
3571        uint64: u64,
3572        address1: String,
3573        int: String,
3574        address2: String,
3575        uint641: u64,
3576        uint8s: Vec<u8>,
3577    ) -> Result<Option<MessagePrototype>, Error> {
3578        let params = vec![
3579            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3580            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3581            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3582            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3583            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3584            serde_json::to_value(&uint641).map_err(|e| Error::invalid_params(e.to_string()))?,
3585            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
3586        ];
3587        self.client
3588            .request("Filecoin.MsigCancelTxnHash", params)
3589            .await
3590    }
3591
3592    async fn msig_create(
3593        &self,
3594        uint64: u64,
3595        addresss: Vec<String>,
3596        chain_epoch: i64,
3597        int: String,
3598        address: String,
3599        int1: String,
3600    ) -> Result<Option<MessagePrototype>, Error> {
3601        let params = vec![
3602            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3603            serde_json::to_value(&addresss).map_err(|e| Error::invalid_params(e.to_string()))?,
3604            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
3605            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3606            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3607            serde_json::to_value(&int1).map_err(|e| Error::invalid_params(e.to_string()))?,
3608        ];
3609        self.client.request("Filecoin.MsigCreate", params).await
3610    }
3611
3612    async fn msig_get_available_balance(
3613        &self,
3614        address: String,
3615        tip_set_key: Option<TipSetKey>,
3616    ) -> Result<String, Error> {
3617        let params = vec![
3618            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3619            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3620        ];
3621        self.client
3622            .request("Filecoin.MsigGetAvailableBalance", params)
3623            .await
3624    }
3625
3626    async fn msig_get_pending(
3627        &self,
3628        address: String,
3629        tip_set_key: Option<TipSetKey>,
3630    ) -> Result<Vec<Option<MsigTransaction>>, Error> {
3631        let params = vec![
3632            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3633            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3634        ];
3635        self.client.request("Filecoin.MsigGetPending", params).await
3636    }
3637
3638    async fn msig_get_vested(
3639        &self,
3640        address: String,
3641        tip_set_key: Option<TipSetKey>,
3642        tip_set_key1: Option<TipSetKey>,
3643    ) -> Result<String, Error> {
3644        let params = vec![
3645            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3646            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3647            serde_json::to_value(&tip_set_key1)
3648                .map_err(|e| Error::invalid_params(e.to_string()))?,
3649        ];
3650        self.client.request("Filecoin.MsigGetVested", params).await
3651    }
3652
3653    async fn msig_get_vesting_schedule(
3654        &self,
3655        address: String,
3656        tip_set_key: Option<TipSetKey>,
3657    ) -> Result<MsigVesting, Error> {
3658        let params = vec![
3659            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3660            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
3661        ];
3662        self.client
3663            .request("Filecoin.MsigGetVestingSchedule", params)
3664            .await
3665    }
3666
3667    async fn msig_propose(
3668        &self,
3669        address: String,
3670        address1: String,
3671        int: String,
3672        address2: String,
3673        uint64: u64,
3674        uint8s: Vec<u8>,
3675    ) -> Result<Option<MessagePrototype>, Error> {
3676        let params = vec![
3677            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3678            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3679            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3680            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3681            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3682            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
3683        ];
3684        self.client.request("Filecoin.MsigPropose", params).await
3685    }
3686
3687    async fn msig_remove_signer(
3688        &self,
3689        address: String,
3690        address1: String,
3691        address2: String,
3692        bool: bool,
3693    ) -> Result<Option<MessagePrototype>, Error> {
3694        let params = vec![
3695            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3696            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3697            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3698            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
3699        ];
3700        self.client
3701            .request("Filecoin.MsigRemoveSigner", params)
3702            .await
3703    }
3704
3705    async fn msig_swap_approve(
3706        &self,
3707        address: String,
3708        address1: String,
3709        uint64: u64,
3710        address2: String,
3711        address3: String,
3712        address4: String,
3713    ) -> Result<Option<MessagePrototype>, Error> {
3714        let params = vec![
3715            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3716            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3717            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3718            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3719            serde_json::to_value(&address3).map_err(|e| Error::invalid_params(e.to_string()))?,
3720            serde_json::to_value(&address4).map_err(|e| Error::invalid_params(e.to_string()))?,
3721        ];
3722        self.client
3723            .request("Filecoin.MsigSwapApprove", params)
3724            .await
3725    }
3726
3727    async fn msig_swap_cancel(
3728        &self,
3729        address: String,
3730        address1: String,
3731        uint64: u64,
3732        address2: String,
3733        address3: String,
3734    ) -> Result<Option<MessagePrototype>, Error> {
3735        let params = vec![
3736            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3737            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3738            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
3739            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3740            serde_json::to_value(&address3).map_err(|e| Error::invalid_params(e.to_string()))?,
3741        ];
3742        self.client.request("Filecoin.MsigSwapCancel", params).await
3743    }
3744
3745    async fn msig_swap_propose(
3746        &self,
3747        address: String,
3748        address1: String,
3749        address2: String,
3750        address3: String,
3751    ) -> Result<Option<MessagePrototype>, Error> {
3752        let params = vec![
3753            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3754            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3755            serde_json::to_value(&address2).map_err(|e| Error::invalid_params(e.to_string()))?,
3756            serde_json::to_value(&address3).map_err(|e| Error::invalid_params(e.to_string()))?,
3757        ];
3758        self.client
3759            .request("Filecoin.MsigSwapPropose", params)
3760            .await
3761    }
3762
3763    async fn net_addrs_listen(&self) -> Result<AddrInfo, Error> {
3764        let params = vec![];
3765        self.client.request("Filecoin.NetAddrsListen", params).await
3766    }
3767
3768    async fn net_agent_version(&self, id: String) -> Result<String, Error> {
3769        let params =
3770            vec![serde_json::to_value(&id).map_err(|e| Error::invalid_params(e.to_string()))?];
3771        self.client
3772            .request("Filecoin.NetAgentVersion", params)
3773            .await
3774    }
3775
3776    async fn net_auto_nat_status(&self) -> Result<NatInfo, Error> {
3777        let params = vec![];
3778        self.client
3779            .request("Filecoin.NetAutoNatStatus", params)
3780            .await
3781    }
3782
3783    async fn net_bandwidth_stats(&self) -> Result<Stats, Error> {
3784        let params = vec![];
3785        self.client
3786            .request("Filecoin.NetBandwidthStats", params)
3787            .await
3788    }
3789
3790    async fn net_bandwidth_stats_by_peer(&self) -> Result<HashMap<String, Stats>, Error> {
3791        let params = vec![];
3792        self.client
3793            .request("Filecoin.NetBandwidthStatsByPeer", params)
3794            .await
3795    }
3796
3797    async fn net_bandwidth_stats_by_protocol(&self) -> Result<HashMap<String, Stats>, Error> {
3798        let params = vec![];
3799        self.client
3800            .request("Filecoin.NetBandwidthStatsByProtocol", params)
3801            .await
3802    }
3803
3804    async fn net_block_add(&self, net_block_list: NetBlockList) -> Result<(), Error> {
3805        let params = vec![serde_json::to_value(&net_block_list)
3806            .map_err(|e| Error::invalid_params(e.to_string()))?];
3807        self.client
3808            .request::<()>("Filecoin.NetBlockAdd", params)
3809            .await
3810    }
3811
3812    async fn net_block_list(&self) -> Result<NetBlockList, Error> {
3813        let params = vec![];
3814        self.client.request("Filecoin.NetBlockList", params).await
3815    }
3816
3817    async fn net_block_remove(&self, net_block_list: NetBlockList) -> Result<(), Error> {
3818        let params = vec![serde_json::to_value(&net_block_list)
3819            .map_err(|e| Error::invalid_params(e.to_string()))?];
3820        self.client
3821            .request::<()>("Filecoin.NetBlockRemove", params)
3822            .await
3823    }
3824
3825    async fn net_connect(&self, addr_info: AddrInfo) -> Result<(), Error> {
3826        let params =
3827            vec![serde_json::to_value(&addr_info)
3828                .map_err(|e| Error::invalid_params(e.to_string()))?];
3829        self.client
3830            .request::<()>("Filecoin.NetConnect", params)
3831            .await
3832    }
3833
3834    async fn net_connectedness(&self, id: String) -> Result<i32, Error> {
3835        let params =
3836            vec![serde_json::to_value(&id).map_err(|e| Error::invalid_params(e.to_string()))?];
3837        self.client
3838            .request("Filecoin.NetConnectedness", params)
3839            .await
3840    }
3841
3842    async fn net_disconnect(&self, id: String) -> Result<(), Error> {
3843        let params =
3844            vec![serde_json::to_value(&id).map_err(|e| Error::invalid_params(e.to_string()))?];
3845        self.client
3846            .request::<()>("Filecoin.NetDisconnect", params)
3847            .await
3848    }
3849
3850    async fn net_find_peer(&self, id: String) -> Result<AddrInfo, Error> {
3851        let params =
3852            vec![serde_json::to_value(&id).map_err(|e| Error::invalid_params(e.to_string()))?];
3853        self.client.request("Filecoin.NetFindPeer", params).await
3854    }
3855
3856    async fn net_limit(&self, string: String) -> Result<NetLimit, Error> {
3857        let params =
3858            vec![serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?];
3859        self.client.request("Filecoin.NetLimit", params).await
3860    }
3861
3862    async fn net_listening(&self) -> Result<bool, Error> {
3863        let params = vec![];
3864        self.client.request("Filecoin.NetListening", params).await
3865    }
3866
3867    async fn net_peer_info(&self, id: String) -> Result<Option<ExtendedPeerInfo>, Error> {
3868        let params =
3869            vec![serde_json::to_value(&id).map_err(|e| Error::invalid_params(e.to_string()))?];
3870        self.client.request("Filecoin.NetPeerInfo", params).await
3871    }
3872
3873    async fn net_peers(&self) -> Result<Vec<AddrInfo>, Error> {
3874        let params = vec![];
3875        self.client.request("Filecoin.NetPeers", params).await
3876    }
3877
3878    async fn net_ping(&self, id: String) -> Result<i64, Error> {
3879        let params =
3880            vec![serde_json::to_value(&id).map_err(|e| Error::invalid_params(e.to_string()))?];
3881        self.client.request("Filecoin.NetPing", params).await
3882    }
3883
3884    async fn net_protect_add(&self, ids: Vec<String>) -> Result<(), Error> {
3885        let params =
3886            vec![serde_json::to_value(&ids).map_err(|e| Error::invalid_params(e.to_string()))?];
3887        self.client
3888            .request::<()>("Filecoin.NetProtectAdd", params)
3889            .await
3890    }
3891
3892    async fn net_protect_list(&self) -> Result<Vec<String>, Error> {
3893        let params = vec![];
3894        self.client.request("Filecoin.NetProtectList", params).await
3895    }
3896
3897    async fn net_protect_remove(&self, ids: Vec<String>) -> Result<(), Error> {
3898        let params =
3899            vec![serde_json::to_value(&ids).map_err(|e| Error::invalid_params(e.to_string()))?];
3900        self.client
3901            .request::<()>("Filecoin.NetProtectRemove", params)
3902            .await
3903    }
3904
3905    async fn net_pubsub_scores(&self) -> Result<Vec<PubsubScore>, Error> {
3906        let params = vec![];
3907        self.client
3908            .request("Filecoin.NetPubsubScores", params)
3909            .await
3910    }
3911
3912    async fn net_set_limit(&self, string: String, net_limit: NetLimit) -> Result<(), Error> {
3913        let params = vec![
3914            serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?,
3915            serde_json::to_value(&net_limit).map_err(|e| Error::invalid_params(e.to_string()))?,
3916        ];
3917        self.client
3918            .request::<()>("Filecoin.NetSetLimit", params)
3919            .await
3920    }
3921
3922    async fn net_stat(&self, string: String) -> Result<NetStat, Error> {
3923        let params =
3924            vec![serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?];
3925        self.client.request("Filecoin.NetStat", params).await
3926    }
3927
3928    async fn net_version(&self) -> Result<String, Error> {
3929        let params = vec![];
3930        self.client.request("Filecoin.NetVersion", params).await
3931    }
3932
3933    async fn node_status(&self, bool: bool) -> Result<NodeStatus, Error> {
3934        let params =
3935            vec![serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?];
3936        self.client.request("Filecoin.NodeStatus", params).await
3937    }
3938
3939    async fn paych_allocate_lane(&self, address: String) -> Result<u64, Error> {
3940        let params =
3941            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
3942        self.client
3943            .request("Filecoin.PaychAllocateLane", params)
3944            .await
3945    }
3946
3947    async fn paych_available_funds(
3948        &self,
3949        address: String,
3950    ) -> Result<Option<ChannelAvailableFunds>, Error> {
3951        let params =
3952            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
3953        self.client
3954            .request("Filecoin.PaychAvailableFunds", params)
3955            .await
3956    }
3957
3958    async fn paych_available_funds_by_from_to(
3959        &self,
3960        address: String,
3961        address1: String,
3962    ) -> Result<Option<ChannelAvailableFunds>, Error> {
3963        let params = vec![
3964            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3965            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3966        ];
3967        self.client
3968            .request("Filecoin.PaychAvailableFundsByFromTo", params)
3969            .await
3970    }
3971
3972    async fn paych_collect(&self, address: String) -> Result<Cid, Error> {
3973        let params =
3974            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
3975        self.client.request("Filecoin.PaychCollect", params).await
3976    }
3977
3978    async fn paych_fund(
3979        &self,
3980        address: String,
3981        address1: String,
3982        int: String,
3983    ) -> Result<Option<ChannelInfo>, Error> {
3984        let params = vec![
3985            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
3986            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
3987            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
3988        ];
3989        self.client.request("Filecoin.PaychFund", params).await
3990    }
3991
3992    async fn paych_get(
3993        &self,
3994        address: String,
3995        address1: String,
3996        int: String,
3997        paych_get_opts: PaychGetOpts,
3998    ) -> Result<Option<ChannelInfo>, Error> {
3999        let params = vec![
4000            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4001            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
4002            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
4003            serde_json::to_value(&paych_get_opts)
4004                .map_err(|e| Error::invalid_params(e.to_string()))?,
4005        ];
4006        self.client.request("Filecoin.PaychGet", params).await
4007    }
4008
4009    async fn paych_get_wait_ready(&self, cid: Cid) -> Result<String, Error> {
4010        let params =
4011            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
4012        self.client
4013            .request("Filecoin.PaychGetWaitReady", params)
4014            .await
4015    }
4016
4017    async fn paych_list(&self) -> Result<Vec<String>, Error> {
4018        let params = vec![];
4019        self.client.request("Filecoin.PaychList", params).await
4020    }
4021
4022    async fn paych_new_payment(
4023        &self,
4024        address: String,
4025        address1: String,
4026        voucher_specs: Vec<VoucherSpec>,
4027    ) -> Result<Option<PaymentInfo>, Error> {
4028        let params = vec![
4029            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4030            serde_json::to_value(&address1).map_err(|e| Error::invalid_params(e.to_string()))?,
4031            serde_json::to_value(&voucher_specs)
4032                .map_err(|e| Error::invalid_params(e.to_string()))?,
4033        ];
4034        self.client
4035            .request("Filecoin.PaychNewPayment", params)
4036            .await
4037    }
4038
4039    async fn paych_settle(&self, address: String) -> Result<Cid, Error> {
4040        let params =
4041            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
4042        self.client.request("Filecoin.PaychSettle", params).await
4043    }
4044
4045    async fn paych_status(&self, address: String) -> Result<Option<PaychStatus>, Error> {
4046        let params =
4047            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
4048        self.client.request("Filecoin.PaychStatus", params).await
4049    }
4050
4051    async fn paych_voucher_add(
4052        &self,
4053        address: String,
4054        signed_voucher: Option<SignedVoucher>,
4055        uint8s: Vec<u8>,
4056        int: String,
4057    ) -> Result<String, Error> {
4058        let params = vec![
4059            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4060            serde_json::to_value(&signed_voucher)
4061                .map_err(|e| Error::invalid_params(e.to_string()))?,
4062            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
4063            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
4064        ];
4065        self.client
4066            .request("Filecoin.PaychVoucherAdd", params)
4067            .await
4068    }
4069
4070    async fn paych_voucher_check_spendable(
4071        &self,
4072        address: String,
4073        signed_voucher: Option<SignedVoucher>,
4074        uint8s: Vec<u8>,
4075        uint8s1: Vec<u8>,
4076    ) -> Result<bool, Error> {
4077        let params = vec![
4078            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4079            serde_json::to_value(&signed_voucher)
4080                .map_err(|e| Error::invalid_params(e.to_string()))?,
4081            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
4082            serde_json::to_value(&uint8s1).map_err(|e| Error::invalid_params(e.to_string()))?,
4083        ];
4084        self.client
4085            .request("Filecoin.PaychVoucherCheckSpendable", params)
4086            .await
4087    }
4088
4089    async fn paych_voucher_check_valid(
4090        &self,
4091        address: String,
4092        signed_voucher: Option<SignedVoucher>,
4093    ) -> Result<(), Error> {
4094        let params = vec![
4095            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4096            serde_json::to_value(&signed_voucher)
4097                .map_err(|e| Error::invalid_params(e.to_string()))?,
4098        ];
4099        self.client
4100            .request::<()>("Filecoin.PaychVoucherCheckValid", params)
4101            .await
4102    }
4103
4104    async fn paych_voucher_create(
4105        &self,
4106        address: String,
4107        int: String,
4108        uint64: u64,
4109    ) -> Result<Option<VoucherCreateResult>, Error> {
4110        let params = vec![
4111            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4112            serde_json::to_value(&int).map_err(|e| Error::invalid_params(e.to_string()))?,
4113            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
4114        ];
4115        self.client
4116            .request("Filecoin.PaychVoucherCreate", params)
4117            .await
4118    }
4119
4120    async fn paych_voucher_list(
4121        &self,
4122        address: String,
4123    ) -> Result<Vec<Option<SignedVoucher>>, Error> {
4124        let params =
4125            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
4126        self.client
4127            .request("Filecoin.PaychVoucherList", params)
4128            .await
4129    }
4130
4131    async fn paych_voucher_submit(
4132        &self,
4133        address: String,
4134        signed_voucher: Option<SignedVoucher>,
4135        uint8s: Vec<u8>,
4136        uint8s1: Vec<u8>,
4137    ) -> Result<Cid, Error> {
4138        let params = vec![
4139            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4140            serde_json::to_value(&signed_voucher)
4141                .map_err(|e| Error::invalid_params(e.to_string()))?,
4142            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
4143            serde_json::to_value(&uint8s1).map_err(|e| Error::invalid_params(e.to_string()))?,
4144        ];
4145        self.client
4146            .request("Filecoin.PaychVoucherSubmit", params)
4147            .await
4148    }
4149
4150    async fn session(&self) -> Result<[u8; 16], Error> {
4151        let params = vec![];
4152        self.client.request("Filecoin.Session", params).await
4153    }
4154
4155    async fn shutdown(&self) -> Result<(), Error> {
4156        let params = vec![];
4157        self.client.request::<()>("Filecoin.Shutdown", params).await
4158    }
4159
4160    async fn start_time(&self) -> Result<Time, Error> {
4161        let params = vec![];
4162        self.client.request("Filecoin.StartTime", params).await
4163    }
4164
4165    async fn state_account_key(
4166        &self,
4167        address: String,
4168        tip_set_key: Option<TipSetKey>,
4169    ) -> Result<String, Error> {
4170        let params = vec![
4171            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4172            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4173        ];
4174        self.client
4175            .request("Filecoin.StateAccountKey", params)
4176            .await
4177    }
4178
4179    async fn state_actor_code_ci_ds(&self, version: u32) -> Result<HashMap<String, Cid>, Error> {
4180        let params =
4181            vec![serde_json::to_value(&version).map_err(|e| Error::invalid_params(e.to_string()))?];
4182        self.client
4183            .request("Filecoin.StateActorCodeCIDs", params)
4184            .await
4185    }
4186
4187    async fn state_actor_manifest_cid(&self, version: u32) -> Result<Cid, Error> {
4188        let params =
4189            vec![serde_json::to_value(&version).map_err(|e| Error::invalid_params(e.to_string()))?];
4190        self.client
4191            .request("Filecoin.StateActorManifestCID", params)
4192            .await
4193    }
4194
4195    async fn state_all_miner_faults(
4196        &self,
4197        chain_epoch: i64,
4198        tip_set_key: Option<TipSetKey>,
4199    ) -> Result<Vec<Option<Fault>>, Error> {
4200        let params = vec![
4201            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4202            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4203        ];
4204        self.client
4205            .request("Filecoin.StateAllMinerFaults", params)
4206            .await
4207    }
4208
4209    async fn state_call(
4210        &self,
4211        message: Option<Message>,
4212        tip_set_key: Option<TipSetKey>,
4213    ) -> Result<Option<InvocResult>, Error> {
4214        let params = vec![
4215            serde_json::to_value(&message).map_err(|e| Error::invalid_params(e.to_string()))?,
4216            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4217        ];
4218        self.client.request("Filecoin.StateCall", params).await
4219    }
4220
4221    async fn state_changed_actors(
4222        &self,
4223        cid: Cid,
4224        cid1: Cid,
4225    ) -> Result<HashMap<String, ActorV5>, Error> {
4226        let params = vec![
4227            serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?,
4228            serde_json::to_value(&cid1).map_err(|e| Error::invalid_params(e.to_string()))?,
4229        ];
4230        self.client
4231            .request("Filecoin.StateChangedActors", params)
4232            .await
4233    }
4234
4235    async fn state_circulating_supply(
4236        &self,
4237        tip_set_key: Option<TipSetKey>,
4238    ) -> Result<String, Error> {
4239        let params =
4240            vec![serde_json::to_value(&tip_set_key)
4241                .map_err(|e| Error::invalid_params(e.to_string()))?];
4242        self.client
4243            .request("Filecoin.StateCirculatingSupply", params)
4244            .await
4245    }
4246
4247    async fn state_compute(
4248        &self,
4249        chain_epoch: i64,
4250        s: Vec<Option<Message>>,
4251        tip_set_key: Option<TipSetKey>,
4252    ) -> Result<Option<ComputeStateOutput>, Error> {
4253        let params = vec![
4254            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4255            serde_json::to_value(&s).map_err(|e| Error::invalid_params(e.to_string()))?,
4256            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4257        ];
4258        self.client.request("Filecoin.StateCompute", params).await
4259    }
4260
4261    async fn state_compute_data_cid(
4262        &self,
4263        address: String,
4264        registered_seal_proof: i64,
4265        deal_ids: Vec<u64>,
4266        tip_set_key: Option<TipSetKey>,
4267    ) -> Result<Cid, Error> {
4268        let params = vec![
4269            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4270            serde_json::to_value(&registered_seal_proof)
4271                .map_err(|e| Error::invalid_params(e.to_string()))?,
4272            serde_json::to_value(&deal_ids).map_err(|e| Error::invalid_params(e.to_string()))?,
4273            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4274        ];
4275        self.client
4276            .request("Filecoin.StateComputeDataCID", params)
4277            .await
4278    }
4279
4280    async fn state_deal_provider_collateral_bounds(
4281        &self,
4282        padded_piece_size: u64,
4283        bool: bool,
4284        tip_set_key: Option<TipSetKey>,
4285    ) -> Result<DealCollateralBounds, Error> {
4286        let params = vec![
4287            serde_json::to_value(&padded_piece_size)
4288                .map_err(|e| Error::invalid_params(e.to_string()))?,
4289            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
4290            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4291        ];
4292        self.client
4293            .request("Filecoin.StateDealProviderCollateralBounds", params)
4294            .await
4295    }
4296
4297    async fn state_decode_params(
4298        &self,
4299        address: String,
4300        method_num: u64,
4301        uint8s: Vec<u8>,
4302        tip_set_key: Option<TipSetKey>,
4303    ) -> Result<Value, Error> {
4304        let params = vec![
4305            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4306            serde_json::to_value(&method_num).map_err(|e| Error::invalid_params(e.to_string()))?,
4307            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
4308            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4309        ];
4310        self.client
4311            .request("Filecoin.StateDecodeParams", params)
4312            .await
4313    }
4314
4315    async fn state_encode_params(
4316        &self,
4317        cid: Cid,
4318        method_num: u64,
4319        uint8s: Vec<u8>,
4320    ) -> Result<Vec<u8>, Error> {
4321        let params = vec![
4322            serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?,
4323            serde_json::to_value(&method_num).map_err(|e| Error::invalid_params(e.to_string()))?,
4324            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
4325        ];
4326        self.client
4327            .request("Filecoin.StateEncodeParams", params)
4328            .await
4329    }
4330
4331    async fn state_get_actor(
4332        &self,
4333        address: String,
4334        tip_set_key: Option<TipSetKey>,
4335    ) -> Result<Option<ActorV5>, Error> {
4336        let params = vec![
4337            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4338            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4339        ];
4340        self.client.request("Filecoin.StateGetActor", params).await
4341    }
4342
4343    async fn state_get_all_allocations(
4344        &self,
4345        tip_set_key: Option<TipSetKey>,
4346    ) -> Result<HashMap<u64, Allocation>, Error> {
4347        let params =
4348            vec![serde_json::to_value(&tip_set_key)
4349                .map_err(|e| Error::invalid_params(e.to_string()))?];
4350        self.client
4351            .request("Filecoin.StateGetAllAllocations", params)
4352            .await
4353    }
4354
4355    async fn state_get_all_claims(
4356        &self,
4357        tip_set_key: Option<TipSetKey>,
4358    ) -> Result<HashMap<u64, Claim>, Error> {
4359        let params =
4360            vec![serde_json::to_value(&tip_set_key)
4361                .map_err(|e| Error::invalid_params(e.to_string()))?];
4362        self.client
4363            .request("Filecoin.StateGetAllClaims", params)
4364            .await
4365    }
4366
4367    async fn state_get_allocation(
4368        &self,
4369        address: String,
4370        allocation_id: u64,
4371        tip_set_key: Option<TipSetKey>,
4372    ) -> Result<Option<Allocation>, Error> {
4373        let params = vec![
4374            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4375            serde_json::to_value(&allocation_id)
4376                .map_err(|e| Error::invalid_params(e.to_string()))?,
4377            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4378        ];
4379        self.client
4380            .request("Filecoin.StateGetAllocation", params)
4381            .await
4382    }
4383
4384    async fn state_get_allocation_for_pending_deal(
4385        &self,
4386        deal_id: u64,
4387        tip_set_key: Option<TipSetKey>,
4388    ) -> Result<Option<Allocation>, Error> {
4389        let params = vec![
4390            serde_json::to_value(&deal_id).map_err(|e| Error::invalid_params(e.to_string()))?,
4391            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4392        ];
4393        self.client
4394            .request("Filecoin.StateGetAllocationForPendingDeal", params)
4395            .await
4396    }
4397
4398    async fn state_get_allocation_id_for_pending_deal(
4399        &self,
4400        deal_id: u64,
4401        tip_set_key: Option<TipSetKey>,
4402    ) -> Result<u64, Error> {
4403        let params = vec![
4404            serde_json::to_value(&deal_id).map_err(|e| Error::invalid_params(e.to_string()))?,
4405            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4406        ];
4407        self.client
4408            .request("Filecoin.StateGetAllocationIdForPendingDeal", params)
4409            .await
4410    }
4411
4412    async fn state_get_allocations(
4413        &self,
4414        address: String,
4415        tip_set_key: Option<TipSetKey>,
4416    ) -> Result<HashMap<u64, Allocation>, Error> {
4417        let params = vec![
4418            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4419            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4420        ];
4421        self.client
4422            .request("Filecoin.StateGetAllocations", params)
4423            .await
4424    }
4425
4426    async fn state_get_beacon_entry(&self, chain_epoch: i64) -> Result<Option<BeaconEntry>, Error> {
4427        let params =
4428            vec![serde_json::to_value(&chain_epoch)
4429                .map_err(|e| Error::invalid_params(e.to_string()))?];
4430        self.client
4431            .request("Filecoin.StateGetBeaconEntry", params)
4432            .await
4433    }
4434
4435    async fn state_get_claim(
4436        &self,
4437        address: String,
4438        claim_id: u64,
4439        tip_set_key: Option<TipSetKey>,
4440    ) -> Result<Option<Claim>, Error> {
4441        let params = vec![
4442            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4443            serde_json::to_value(&claim_id).map_err(|e| Error::invalid_params(e.to_string()))?,
4444            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4445        ];
4446        self.client.request("Filecoin.StateGetClaim", params).await
4447    }
4448
4449    async fn state_get_claims(
4450        &self,
4451        address: String,
4452        tip_set_key: Option<TipSetKey>,
4453    ) -> Result<HashMap<u64, Claim>, Error> {
4454        let params = vec![
4455            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4456            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4457        ];
4458        self.client.request("Filecoin.StateGetClaims", params).await
4459    }
4460
4461    async fn state_get_network_params(&self) -> Result<Option<NetworkParams>, Error> {
4462        let params = vec![];
4463        self.client
4464            .request("Filecoin.StateGetNetworkParams", params)
4465            .await
4466    }
4467
4468    async fn state_get_randomness_digest_from_beacon(
4469        &self,
4470        chain_epoch: i64,
4471        tip_set_key: Option<TipSetKey>,
4472    ) -> Result<String, Error> {
4473        let params = vec![
4474            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4475            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4476        ];
4477        self.client
4478            .request("Filecoin.StateGetRandomnessDigestFromBeacon", params)
4479            .await
4480    }
4481
4482    async fn state_get_randomness_digest_from_tickets(
4483        &self,
4484        chain_epoch: i64,
4485        tip_set_key: Option<TipSetKey>,
4486    ) -> Result<String, Error> {
4487        let params = vec![
4488            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4489            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4490        ];
4491        self.client
4492            .request("Filecoin.StateGetRandomnessDigestFromTickets", params)
4493            .await
4494    }
4495
4496    async fn state_get_randomness_from_beacon(
4497        &self,
4498        domain_separation_tag: i64,
4499        chain_epoch: i64,
4500        uint8s: Vec<u8>,
4501        tip_set_key: Option<TipSetKey>,
4502    ) -> Result<String, Error> {
4503        let params = vec![
4504            serde_json::to_value(&domain_separation_tag)
4505                .map_err(|e| Error::invalid_params(e.to_string()))?,
4506            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4507            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
4508            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4509        ];
4510        self.client
4511            .request("Filecoin.StateGetRandomnessFromBeacon", params)
4512            .await
4513    }
4514
4515    async fn state_get_randomness_from_tickets(
4516        &self,
4517        domain_separation_tag: i64,
4518        chain_epoch: i64,
4519        uint8s: Vec<u8>,
4520        tip_set_key: Option<TipSetKey>,
4521    ) -> Result<String, Error> {
4522        let params = vec![
4523            serde_json::to_value(&domain_separation_tag)
4524                .map_err(|e| Error::invalid_params(e.to_string()))?,
4525            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4526            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
4527            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4528        ];
4529        self.client
4530            .request("Filecoin.StateGetRandomnessFromTickets", params)
4531            .await
4532    }
4533
4534    async fn state_list_actors(
4535        &self,
4536        tip_set_key: Option<TipSetKey>,
4537    ) -> Result<Vec<String>, Error> {
4538        let params =
4539            vec![serde_json::to_value(&tip_set_key)
4540                .map_err(|e| Error::invalid_params(e.to_string()))?];
4541        self.client
4542            .request("Filecoin.StateListActors", params)
4543            .await
4544    }
4545
4546    async fn state_list_messages(
4547        &self,
4548        message_match: Option<MessageMatch>,
4549        tip_set_key: Option<TipSetKey>,
4550        chain_epoch: i64,
4551    ) -> Result<Vec<Cid>, Error> {
4552        let params = vec![
4553            serde_json::to_value(&message_match)
4554                .map_err(|e| Error::invalid_params(e.to_string()))?,
4555            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4556            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4557        ];
4558        self.client
4559            .request("Filecoin.StateListMessages", params)
4560            .await
4561    }
4562
4563    async fn state_list_miners(
4564        &self,
4565        tip_set_key: Option<TipSetKey>,
4566    ) -> Result<Vec<String>, Error> {
4567        let params =
4568            vec![serde_json::to_value(&tip_set_key)
4569                .map_err(|e| Error::invalid_params(e.to_string()))?];
4570        self.client
4571            .request("Filecoin.StateListMiners", params)
4572            .await
4573    }
4574
4575    async fn state_lookup_id(
4576        &self,
4577        address: String,
4578        tip_set_key: Option<TipSetKey>,
4579    ) -> Result<String, Error> {
4580        let params = vec![
4581            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4582            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4583        ];
4584        self.client.request("Filecoin.StateLookupID", params).await
4585    }
4586
4587    async fn state_lookup_robust_address(
4588        &self,
4589        address: String,
4590        tip_set_key: Option<TipSetKey>,
4591    ) -> Result<String, Error> {
4592        let params = vec![
4593            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4594            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4595        ];
4596        self.client
4597            .request("Filecoin.StateLookupRobustAddress", params)
4598            .await
4599    }
4600
4601    async fn state_market_balance(
4602        &self,
4603        address: String,
4604        tip_set_key: Option<TipSetKey>,
4605    ) -> Result<MarketBalance, Error> {
4606        let params = vec![
4607            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4608            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4609        ];
4610        self.client
4611            .request("Filecoin.StateMarketBalance", params)
4612            .await
4613    }
4614
4615    async fn state_market_deals(
4616        &self,
4617        tip_set_key: Option<TipSetKey>,
4618    ) -> Result<HashMap<String, Option<MarketDeal>>, Error> {
4619        let params =
4620            vec![serde_json::to_value(&tip_set_key)
4621                .map_err(|e| Error::invalid_params(e.to_string()))?];
4622        self.client
4623            .request("Filecoin.StateMarketDeals", params)
4624            .await
4625    }
4626
4627    async fn state_market_participants(
4628        &self,
4629        tip_set_key: Option<TipSetKey>,
4630    ) -> Result<HashMap<String, MarketBalance>, Error> {
4631        let params =
4632            vec![serde_json::to_value(&tip_set_key)
4633                .map_err(|e| Error::invalid_params(e.to_string()))?];
4634        self.client
4635            .request("Filecoin.StateMarketParticipants", params)
4636            .await
4637    }
4638
4639    async fn state_market_storage_deal(
4640        &self,
4641        deal_id: u64,
4642        tip_set_key: Option<TipSetKey>,
4643    ) -> Result<Option<MarketDeal>, Error> {
4644        let params = vec![
4645            serde_json::to_value(&deal_id).map_err(|e| Error::invalid_params(e.to_string()))?,
4646            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4647        ];
4648        self.client
4649            .request("Filecoin.StateMarketStorageDeal", params)
4650            .await
4651    }
4652
4653    async fn state_miner_active_sectors(
4654        &self,
4655        address: String,
4656        tip_set_key: Option<TipSetKey>,
4657    ) -> Result<Vec<Option<SectorOnChainInfo>>, Error> {
4658        let params = vec![
4659            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4660            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4661        ];
4662        self.client
4663            .request("Filecoin.StateMinerActiveSectors", params)
4664            .await
4665    }
4666
4667    async fn state_miner_allocated(
4668        &self,
4669        address: String,
4670        tip_set_key: Option<TipSetKey>,
4671    ) -> Result<Option<BitField>, Error> {
4672        let params = vec![
4673            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4674            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4675        ];
4676        self.client
4677            .request("Filecoin.StateMinerAllocated", params)
4678            .await
4679    }
4680
4681    async fn state_miner_available_balance(
4682        &self,
4683        address: String,
4684        tip_set_key: Option<TipSetKey>,
4685    ) -> Result<String, Error> {
4686        let params = vec![
4687            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4688            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4689        ];
4690        self.client
4691            .request("Filecoin.StateMinerAvailableBalance", params)
4692            .await
4693    }
4694
4695    async fn state_miner_deadlines(
4696        &self,
4697        address: String,
4698        tip_set_key: Option<TipSetKey>,
4699    ) -> Result<Vec<Deadline>, Error> {
4700        let params = vec![
4701            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4702            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4703        ];
4704        self.client
4705            .request("Filecoin.StateMinerDeadlines", params)
4706            .await
4707    }
4708
4709    async fn state_miner_faults(
4710        &self,
4711        address: String,
4712        tip_set_key: Option<TipSetKey>,
4713    ) -> Result<BitField, Error> {
4714        let params = vec![
4715            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4716            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4717        ];
4718        self.client
4719            .request("Filecoin.StateMinerFaults", params)
4720            .await
4721    }
4722
4723    async fn state_miner_info(
4724        &self,
4725        address: String,
4726        tip_set_key: Option<TipSetKey>,
4727    ) -> Result<MinerInfo, Error> {
4728        let params = vec![
4729            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4730            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4731        ];
4732        self.client.request("Filecoin.StateMinerInfo", params).await
4733    }
4734
4735    async fn state_miner_initial_pledge_collateral(
4736        &self,
4737        address: String,
4738        sector_pre_commit_info: SectorPreCommitInfo,
4739        tip_set_key: Option<TipSetKey>,
4740    ) -> Result<String, Error> {
4741        let params = vec![
4742            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4743            serde_json::to_value(&sector_pre_commit_info)
4744                .map_err(|e| Error::invalid_params(e.to_string()))?,
4745            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4746        ];
4747        self.client
4748            .request("Filecoin.StateMinerInitialPledgeCollateral", params)
4749            .await
4750    }
4751
4752    async fn state_miner_initial_pledge_for_sector(
4753        &self,
4754        chain_epoch: i64,
4755        sector_size: u64,
4756        uint64: u64,
4757        tip_set_key: Option<TipSetKey>,
4758    ) -> Result<String, Error> {
4759        let params = vec![
4760            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4761            serde_json::to_value(&sector_size).map_err(|e| Error::invalid_params(e.to_string()))?,
4762            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
4763            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4764        ];
4765        self.client
4766            .request("Filecoin.StateMinerInitialPledgeForSector", params)
4767            .await
4768    }
4769
4770    async fn state_miner_partitions(
4771        &self,
4772        address: String,
4773        uint64: u64,
4774        tip_set_key: Option<TipSetKey>,
4775    ) -> Result<Vec<Partition>, Error> {
4776        let params = vec![
4777            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4778            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
4779            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4780        ];
4781        self.client
4782            .request("Filecoin.StateMinerPartitions", params)
4783            .await
4784    }
4785
4786    async fn state_miner_power(
4787        &self,
4788        address: String,
4789        tip_set_key: Option<TipSetKey>,
4790    ) -> Result<Option<MinerPower>, Error> {
4791        let params = vec![
4792            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4793            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4794        ];
4795        self.client
4796            .request("Filecoin.StateMinerPower", params)
4797            .await
4798    }
4799
4800    async fn state_miner_pre_commit_deposit_for_power(
4801        &self,
4802        address: String,
4803        sector_pre_commit_info: SectorPreCommitInfo,
4804        tip_set_key: Option<TipSetKey>,
4805    ) -> Result<String, Error> {
4806        let params = vec![
4807            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4808            serde_json::to_value(&sector_pre_commit_info)
4809                .map_err(|e| Error::invalid_params(e.to_string()))?,
4810            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4811        ];
4812        self.client
4813            .request("Filecoin.StateMinerPreCommitDepositForPower", params)
4814            .await
4815    }
4816
4817    async fn state_miner_proving_deadline(
4818        &self,
4819        address: String,
4820        tip_set_key: Option<TipSetKey>,
4821    ) -> Result<Option<Info>, Error> {
4822        let params = vec![
4823            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4824            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4825        ];
4826        self.client
4827            .request("Filecoin.StateMinerProvingDeadline", params)
4828            .await
4829    }
4830
4831    async fn state_miner_recoveries(
4832        &self,
4833        address: String,
4834        tip_set_key: Option<TipSetKey>,
4835    ) -> Result<BitField, Error> {
4836        let params = vec![
4837            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4838            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4839        ];
4840        self.client
4841            .request("Filecoin.StateMinerRecoveries", params)
4842            .await
4843    }
4844
4845    async fn state_miner_sector_allocated(
4846        &self,
4847        address: String,
4848        sector_number: u64,
4849        tip_set_key: Option<TipSetKey>,
4850    ) -> Result<bool, Error> {
4851        let params = vec![
4852            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4853            serde_json::to_value(&sector_number)
4854                .map_err(|e| Error::invalid_params(e.to_string()))?,
4855            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4856        ];
4857        self.client
4858            .request("Filecoin.StateMinerSectorAllocated", params)
4859            .await
4860    }
4861
4862    async fn state_miner_sector_count(
4863        &self,
4864        address: String,
4865        tip_set_key: Option<TipSetKey>,
4866    ) -> Result<MinerSectors, Error> {
4867        let params = vec![
4868            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4869            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4870        ];
4871        self.client
4872            .request("Filecoin.StateMinerSectorCount", params)
4873            .await
4874    }
4875
4876    async fn state_miner_sectors(
4877        &self,
4878        address: String,
4879        bit_field: Option<BitField>,
4880        tip_set_key: Option<TipSetKey>,
4881    ) -> Result<Vec<Option<SectorOnChainInfo>>, Error> {
4882        let params = vec![
4883            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4884            serde_json::to_value(&bit_field).map_err(|e| Error::invalid_params(e.to_string()))?,
4885            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4886        ];
4887        self.client
4888            .request("Filecoin.StateMinerSectors", params)
4889            .await
4890    }
4891
4892    async fn state_network_name(&self) -> Result<String, Error> {
4893        let params = vec![];
4894        self.client
4895            .request("Filecoin.StateNetworkName", params)
4896            .await
4897    }
4898
4899    async fn state_network_version(&self, tip_set_key: Option<TipSetKey>) -> Result<u32, Error> {
4900        let params =
4901            vec![serde_json::to_value(&tip_set_key)
4902                .map_err(|e| Error::invalid_params(e.to_string()))?];
4903        self.client
4904            .request("Filecoin.StateNetworkVersion", params)
4905            .await
4906    }
4907
4908    async fn state_read_state(
4909        &self,
4910        address: String,
4911        tip_set_key: Option<TipSetKey>,
4912    ) -> Result<Option<ActorState>, Error> {
4913        let params = vec![
4914            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4915            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4916        ];
4917        self.client.request("Filecoin.StateReadState", params).await
4918    }
4919
4920    async fn state_replay(
4921        &self,
4922        tip_set_key: Option<TipSetKey>,
4923        cid: Cid,
4924    ) -> Result<Option<InvocResult>, Error> {
4925        let params = vec![
4926            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4927            serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?,
4928        ];
4929        self.client.request("Filecoin.StateReplay", params).await
4930    }
4931
4932    async fn state_search_msg(
4933        &self,
4934        tip_set_key: Option<TipSetKey>,
4935        cid: Cid,
4936        chain_epoch: i64,
4937        bool: bool,
4938    ) -> Result<Option<MsgLookup>, Error> {
4939        let params = vec![
4940            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4941            serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?,
4942            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
4943            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
4944        ];
4945        self.client.request("Filecoin.StateSearchMsg", params).await
4946    }
4947
4948    async fn state_sector_expiration(
4949        &self,
4950        address: String,
4951        sector_number: u64,
4952        tip_set_key: Option<TipSetKey>,
4953    ) -> Result<Option<SectorExpiration>, Error> {
4954        let params = vec![
4955            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4956            serde_json::to_value(&sector_number)
4957                .map_err(|e| Error::invalid_params(e.to_string()))?,
4958            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4959        ];
4960        self.client
4961            .request("Filecoin.StateSectorExpiration", params)
4962            .await
4963    }
4964
4965    async fn state_sector_get_info(
4966        &self,
4967        address: String,
4968        sector_number: u64,
4969        tip_set_key: Option<TipSetKey>,
4970    ) -> Result<Option<SectorOnChainInfo>, Error> {
4971        let params = vec![
4972            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4973            serde_json::to_value(&sector_number)
4974                .map_err(|e| Error::invalid_params(e.to_string()))?,
4975            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4976        ];
4977        self.client
4978            .request("Filecoin.StateSectorGetInfo", params)
4979            .await
4980    }
4981
4982    async fn state_sector_partition(
4983        &self,
4984        address: String,
4985        sector_number: u64,
4986        tip_set_key: Option<TipSetKey>,
4987    ) -> Result<Option<SectorLocation>, Error> {
4988        let params = vec![
4989            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
4990            serde_json::to_value(&sector_number)
4991                .map_err(|e| Error::invalid_params(e.to_string()))?,
4992            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
4993        ];
4994        self.client
4995            .request("Filecoin.StateSectorPartition", params)
4996            .await
4997    }
4998
4999    async fn state_sector_pre_commit_info(
5000        &self,
5001        address: String,
5002        sector_number: u64,
5003        tip_set_key: Option<TipSetKey>,
5004    ) -> Result<Option<SectorPreCommitOnChainInfo>, Error> {
5005        let params = vec![
5006            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
5007            serde_json::to_value(&sector_number)
5008                .map_err(|e| Error::invalid_params(e.to_string()))?,
5009            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
5010        ];
5011        self.client
5012            .request("Filecoin.StateSectorPreCommitInfo", params)
5013            .await
5014    }
5015
5016    async fn state_vm_circulating_supply_internal(
5017        &self,
5018        tip_set_key: Option<TipSetKey>,
5019    ) -> Result<CirculatingSupply, Error> {
5020        let params =
5021            vec![serde_json::to_value(&tip_set_key)
5022                .map_err(|e| Error::invalid_params(e.to_string()))?];
5023        self.client
5024            .request("Filecoin.StateVMCirculatingSupplyInternal", params)
5025            .await
5026    }
5027
5028    async fn state_verified_client_status(
5029        &self,
5030        address: String,
5031        tip_set_key: Option<TipSetKey>,
5032    ) -> Result<Option<String>, Error> {
5033        let params = vec![
5034            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
5035            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
5036        ];
5037        self.client
5038            .request("Filecoin.StateVerifiedClientStatus", params)
5039            .await
5040    }
5041
5042    async fn state_verified_registry_root_key(
5043        &self,
5044        tip_set_key: Option<TipSetKey>,
5045    ) -> Result<String, Error> {
5046        let params =
5047            vec![serde_json::to_value(&tip_set_key)
5048                .map_err(|e| Error::invalid_params(e.to_string()))?];
5049        self.client
5050            .request("Filecoin.StateVerifiedRegistryRootKey", params)
5051            .await
5052    }
5053
5054    async fn state_verifier_status(
5055        &self,
5056        address: String,
5057        tip_set_key: Option<TipSetKey>,
5058    ) -> Result<Option<String>, Error> {
5059        let params = vec![
5060            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
5061            serde_json::to_value(&tip_set_key).map_err(|e| Error::invalid_params(e.to_string()))?,
5062        ];
5063        self.client
5064            .request("Filecoin.StateVerifierStatus", params)
5065            .await
5066    }
5067
5068    async fn state_wait_msg(
5069        &self,
5070        cid: Cid,
5071        uint64: u64,
5072        chain_epoch: i64,
5073        bool: bool,
5074    ) -> Result<Option<MsgLookup>, Error> {
5075        let params = vec![
5076            serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?,
5077            serde_json::to_value(&uint64).map_err(|e| Error::invalid_params(e.to_string()))?,
5078            serde_json::to_value(&chain_epoch).map_err(|e| Error::invalid_params(e.to_string()))?,
5079            serde_json::to_value(&bool).map_err(|e| Error::invalid_params(e.to_string()))?,
5080        ];
5081        self.client.request("Filecoin.StateWaitMsg", params).await
5082    }
5083
5084    async fn subscribe_actor_events_raw(
5085        &self,
5086        actor_event_filter: Option<ActorEventFilter>,
5087    ) -> Result<mpsc::Receiver<Option<ActorEvent>>, Error> {
5088        let params = vec![serde_json::to_value(&actor_event_filter)
5089            .map_err(|e| Error::invalid_params(e.to_string()))?];
5090        self.client
5091            .subscribe("Filecoin.SubscribeActorEventsRaw", params)
5092            .await
5093    }
5094
5095    async fn sync_check_bad(&self, cid: Cid) -> Result<String, Error> {
5096        let params =
5097            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
5098        self.client.request("Filecoin.SyncCheckBad", params).await
5099    }
5100
5101    async fn sync_checkpoint(&self, tip_set_key: Option<TipSetKey>) -> Result<(), Error> {
5102        let params =
5103            vec![serde_json::to_value(&tip_set_key)
5104                .map_err(|e| Error::invalid_params(e.to_string()))?];
5105        self.client
5106            .request::<()>("Filecoin.SyncCheckpoint", params)
5107            .await
5108    }
5109
5110    async fn sync_incoming_blocks(&self) -> Result<mpsc::Receiver<Option<BlockHeader>>, Error> {
5111        let params = vec![];
5112        self.client
5113            .subscribe("Filecoin.SyncIncomingBlocks", params)
5114            .await
5115    }
5116
5117    async fn sync_mark_bad(&self, cid: Cid) -> Result<(), Error> {
5118        let params =
5119            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
5120        self.client
5121            .request::<()>("Filecoin.SyncMarkBad", params)
5122            .await
5123    }
5124
5125    async fn sync_state(&self) -> Result<Option<SyncState>, Error> {
5126        let params = vec![];
5127        self.client.request("Filecoin.SyncState", params).await
5128    }
5129
5130    async fn sync_submit_block(&self, block_msg: Option<BlockMsg>) -> Result<(), Error> {
5131        let params =
5132            vec![serde_json::to_value(&block_msg)
5133                .map_err(|e| Error::invalid_params(e.to_string()))?];
5134        self.client
5135            .request::<()>("Filecoin.SyncSubmitBlock", params)
5136            .await
5137    }
5138
5139    async fn sync_unmark_all_bad(&self) -> Result<(), Error> {
5140        let params = vec![];
5141        self.client
5142            .request::<()>("Filecoin.SyncUnmarkAllBad", params)
5143            .await
5144    }
5145
5146    async fn sync_unmark_bad(&self, cid: Cid) -> Result<(), Error> {
5147        let params =
5148            vec![serde_json::to_value(&cid).map_err(|e| Error::invalid_params(e.to_string()))?];
5149        self.client
5150            .request::<()>("Filecoin.SyncUnmarkBad", params)
5151            .await
5152    }
5153
5154    async fn sync_validate_tipset(&self, tip_set_key: Option<TipSetKey>) -> Result<bool, Error> {
5155        let params =
5156            vec![serde_json::to_value(&tip_set_key)
5157                .map_err(|e| Error::invalid_params(e.to_string()))?];
5158        self.client
5159            .request("Filecoin.SyncValidateTipset", params)
5160            .await
5161    }
5162
5163    async fn version(&self) -> Result<APIVersion, Error> {
5164        let params = vec![];
5165        self.client.request("Filecoin.Version", params).await
5166    }
5167
5168    async fn wallet_balance(&self, address: String) -> Result<String, Error> {
5169        let params =
5170            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
5171        self.client.request("Filecoin.WalletBalance", params).await
5172    }
5173
5174    async fn wallet_default_address(&self) -> Result<String, Error> {
5175        let params = vec![];
5176        self.client
5177            .request("Filecoin.WalletDefaultAddress", params)
5178            .await
5179    }
5180
5181    async fn wallet_delete(&self, address: String) -> Result<(), Error> {
5182        let params =
5183            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
5184        self.client
5185            .request::<()>("Filecoin.WalletDelete", params)
5186            .await
5187    }
5188
5189    async fn wallet_export(&self, address: String) -> Result<Option<KeyInfo>, Error> {
5190        let params =
5191            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
5192        self.client.request("Filecoin.WalletExport", params).await
5193    }
5194
5195    async fn wallet_has(&self, address: String) -> Result<bool, Error> {
5196        let params =
5197            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
5198        self.client.request("Filecoin.WalletHas", params).await
5199    }
5200
5201    async fn wallet_import(&self, key_info: Option<KeyInfo>) -> Result<String, Error> {
5202        let params =
5203            vec![serde_json::to_value(&key_info)
5204                .map_err(|e| Error::invalid_params(e.to_string()))?];
5205        self.client.request("Filecoin.WalletImport", params).await
5206    }
5207
5208    async fn wallet_list(&self) -> Result<Vec<String>, Error> {
5209        let params = vec![];
5210        self.client.request("Filecoin.WalletList", params).await
5211    }
5212
5213    async fn wallet_new(&self, key_type: String) -> Result<String, Error> {
5214        let params =
5215            vec![serde_json::to_value(&key_type)
5216                .map_err(|e| Error::invalid_params(e.to_string()))?];
5217        self.client.request("Filecoin.WalletNew", params).await
5218    }
5219
5220    async fn wallet_set_default(&self, address: String) -> Result<(), Error> {
5221        let params =
5222            vec![serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?];
5223        self.client
5224            .request::<()>("Filecoin.WalletSetDefault", params)
5225            .await
5226    }
5227
5228    async fn wallet_sign(
5229        &self,
5230        address: String,
5231        uint8s: Vec<u8>,
5232    ) -> Result<Option<Signature>, Error> {
5233        let params = vec![
5234            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
5235            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
5236        ];
5237        self.client.request("Filecoin.WalletSign", params).await
5238    }
5239
5240    async fn wallet_sign_message(
5241        &self,
5242        address: String,
5243        message: Option<Message>,
5244    ) -> Result<Option<SignedMessage>, Error> {
5245        let params = vec![
5246            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
5247            serde_json::to_value(&message).map_err(|e| Error::invalid_params(e.to_string()))?,
5248        ];
5249        self.client
5250            .request("Filecoin.WalletSignMessage", params)
5251            .await
5252    }
5253
5254    async fn wallet_validate_address(&self, string: String) -> Result<String, Error> {
5255        let params =
5256            vec![serde_json::to_value(&string).map_err(|e| Error::invalid_params(e.to_string()))?];
5257        self.client
5258            .request("Filecoin.WalletValidateAddress", params)
5259            .await
5260    }
5261
5262    async fn wallet_verify(
5263        &self,
5264        address: String,
5265        uint8s: Vec<u8>,
5266        signature: Option<Signature>,
5267    ) -> Result<bool, Error> {
5268        let params = vec![
5269            serde_json::to_value(&address).map_err(|e| Error::invalid_params(e.to_string()))?,
5270            serde_json::to_value(&uint8s).map_err(|e| Error::invalid_params(e.to_string()))?,
5271            serde_json::to_value(&signature).map_err(|e| Error::invalid_params(e.to_string()))?,
5272        ];
5273        self.client.request("Filecoin.WalletVerify", params).await
5274    }
5275
5276    async fn web3_client_version(&self) -> Result<String, Error> {
5277        let params = vec![];
5278        self.client
5279            .request("Filecoin.Web3ClientVersion", params)
5280            .await
5281    }
5282}