@chainflip/rpc 1.11.5 → 1.11.7
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 +299 -1
- package/dist/common.d.ts +299 -1
- package/dist/common.mjs +4 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/parsers.cjs +49 -3
- package/dist/parsers.d.cts +299 -2
- package/dist/parsers.d.ts +299 -2
- package/dist/parsers.mjs +48 -2
- package/dist/types.d.cts +3 -1
- package/dist/types.d.ts +3 -1
- package/package.json +2 -2
package/dist/common.d.ts
CHANGED
|
@@ -195,6 +195,7 @@ type RpcRequest = WithHash<{
|
|
|
195
195
|
cf_lending_pools: [asset?: UncheckedAssetAndChain];
|
|
196
196
|
cf_lending_config: [];
|
|
197
197
|
cf_loan_accounts: [accountId?: string];
|
|
198
|
+
cf_get_vault_addresses: [];
|
|
198
199
|
}> & {
|
|
199
200
|
chain_getBlockHash: [blockHeight?: number];
|
|
200
201
|
};
|
|
@@ -390,7 +391,7 @@ declare const rpcResult: {
|
|
|
390
391
|
is_writable: boolean;
|
|
391
392
|
}[];
|
|
392
393
|
}>]>;
|
|
393
|
-
readonly cf_accounts: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
394
|
+
readonly cf_accounts: z.ZodArray<z.ZodTuple<[z.ZodEffects<z.ZodString, `cF${string}`, string>, z.ZodString], null>, "many">;
|
|
394
395
|
readonly cf_account_info: z.ZodEffects<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
395
396
|
vanity_name: z.ZodOptional<z.ZodString>;
|
|
396
397
|
flip_balance: z.ZodEffects<z.ZodUnion<[z.ZodNumber, z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, bigint, string>, z.ZodString]>, bigint, string | number>;
|
|
@@ -4880,6 +4881,46 @@ declare const rpcResult: {
|
|
|
4880
4881
|
Solana: string | number;
|
|
4881
4882
|
Assethub: string | number;
|
|
4882
4883
|
}>;
|
|
4884
|
+
ingress_delays: z.ZodOptional<z.ZodObject<Omit<{
|
|
4885
|
+
Bitcoin: z.ZodNumber;
|
|
4886
|
+
Ethereum: z.ZodNumber;
|
|
4887
|
+
Polkadot: z.ZodNumber;
|
|
4888
|
+
Arbitrum: z.ZodNumber;
|
|
4889
|
+
Solana: z.ZodNumber;
|
|
4890
|
+
Assethub: z.ZodNumber;
|
|
4891
|
+
}, "Polkadot">, "strip", z.ZodTypeAny, {
|
|
4892
|
+
Bitcoin: number;
|
|
4893
|
+
Ethereum: number;
|
|
4894
|
+
Arbitrum: number;
|
|
4895
|
+
Solana: number;
|
|
4896
|
+
Assethub: number;
|
|
4897
|
+
}, {
|
|
4898
|
+
Bitcoin: number;
|
|
4899
|
+
Ethereum: number;
|
|
4900
|
+
Arbitrum: number;
|
|
4901
|
+
Solana: number;
|
|
4902
|
+
Assethub: number;
|
|
4903
|
+
}>>;
|
|
4904
|
+
boost_delays: z.ZodOptional<z.ZodObject<Omit<{
|
|
4905
|
+
Bitcoin: z.ZodNumber;
|
|
4906
|
+
Ethereum: z.ZodNumber;
|
|
4907
|
+
Polkadot: z.ZodNumber;
|
|
4908
|
+
Arbitrum: z.ZodNumber;
|
|
4909
|
+
Solana: z.ZodNumber;
|
|
4910
|
+
Assethub: z.ZodNumber;
|
|
4911
|
+
}, "Polkadot">, "strip", z.ZodTypeAny, {
|
|
4912
|
+
Bitcoin: number;
|
|
4913
|
+
Ethereum: number;
|
|
4914
|
+
Arbitrum: number;
|
|
4915
|
+
Solana: number;
|
|
4916
|
+
Assethub: number;
|
|
4917
|
+
}, {
|
|
4918
|
+
Bitcoin: number;
|
|
4919
|
+
Ethereum: number;
|
|
4920
|
+
Arbitrum: number;
|
|
4921
|
+
Solana: number;
|
|
4922
|
+
Assethub: number;
|
|
4923
|
+
}>>;
|
|
4883
4924
|
}, "strip", z.ZodTypeAny, {
|
|
4884
4925
|
minimum_deposit_amounts: {
|
|
4885
4926
|
Bitcoin: {
|
|
@@ -4991,6 +5032,20 @@ declare const rpcResult: {
|
|
|
4991
5032
|
Solana: bigint;
|
|
4992
5033
|
Assethub: bigint;
|
|
4993
5034
|
};
|
|
5035
|
+
ingress_delays?: {
|
|
5036
|
+
Bitcoin: number;
|
|
5037
|
+
Ethereum: number;
|
|
5038
|
+
Arbitrum: number;
|
|
5039
|
+
Solana: number;
|
|
5040
|
+
Assethub: number;
|
|
5041
|
+
} | undefined;
|
|
5042
|
+
boost_delays?: {
|
|
5043
|
+
Bitcoin: number;
|
|
5044
|
+
Ethereum: number;
|
|
5045
|
+
Arbitrum: number;
|
|
5046
|
+
Solana: number;
|
|
5047
|
+
Assethub: number;
|
|
5048
|
+
} | undefined;
|
|
4994
5049
|
}, {
|
|
4995
5050
|
minimum_deposit_amounts: {
|
|
4996
5051
|
Bitcoin: {
|
|
@@ -5102,6 +5157,20 @@ declare const rpcResult: {
|
|
|
5102
5157
|
Solana: string | number;
|
|
5103
5158
|
Assethub: string | number;
|
|
5104
5159
|
};
|
|
5160
|
+
ingress_delays?: {
|
|
5161
|
+
Bitcoin: number;
|
|
5162
|
+
Ethereum: number;
|
|
5163
|
+
Arbitrum: number;
|
|
5164
|
+
Solana: number;
|
|
5165
|
+
Assethub: number;
|
|
5166
|
+
} | undefined;
|
|
5167
|
+
boost_delays?: {
|
|
5168
|
+
Bitcoin: number;
|
|
5169
|
+
Ethereum: number;
|
|
5170
|
+
Arbitrum: number;
|
|
5171
|
+
Solana: number;
|
|
5172
|
+
Assethub: number;
|
|
5173
|
+
} | undefined;
|
|
5105
5174
|
}>, Omit<{
|
|
5106
5175
|
minimum_deposit_amounts: {
|
|
5107
5176
|
Bitcoin: {
|
|
@@ -5213,6 +5282,20 @@ declare const rpcResult: {
|
|
|
5213
5282
|
Solana: bigint;
|
|
5214
5283
|
Assethub: bigint;
|
|
5215
5284
|
};
|
|
5285
|
+
ingress_delays?: {
|
|
5286
|
+
Bitcoin: number;
|
|
5287
|
+
Ethereum: number;
|
|
5288
|
+
Arbitrum: number;
|
|
5289
|
+
Solana: number;
|
|
5290
|
+
Assethub: number;
|
|
5291
|
+
} | undefined;
|
|
5292
|
+
boost_delays?: {
|
|
5293
|
+
Bitcoin: number;
|
|
5294
|
+
Ethereum: number;
|
|
5295
|
+
Arbitrum: number;
|
|
5296
|
+
Solana: number;
|
|
5297
|
+
Assethub: number;
|
|
5298
|
+
} | undefined;
|
|
5216
5299
|
}, "egress_dust_limits"> & {
|
|
5217
5300
|
readonly minimum_egress_amounts: {
|
|
5218
5301
|
Bitcoin: {
|
|
@@ -5349,6 +5432,20 @@ declare const rpcResult: {
|
|
|
5349
5432
|
Solana: string | number;
|
|
5350
5433
|
Assethub: string | number;
|
|
5351
5434
|
};
|
|
5435
|
+
ingress_delays?: {
|
|
5436
|
+
Bitcoin: number;
|
|
5437
|
+
Ethereum: number;
|
|
5438
|
+
Arbitrum: number;
|
|
5439
|
+
Solana: number;
|
|
5440
|
+
Assethub: number;
|
|
5441
|
+
} | undefined;
|
|
5442
|
+
boost_delays?: {
|
|
5443
|
+
Bitcoin: number;
|
|
5444
|
+
Ethereum: number;
|
|
5445
|
+
Arbitrum: number;
|
|
5446
|
+
Solana: number;
|
|
5447
|
+
Assethub: number;
|
|
5448
|
+
} | undefined;
|
|
5352
5449
|
}>;
|
|
5353
5450
|
swapping: z.ZodObject<{
|
|
5354
5451
|
maximum_swap_amounts: z.ZodObject<Omit<{
|
|
@@ -10934,6 +11031,20 @@ declare const rpcResult: {
|
|
|
10934
11031
|
Solana: bigint;
|
|
10935
11032
|
Assethub: bigint;
|
|
10936
11033
|
};
|
|
11034
|
+
ingress_delays?: {
|
|
11035
|
+
Bitcoin: number;
|
|
11036
|
+
Ethereum: number;
|
|
11037
|
+
Arbitrum: number;
|
|
11038
|
+
Solana: number;
|
|
11039
|
+
Assethub: number;
|
|
11040
|
+
} | undefined;
|
|
11041
|
+
boost_delays?: {
|
|
11042
|
+
Bitcoin: number;
|
|
11043
|
+
Ethereum: number;
|
|
11044
|
+
Arbitrum: number;
|
|
11045
|
+
Solana: number;
|
|
11046
|
+
Assethub: number;
|
|
11047
|
+
} | undefined;
|
|
10937
11048
|
}, "egress_dust_limits"> & {
|
|
10938
11049
|
readonly minimum_egress_amounts: {
|
|
10939
11050
|
Bitcoin: {
|
|
@@ -11723,6 +11834,20 @@ declare const rpcResult: {
|
|
|
11723
11834
|
Solana: string | number;
|
|
11724
11835
|
Assethub: string | number;
|
|
11725
11836
|
};
|
|
11837
|
+
ingress_delays?: {
|
|
11838
|
+
Bitcoin: number;
|
|
11839
|
+
Ethereum: number;
|
|
11840
|
+
Arbitrum: number;
|
|
11841
|
+
Solana: number;
|
|
11842
|
+
Assethub: number;
|
|
11843
|
+
} | undefined;
|
|
11844
|
+
boost_delays?: {
|
|
11845
|
+
Bitcoin: number;
|
|
11846
|
+
Ethereum: number;
|
|
11847
|
+
Arbitrum: number;
|
|
11848
|
+
Solana: number;
|
|
11849
|
+
Assethub: number;
|
|
11850
|
+
} | undefined;
|
|
11726
11851
|
};
|
|
11727
11852
|
swapping: {
|
|
11728
11853
|
maximum_swap_amounts: {
|
|
@@ -12618,6 +12743,46 @@ declare const rpcResult: {
|
|
|
12618
12743
|
Solana: string | number;
|
|
12619
12744
|
Assethub: string | number;
|
|
12620
12745
|
}>;
|
|
12746
|
+
ingress_delays: z.ZodOptional<z.ZodObject<Omit<{
|
|
12747
|
+
Bitcoin: z.ZodNumber;
|
|
12748
|
+
Ethereum: z.ZodNumber;
|
|
12749
|
+
Polkadot: z.ZodNumber;
|
|
12750
|
+
Arbitrum: z.ZodNumber;
|
|
12751
|
+
Solana: z.ZodNumber;
|
|
12752
|
+
Assethub: z.ZodNumber;
|
|
12753
|
+
}, "Polkadot">, "strip", z.ZodTypeAny, {
|
|
12754
|
+
Bitcoin: number;
|
|
12755
|
+
Ethereum: number;
|
|
12756
|
+
Arbitrum: number;
|
|
12757
|
+
Solana: number;
|
|
12758
|
+
Assethub: number;
|
|
12759
|
+
}, {
|
|
12760
|
+
Bitcoin: number;
|
|
12761
|
+
Ethereum: number;
|
|
12762
|
+
Arbitrum: number;
|
|
12763
|
+
Solana: number;
|
|
12764
|
+
Assethub: number;
|
|
12765
|
+
}>>;
|
|
12766
|
+
boost_delays: z.ZodOptional<z.ZodObject<Omit<{
|
|
12767
|
+
Bitcoin: z.ZodNumber;
|
|
12768
|
+
Ethereum: z.ZodNumber;
|
|
12769
|
+
Polkadot: z.ZodNumber;
|
|
12770
|
+
Arbitrum: z.ZodNumber;
|
|
12771
|
+
Solana: z.ZodNumber;
|
|
12772
|
+
Assethub: z.ZodNumber;
|
|
12773
|
+
}, "Polkadot">, "strip", z.ZodTypeAny, {
|
|
12774
|
+
Bitcoin: number;
|
|
12775
|
+
Ethereum: number;
|
|
12776
|
+
Arbitrum: number;
|
|
12777
|
+
Solana: number;
|
|
12778
|
+
Assethub: number;
|
|
12779
|
+
}, {
|
|
12780
|
+
Bitcoin: number;
|
|
12781
|
+
Ethereum: number;
|
|
12782
|
+
Arbitrum: number;
|
|
12783
|
+
Solana: number;
|
|
12784
|
+
Assethub: number;
|
|
12785
|
+
}>>;
|
|
12621
12786
|
}, "strip", z.ZodTypeAny, {
|
|
12622
12787
|
minimum_deposit_amounts: {
|
|
12623
12788
|
Bitcoin: {
|
|
@@ -12729,6 +12894,20 @@ declare const rpcResult: {
|
|
|
12729
12894
|
Solana: bigint;
|
|
12730
12895
|
Assethub: bigint;
|
|
12731
12896
|
};
|
|
12897
|
+
ingress_delays?: {
|
|
12898
|
+
Bitcoin: number;
|
|
12899
|
+
Ethereum: number;
|
|
12900
|
+
Arbitrum: number;
|
|
12901
|
+
Solana: number;
|
|
12902
|
+
Assethub: number;
|
|
12903
|
+
} | undefined;
|
|
12904
|
+
boost_delays?: {
|
|
12905
|
+
Bitcoin: number;
|
|
12906
|
+
Ethereum: number;
|
|
12907
|
+
Arbitrum: number;
|
|
12908
|
+
Solana: number;
|
|
12909
|
+
Assethub: number;
|
|
12910
|
+
} | undefined;
|
|
12732
12911
|
}, {
|
|
12733
12912
|
minimum_deposit_amounts: {
|
|
12734
12913
|
Bitcoin: {
|
|
@@ -12840,6 +13019,20 @@ declare const rpcResult: {
|
|
|
12840
13019
|
Solana: string | number;
|
|
12841
13020
|
Assethub: string | number;
|
|
12842
13021
|
};
|
|
13022
|
+
ingress_delays?: {
|
|
13023
|
+
Bitcoin: number;
|
|
13024
|
+
Ethereum: number;
|
|
13025
|
+
Arbitrum: number;
|
|
13026
|
+
Solana: number;
|
|
13027
|
+
Assethub: number;
|
|
13028
|
+
} | undefined;
|
|
13029
|
+
boost_delays?: {
|
|
13030
|
+
Bitcoin: number;
|
|
13031
|
+
Ethereum: number;
|
|
13032
|
+
Arbitrum: number;
|
|
13033
|
+
Solana: number;
|
|
13034
|
+
Assethub: number;
|
|
13035
|
+
} | undefined;
|
|
12843
13036
|
}>, Omit<{
|
|
12844
13037
|
minimum_deposit_amounts: {
|
|
12845
13038
|
Bitcoin: {
|
|
@@ -12951,6 +13144,20 @@ declare const rpcResult: {
|
|
|
12951
13144
|
Solana: bigint;
|
|
12952
13145
|
Assethub: bigint;
|
|
12953
13146
|
};
|
|
13147
|
+
ingress_delays?: {
|
|
13148
|
+
Bitcoin: number;
|
|
13149
|
+
Ethereum: number;
|
|
13150
|
+
Arbitrum: number;
|
|
13151
|
+
Solana: number;
|
|
13152
|
+
Assethub: number;
|
|
13153
|
+
} | undefined;
|
|
13154
|
+
boost_delays?: {
|
|
13155
|
+
Bitcoin: number;
|
|
13156
|
+
Ethereum: number;
|
|
13157
|
+
Arbitrum: number;
|
|
13158
|
+
Solana: number;
|
|
13159
|
+
Assethub: number;
|
|
13160
|
+
} | undefined;
|
|
12954
13161
|
}, "egress_dust_limits"> & {
|
|
12955
13162
|
readonly minimum_egress_amounts: {
|
|
12956
13163
|
Bitcoin: {
|
|
@@ -13087,6 +13294,20 @@ declare const rpcResult: {
|
|
|
13087
13294
|
Solana: string | number;
|
|
13088
13295
|
Assethub: string | number;
|
|
13089
13296
|
};
|
|
13297
|
+
ingress_delays?: {
|
|
13298
|
+
Bitcoin: number;
|
|
13299
|
+
Ethereum: number;
|
|
13300
|
+
Arbitrum: number;
|
|
13301
|
+
Solana: number;
|
|
13302
|
+
Assethub: number;
|
|
13303
|
+
} | undefined;
|
|
13304
|
+
boost_delays?: {
|
|
13305
|
+
Bitcoin: number;
|
|
13306
|
+
Ethereum: number;
|
|
13307
|
+
Arbitrum: number;
|
|
13308
|
+
Solana: number;
|
|
13309
|
+
Assethub: number;
|
|
13310
|
+
} | undefined;
|
|
13090
13311
|
}>;
|
|
13091
13312
|
readonly cf_pool_orders: z.ZodObject<{
|
|
13092
13313
|
limit_orders: z.ZodObject<{
|
|
@@ -26461,6 +26682,83 @@ declare const rpcResult: {
|
|
|
26461
26682
|
is_hard: boolean;
|
|
26462
26683
|
} | null;
|
|
26463
26684
|
}>, "many">;
|
|
26685
|
+
readonly cf_get_vault_addresses: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
26686
|
+
ethereum: z.ZodObject<{
|
|
26687
|
+
Eth: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, `0x${string}`, number[]>;
|
|
26688
|
+
}, "strip", z.ZodTypeAny, {
|
|
26689
|
+
Eth: `0x${string}`;
|
|
26690
|
+
}, {
|
|
26691
|
+
Eth: number[];
|
|
26692
|
+
}>;
|
|
26693
|
+
arbitrum: z.ZodObject<{
|
|
26694
|
+
Arb: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, `0x${string}`, number[]>;
|
|
26695
|
+
}, "strip", z.ZodTypeAny, {
|
|
26696
|
+
Arb: `0x${string}`;
|
|
26697
|
+
}, {
|
|
26698
|
+
Arb: number[];
|
|
26699
|
+
}>;
|
|
26700
|
+
bitcoin: z.ZodArray<z.ZodTuple<[z.ZodEffects<z.ZodString, `cF${string}`, string>, z.ZodObject<{
|
|
26701
|
+
Btc: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, string, number[]>;
|
|
26702
|
+
}, "strip", z.ZodTypeAny, {
|
|
26703
|
+
Btc: string;
|
|
26704
|
+
}, {
|
|
26705
|
+
Btc: number[];
|
|
26706
|
+
}>], null>, "many">;
|
|
26707
|
+
}, "strip", z.ZodTypeAny, {
|
|
26708
|
+
ethereum: {
|
|
26709
|
+
Eth: `0x${string}`;
|
|
26710
|
+
};
|
|
26711
|
+
arbitrum: {
|
|
26712
|
+
Arb: `0x${string}`;
|
|
26713
|
+
};
|
|
26714
|
+
bitcoin: [`cF${string}`, {
|
|
26715
|
+
Btc: string;
|
|
26716
|
+
}][];
|
|
26717
|
+
}, {
|
|
26718
|
+
ethereum: {
|
|
26719
|
+
Eth: number[];
|
|
26720
|
+
};
|
|
26721
|
+
arbitrum: {
|
|
26722
|
+
Arb: number[];
|
|
26723
|
+
};
|
|
26724
|
+
bitcoin: [string, {
|
|
26725
|
+
Btc: number[];
|
|
26726
|
+
}][];
|
|
26727
|
+
}>, {
|
|
26728
|
+
Ethereum: `0x${string}`;
|
|
26729
|
+
Arbitrum: `0x${string}`;
|
|
26730
|
+
Bitcoin: Map<`cF${string}`, {
|
|
26731
|
+
current: string;
|
|
26732
|
+
previous: string;
|
|
26733
|
+
}>;
|
|
26734
|
+
}, {
|
|
26735
|
+
ethereum: {
|
|
26736
|
+
Eth: number[];
|
|
26737
|
+
};
|
|
26738
|
+
arbitrum: {
|
|
26739
|
+
Arb: number[];
|
|
26740
|
+
};
|
|
26741
|
+
bitcoin: [string, {
|
|
26742
|
+
Btc: number[];
|
|
26743
|
+
}][];
|
|
26744
|
+
}>, {
|
|
26745
|
+
Ethereum: `0x${string}`;
|
|
26746
|
+
Arbitrum: `0x${string}`;
|
|
26747
|
+
Bitcoin: Map<`cF${string}`, {
|
|
26748
|
+
current: string;
|
|
26749
|
+
previous: string;
|
|
26750
|
+
}>;
|
|
26751
|
+
}, {
|
|
26752
|
+
ethereum: {
|
|
26753
|
+
Eth: number[];
|
|
26754
|
+
};
|
|
26755
|
+
arbitrum: {
|
|
26756
|
+
Arb: number[];
|
|
26757
|
+
};
|
|
26758
|
+
bitcoin: [string, {
|
|
26759
|
+
Btc: number[];
|
|
26760
|
+
}][];
|
|
26761
|
+
}>;
|
|
26464
26762
|
};
|
|
26465
26763
|
type RpcMethod = keyof RpcRequest;
|
|
26466
26764
|
type RpcResponse<T extends RpcMethod> = z.input<(typeof rpcResult)[T]>;
|
package/dist/common.mjs
CHANGED
|
@@ -39,7 +39,8 @@ import {
|
|
|
39
39
|
cfLendingPools,
|
|
40
40
|
cfLendingConfig,
|
|
41
41
|
cfLoanAccounts,
|
|
42
|
-
cfMonitoringSimulateAuction
|
|
42
|
+
cfMonitoringSimulateAuction,
|
|
43
|
+
cfVaultAddresses
|
|
43
44
|
} from "./parsers.mjs";
|
|
44
45
|
import { rpcResponse } from "./parsers.mjs";
|
|
45
46
|
var rpcResult = {
|
|
@@ -86,7 +87,8 @@ var rpcResult = {
|
|
|
86
87
|
cf_oracle_prices: cfOraclePrices,
|
|
87
88
|
cf_lending_pools: cfLendingPools,
|
|
88
89
|
cf_lending_config: cfLendingConfig,
|
|
89
|
-
cf_loan_accounts: cfLoanAccounts
|
|
90
|
+
cf_loan_accounts: cfLoanAccounts,
|
|
91
|
+
cf_get_vault_addresses: cfVaultAddresses
|
|
90
92
|
};
|
|
91
93
|
export {
|
|
92
94
|
rpcResponse,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as HttpClient } from './HttpClient.cjs';
|
|
2
2
|
export { default as WsClient } from './WsClient.cjs';
|
|
3
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPools, CfLendingPoolsResponse, CfLiquidityProviderAccount, CfLoanAccounts, CfLoanAccountsResponse, CfMonitoringSimulateAuction, CfMonitoringSimulateAuctionResponse, CfOperatorAccount, CfOraclePrices, CfOraclePricesResponse, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSafeModeStatuses, CfSafeModeStatusesResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, LpTotalBalances, LpTotalBalancesResponse } from './types.cjs';
|
|
3
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPools, CfLendingPoolsResponse, CfLiquidityProviderAccount, CfLoanAccounts, CfLoanAccountsResponse, CfMonitoringSimulateAuction, CfMonitoringSimulateAuctionResponse, CfOperatorAccount, CfOraclePrices, CfOraclePricesResponse, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSafeModeStatuses, CfSafeModeStatusesResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, CfVaultAddresses, CfVaultAddressesResponse, LpTotalBalances, LpTotalBalancesResponse } from './types.cjs';
|
|
4
4
|
export { c as constants } from './constants-jLrn-AnI.cjs';
|
|
5
5
|
export { RpcLimitOrder, RpcRangeOrder } from './parsers.cjs';
|
|
6
6
|
export { RpcMethod, RpcRequest as RpcParams, RpcResult } from './common.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as HttpClient } from './HttpClient.js';
|
|
2
2
|
export { default as WsClient } from './WsClient.js';
|
|
3
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPools, CfLendingPoolsResponse, CfLiquidityProviderAccount, CfLoanAccounts, CfLoanAccountsResponse, CfMonitoringSimulateAuction, CfMonitoringSimulateAuctionResponse, CfOperatorAccount, CfOraclePrices, CfOraclePricesResponse, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSafeModeStatuses, CfSafeModeStatusesResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, LpTotalBalances, LpTotalBalancesResponse } from './types.js';
|
|
3
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPools, CfLendingPoolsResponse, CfLiquidityProviderAccount, CfLoanAccounts, CfLoanAccountsResponse, CfMonitoringSimulateAuction, CfMonitoringSimulateAuctionResponse, CfOperatorAccount, CfOraclePrices, CfOraclePricesResponse, CfPoolDepth, CfPoolDepthResponse, CfPoolOrderbook, CfPoolOrderbookResponse, CfPoolOrders, CfPoolOrdersResponse, CfPoolPriceV2, CfPoolPriceV2Response, CfPoolsEnvironment, CfPoolsEnvironmentResponse, CfRequestSwapParameterEncoding, CfRequestSwapParameterEncodingResponse, CfSafeModeStatuses, CfSafeModeStatusesResponse, CfSupportedAssets, CfSupportedAssetsResponse, CfSwapRate, CfSwapRateResponse, CfSwapRateV2, CfSwapRateV2Response, CfSwapRateV3, CfSwapRateV3Response, CfSwappingEnvironment, CfSwappingEnvironmentResponse, CfUnregisteredAccount, CfValidatorAccount, CfVaultAddresses, CfVaultAddressesResponse, LpTotalBalances, LpTotalBalancesResponse } from './types.js';
|
|
4
4
|
export { c as constants } from './constants-jLrn-AnI.js';
|
|
5
5
|
export { RpcLimitOrder, RpcRangeOrder } from './parsers.js';
|
|
6
6
|
export { RpcMethod, RpcRequest as RpcParams, RpcResult } from './common.js';
|
package/dist/parsers.cjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/parsers.ts
|
|
2
|
+
var _bytes = require('@chainflip/utils/bytes');
|
|
2
3
|
var _chainflip = require('@chainflip/utils/chainflip');
|
|
3
4
|
var _guard = require('@chainflip/utils/guard');
|
|
4
5
|
var _string = require('@chainflip/utils/string');
|
|
@@ -106,7 +107,11 @@ var cfIngressEgressEnvironment = _zod.z.object({
|
|
|
106
107
|
egress_fees: chainAssetMapFactory(numberOrHex.nullable(), null),
|
|
107
108
|
witness_safety_margins: chainMapFactory(_zod.z.number().nullable(), null),
|
|
108
109
|
egress_dust_limits: chainAssetMapFactory(numberOrHex, 0),
|
|
109
|
-
channel_opening_fees: chainMapFactory(numberOrHex, 0)
|
|
110
|
+
channel_opening_fees: chainMapFactory(numberOrHex, 0),
|
|
111
|
+
ingress_delays: chainMapFactory(_zod.z.number(), 0).optional(),
|
|
112
|
+
// TODO(1.12): remove after all networks upgraded
|
|
113
|
+
boost_delays: chainMapFactory(_zod.z.number(), 0).optional()
|
|
114
|
+
// TODO(1.12): remove after all networks upgraded
|
|
110
115
|
}).transform(rename({ egress_dust_limits: "minimum_egress_amounts" }));
|
|
111
116
|
var cfSwappingEnvironment = _zod.z.object({
|
|
112
117
|
maximum_swap_amounts: chainAssetMapFactory(numberOrHex.nullable(), null),
|
|
@@ -319,7 +324,7 @@ var cfAccountInfo = _zod.z.discriminatedUnion("role", [unregistered, broker, ope
|
|
|
319
324
|
}
|
|
320
325
|
}
|
|
321
326
|
});
|
|
322
|
-
var cfAccounts = _zod.z.array(_zod.z.tuple([
|
|
327
|
+
var cfAccounts = _zod.z.array(_zod.z.tuple([accountId, _zod.z.string()]));
|
|
323
328
|
var cfPoolPriceV2 = _zod.z.object({
|
|
324
329
|
sell: numberOrHex.nullable(),
|
|
325
330
|
buy: numberOrHex.nullable(),
|
|
@@ -649,6 +654,47 @@ var cfLoanAccount = _zod.z.object({
|
|
|
649
654
|
}).nullable()
|
|
650
655
|
});
|
|
651
656
|
var cfLoanAccounts = _zod.z.array(cfLoanAccount);
|
|
657
|
+
var cfVaultAddresses = _zod.z.object({
|
|
658
|
+
ethereum: _zod.z.object({ Eth: _zod.z.array(_zod.z.number()).length(20).transform(_bytes.bytesToHex) }),
|
|
659
|
+
arbitrum: _zod.z.object({ Arb: _zod.z.array(_zod.z.number()).length(20).transform(_bytes.bytesToHex) }),
|
|
660
|
+
bitcoin: _zod.z.array(
|
|
661
|
+
_zod.z.tuple([
|
|
662
|
+
accountId,
|
|
663
|
+
_zod.z.object({
|
|
664
|
+
Btc: _zod.z.array(_zod.z.number()).transform((bytes) => new TextDecoder().decode(new Uint8Array(bytes)))
|
|
665
|
+
})
|
|
666
|
+
])
|
|
667
|
+
)
|
|
668
|
+
}).transform(({ ethereum, arbitrum, bitcoin }) => {
|
|
669
|
+
const bitcoinAddresses = bitcoin.reduce((acc, [brokerId, { Btc }]) => {
|
|
670
|
+
let obj = acc.get(brokerId);
|
|
671
|
+
if (!obj) {
|
|
672
|
+
obj = { current: "", previous: "" };
|
|
673
|
+
acc.set(brokerId, obj);
|
|
674
|
+
}
|
|
675
|
+
if (!obj.previous) {
|
|
676
|
+
obj.previous = Btc;
|
|
677
|
+
} else {
|
|
678
|
+
obj.current = Btc;
|
|
679
|
+
}
|
|
680
|
+
return acc;
|
|
681
|
+
}, /* @__PURE__ */ new Map());
|
|
682
|
+
return {
|
|
683
|
+
Ethereum: ethereum.Eth,
|
|
684
|
+
Arbitrum: arbitrum.Arb,
|
|
685
|
+
Bitcoin: bitcoinAddresses
|
|
686
|
+
};
|
|
687
|
+
}).superRefine(({ Bitcoin }, ctx) => {
|
|
688
|
+
Bitcoin.forEach((value, key) => {
|
|
689
|
+
if (!value.current) {
|
|
690
|
+
ctx.addIssue({
|
|
691
|
+
message: `No current BTC address for broker ${key}`,
|
|
692
|
+
code: _zod.z.ZodIssueCode.custom
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
});
|
|
697
|
+
|
|
652
698
|
|
|
653
699
|
|
|
654
700
|
|
|
@@ -700,4 +746,4 @@ var cfLoanAccounts = _zod.z.array(cfLoanAccount);
|
|
|
700
746
|
|
|
701
747
|
|
|
702
748
|
|
|
703
|
-
exports.accountInfoCommon = accountInfoCommon; exports.broker = broker; exports.brokerRequestSwapDepositAddress = brokerRequestSwapDepositAddress; exports.cfAccountInfo = cfAccountInfo; exports.cfAccounts = cfAccounts; exports.cfAuctionState = cfAuctionState; exports.cfAvailablePools = cfAvailablePools; exports.cfBoostPoolDetails = cfBoostPoolDetails; exports.cfBoostPoolPendingFees = cfBoostPoolPendingFees; exports.cfBoostPoolsDepth = cfBoostPoolsDepth; exports.cfEnvironment = cfEnvironment; exports.cfFailedCallEvm = cfFailedCallEvm; exports.cfFlipSuppy = cfFlipSuppy; exports.cfFundingEnvironment = cfFundingEnvironment; exports.cfGetTradingStrategies = cfGetTradingStrategies; exports.cfGetTradingStrategyLimits = cfGetTradingStrategyLimits; exports.cfIngressEgressEnvironment = cfIngressEgressEnvironment; exports.cfLendingConfig = cfLendingConfig; exports.cfLendingPools = cfLendingPools; exports.cfLoanAccount = cfLoanAccount; exports.cfLoanAccounts = cfLoanAccounts; exports.cfMonitoringSimulateAuction = cfMonitoringSimulateAuction; exports.cfOraclePrices = cfOraclePrices; exports.cfPoolDepth = cfPoolDepth; exports.cfPoolOrderbook = cfPoolOrderbook; exports.cfPoolOrders = cfPoolOrders; exports.cfPoolPriceV2 = cfPoolPriceV2; exports.cfPoolsEnvironment = cfPoolsEnvironment; exports.cfSafeModeStatuses = cfSafeModeStatuses; exports.cfSupportedAssets = cfSupportedAssets; exports.cfSwapRate = cfSwapRate; exports.cfSwapRateV2 = cfSwapRateV2; exports.cfSwapRateV3 = cfSwapRateV3; exports.cfSwappingEnvironment = cfSwappingEnvironment; exports.cfTradingStrategy = cfTradingStrategy; exports.chainGetBlockHash = chainGetBlockHash; exports.ethereumAddress = ethereumAddress; exports.hexString = hexString; exports.liquidityProvider = liquidityProvider; exports.lpTotalBalances = lpTotalBalances; exports.numberOrHex = numberOrHex; exports.numericString = numericString; exports.operator = operator; exports.requestSwapParameterEncoding = requestSwapParameterEncoding; exports.rpcResponse = rpcResponse; exports.stateGetMetadata = stateGetMetadata; exports.stateGetRuntimeVersion = stateGetRuntimeVersion; exports.u256 = u256; exports.unregistered = unregistered; exports.validator = validator;
|
|
749
|
+
exports.accountInfoCommon = accountInfoCommon; exports.broker = broker; exports.brokerRequestSwapDepositAddress = brokerRequestSwapDepositAddress; exports.cfAccountInfo = cfAccountInfo; exports.cfAccounts = cfAccounts; exports.cfAuctionState = cfAuctionState; exports.cfAvailablePools = cfAvailablePools; exports.cfBoostPoolDetails = cfBoostPoolDetails; exports.cfBoostPoolPendingFees = cfBoostPoolPendingFees; exports.cfBoostPoolsDepth = cfBoostPoolsDepth; exports.cfEnvironment = cfEnvironment; exports.cfFailedCallEvm = cfFailedCallEvm; exports.cfFlipSuppy = cfFlipSuppy; exports.cfFundingEnvironment = cfFundingEnvironment; exports.cfGetTradingStrategies = cfGetTradingStrategies; exports.cfGetTradingStrategyLimits = cfGetTradingStrategyLimits; exports.cfIngressEgressEnvironment = cfIngressEgressEnvironment; exports.cfLendingConfig = cfLendingConfig; exports.cfLendingPools = cfLendingPools; exports.cfLoanAccount = cfLoanAccount; exports.cfLoanAccounts = cfLoanAccounts; exports.cfMonitoringSimulateAuction = cfMonitoringSimulateAuction; exports.cfOraclePrices = cfOraclePrices; exports.cfPoolDepth = cfPoolDepth; exports.cfPoolOrderbook = cfPoolOrderbook; exports.cfPoolOrders = cfPoolOrders; exports.cfPoolPriceV2 = cfPoolPriceV2; exports.cfPoolsEnvironment = cfPoolsEnvironment; exports.cfSafeModeStatuses = cfSafeModeStatuses; exports.cfSupportedAssets = cfSupportedAssets; exports.cfSwapRate = cfSwapRate; exports.cfSwapRateV2 = cfSwapRateV2; exports.cfSwapRateV3 = cfSwapRateV3; exports.cfSwappingEnvironment = cfSwappingEnvironment; exports.cfTradingStrategy = cfTradingStrategy; exports.cfVaultAddresses = cfVaultAddresses; exports.chainGetBlockHash = chainGetBlockHash; exports.ethereumAddress = ethereumAddress; exports.hexString = hexString; exports.liquidityProvider = liquidityProvider; exports.lpTotalBalances = lpTotalBalances; exports.numberOrHex = numberOrHex; exports.numericString = numericString; exports.operator = operator; exports.requestSwapParameterEncoding = requestSwapParameterEncoding; exports.rpcResponse = rpcResponse; exports.stateGetMetadata = stateGetMetadata; exports.stateGetRuntimeVersion = stateGetRuntimeVersion; exports.u256 = u256; exports.unregistered = unregistered; exports.validator = validator;
|