@chainflip/rpc 1.4.5 → 1.4.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 +4 -0
- package/dist/common.d.cts +956 -460
- package/dist/common.d.ts +956 -460
- package/dist/common.mjs +4 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/parsers.cjs +48 -2
- package/dist/parsers.d.cts +1018 -506
- package/dist/parsers.d.ts +1018 -506
- package/dist/parsers.mjs +47 -1
- package/dist/types.d.cts +7 -1
- package/dist/types.d.ts +7 -1
- package/package.json +1 -1
package/dist/parsers.mjs
CHANGED
|
@@ -10,18 +10,21 @@ var chainAssetMapFactory = (parser, defaultValue) => z.object({
|
|
|
10
10
|
Ethereum: z.object({ ETH: parser, USDC: parser, FLIP: parser, USDT: parser }),
|
|
11
11
|
Polkadot: z.object({ DOT: parser }),
|
|
12
12
|
Arbitrum: z.object({ ETH: parser.default(defaultValue), USDC: parser.default(defaultValue) })
|
|
13
|
+
// Solana: z.object({ SOL: parser.default(defaultValue) }),
|
|
13
14
|
});
|
|
14
15
|
var chainBaseAssetMapFactory = (parser, defaultValue) => z.object({
|
|
15
16
|
Bitcoin: z.object({ BTC: parser }),
|
|
16
17
|
Ethereum: z.object({ ETH: parser, FLIP: parser, USDT: parser }),
|
|
17
18
|
Polkadot: z.object({ DOT: parser }),
|
|
18
19
|
Arbitrum: z.object({ ETH: parser.default(defaultValue), USDC: parser.default(defaultValue) })
|
|
20
|
+
// Solana: z.object({ SOL: parser.default(defaultValue) }),
|
|
19
21
|
});
|
|
20
22
|
var chainMapFactory = (parser, defaultValue) => z.object({
|
|
21
23
|
Bitcoin: parser,
|
|
22
24
|
Ethereum: parser,
|
|
23
25
|
Polkadot: parser,
|
|
24
26
|
Arbitrum: parser.default(defaultValue)
|
|
27
|
+
// Solana: parser.default(defaultValue),
|
|
25
28
|
});
|
|
26
29
|
var rpcAssetSchema = z.union([
|
|
27
30
|
z.object({ chain: z.literal("Bitcoin"), asset: z.literal("BTC") }),
|
|
@@ -31,7 +34,9 @@ var rpcAssetSchema = z.union([
|
|
|
31
34
|
z.object({ chain: z.literal("Ethereum"), asset: z.literal("USDC") }),
|
|
32
35
|
z.object({ chain: z.literal("Ethereum"), asset: z.literal("USDT") }),
|
|
33
36
|
z.object({ chain: z.literal("Arbitrum"), asset: z.literal("ETH") }),
|
|
34
|
-
z.object({ chain: z.literal("Arbitrum"), asset: z.literal("USDC") })
|
|
37
|
+
z.object({ chain: z.literal("Arbitrum"), asset: z.literal("USDC") }),
|
|
38
|
+
z.object({ chain: z.literal("Solana"), asset: z.literal("SOL") }),
|
|
39
|
+
z.object({ chain: z.literal("Solana"), asset: z.literal("USDC") })
|
|
35
40
|
]);
|
|
36
41
|
var rename = (mapping) => (obj) => Object.fromEntries(
|
|
37
42
|
Object.entries(obj).map(([key, value]) => [
|
|
@@ -199,10 +204,51 @@ var cfPoolOrders = z.object({
|
|
|
199
204
|
}),
|
|
200
205
|
range_orders: z.array(rangeOrder)
|
|
201
206
|
});
|
|
207
|
+
var boostPoolAmount = z.object({
|
|
208
|
+
account_id: z.string(),
|
|
209
|
+
amount: u256
|
|
210
|
+
});
|
|
211
|
+
var cfBoostPoolDetails = z.array(
|
|
212
|
+
z.intersection(
|
|
213
|
+
rpcAssetSchema,
|
|
214
|
+
z.object({
|
|
215
|
+
fee_tier: z.number(),
|
|
216
|
+
available_amounts: z.array(boostPoolAmount),
|
|
217
|
+
deposits_pending_finalization: z.array(
|
|
218
|
+
z.object({
|
|
219
|
+
deposit_id: z.number().transform(BigInt),
|
|
220
|
+
owed_amounts: z.array(boostPoolAmount)
|
|
221
|
+
})
|
|
222
|
+
),
|
|
223
|
+
pending_withdrawals: z.array(
|
|
224
|
+
z.object({
|
|
225
|
+
account_id: z.string(),
|
|
226
|
+
pending_deposits: z.array(z.bigint())
|
|
227
|
+
})
|
|
228
|
+
)
|
|
229
|
+
})
|
|
230
|
+
)
|
|
231
|
+
);
|
|
232
|
+
var cfBoostPoolPendingFees = z.array(
|
|
233
|
+
z.intersection(
|
|
234
|
+
rpcAssetSchema,
|
|
235
|
+
z.object({
|
|
236
|
+
fee_tier: z.number(),
|
|
237
|
+
pending_fees: z.array(
|
|
238
|
+
z.object({
|
|
239
|
+
deposit_id: z.number().transform(BigInt),
|
|
240
|
+
fees: z.array(boostPoolAmount)
|
|
241
|
+
})
|
|
242
|
+
)
|
|
243
|
+
})
|
|
244
|
+
)
|
|
245
|
+
);
|
|
202
246
|
export {
|
|
203
247
|
broker,
|
|
204
248
|
brokerRequestSwapDepositAddress,
|
|
205
249
|
cfAccountInfo,
|
|
250
|
+
cfBoostPoolDetails,
|
|
251
|
+
cfBoostPoolPendingFees,
|
|
206
252
|
cfBoostPoolsDepth,
|
|
207
253
|
cfEnvironment,
|
|
208
254
|
cfFundingEnvironment,
|
package/dist/types.d.cts
CHANGED
|
@@ -6,23 +6,29 @@ export { RpcLimitOrder, RpcRangeOrder } from './parsers.cjs';
|
|
|
6
6
|
import '@chainflip/utils/types';
|
|
7
7
|
|
|
8
8
|
type CfAccountInfo = RpcResult<'cf_account_info'>;
|
|
9
|
+
type CfBoostPoolDetails = RpcResult<'cf_boost_pool_details'>;
|
|
10
|
+
type CfBoostPoolPendingFees = RpcResult<'cf_boost_pool_pending_fees'>;
|
|
9
11
|
type CfBoostPoolsDepth = RpcResult<'cf_boost_pools_depth'>;
|
|
10
12
|
type CfEnvironment = RpcResult<'cf_environment'>;
|
|
11
13
|
type CfFundingEnvironment = RpcResult<'cf_funding_environment'>;
|
|
12
14
|
type CfIngressEgressEnvironment = RpcResult<'cf_ingress_egress_environment'>;
|
|
13
15
|
type CfPoolOrders = RpcResult<'cf_pool_orders'>;
|
|
14
16
|
type CfPoolPriceV2 = RpcResult<'cf_pool_price_v2'>;
|
|
17
|
+
type CfPoolsEnvironment = RpcResult<'cf_pools_environment'>;
|
|
15
18
|
type CfSupportedAssets = RpcResult<'cf_supported_assets'>;
|
|
16
19
|
type CfSwappingEnvironment = RpcResult<'cf_swapping_environment'>;
|
|
17
20
|
type CfSwapRate = RpcResult<'cf_swap_rate'>;
|
|
18
21
|
type CfSwapRateV2 = RpcResult<'cf_swap_rate_v2'>;
|
|
19
22
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
23
|
+
type CfBoostPoolDetailsResponse = RpcResponse<'cf_boost_pool_details'>;
|
|
24
|
+
type CfBoostPoolPendingFeesResponse = RpcResponse<'cf_boost_pool_pending_fees'>;
|
|
20
25
|
type CfBoostPoolsDepthResponse = RpcResponse<'cf_boost_pools_depth'>;
|
|
21
26
|
type CfEnvironmentResponse = RpcResponse<'cf_environment'>;
|
|
22
27
|
type CfFundingEnvironmentResponse = RpcResponse<'cf_funding_environment'>;
|
|
23
28
|
type CfIngressEgressEnvironmentResponse = RpcResponse<'cf_ingress_egress_environment'>;
|
|
24
29
|
type CfPoolOrdersResponse = RpcResponse<'cf_pool_orders'>;
|
|
25
30
|
type CfPoolPriceV2Response = RpcResponse<'cf_pool_price_v2'>;
|
|
31
|
+
type CfPoolsEnvironmentResponse = RpcResponse<'cf_pools_environment'>;
|
|
26
32
|
type CfSupportedAssetsResponse = RpcResponse<'cf_supported_assets'>;
|
|
27
33
|
type CfSwappingEnvironmentResponse = RpcResponse<'cf_swapping_environment'>;
|
|
28
34
|
type CfSwapRateResponse = RpcResponse<'cf_swap_rate'>;
|
|
@@ -32,4 +38,4 @@ type CfBrokerAccount = z.output<typeof broker>;
|
|
|
32
38
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
33
39
|
type CfLiquidityProviderAccount = z.output<typeof liquidityProvider>;
|
|
34
40
|
|
|
35
|
-
export { type CfAccountInfo, type CfAccountInfoResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolOrders, type CfPoolOrdersResponse, type CfPoolPriceV2, type CfPoolPriceV2Response, type CfSupportedAssets, type CfSupportedAssetsResponse, type CfSwapRate, type CfSwapRateResponse, type CfSwapRateV2, type CfSwapRateV2Response, type CfSwappingEnvironment, type CfSwappingEnvironmentResponse, type CfUnregisteredAccount, type CfValidatorAccount, RpcResult };
|
|
41
|
+
export { type CfAccountInfo, type CfAccountInfoResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolOrders, type CfPoolOrdersResponse, type CfPoolPriceV2, type CfPoolPriceV2Response, type CfPoolsEnvironment, type CfPoolsEnvironmentResponse, type CfSupportedAssets, type CfSupportedAssetsResponse, type CfSwapRate, type CfSwapRateResponse, type CfSwapRateV2, type CfSwapRateV2Response, type CfSwappingEnvironment, type CfSwappingEnvironmentResponse, type CfUnregisteredAccount, type CfValidatorAccount, RpcResult };
|
package/dist/types.d.ts
CHANGED
|
@@ -6,23 +6,29 @@ export { RpcLimitOrder, RpcRangeOrder } from './parsers.js';
|
|
|
6
6
|
import '@chainflip/utils/types';
|
|
7
7
|
|
|
8
8
|
type CfAccountInfo = RpcResult<'cf_account_info'>;
|
|
9
|
+
type CfBoostPoolDetails = RpcResult<'cf_boost_pool_details'>;
|
|
10
|
+
type CfBoostPoolPendingFees = RpcResult<'cf_boost_pool_pending_fees'>;
|
|
9
11
|
type CfBoostPoolsDepth = RpcResult<'cf_boost_pools_depth'>;
|
|
10
12
|
type CfEnvironment = RpcResult<'cf_environment'>;
|
|
11
13
|
type CfFundingEnvironment = RpcResult<'cf_funding_environment'>;
|
|
12
14
|
type CfIngressEgressEnvironment = RpcResult<'cf_ingress_egress_environment'>;
|
|
13
15
|
type CfPoolOrders = RpcResult<'cf_pool_orders'>;
|
|
14
16
|
type CfPoolPriceV2 = RpcResult<'cf_pool_price_v2'>;
|
|
17
|
+
type CfPoolsEnvironment = RpcResult<'cf_pools_environment'>;
|
|
15
18
|
type CfSupportedAssets = RpcResult<'cf_supported_assets'>;
|
|
16
19
|
type CfSwappingEnvironment = RpcResult<'cf_swapping_environment'>;
|
|
17
20
|
type CfSwapRate = RpcResult<'cf_swap_rate'>;
|
|
18
21
|
type CfSwapRateV2 = RpcResult<'cf_swap_rate_v2'>;
|
|
19
22
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
23
|
+
type CfBoostPoolDetailsResponse = RpcResponse<'cf_boost_pool_details'>;
|
|
24
|
+
type CfBoostPoolPendingFeesResponse = RpcResponse<'cf_boost_pool_pending_fees'>;
|
|
20
25
|
type CfBoostPoolsDepthResponse = RpcResponse<'cf_boost_pools_depth'>;
|
|
21
26
|
type CfEnvironmentResponse = RpcResponse<'cf_environment'>;
|
|
22
27
|
type CfFundingEnvironmentResponse = RpcResponse<'cf_funding_environment'>;
|
|
23
28
|
type CfIngressEgressEnvironmentResponse = RpcResponse<'cf_ingress_egress_environment'>;
|
|
24
29
|
type CfPoolOrdersResponse = RpcResponse<'cf_pool_orders'>;
|
|
25
30
|
type CfPoolPriceV2Response = RpcResponse<'cf_pool_price_v2'>;
|
|
31
|
+
type CfPoolsEnvironmentResponse = RpcResponse<'cf_pools_environment'>;
|
|
26
32
|
type CfSupportedAssetsResponse = RpcResponse<'cf_supported_assets'>;
|
|
27
33
|
type CfSwappingEnvironmentResponse = RpcResponse<'cf_swapping_environment'>;
|
|
28
34
|
type CfSwapRateResponse = RpcResponse<'cf_swap_rate'>;
|
|
@@ -32,4 +38,4 @@ type CfBrokerAccount = z.output<typeof broker>;
|
|
|
32
38
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
33
39
|
type CfLiquidityProviderAccount = z.output<typeof liquidityProvider>;
|
|
34
40
|
|
|
35
|
-
export { type CfAccountInfo, type CfAccountInfoResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolOrders, type CfPoolOrdersResponse, type CfPoolPriceV2, type CfPoolPriceV2Response, type CfSupportedAssets, type CfSupportedAssetsResponse, type CfSwapRate, type CfSwapRateResponse, type CfSwapRateV2, type CfSwapRateV2Response, type CfSwappingEnvironment, type CfSwappingEnvironmentResponse, type CfUnregisteredAccount, type CfValidatorAccount, RpcResult };
|
|
41
|
+
export { type CfAccountInfo, type CfAccountInfoResponse, type CfBoostPoolDetails, type CfBoostPoolDetailsResponse, type CfBoostPoolPendingFees, type CfBoostPoolPendingFeesResponse, type CfBoostPoolsDepth, type CfBoostPoolsDepthResponse, type CfBrokerAccount, type CfEnvironment, type CfEnvironmentResponse, type CfFundingEnvironment, type CfFundingEnvironmentResponse, type CfIngressEgressEnvironment, type CfIngressEgressEnvironmentResponse, type CfLiquidityProviderAccount, type CfPoolOrders, type CfPoolOrdersResponse, type CfPoolPriceV2, type CfPoolPriceV2Response, type CfPoolsEnvironment, type CfPoolsEnvironmentResponse, type CfSupportedAssets, type CfSupportedAssetsResponse, type CfSwapRate, type CfSwapRateResponse, type CfSwapRateV2, type CfSwapRateV2Response, type CfSwappingEnvironment, type CfSwappingEnvironmentResponse, type CfUnregisteredAccount, type CfValidatorAccount, RpcResult };
|