@chainflip/rpc 1.8.10 → 1.8.12
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 +3 -1
- package/dist/common.d.cts +225 -16
- package/dist/common.d.ts +225 -16
- package/dist/common.mjs +4 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/parsers.cjs +13 -3
- package/dist/parsers.d.cts +385 -17
- package/dist/parsers.d.ts +385 -17
- package/dist/parsers.mjs +12 -2
- package/dist/types.d.cts +3 -1
- package/dist/types.d.ts +3 -1
- package/package.json +2 -2
package/dist/common.cjs
CHANGED
|
@@ -27,6 +27,7 @@ var _zod = require('zod');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
var _parserscjs = require('./parsers.cjs');
|
|
@@ -63,7 +64,8 @@ var rpcResult = {
|
|
|
63
64
|
cf_auction_state: _parserscjs.cfAuctionState,
|
|
64
65
|
cf_flip_supply: _parserscjs.cfFlipSuppy,
|
|
65
66
|
cf_eth_state_chain_gateway_address: _parserscjs.ethereumAddress.nullable(),
|
|
66
|
-
cf_eth_key_manager_address: _parserscjs.ethereumAddress.nullable()
|
|
67
|
+
cf_eth_key_manager_address: _parserscjs.ethereumAddress.nullable(),
|
|
68
|
+
cf_pool_orderbook: _parserscjs.cfPoolOrderbook
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
|
package/dist/common.d.cts
CHANGED
|
@@ -148,6 +148,11 @@ type RpcRequest = WithHash<{
|
|
|
148
148
|
cf_flip_supply: [];
|
|
149
149
|
cf_eth_state_chain_gateway_address: [];
|
|
150
150
|
cf_eth_key_manager_address: [];
|
|
151
|
+
cf_pool_orderbook: [
|
|
152
|
+
baseAsset: UncheckedAssetAndChain,
|
|
153
|
+
quoteAsset: UncheckedAssetAndChain,
|
|
154
|
+
orders: number
|
|
155
|
+
];
|
|
151
156
|
}> & {
|
|
152
157
|
chain_getBlockHash: [blockHeight?: number];
|
|
153
158
|
};
|
|
@@ -347,14 +352,153 @@ declare const rpcResult: {
|
|
|
347
352
|
readonly cf_account_info: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
348
353
|
role: z.ZodLiteral<"unregistered">;
|
|
349
354
|
flip_balance: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
355
|
+
asset_balances: z.ZodObject<{
|
|
356
|
+
Bitcoin: z.ZodObject<{
|
|
357
|
+
BTC: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
358
|
+
}, "strip", z.ZodTypeAny, {
|
|
359
|
+
BTC: bigint;
|
|
360
|
+
}, {
|
|
361
|
+
BTC: string | number;
|
|
362
|
+
}>;
|
|
363
|
+
Ethereum: z.ZodObject<{
|
|
364
|
+
ETH: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
365
|
+
USDC: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
366
|
+
FLIP: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
367
|
+
USDT: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
368
|
+
}, "strip", z.ZodTypeAny, {
|
|
369
|
+
ETH: bigint;
|
|
370
|
+
USDC: bigint;
|
|
371
|
+
FLIP: bigint;
|
|
372
|
+
USDT: bigint;
|
|
373
|
+
}, {
|
|
374
|
+
ETH: string | number;
|
|
375
|
+
USDC: string | number;
|
|
376
|
+
FLIP: string | number;
|
|
377
|
+
USDT: string | number;
|
|
378
|
+
}>;
|
|
379
|
+
Polkadot: z.ZodObject<{
|
|
380
|
+
DOT: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
381
|
+
}, "strip", z.ZodTypeAny, {
|
|
382
|
+
DOT: bigint;
|
|
383
|
+
}, {
|
|
384
|
+
DOT: string | number;
|
|
385
|
+
}>;
|
|
386
|
+
Arbitrum: z.ZodObject<{
|
|
387
|
+
ETH: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
388
|
+
USDC: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
389
|
+
}, "strip", z.ZodTypeAny, {
|
|
390
|
+
ETH: bigint;
|
|
391
|
+
USDC: bigint;
|
|
392
|
+
}, {
|
|
393
|
+
ETH: string | number;
|
|
394
|
+
USDC: string | number;
|
|
395
|
+
}>;
|
|
396
|
+
Solana: z.ZodObject<{
|
|
397
|
+
SOL: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
398
|
+
USDC: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
399
|
+
}, "strip", z.ZodTypeAny, {
|
|
400
|
+
USDC: bigint;
|
|
401
|
+
SOL: bigint;
|
|
402
|
+
}, {
|
|
403
|
+
USDC: string | number;
|
|
404
|
+
SOL: string | number;
|
|
405
|
+
}>;
|
|
406
|
+
}, "strip", z.ZodTypeAny, {
|
|
407
|
+
Bitcoin: {
|
|
408
|
+
BTC: bigint;
|
|
409
|
+
};
|
|
410
|
+
Ethereum: {
|
|
411
|
+
ETH: bigint;
|
|
412
|
+
USDC: bigint;
|
|
413
|
+
FLIP: bigint;
|
|
414
|
+
USDT: bigint;
|
|
415
|
+
};
|
|
416
|
+
Arbitrum: {
|
|
417
|
+
ETH: bigint;
|
|
418
|
+
USDC: bigint;
|
|
419
|
+
};
|
|
420
|
+
Solana: {
|
|
421
|
+
USDC: bigint;
|
|
422
|
+
SOL: bigint;
|
|
423
|
+
};
|
|
424
|
+
Polkadot: {
|
|
425
|
+
DOT: bigint;
|
|
426
|
+
};
|
|
427
|
+
}, {
|
|
428
|
+
Bitcoin: {
|
|
429
|
+
BTC: string | number;
|
|
430
|
+
};
|
|
431
|
+
Ethereum: {
|
|
432
|
+
ETH: string | number;
|
|
433
|
+
USDC: string | number;
|
|
434
|
+
FLIP: string | number;
|
|
435
|
+
USDT: string | number;
|
|
436
|
+
};
|
|
437
|
+
Arbitrum: {
|
|
438
|
+
ETH: string | number;
|
|
439
|
+
USDC: string | number;
|
|
440
|
+
};
|
|
441
|
+
Solana: {
|
|
442
|
+
USDC: string | number;
|
|
443
|
+
SOL: string | number;
|
|
444
|
+
};
|
|
445
|
+
Polkadot: {
|
|
446
|
+
DOT: string | number;
|
|
447
|
+
};
|
|
448
|
+
}>;
|
|
350
449
|
}, "strip", z.ZodTypeAny, {
|
|
351
450
|
role: "unregistered";
|
|
352
451
|
flip_balance: bigint;
|
|
452
|
+
asset_balances: {
|
|
453
|
+
Bitcoin: {
|
|
454
|
+
BTC: bigint;
|
|
455
|
+
};
|
|
456
|
+
Ethereum: {
|
|
457
|
+
ETH: bigint;
|
|
458
|
+
USDC: bigint;
|
|
459
|
+
FLIP: bigint;
|
|
460
|
+
USDT: bigint;
|
|
461
|
+
};
|
|
462
|
+
Arbitrum: {
|
|
463
|
+
ETH: bigint;
|
|
464
|
+
USDC: bigint;
|
|
465
|
+
};
|
|
466
|
+
Solana: {
|
|
467
|
+
USDC: bigint;
|
|
468
|
+
SOL: bigint;
|
|
469
|
+
};
|
|
470
|
+
Polkadot: {
|
|
471
|
+
DOT: bigint;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
353
474
|
}, {
|
|
354
475
|
role: "unregistered";
|
|
355
476
|
flip_balance: string | number;
|
|
477
|
+
asset_balances: {
|
|
478
|
+
Bitcoin: {
|
|
479
|
+
BTC: string | number;
|
|
480
|
+
};
|
|
481
|
+
Ethereum: {
|
|
482
|
+
ETH: string | number;
|
|
483
|
+
USDC: string | number;
|
|
484
|
+
FLIP: string | number;
|
|
485
|
+
USDT: string | number;
|
|
486
|
+
};
|
|
487
|
+
Arbitrum: {
|
|
488
|
+
ETH: string | number;
|
|
489
|
+
USDC: string | number;
|
|
490
|
+
};
|
|
491
|
+
Solana: {
|
|
492
|
+
USDC: string | number;
|
|
493
|
+
SOL: string | number;
|
|
494
|
+
};
|
|
495
|
+
Polkadot: {
|
|
496
|
+
DOT: string | number;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
356
499
|
}>, z.ZodObject<{
|
|
357
500
|
role: z.ZodLiteral<"broker">;
|
|
501
|
+
bond: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
358
502
|
flip_balance: z.ZodUnion<[z.ZodEffects<z.ZodNumber, bigint, number>, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>]>;
|
|
359
503
|
earned_fees: z.ZodObject<{
|
|
360
504
|
Bitcoin: z.ZodObject<{
|
|
@@ -451,9 +595,23 @@ declare const rpcResult: {
|
|
|
451
595
|
};
|
|
452
596
|
}>;
|
|
453
597
|
btc_vault_deposit_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
598
|
+
affiliates: z.ZodArray<z.ZodObject<{
|
|
599
|
+
account_id: z.ZodString;
|
|
600
|
+
short_id: z.ZodNumber;
|
|
601
|
+
withdrawal_address: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
602
|
+
}, "strip", z.ZodTypeAny, {
|
|
603
|
+
account_id: string;
|
|
604
|
+
short_id: number;
|
|
605
|
+
withdrawal_address: `0x${string}`;
|
|
606
|
+
}, {
|
|
607
|
+
account_id: string;
|
|
608
|
+
short_id: number;
|
|
609
|
+
withdrawal_address: string;
|
|
610
|
+
}>, "many">;
|
|
454
611
|
}, "strip", z.ZodTypeAny, {
|
|
455
612
|
role: "broker";
|
|
456
613
|
flip_balance: bigint;
|
|
614
|
+
bond: bigint;
|
|
457
615
|
earned_fees: {
|
|
458
616
|
Bitcoin: {
|
|
459
617
|
BTC: bigint;
|
|
@@ -476,10 +634,16 @@ declare const rpcResult: {
|
|
|
476
634
|
DOT: bigint;
|
|
477
635
|
};
|
|
478
636
|
};
|
|
637
|
+
affiliates: {
|
|
638
|
+
account_id: string;
|
|
639
|
+
short_id: number;
|
|
640
|
+
withdrawal_address: `0x${string}`;
|
|
641
|
+
}[];
|
|
479
642
|
btc_vault_deposit_address?: string | null | undefined;
|
|
480
643
|
}, {
|
|
481
644
|
role: "broker";
|
|
482
645
|
flip_balance: string | number;
|
|
646
|
+
bond: string | number;
|
|
483
647
|
earned_fees: {
|
|
484
648
|
Bitcoin: {
|
|
485
649
|
BTC: string | number;
|
|
@@ -502,6 +666,11 @@ declare const rpcResult: {
|
|
|
502
666
|
DOT: string | number;
|
|
503
667
|
};
|
|
504
668
|
};
|
|
669
|
+
affiliates: {
|
|
670
|
+
account_id: string;
|
|
671
|
+
short_id: number;
|
|
672
|
+
withdrawal_address: string;
|
|
673
|
+
}[];
|
|
505
674
|
btc_vault_deposit_address?: string | null | undefined;
|
|
506
675
|
}>, z.ZodObject<{
|
|
507
676
|
role: z.ZodLiteral<"liquidity_provider">;
|
|
@@ -13755,11 +13924,11 @@ declare const rpcResult: {
|
|
|
13755
13924
|
account_id: z.ZodString;
|
|
13756
13925
|
amount: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
|
|
13757
13926
|
}, "strip", z.ZodTypeAny, {
|
|
13758
|
-
amount: bigint;
|
|
13759
13927
|
account_id: string;
|
|
13928
|
+
amount: bigint;
|
|
13760
13929
|
}, {
|
|
13761
|
-
amount: string;
|
|
13762
13930
|
account_id: string;
|
|
13931
|
+
amount: string;
|
|
13763
13932
|
}>, "many">;
|
|
13764
13933
|
deposits_pending_finalization: z.ZodArray<z.ZodObject<{
|
|
13765
13934
|
deposit_id: z.ZodEffects<z.ZodNumber, bigint, number>;
|
|
@@ -13767,23 +13936,23 @@ declare const rpcResult: {
|
|
|
13767
13936
|
account_id: z.ZodString;
|
|
13768
13937
|
amount: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
|
|
13769
13938
|
}, "strip", z.ZodTypeAny, {
|
|
13770
|
-
amount: bigint;
|
|
13771
13939
|
account_id: string;
|
|
13940
|
+
amount: bigint;
|
|
13772
13941
|
}, {
|
|
13773
|
-
amount: string;
|
|
13774
13942
|
account_id: string;
|
|
13943
|
+
amount: string;
|
|
13775
13944
|
}>, "many">;
|
|
13776
13945
|
}, "strip", z.ZodTypeAny, {
|
|
13777
13946
|
deposit_id: bigint;
|
|
13778
13947
|
owed_amounts: {
|
|
13779
|
-
amount: bigint;
|
|
13780
13948
|
account_id: string;
|
|
13949
|
+
amount: bigint;
|
|
13781
13950
|
}[];
|
|
13782
13951
|
}, {
|
|
13783
13952
|
deposit_id: number;
|
|
13784
13953
|
owed_amounts: {
|
|
13785
|
-
amount: string;
|
|
13786
13954
|
account_id: string;
|
|
13955
|
+
amount: string;
|
|
13787
13956
|
}[];
|
|
13788
13957
|
}>, "many">;
|
|
13789
13958
|
pending_withdrawals: z.ZodArray<z.ZodObject<{
|
|
@@ -13800,14 +13969,14 @@ declare const rpcResult: {
|
|
|
13800
13969
|
}, "strip", z.ZodTypeAny, {
|
|
13801
13970
|
fee_tier: number;
|
|
13802
13971
|
available_amounts: {
|
|
13803
|
-
amount: bigint;
|
|
13804
13972
|
account_id: string;
|
|
13973
|
+
amount: bigint;
|
|
13805
13974
|
}[];
|
|
13806
13975
|
deposits_pending_finalization: {
|
|
13807
13976
|
deposit_id: bigint;
|
|
13808
13977
|
owed_amounts: {
|
|
13809
|
-
amount: bigint;
|
|
13810
13978
|
account_id: string;
|
|
13979
|
+
amount: bigint;
|
|
13811
13980
|
}[];
|
|
13812
13981
|
}[];
|
|
13813
13982
|
pending_withdrawals: {
|
|
@@ -13818,14 +13987,14 @@ declare const rpcResult: {
|
|
|
13818
13987
|
}, {
|
|
13819
13988
|
fee_tier: number;
|
|
13820
13989
|
available_amounts: {
|
|
13821
|
-
amount: string;
|
|
13822
13990
|
account_id: string;
|
|
13991
|
+
amount: string;
|
|
13823
13992
|
}[];
|
|
13824
13993
|
deposits_pending_finalization: {
|
|
13825
13994
|
deposit_id: number;
|
|
13826
13995
|
owed_amounts: {
|
|
13827
|
-
amount: string;
|
|
13828
13996
|
account_id: string;
|
|
13997
|
+
amount: string;
|
|
13829
13998
|
}[];
|
|
13830
13999
|
}[];
|
|
13831
14000
|
pending_withdrawals: {
|
|
@@ -13932,22 +14101,22 @@ declare const rpcResult: {
|
|
|
13932
14101
|
account_id: z.ZodString;
|
|
13933
14102
|
amount: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
|
|
13934
14103
|
}, "strip", z.ZodTypeAny, {
|
|
13935
|
-
amount: bigint;
|
|
13936
14104
|
account_id: string;
|
|
14105
|
+
amount: bigint;
|
|
13937
14106
|
}, {
|
|
13938
|
-
amount: string;
|
|
13939
14107
|
account_id: string;
|
|
14108
|
+
amount: string;
|
|
13940
14109
|
}>, "many">;
|
|
13941
14110
|
}, "strip", z.ZodTypeAny, {
|
|
13942
14111
|
fees: {
|
|
13943
|
-
amount: bigint;
|
|
13944
14112
|
account_id: string;
|
|
14113
|
+
amount: bigint;
|
|
13945
14114
|
}[];
|
|
13946
14115
|
deposit_id: bigint;
|
|
13947
14116
|
}, {
|
|
13948
14117
|
fees: {
|
|
13949
|
-
amount: string;
|
|
13950
14118
|
account_id: string;
|
|
14119
|
+
amount: string;
|
|
13951
14120
|
}[];
|
|
13952
14121
|
deposit_id: number;
|
|
13953
14122
|
}>, "many">;
|
|
@@ -13955,8 +14124,8 @@ declare const rpcResult: {
|
|
|
13955
14124
|
fee_tier: number;
|
|
13956
14125
|
pending_fees: {
|
|
13957
14126
|
fees: {
|
|
13958
|
-
amount: bigint;
|
|
13959
14127
|
account_id: string;
|
|
14128
|
+
amount: bigint;
|
|
13960
14129
|
}[];
|
|
13961
14130
|
deposit_id: bigint;
|
|
13962
14131
|
}[];
|
|
@@ -13964,8 +14133,8 @@ declare const rpcResult: {
|
|
|
13964
14133
|
fee_tier: number;
|
|
13965
14134
|
pending_fees: {
|
|
13966
14135
|
fees: {
|
|
13967
|
-
amount: string;
|
|
13968
14136
|
account_id: string;
|
|
14137
|
+
amount: string;
|
|
13969
14138
|
}[];
|
|
13970
14139
|
deposit_id: number;
|
|
13971
14140
|
}[];
|
|
@@ -14143,6 +14312,46 @@ declare const rpcResult: {
|
|
|
14143
14312
|
}, [string | number, string | number]>;
|
|
14144
14313
|
readonly cf_eth_state_chain_gateway_address: z.ZodNullable<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
|
|
14145
14314
|
readonly cf_eth_key_manager_address: z.ZodNullable<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
|
|
14315
|
+
readonly cf_pool_orderbook: z.ZodObject<{
|
|
14316
|
+
bids: z.ZodArray<z.ZodObject<{
|
|
14317
|
+
amount: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
|
|
14318
|
+
sqrt_price: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
|
|
14319
|
+
}, "strip", z.ZodTypeAny, {
|
|
14320
|
+
amount: bigint;
|
|
14321
|
+
sqrt_price: bigint;
|
|
14322
|
+
}, {
|
|
14323
|
+
amount: string;
|
|
14324
|
+
sqrt_price: string;
|
|
14325
|
+
}>, "many">;
|
|
14326
|
+
asks: z.ZodArray<z.ZodObject<{
|
|
14327
|
+
amount: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
|
|
14328
|
+
sqrt_price: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>;
|
|
14329
|
+
}, "strip", z.ZodTypeAny, {
|
|
14330
|
+
amount: bigint;
|
|
14331
|
+
sqrt_price: bigint;
|
|
14332
|
+
}, {
|
|
14333
|
+
amount: string;
|
|
14334
|
+
sqrt_price: string;
|
|
14335
|
+
}>, "many">;
|
|
14336
|
+
}, "strip", z.ZodTypeAny, {
|
|
14337
|
+
asks: {
|
|
14338
|
+
amount: bigint;
|
|
14339
|
+
sqrt_price: bigint;
|
|
14340
|
+
}[];
|
|
14341
|
+
bids: {
|
|
14342
|
+
amount: bigint;
|
|
14343
|
+
sqrt_price: bigint;
|
|
14344
|
+
}[];
|
|
14345
|
+
}, {
|
|
14346
|
+
asks: {
|
|
14347
|
+
amount: string;
|
|
14348
|
+
sqrt_price: string;
|
|
14349
|
+
}[];
|
|
14350
|
+
bids: {
|
|
14351
|
+
amount: string;
|
|
14352
|
+
sqrt_price: string;
|
|
14353
|
+
}[];
|
|
14354
|
+
}>;
|
|
14146
14355
|
};
|
|
14147
14356
|
type RpcMethod = keyof RpcRequest;
|
|
14148
14357
|
type RpcResponse<T extends RpcMethod> = z.input<(typeof rpcResult)[T]>;
|