@chainflip/rpc 1.8.9 → 1.8.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/common.cjs CHANGED
@@ -1,4 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/common.ts
2
+ var _zod = require('zod');
3
+
4
+
5
+
6
+
7
+
2
8
 
3
9
 
4
10
 
@@ -49,7 +55,15 @@ var rpcResult = {
49
55
  cf_boost_pool_pending_fees: _parserscjs.cfBoostPoolPendingFees,
50
56
  state_getMetadata: _parserscjs.stateGetMetadata,
51
57
  state_getRuntimeVersion: _parserscjs.stateGetRuntimeVersion,
52
- lp_total_balances: _parserscjs.lpTotalBalances
58
+ lp_total_balances: _parserscjs.lpTotalBalances,
59
+ cf_failed_call_ethereum: _parserscjs.cfFailedCallEvm.nullable(),
60
+ cf_failed_call_arbitrum: _parserscjs.cfFailedCallEvm.nullable(),
61
+ cf_authority_emission_per_block: _parserscjs.numberOrHex,
62
+ cf_epoch_duration: _zod.z.number(),
63
+ cf_auction_state: _parserscjs.cfAuctionState,
64
+ cf_flip_supply: _parserscjs.cfFlipSuppy,
65
+ cf_eth_state_chain_gateway_address: _parserscjs.ethereumAddress.nullable(),
66
+ cf_eth_key_manager_address: _parserscjs.ethereumAddress.nullable()
53
67
  };
54
68
 
55
69
 
package/dist/common.d.cts CHANGED
@@ -140,6 +140,14 @@ type RpcRequest = WithHash<{
140
140
  state_getMetadata: [];
141
141
  state_getRuntimeVersion: [];
142
142
  lp_total_balances: [accountId: string];
143
+ cf_failed_call_ethereum: [broadcastId: number];
144
+ cf_failed_call_arbitrum: [broadcastId: number];
145
+ cf_authority_emission_per_block: [];
146
+ cf_epoch_duration: [];
147
+ cf_auction_state: [];
148
+ cf_flip_supply: [];
149
+ cf_eth_state_chain_gateway_address: [];
150
+ cf_eth_key_manager_address: [];
143
151
  }> & {
144
152
  chain_getBlockHash: [blockHeight?: number];
145
153
  };
@@ -339,14 +347,153 @@ declare const rpcResult: {
339
347
  readonly cf_account_info: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
340
348
  role: z.ZodLiteral<"unregistered">;
341
349
  flip_balance: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
350
+ asset_balances: z.ZodObject<{
351
+ Bitcoin: z.ZodObject<{
352
+ BTC: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
353
+ }, "strip", z.ZodTypeAny, {
354
+ BTC: bigint;
355
+ }, {
356
+ BTC: string | number;
357
+ }>;
358
+ Ethereum: z.ZodObject<{
359
+ ETH: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
360
+ USDC: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
361
+ FLIP: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
362
+ USDT: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
363
+ }, "strip", z.ZodTypeAny, {
364
+ ETH: bigint;
365
+ USDC: bigint;
366
+ FLIP: bigint;
367
+ USDT: bigint;
368
+ }, {
369
+ ETH: string | number;
370
+ USDC: string | number;
371
+ FLIP: string | number;
372
+ USDT: string | number;
373
+ }>;
374
+ Polkadot: z.ZodObject<{
375
+ DOT: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
376
+ }, "strip", z.ZodTypeAny, {
377
+ DOT: bigint;
378
+ }, {
379
+ DOT: string | number;
380
+ }>;
381
+ Arbitrum: z.ZodObject<{
382
+ ETH: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
383
+ USDC: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
384
+ }, "strip", z.ZodTypeAny, {
385
+ ETH: bigint;
386
+ USDC: bigint;
387
+ }, {
388
+ ETH: string | number;
389
+ USDC: string | number;
390
+ }>;
391
+ Solana: z.ZodObject<{
392
+ SOL: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
393
+ USDC: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ USDC: bigint;
396
+ SOL: bigint;
397
+ }, {
398
+ USDC: string | number;
399
+ SOL: string | number;
400
+ }>;
401
+ }, "strip", z.ZodTypeAny, {
402
+ Bitcoin: {
403
+ BTC: bigint;
404
+ };
405
+ Ethereum: {
406
+ ETH: bigint;
407
+ USDC: bigint;
408
+ FLIP: bigint;
409
+ USDT: bigint;
410
+ };
411
+ Arbitrum: {
412
+ ETH: bigint;
413
+ USDC: bigint;
414
+ };
415
+ Solana: {
416
+ USDC: bigint;
417
+ SOL: bigint;
418
+ };
419
+ Polkadot: {
420
+ DOT: bigint;
421
+ };
422
+ }, {
423
+ Bitcoin: {
424
+ BTC: string | number;
425
+ };
426
+ Ethereum: {
427
+ ETH: string | number;
428
+ USDC: string | number;
429
+ FLIP: string | number;
430
+ USDT: string | number;
431
+ };
432
+ Arbitrum: {
433
+ ETH: string | number;
434
+ USDC: string | number;
435
+ };
436
+ Solana: {
437
+ USDC: string | number;
438
+ SOL: string | number;
439
+ };
440
+ Polkadot: {
441
+ DOT: string | number;
442
+ };
443
+ }>;
342
444
  }, "strip", z.ZodTypeAny, {
343
445
  role: "unregistered";
344
446
  flip_balance: bigint;
447
+ asset_balances: {
448
+ Bitcoin: {
449
+ BTC: bigint;
450
+ };
451
+ Ethereum: {
452
+ ETH: bigint;
453
+ USDC: bigint;
454
+ FLIP: bigint;
455
+ USDT: bigint;
456
+ };
457
+ Arbitrum: {
458
+ ETH: bigint;
459
+ USDC: bigint;
460
+ };
461
+ Solana: {
462
+ USDC: bigint;
463
+ SOL: bigint;
464
+ };
465
+ Polkadot: {
466
+ DOT: bigint;
467
+ };
468
+ };
345
469
  }, {
346
470
  role: "unregistered";
347
471
  flip_balance: string | number;
472
+ asset_balances: {
473
+ Bitcoin: {
474
+ BTC: string | number;
475
+ };
476
+ Ethereum: {
477
+ ETH: string | number;
478
+ USDC: string | number;
479
+ FLIP: string | number;
480
+ USDT: string | number;
481
+ };
482
+ Arbitrum: {
483
+ ETH: string | number;
484
+ USDC: string | number;
485
+ };
486
+ Solana: {
487
+ USDC: string | number;
488
+ SOL: string | number;
489
+ };
490
+ Polkadot: {
491
+ DOT: string | number;
492
+ };
493
+ };
348
494
  }>, z.ZodObject<{
349
495
  role: z.ZodLiteral<"broker">;
496
+ bond: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
350
497
  flip_balance: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
351
498
  earned_fees: z.ZodObject<{
352
499
  Bitcoin: z.ZodObject<{
@@ -443,9 +590,23 @@ declare const rpcResult: {
443
590
  };
444
591
  }>;
445
592
  btc_vault_deposit_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
593
+ affiliates: z.ZodArray<z.ZodObject<{
594
+ account_id: z.ZodString;
595
+ short_id: z.ZodNumber;
596
+ withdrawal_address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
597
+ }, "strip", z.ZodTypeAny, {
598
+ account_id: string;
599
+ short_id: number;
600
+ withdrawal_address: `0x${string}`;
601
+ }, {
602
+ account_id: string;
603
+ short_id: number;
604
+ withdrawal_address: string;
605
+ }>, "many">;
446
606
  }, "strip", z.ZodTypeAny, {
447
607
  role: "broker";
448
608
  flip_balance: bigint;
609
+ bond: bigint;
449
610
  earned_fees: {
450
611
  Bitcoin: {
451
612
  BTC: bigint;
@@ -468,10 +629,16 @@ declare const rpcResult: {
468
629
  DOT: bigint;
469
630
  };
470
631
  };
632
+ affiliates: {
633
+ account_id: string;
634
+ short_id: number;
635
+ withdrawal_address: `0x${string}`;
636
+ }[];
471
637
  btc_vault_deposit_address?: string | null | undefined;
472
638
  }, {
473
639
  role: "broker";
474
640
  flip_balance: string | number;
641
+ bond: string | number;
475
642
  earned_fees: {
476
643
  Bitcoin: {
477
644
  BTC: string | number;
@@ -494,6 +661,11 @@ declare const rpcResult: {
494
661
  DOT: string | number;
495
662
  };
496
663
  };
664
+ affiliates: {
665
+ account_id: string;
666
+ short_id: number;
667
+ withdrawal_address: string;
668
+ }[];
497
669
  btc_vault_deposit_address?: string | null | undefined;
498
670
  }>, z.ZodObject<{
499
671
  role: z.ZodLiteral<"liquidity_provider">;
@@ -13747,11 +13919,11 @@ declare const rpcResult: {
13747
13919
  account_id: z.ZodString;
13748
13920
  amount: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
13749
13921
  }, "strip", z.ZodTypeAny, {
13750
- amount: bigint;
13751
13922
  account_id: string;
13923
+ amount: bigint;
13752
13924
  }, {
13753
- amount: string;
13754
13925
  account_id: string;
13926
+ amount: string;
13755
13927
  }>, "many">;
13756
13928
  deposits_pending_finalization: z.ZodArray<z.ZodObject<{
13757
13929
  deposit_id: z.ZodEffects<z.ZodNumber, bigint, number>;
@@ -13759,23 +13931,23 @@ declare const rpcResult: {
13759
13931
  account_id: z.ZodString;
13760
13932
  amount: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
13761
13933
  }, "strip", z.ZodTypeAny, {
13762
- amount: bigint;
13763
13934
  account_id: string;
13935
+ amount: bigint;
13764
13936
  }, {
13765
- amount: string;
13766
13937
  account_id: string;
13938
+ amount: string;
13767
13939
  }>, "many">;
13768
13940
  }, "strip", z.ZodTypeAny, {
13769
13941
  deposit_id: bigint;
13770
13942
  owed_amounts: {
13771
- amount: bigint;
13772
13943
  account_id: string;
13944
+ amount: bigint;
13773
13945
  }[];
13774
13946
  }, {
13775
13947
  deposit_id: number;
13776
13948
  owed_amounts: {
13777
- amount: string;
13778
13949
  account_id: string;
13950
+ amount: string;
13779
13951
  }[];
13780
13952
  }>, "many">;
13781
13953
  pending_withdrawals: z.ZodArray<z.ZodObject<{
@@ -13792,14 +13964,14 @@ declare const rpcResult: {
13792
13964
  }, "strip", z.ZodTypeAny, {
13793
13965
  fee_tier: number;
13794
13966
  available_amounts: {
13795
- amount: bigint;
13796
13967
  account_id: string;
13968
+ amount: bigint;
13797
13969
  }[];
13798
13970
  deposits_pending_finalization: {
13799
13971
  deposit_id: bigint;
13800
13972
  owed_amounts: {
13801
- amount: bigint;
13802
13973
  account_id: string;
13974
+ amount: bigint;
13803
13975
  }[];
13804
13976
  }[];
13805
13977
  pending_withdrawals: {
@@ -13810,14 +13982,14 @@ declare const rpcResult: {
13810
13982
  }, {
13811
13983
  fee_tier: number;
13812
13984
  available_amounts: {
13813
- amount: string;
13814
13985
  account_id: string;
13986
+ amount: string;
13815
13987
  }[];
13816
13988
  deposits_pending_finalization: {
13817
13989
  deposit_id: number;
13818
13990
  owed_amounts: {
13819
- amount: string;
13820
13991
  account_id: string;
13992
+ amount: string;
13821
13993
  }[];
13822
13994
  }[];
13823
13995
  pending_withdrawals: {
@@ -13924,22 +14096,22 @@ declare const rpcResult: {
13924
14096
  account_id: z.ZodString;
13925
14097
  amount: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
13926
14098
  }, "strip", z.ZodTypeAny, {
13927
- amount: bigint;
13928
14099
  account_id: string;
14100
+ amount: bigint;
13929
14101
  }, {
13930
- amount: string;
13931
14102
  account_id: string;
14103
+ amount: string;
13932
14104
  }>, "many">;
13933
14105
  }, "strip", z.ZodTypeAny, {
13934
14106
  fees: {
13935
- amount: bigint;
13936
14107
  account_id: string;
14108
+ amount: bigint;
13937
14109
  }[];
13938
14110
  deposit_id: bigint;
13939
14111
  }, {
13940
14112
  fees: {
13941
- amount: string;
13942
14113
  account_id: string;
14114
+ amount: string;
13943
14115
  }[];
13944
14116
  deposit_id: number;
13945
14117
  }>, "many">;
@@ -13947,8 +14119,8 @@ declare const rpcResult: {
13947
14119
  fee_tier: number;
13948
14120
  pending_fees: {
13949
14121
  fees: {
13950
- amount: bigint;
13951
14122
  account_id: string;
14123
+ amount: bigint;
13952
14124
  }[];
13953
14125
  deposit_id: bigint;
13954
14126
  }[];
@@ -13956,8 +14128,8 @@ declare const rpcResult: {
13956
14128
  fee_tier: number;
13957
14129
  pending_fees: {
13958
14130
  fees: {
13959
- amount: string;
13960
14131
  account_id: string;
14132
+ amount: string;
13961
14133
  }[];
13962
14134
  deposit_id: number;
13963
14135
  }[];
@@ -14085,6 +14257,56 @@ declare const rpcResult: {
14085
14257
  DOT: string | number;
14086
14258
  };
14087
14259
  }>;
14260
+ readonly cf_failed_call_ethereum: z.ZodNullable<z.ZodObject<{
14261
+ contract: z.ZodEffects<z.ZodString, `0x${string}`, string>;
14262
+ data: z.ZodString;
14263
+ }, "strip", z.ZodTypeAny, {
14264
+ data: string;
14265
+ contract: `0x${string}`;
14266
+ }, {
14267
+ data: string;
14268
+ contract: string;
14269
+ }>>;
14270
+ readonly cf_failed_call_arbitrum: z.ZodNullable<z.ZodObject<{
14271
+ contract: z.ZodEffects<z.ZodString, `0x${string}`, string>;
14272
+ data: z.ZodString;
14273
+ }, "strip", z.ZodTypeAny, {
14274
+ data: string;
14275
+ contract: `0x${string}`;
14276
+ }, {
14277
+ data: string;
14278
+ contract: string;
14279
+ }>>;
14280
+ readonly cf_authority_emission_per_block: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
14281
+ readonly cf_epoch_duration: z.ZodNumber;
14282
+ readonly cf_auction_state: z.ZodObject<{
14283
+ blocks_per_epoch: z.ZodNumber;
14284
+ current_epoch_started_at: z.ZodNumber;
14285
+ redemption_period_as_percentage: z.ZodNumber;
14286
+ min_funding: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
14287
+ auction_size_range: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
14288
+ min_active_bid: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
14289
+ }, "strip", z.ZodTypeAny, {
14290
+ blocks_per_epoch: number;
14291
+ current_epoch_started_at: number;
14292
+ redemption_period_as_percentage: number;
14293
+ min_funding: bigint;
14294
+ auction_size_range: [number, number];
14295
+ min_active_bid: bigint;
14296
+ }, {
14297
+ blocks_per_epoch: number;
14298
+ current_epoch_started_at: number;
14299
+ redemption_period_as_percentage: number;
14300
+ min_funding: string | number;
14301
+ auction_size_range: [number, number];
14302
+ min_active_bid: string | number;
14303
+ }>;
14304
+ readonly cf_flip_supply: z.ZodEffects<z.ZodTuple<[z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>, z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>], null>, {
14305
+ totalIssuance: bigint;
14306
+ offchainFunds: bigint;
14307
+ }, [string | number, string | number]>;
14308
+ readonly cf_eth_state_chain_gateway_address: z.ZodNullable<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
14309
+ readonly cf_eth_key_manager_address: z.ZodNullable<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
14088
14310
  };
14089
14311
  type RpcMethod = keyof RpcRequest;
14090
14312
  type RpcResponse<T extends RpcMethod> = z.input<(typeof rpcResult)[T]>;