@chainflip/rpc 2.2.0-tron-dev.4 → 2.2.1
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/Client.cjs +2 -2
- package/dist/Client.mjs +3 -3
- package/dist/common.cjs +2 -1
- package/dist/common.d.cts +4063 -3257
- package/dist/common.d.mts +4063 -3257
- package/dist/common.mjs +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/parsers.cjs +69 -39
- package/dist/parsers.d.cts +5707 -4117
- package/dist/parsers.d.mts +5707 -4117
- package/dist/parsers.mjs +68 -40
- package/dist/types.d.cts +3 -1
- package/dist/types.d.mts +3 -1
- package/package.json +3 -3
package/dist/parsers.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import { CHAINFLIP_SS58_PREFIX } from "@chainflip/utils/consts";
|
|
|
5
5
|
import { isUndefined } from "@chainflip/utils/guard";
|
|
6
6
|
import * as ss58 from "@chainflip/utils/ss58";
|
|
7
7
|
import { isHex } from "@chainflip/utils/string";
|
|
8
|
+
import { isValidTronAddress } from "@chainflip/utils/tron";
|
|
8
9
|
|
|
9
10
|
//#region src/parsers.ts
|
|
10
11
|
const accountId = z.string().refine((val) => val.startsWith("cF"));
|
|
@@ -16,24 +17,25 @@ const numberOrHex = z.union([
|
|
|
16
17
|
u256,
|
|
17
18
|
numericString
|
|
18
19
|
]).transform((n) => BigInt(n));
|
|
19
|
-
const
|
|
20
|
+
const tronAddress = z.string().refine(isValidTronAddress, { message: "Invalid tron address" });
|
|
21
|
+
const chainAssetMapFactory = (parser, _defaultValue) => z.object({
|
|
20
22
|
Bitcoin: z.object({ BTC: parser }),
|
|
21
23
|
Ethereum: z.object({
|
|
22
24
|
ETH: parser,
|
|
23
25
|
USDC: parser,
|
|
24
26
|
FLIP: parser,
|
|
25
27
|
USDT: parser,
|
|
26
|
-
WBTC: parser
|
|
28
|
+
WBTC: parser
|
|
27
29
|
}),
|
|
28
30
|
Arbitrum: z.object({
|
|
29
31
|
ETH: parser,
|
|
30
32
|
USDC: parser,
|
|
31
|
-
USDT: parser
|
|
33
|
+
USDT: parser
|
|
32
34
|
}),
|
|
33
35
|
Solana: z.object({
|
|
34
36
|
SOL: parser,
|
|
35
37
|
USDC: parser,
|
|
36
|
-
USDT: parser
|
|
38
|
+
USDT: parser
|
|
37
39
|
}),
|
|
38
40
|
Assethub: z.object({
|
|
39
41
|
DOT: parser,
|
|
@@ -42,26 +44,26 @@ const chainAssetMapFactory = (parser, defaultValue) => z.object({
|
|
|
42
44
|
}),
|
|
43
45
|
Tron: z.object({
|
|
44
46
|
TRX: parser,
|
|
45
|
-
USDT: parser
|
|
47
|
+
USDT: parser
|
|
46
48
|
})
|
|
47
49
|
});
|
|
48
|
-
const chainBaseAssetMapFactory = (parser,
|
|
50
|
+
const chainBaseAssetMapFactory = (parser, _defaultValue) => z.object({
|
|
49
51
|
Bitcoin: z.object({ BTC: parser }),
|
|
50
52
|
Ethereum: z.object({
|
|
51
53
|
ETH: parser,
|
|
52
54
|
FLIP: parser,
|
|
53
55
|
USDT: parser,
|
|
54
|
-
WBTC: parser
|
|
56
|
+
WBTC: parser
|
|
55
57
|
}),
|
|
56
58
|
Arbitrum: z.object({
|
|
57
59
|
ETH: parser,
|
|
58
60
|
USDC: parser,
|
|
59
|
-
USDT: parser
|
|
61
|
+
USDT: parser
|
|
60
62
|
}),
|
|
61
63
|
Solana: z.object({
|
|
62
64
|
SOL: parser,
|
|
63
65
|
USDC: parser,
|
|
64
|
-
USDT: parser
|
|
66
|
+
USDT: parser
|
|
65
67
|
}),
|
|
66
68
|
Assethub: z.object({
|
|
67
69
|
DOT: parser,
|
|
@@ -70,10 +72,10 @@ const chainBaseAssetMapFactory = (parser, defaultValue) => z.object({
|
|
|
70
72
|
}),
|
|
71
73
|
Tron: z.object({
|
|
72
74
|
TRX: parser,
|
|
73
|
-
USDT: parser
|
|
75
|
+
USDT: parser
|
|
74
76
|
})
|
|
75
77
|
});
|
|
76
|
-
const chainMapFactory = (parser, _defaultValue) => z.object({
|
|
78
|
+
const chainMapFactory = (parser, _defaultValue = null) => z.object({
|
|
77
79
|
Bitcoin: parser,
|
|
78
80
|
Ethereum: parser,
|
|
79
81
|
Arbitrum: parser,
|
|
@@ -328,9 +330,13 @@ const requestSwapParameterEncoding = z.discriminatedUnion("chain", [
|
|
|
328
330
|
}),
|
|
329
331
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Ethereum") }),
|
|
330
332
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Arbitrum") }),
|
|
331
|
-
|
|
333
|
+
z.object({
|
|
332
334
|
chain: z.literal("Tron"),
|
|
333
|
-
|
|
335
|
+
to: tronAddress,
|
|
336
|
+
calldata: z.string(),
|
|
337
|
+
note: hexString,
|
|
338
|
+
value: numberOrHex,
|
|
339
|
+
source_token_address: tronAddress.optional()
|
|
334
340
|
}),
|
|
335
341
|
z.object({
|
|
336
342
|
chain: z.literal("Solana"),
|
|
@@ -366,7 +372,7 @@ const broker = z.object({
|
|
|
366
372
|
role: z.literal("broker"),
|
|
367
373
|
...accountInfoCommon,
|
|
368
374
|
earned_fees: chainAssetMapFactory(numberOrHex, 0),
|
|
369
|
-
btc_vault_deposit_address: z.string().
|
|
375
|
+
btc_vault_deposit_address: z.string().nullish(),
|
|
370
376
|
affiliates: z.array(z.object({
|
|
371
377
|
account_id: accountId,
|
|
372
378
|
short_id: z.number(),
|
|
@@ -585,6 +591,14 @@ const cfTradingStrategy = z.object({
|
|
|
585
591
|
min_sell_tick: z.number(),
|
|
586
592
|
max_sell_tick: z.number(),
|
|
587
593
|
base_asset: rpcAssetSchema
|
|
594
|
+
}) }),
|
|
595
|
+
z.object({ OracleTracking: z.object({
|
|
596
|
+
min_buy_offset_tick: z.number(),
|
|
597
|
+
max_buy_offset_tick: z.number(),
|
|
598
|
+
min_sell_offset_tick: z.number(),
|
|
599
|
+
max_sell_offset_tick: z.number(),
|
|
600
|
+
base_asset: rpcAssetSchema,
|
|
601
|
+
quote_asset: rpcAssetSchema
|
|
588
602
|
}) })
|
|
589
603
|
]),
|
|
590
604
|
balance: z.array(z.tuple([rpcAssetSchema, numberOrHex]))
|
|
@@ -663,8 +677,6 @@ const cfSafeModeStatuses = z.object({
|
|
|
663
677
|
borrowing: cfSupportedAssets,
|
|
664
678
|
add_lender_funds: cfSupportedAssets,
|
|
665
679
|
withdraw_lender_funds: cfSupportedAssets,
|
|
666
|
-
add_collateral: cfSupportedAssets,
|
|
667
|
-
remove_collateral: cfSupportedAssets,
|
|
668
680
|
liquidations_enabled: z.boolean()
|
|
669
681
|
}),
|
|
670
682
|
broadcast_ethereum: broadcastPalletSafeModeStatuses,
|
|
@@ -699,6 +711,7 @@ const cfLendingPools = z.array(z.object({
|
|
|
699
711
|
total_amount: numberOrHex,
|
|
700
712
|
available_amount: numberOrHex,
|
|
701
713
|
utilisation_rate: z.number(),
|
|
714
|
+
utilisation_cap: z.number(),
|
|
702
715
|
current_interest_rate: z.number(),
|
|
703
716
|
origination_fee: z.number(),
|
|
704
717
|
liquidation_fee: z.number(),
|
|
@@ -712,7 +725,6 @@ const cfLendingPools = z.array(z.object({
|
|
|
712
725
|
const cfLendingConfig = z.object({
|
|
713
726
|
ltv_thresholds: z.object({
|
|
714
727
|
target: z.number(),
|
|
715
|
-
topup: z.number().nullable(),
|
|
716
728
|
soft_liquidation: z.number(),
|
|
717
729
|
soft_liquidation_abort: z.number(),
|
|
718
730
|
hard_liquidation: z.number(),
|
|
@@ -736,19 +748,24 @@ const cfLendingConfig = z.object({
|
|
|
736
748
|
fee_swap_max_oracle_slippage: z.number(),
|
|
737
749
|
minimum_loan_amount_usd: numberOrHex,
|
|
738
750
|
minimum_supply_amount_usd: numberOrHex,
|
|
739
|
-
minimum_update_loan_amount_usd: numberOrHex
|
|
740
|
-
|
|
751
|
+
minimum_update_loan_amount_usd: numberOrHex
|
|
752
|
+
});
|
|
753
|
+
const cfLoan = z.object({
|
|
754
|
+
loan_id: z.number(),
|
|
755
|
+
asset: rpcAssetSchema,
|
|
756
|
+
principal_amount: numberOrHex,
|
|
757
|
+
loan_type: z.union([z.object({ User: accountId }), z.object({ Boost: numberOrHex })]),
|
|
758
|
+
created_at: z.number(),
|
|
759
|
+
broker: z.object({
|
|
760
|
+
account: accountId,
|
|
761
|
+
bps: z.number()
|
|
762
|
+
}).nullable()
|
|
741
763
|
});
|
|
742
764
|
const cfLoanAccount = z.object({
|
|
743
765
|
account: accountId,
|
|
744
|
-
collateral_topup_asset: rpcAssetSchema.nullable(),
|
|
745
766
|
ltv_ratio: numberOrHex.nullable(),
|
|
746
767
|
collateral: z.array(z.intersection(rpcAssetSchema, z.object({ amount: numberOrHex }))),
|
|
747
|
-
loans: z.array(
|
|
748
|
-
loan_id: z.number(),
|
|
749
|
-
asset: rpcAssetSchema,
|
|
750
|
-
principal_amount: numberOrHex
|
|
751
|
-
})),
|
|
768
|
+
loans: z.array(cfLoan),
|
|
752
769
|
liquidation_status: z.object({
|
|
753
770
|
liquidation_swaps: z.array(z.object({
|
|
754
771
|
swap_request_id: z.number(),
|
|
@@ -766,10 +783,15 @@ const cfLendingPoolSupplyBalances = z.array(z.intersection(rpcAssetSchema, z.obj
|
|
|
766
783
|
lp_id: accountId,
|
|
767
784
|
total_amount: numberOrHex
|
|
768
785
|
})) })));
|
|
786
|
+
const u128 = z.union([
|
|
787
|
+
z.number(),
|
|
788
|
+
numericString,
|
|
789
|
+
hexString
|
|
790
|
+
]).transform((arg) => BigInt(arg));
|
|
769
791
|
const ingressEgressDeposit = z.object({
|
|
770
792
|
deposit_chain_block_height: z.number(),
|
|
771
793
|
deposit_address: z.string(),
|
|
772
|
-
amount:
|
|
794
|
+
amount: u128,
|
|
773
795
|
asset: z.object({
|
|
774
796
|
chain: z.string(),
|
|
775
797
|
asset: z.string()
|
|
@@ -777,17 +799,22 @@ const ingressEgressDeposit = z.object({
|
|
|
777
799
|
deposit_details: z.union([z.object({ tx_hashes: z.array(hexString) }), z.object({
|
|
778
800
|
tx_id: z.string().transform((v) => v.startsWith("0x") ? v : `0x${v}`),
|
|
779
801
|
vout: z.number().int()
|
|
780
|
-
})]).
|
|
802
|
+
})]).nullish()
|
|
781
803
|
});
|
|
804
|
+
const txRef = z.object({ hash: z.string() });
|
|
805
|
+
const txOutId = z.union([z.object({ hash: z.string() }), z.object({ signature: z.object({
|
|
806
|
+
s: z.array(z.number()),
|
|
807
|
+
k_times_g_address: z.array(z.number())
|
|
808
|
+
}) })]);
|
|
782
809
|
const ingressEgressBroadcast = z.object({
|
|
783
810
|
broadcast_id: z.number(),
|
|
784
811
|
broadcast_chain_block_height: z.number(),
|
|
785
|
-
tx_out_id:
|
|
786
|
-
tx_ref:
|
|
812
|
+
tx_out_id: txOutId,
|
|
813
|
+
tx_ref: txRef
|
|
787
814
|
});
|
|
788
815
|
const ingressEgressVaultDeposit = z.object({
|
|
789
816
|
tx_id: z.string(),
|
|
790
|
-
deposit_chain_block_height: z.number().
|
|
817
|
+
deposit_chain_block_height: z.number().nullish(),
|
|
791
818
|
input_asset: z.object({
|
|
792
819
|
chain: z.string(),
|
|
793
820
|
asset: z.string()
|
|
@@ -796,17 +823,17 @@ const ingressEgressVaultDeposit = z.object({
|
|
|
796
823
|
chain: z.string(),
|
|
797
824
|
asset: z.string()
|
|
798
825
|
}),
|
|
799
|
-
amount:
|
|
826
|
+
amount: u128,
|
|
800
827
|
destination_address: z.string(),
|
|
801
|
-
ccm_deposit_metadata: z.unknown().
|
|
802
|
-
deposit_details: z.unknown().
|
|
828
|
+
ccm_deposit_metadata: z.unknown().nullish(),
|
|
829
|
+
deposit_details: z.unknown().nullish(),
|
|
803
830
|
broker_fee: z.object({
|
|
804
831
|
account: z.string().transform((v) => ss58.encode({
|
|
805
832
|
data: ss58.decode(v).data,
|
|
806
833
|
ss58Format: CHAINFLIP_SS58_PREFIX
|
|
807
834
|
})),
|
|
808
835
|
bps: z.number()
|
|
809
|
-
}).
|
|
836
|
+
}).nullish(),
|
|
810
837
|
affiliate_fees: z.array(z.object({
|
|
811
838
|
account: z.string().transform((v) => ss58.encode({
|
|
812
839
|
data: ss58.decode(v).data,
|
|
@@ -817,14 +844,14 @@ const ingressEgressVaultDeposit = z.object({
|
|
|
817
844
|
refund_params: z.object({
|
|
818
845
|
retry_duration: z.number(),
|
|
819
846
|
refund_address: z.string(),
|
|
820
|
-
min_price:
|
|
821
|
-
refund_ccm_metadata: z.unknown().
|
|
822
|
-
max_oracle_price_slippage: z.
|
|
823
|
-
}).
|
|
847
|
+
min_price: u128,
|
|
848
|
+
refund_ccm_metadata: z.unknown().nullish(),
|
|
849
|
+
max_oracle_price_slippage: z.number().nullish()
|
|
850
|
+
}).nullish(),
|
|
824
851
|
dca_params: z.object({
|
|
825
852
|
number_of_chunks: z.number(),
|
|
826
853
|
chunk_interval: z.number()
|
|
827
|
-
}).
|
|
854
|
+
}).nullish(),
|
|
828
855
|
max_boost_fee: z.number().optional()
|
|
829
856
|
});
|
|
830
857
|
const cfIngressEgressEvents = z.object({
|
|
@@ -844,6 +871,7 @@ const cfVaultAddresses = z.object({
|
|
|
844
871
|
Bitcoin: bitcoinAddresses
|
|
845
872
|
};
|
|
846
873
|
});
|
|
874
|
+
const cfAllLoans = z.array(cfLoan);
|
|
847
875
|
|
|
848
876
|
//#endregion
|
|
849
|
-
export { accountInfoCommon, broker, brokerRequestAccountCreationDepositAddress, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAuctionState, cfAvailablePools, cfBoostPoolDetails, cfBoostPoolPendingFees, cfBoostPoolsDepth, cfEnvironment, cfFailedCallEvm, cfFlipSuppy, cfFundingEnvironment, cfGetTradingStrategies, cfGetTradingStrategyLimits, cfIngressEgressEnvironment, cfIngressEgressEvents, cfLendingConfig, cfLendingPoolSupplyBalances, cfLendingPools, cfLoanAccount, cfLoanAccounts, cfMonitoringSimulateAuction, cfOraclePrices, cfPoolDepth, cfPoolOrderbook, cfPoolOrders, cfPoolPriceV2, cfPoolsEnvironment, cfSafeModeStatuses, cfSupportedAssets, cfSwapRate, cfSwapRateV2, cfSwapRateV3, cfSwappingEnvironment, cfTradingStrategy, cfVaultAddresses, chainGetBlockHash, ethereumAddress, hexString, liquidityProvider, lpTotalBalances, numberOrHex, numericString, operator, requestSwapParameterEncoding, rpcResponse, stateGetMetadata, stateGetRuntimeVersion, u256, unregistered, validator };
|
|
877
|
+
export { accountInfoCommon, broker, brokerRequestAccountCreationDepositAddress, brokerRequestSwapDepositAddress, cfAccountInfo, cfAccounts, cfAllLoans, cfAuctionState, cfAvailablePools, cfBoostPoolDetails, cfBoostPoolPendingFees, cfBoostPoolsDepth, cfEnvironment, cfFailedCallEvm, cfFlipSuppy, cfFundingEnvironment, cfGetTradingStrategies, cfGetTradingStrategyLimits, cfIngressEgressEnvironment, cfIngressEgressEvents, cfLendingConfig, cfLendingPoolSupplyBalances, cfLendingPools, cfLoanAccount, cfLoanAccounts, cfMonitoringSimulateAuction, cfOraclePrices, cfPoolDepth, cfPoolOrderbook, cfPoolOrders, cfPoolPriceV2, cfPoolsEnvironment, cfSafeModeStatuses, cfSupportedAssets, cfSwapRate, cfSwapRateV2, cfSwapRateV3, cfSwappingEnvironment, cfTradingStrategy, cfVaultAddresses, chainGetBlockHash, ethereumAddress, hexString, liquidityProvider, lpTotalBalances, numberOrHex, numericString, operator, requestSwapParameterEncoding, rpcResponse, stateGetMetadata, stateGetRuntimeVersion, tronAddress, u256, unregistered, validator };
|
package/dist/types.d.cts
CHANGED
|
@@ -40,6 +40,7 @@ type CfLendingConfig = RpcResult<'cf_lending_config'>;
|
|
|
40
40
|
type CfLoanAccounts = RpcResult<'cf_loan_accounts'>;
|
|
41
41
|
type CfLendingPoolSupplyBalances = RpcResult<'cf_lending_pool_supply_balances'>;
|
|
42
42
|
type CfVaultAddresses = RpcResult<'cf_get_vault_addresses'>;
|
|
43
|
+
type CfAllLoans = RpcResult<'cf_all_loans'>;
|
|
43
44
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
44
45
|
type CfAccountsResponse = RpcResponse<'cf_accounts'>;
|
|
45
46
|
type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
|
|
@@ -77,6 +78,7 @@ type CfLendingConfigResponse = RpcResponse<'cf_lending_config'>;
|
|
|
77
78
|
type CfLoanAccountsResponse = RpcResponse<'cf_loan_accounts'>;
|
|
78
79
|
type CfLendingPoolSupplyBalancesResponse = RpcResponse<'cf_lending_pool_supply_balances'>;
|
|
79
80
|
type CfVaultAddressesResponse = RpcResponse<'cf_get_vault_addresses'>;
|
|
81
|
+
type CfAllLoansResponse = RpcResponse<'cf_all_loans'>;
|
|
80
82
|
type CfUnregisteredAccount = z.output<typeof unregistered>;
|
|
81
83
|
type CfBrokerAccount = z.output<typeof broker>;
|
|
82
84
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
@@ -85,4 +87,4 @@ type CfOperatorAccount = z.output<typeof operator>;
|
|
|
85
87
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
86
88
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
87
89
|
//#endregion
|
|
88
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFailedCallTron, CfFailedCallTronResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfIngressEgressEvents, CfIngressEgressEventsResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPoolSupplyBalances, CfLendingPoolSupplyBalancesResponse, 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, type RpcLimitOrder, type RpcMethod, type RpcRequest as RpcParams, type RpcRangeOrder, type RpcResult };
|
|
90
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAllLoans, CfAllLoansResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFailedCallTron, CfFailedCallTronResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfIngressEgressEvents, CfIngressEgressEventsResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPoolSupplyBalances, CfLendingPoolSupplyBalancesResponse, 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, type RpcLimitOrder, type RpcMethod, type RpcRequest as RpcParams, type RpcRangeOrder, type RpcResult };
|
package/dist/types.d.mts
CHANGED
|
@@ -40,6 +40,7 @@ type CfLendingConfig = RpcResult<'cf_lending_config'>;
|
|
|
40
40
|
type CfLoanAccounts = RpcResult<'cf_loan_accounts'>;
|
|
41
41
|
type CfLendingPoolSupplyBalances = RpcResult<'cf_lending_pool_supply_balances'>;
|
|
42
42
|
type CfVaultAddresses = RpcResult<'cf_get_vault_addresses'>;
|
|
43
|
+
type CfAllLoans = RpcResult<'cf_all_loans'>;
|
|
43
44
|
type CfAccountInfoResponse = RpcResponse<'cf_account_info'>;
|
|
44
45
|
type CfAccountsResponse = RpcResponse<'cf_accounts'>;
|
|
45
46
|
type CfAuctionStateResponse = RpcResponse<'cf_auction_state'>;
|
|
@@ -77,6 +78,7 @@ type CfLendingConfigResponse = RpcResponse<'cf_lending_config'>;
|
|
|
77
78
|
type CfLoanAccountsResponse = RpcResponse<'cf_loan_accounts'>;
|
|
78
79
|
type CfLendingPoolSupplyBalancesResponse = RpcResponse<'cf_lending_pool_supply_balances'>;
|
|
79
80
|
type CfVaultAddressesResponse = RpcResponse<'cf_get_vault_addresses'>;
|
|
81
|
+
type CfAllLoansResponse = RpcResponse<'cf_all_loans'>;
|
|
80
82
|
type CfUnregisteredAccount = z.output<typeof unregistered>;
|
|
81
83
|
type CfBrokerAccount = z.output<typeof broker>;
|
|
82
84
|
type CfValidatorAccount = z.output<typeof validator>;
|
|
@@ -85,4 +87,4 @@ type CfOperatorAccount = z.output<typeof operator>;
|
|
|
85
87
|
type LpTotalBalances = RpcResult<'lp_total_balances'>;
|
|
86
88
|
type LpTotalBalancesResponse = RpcResponse<'lp_total_balances'>;
|
|
87
89
|
//#endregion
|
|
88
|
-
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFailedCallTron, CfFailedCallTronResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfIngressEgressEvents, CfIngressEgressEventsResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPoolSupplyBalances, CfLendingPoolSupplyBalancesResponse, 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, type RpcLimitOrder, type RpcMethod, type RpcRequest as RpcParams, type RpcRangeOrder, type RpcResult };
|
|
90
|
+
export { CfAccountInfo, CfAccountInfoResponse, CfAccounts, CfAccountsResponse, CfAllLoans, CfAllLoansResponse, CfAuctionState, CfAuctionStateResponse, CfAvailablePools, CfAvailablePoolsResponse, CfBoostPoolDetails, CfBoostPoolDetailsResponse, CfBoostPoolPendingFees, CfBoostPoolPendingFeesResponse, CfBoostPoolsDepth, CfBoostPoolsDepthResponse, CfBrokerAccount, CfEncodeCfParameters, CfEncodeCfParametersResponse, CfEnvironment, CfEnvironmentResponse, CfFailedCallArbitrum, CfFailedCallArbitrumResponse, CfFailedCallEthereum, CfFailedCallEthereumResponse, CfFailedCallTron, CfFailedCallTronResponse, CfFlipSupply, CfFlipSupplyResponse, CfFundingEnvironment, CfFundingEnvironmentResponse, CfGetTradingStrategies, CfGetTradingStrategiesResponse, CfGetTradingStrategyLimits, CfGetTradingStrategyLimitsResponse, CfIngressEgressEnvironment, CfIngressEgressEnvironmentResponse, CfIngressEgressEvents, CfIngressEgressEventsResponse, CfLendingConfig, CfLendingConfigResponse, CfLendingPoolSupplyBalances, CfLendingPoolSupplyBalancesResponse, 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, type RpcLimitOrder, type RpcMethod, type RpcRequest as RpcParams, type RpcRangeOrder, type RpcResult };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainflip/rpc",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@chainflip/utils": "2.2.0
|
|
6
|
+
"@chainflip/utils": "2.2.0",
|
|
7
7
|
"zod": "^3.25.75"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@types/node": "^25.6.
|
|
10
|
+
"@types/node": "^25.6.2",
|
|
11
11
|
"@types/ws": "^8.18.1",
|
|
12
12
|
"ws": "^8.20.0"
|
|
13
13
|
},
|