@chainflip/rpc 2.2.0-tron-dev.4 → 2.2.0
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 +2619 -1195
- package/dist/common.d.mts +2619 -1195
- package/dist/common.mjs +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/parsers.cjs +72 -31
- package/dist/parsers.d.cts +3960 -1494
- package/dist/parsers.d.mts +3960 -1494
- package/dist/parsers.mjs +71 -32
- 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,6 +17,7 @@ const numberOrHex = z.union([
|
|
|
16
17
|
u256,
|
|
17
18
|
numericString
|
|
18
19
|
]).transform((n) => BigInt(n));
|
|
20
|
+
const tronAddress = z.string().refine(isValidTronAddress, { message: "Invalid tron address" });
|
|
19
21
|
const chainAssetMapFactory = (parser, defaultValue) => z.object({
|
|
20
22
|
Bitcoin: z.object({ BTC: parser }),
|
|
21
23
|
Ethereum: z.object({
|
|
@@ -43,6 +45,9 @@ const chainAssetMapFactory = (parser, defaultValue) => z.object({
|
|
|
43
45
|
Tron: z.object({
|
|
44
46
|
TRX: parser,
|
|
45
47
|
USDT: parser.default(defaultValue)
|
|
48
|
+
}).default({
|
|
49
|
+
TRX: defaultValue,
|
|
50
|
+
USDT: defaultValue
|
|
46
51
|
})
|
|
47
52
|
});
|
|
48
53
|
const chainBaseAssetMapFactory = (parser, defaultValue) => z.object({
|
|
@@ -71,15 +76,18 @@ const chainBaseAssetMapFactory = (parser, defaultValue) => z.object({
|
|
|
71
76
|
Tron: z.object({
|
|
72
77
|
TRX: parser,
|
|
73
78
|
USDT: parser.default(defaultValue)
|
|
79
|
+
}).default({
|
|
80
|
+
TRX: defaultValue,
|
|
81
|
+
USDT: defaultValue
|
|
74
82
|
})
|
|
75
83
|
});
|
|
76
|
-
const chainMapFactory = (parser,
|
|
84
|
+
const chainMapFactory = (parser, defaultValue) => z.object({
|
|
77
85
|
Bitcoin: parser,
|
|
78
86
|
Ethereum: parser,
|
|
79
87
|
Arbitrum: parser,
|
|
80
88
|
Solana: parser,
|
|
81
89
|
Assethub: parser,
|
|
82
|
-
Tron: parser
|
|
90
|
+
Tron: parser.default(defaultValue)
|
|
83
91
|
});
|
|
84
92
|
const rpcAssetSchema = z.union([
|
|
85
93
|
z.object({
|
|
@@ -328,9 +336,13 @@ const requestSwapParameterEncoding = z.discriminatedUnion("chain", [
|
|
|
328
336
|
}),
|
|
329
337
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Ethereum") }),
|
|
330
338
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Arbitrum") }),
|
|
331
|
-
|
|
339
|
+
z.object({
|
|
332
340
|
chain: z.literal("Tron"),
|
|
333
|
-
|
|
341
|
+
to: tronAddress,
|
|
342
|
+
calldata: z.string(),
|
|
343
|
+
note: hexString,
|
|
344
|
+
value: numberOrHex,
|
|
345
|
+
source_token_address: tronAddress.optional()
|
|
334
346
|
}),
|
|
335
347
|
z.object({
|
|
336
348
|
chain: z.literal("Solana"),
|
|
@@ -366,7 +378,7 @@ const broker = z.object({
|
|
|
366
378
|
role: z.literal("broker"),
|
|
367
379
|
...accountInfoCommon,
|
|
368
380
|
earned_fees: chainAssetMapFactory(numberOrHex, 0),
|
|
369
|
-
btc_vault_deposit_address: z.string().
|
|
381
|
+
btc_vault_deposit_address: z.string().nullish(),
|
|
370
382
|
affiliates: z.array(z.object({
|
|
371
383
|
account_id: accountId,
|
|
372
384
|
short_id: z.number(),
|
|
@@ -585,6 +597,14 @@ const cfTradingStrategy = z.object({
|
|
|
585
597
|
min_sell_tick: z.number(),
|
|
586
598
|
max_sell_tick: z.number(),
|
|
587
599
|
base_asset: rpcAssetSchema
|
|
600
|
+
}) }),
|
|
601
|
+
z.object({ OracleTracking: z.object({
|
|
602
|
+
min_buy_offset_tick: z.number(),
|
|
603
|
+
max_buy_offset_tick: z.number(),
|
|
604
|
+
min_sell_offset_tick: z.number(),
|
|
605
|
+
max_sell_offset_tick: z.number(),
|
|
606
|
+
base_asset: rpcAssetSchema,
|
|
607
|
+
quote_asset: rpcAssetSchema
|
|
588
608
|
}) })
|
|
589
609
|
]),
|
|
590
610
|
balance: z.array(z.tuple([rpcAssetSchema, numberOrHex]))
|
|
@@ -663,8 +683,8 @@ const cfSafeModeStatuses = z.object({
|
|
|
663
683
|
borrowing: cfSupportedAssets,
|
|
664
684
|
add_lender_funds: cfSupportedAssets,
|
|
665
685
|
withdraw_lender_funds: cfSupportedAssets,
|
|
666
|
-
add_collateral: cfSupportedAssets,
|
|
667
|
-
remove_collateral: cfSupportedAssets,
|
|
686
|
+
add_collateral: cfSupportedAssets.optional(),
|
|
687
|
+
remove_collateral: cfSupportedAssets.optional(),
|
|
668
688
|
liquidations_enabled: z.boolean()
|
|
669
689
|
}),
|
|
670
690
|
broadcast_ethereum: broadcastPalletSafeModeStatuses,
|
|
@@ -673,14 +693,14 @@ const cfSafeModeStatuses = z.object({
|
|
|
673
693
|
broadcast_arbitrum: broadcastPalletSafeModeStatuses,
|
|
674
694
|
broadcast_solana: broadcastPalletSafeModeStatuses,
|
|
675
695
|
broadcast_assethub: broadcastPalletSafeModeStatuses,
|
|
676
|
-
broadcast_tron: broadcastPalletSafeModeStatuses,
|
|
696
|
+
broadcast_tron: broadcastPalletSafeModeStatuses.optional(),
|
|
677
697
|
ingress_egress_ethereum: ingressEgressPalletSafeModeStatuses,
|
|
678
698
|
ingress_egress_bitcoin: ingressEgressPalletSafeModeStatuses,
|
|
679
699
|
ingress_egress_polkadot: ingressEgressPalletSafeModeStatuses,
|
|
680
700
|
ingress_egress_arbitrum: ingressEgressPalletSafeModeStatuses,
|
|
681
701
|
ingress_egress_solana: ingressEgressPalletSafeModeStatuses,
|
|
682
702
|
ingress_egress_assethub: ingressEgressPalletSafeModeStatuses,
|
|
683
|
-
ingress_egress_tron: ingressEgressPalletSafeModeStatuses,
|
|
703
|
+
ingress_egress_tron: ingressEgressPalletSafeModeStatuses.optional(),
|
|
684
704
|
witnesser: z.enum([
|
|
685
705
|
"CodeRed",
|
|
686
706
|
"CodeGreen",
|
|
@@ -699,6 +719,7 @@ const cfLendingPools = z.array(z.object({
|
|
|
699
719
|
total_amount: numberOrHex,
|
|
700
720
|
available_amount: numberOrHex,
|
|
701
721
|
utilisation_rate: z.number(),
|
|
722
|
+
utilisation_cap: z.number().optional(),
|
|
702
723
|
current_interest_rate: z.number(),
|
|
703
724
|
origination_fee: z.number(),
|
|
704
725
|
liquidation_fee: z.number(),
|
|
@@ -712,7 +733,7 @@ const cfLendingPools = z.array(z.object({
|
|
|
712
733
|
const cfLendingConfig = z.object({
|
|
713
734
|
ltv_thresholds: z.object({
|
|
714
735
|
target: z.number(),
|
|
715
|
-
topup: z.number().
|
|
736
|
+
topup: z.number().nullish(),
|
|
716
737
|
soft_liquidation: z.number(),
|
|
717
738
|
soft_liquidation_abort: z.number(),
|
|
718
739
|
hard_liquidation: z.number(),
|
|
@@ -737,18 +758,25 @@ const cfLendingConfig = z.object({
|
|
|
737
758
|
minimum_loan_amount_usd: numberOrHex,
|
|
738
759
|
minimum_supply_amount_usd: numberOrHex,
|
|
739
760
|
minimum_update_loan_amount_usd: numberOrHex,
|
|
740
|
-
minimum_update_collateral_amount_usd: numberOrHex
|
|
761
|
+
minimum_update_collateral_amount_usd: numberOrHex.optional()
|
|
762
|
+
});
|
|
763
|
+
const cfLoan = z.object({
|
|
764
|
+
loan_id: z.number(),
|
|
765
|
+
asset: rpcAssetSchema,
|
|
766
|
+
principal_amount: numberOrHex,
|
|
767
|
+
loan_type: z.union([z.object({ User: accountId }), z.object({ Boost: numberOrHex })]).optional(),
|
|
768
|
+
created_at: z.number().optional(),
|
|
769
|
+
broker: z.object({
|
|
770
|
+
account: accountId,
|
|
771
|
+
bps: z.number()
|
|
772
|
+
}).nullish()
|
|
741
773
|
});
|
|
742
774
|
const cfLoanAccount = z.object({
|
|
743
775
|
account: accountId,
|
|
744
|
-
collateral_topup_asset: rpcAssetSchema.
|
|
776
|
+
collateral_topup_asset: rpcAssetSchema.nullish(),
|
|
745
777
|
ltv_ratio: numberOrHex.nullable(),
|
|
746
778
|
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
|
-
})),
|
|
779
|
+
loans: z.array(cfLoan),
|
|
752
780
|
liquidation_status: z.object({
|
|
753
781
|
liquidation_swaps: z.array(z.object({
|
|
754
782
|
swap_request_id: z.number(),
|
|
@@ -766,10 +794,15 @@ const cfLendingPoolSupplyBalances = z.array(z.intersection(rpcAssetSchema, z.obj
|
|
|
766
794
|
lp_id: accountId,
|
|
767
795
|
total_amount: numberOrHex
|
|
768
796
|
})) })));
|
|
797
|
+
const u128 = z.union([
|
|
798
|
+
z.number(),
|
|
799
|
+
numericString,
|
|
800
|
+
hexString
|
|
801
|
+
]).transform((arg) => BigInt(arg));
|
|
769
802
|
const ingressEgressDeposit = z.object({
|
|
770
803
|
deposit_chain_block_height: z.number(),
|
|
771
804
|
deposit_address: z.string(),
|
|
772
|
-
amount:
|
|
805
|
+
amount: u128,
|
|
773
806
|
asset: z.object({
|
|
774
807
|
chain: z.string(),
|
|
775
808
|
asset: z.string()
|
|
@@ -777,17 +810,22 @@ const ingressEgressDeposit = z.object({
|
|
|
777
810
|
deposit_details: z.union([z.object({ tx_hashes: z.array(hexString) }), z.object({
|
|
778
811
|
tx_id: z.string().transform((v) => v.startsWith("0x") ? v : `0x${v}`),
|
|
779
812
|
vout: z.number().int()
|
|
780
|
-
})]).
|
|
813
|
+
})]).nullish()
|
|
781
814
|
});
|
|
815
|
+
const txRef = z.object({ hash: z.string() });
|
|
816
|
+
const txOutId = z.union([z.object({ hash: z.string() }), z.object({ signature: z.object({
|
|
817
|
+
s: z.array(z.number()),
|
|
818
|
+
k_times_g_address: z.array(z.number())
|
|
819
|
+
}) })]);
|
|
782
820
|
const ingressEgressBroadcast = z.object({
|
|
783
821
|
broadcast_id: z.number(),
|
|
784
822
|
broadcast_chain_block_height: z.number(),
|
|
785
|
-
tx_out_id:
|
|
786
|
-
tx_ref:
|
|
823
|
+
tx_out_id: txOutId,
|
|
824
|
+
tx_ref: txRef
|
|
787
825
|
});
|
|
788
826
|
const ingressEgressVaultDeposit = z.object({
|
|
789
827
|
tx_id: z.string(),
|
|
790
|
-
deposit_chain_block_height: z.number().
|
|
828
|
+
deposit_chain_block_height: z.number().nullish(),
|
|
791
829
|
input_asset: z.object({
|
|
792
830
|
chain: z.string(),
|
|
793
831
|
asset: z.string()
|
|
@@ -796,17 +834,17 @@ const ingressEgressVaultDeposit = z.object({
|
|
|
796
834
|
chain: z.string(),
|
|
797
835
|
asset: z.string()
|
|
798
836
|
}),
|
|
799
|
-
amount:
|
|
837
|
+
amount: u128,
|
|
800
838
|
destination_address: z.string(),
|
|
801
|
-
ccm_deposit_metadata: z.unknown().
|
|
802
|
-
deposit_details: z.unknown().
|
|
839
|
+
ccm_deposit_metadata: z.unknown().nullish(),
|
|
840
|
+
deposit_details: z.unknown().nullish(),
|
|
803
841
|
broker_fee: z.object({
|
|
804
842
|
account: z.string().transform((v) => ss58.encode({
|
|
805
843
|
data: ss58.decode(v).data,
|
|
806
844
|
ss58Format: CHAINFLIP_SS58_PREFIX
|
|
807
845
|
})),
|
|
808
846
|
bps: z.number()
|
|
809
|
-
}).
|
|
847
|
+
}).nullish(),
|
|
810
848
|
affiliate_fees: z.array(z.object({
|
|
811
849
|
account: z.string().transform((v) => ss58.encode({
|
|
812
850
|
data: ss58.decode(v).data,
|
|
@@ -817,14 +855,14 @@ const ingressEgressVaultDeposit = z.object({
|
|
|
817
855
|
refund_params: z.object({
|
|
818
856
|
retry_duration: z.number(),
|
|
819
857
|
refund_address: z.string(),
|
|
820
|
-
min_price:
|
|
821
|
-
refund_ccm_metadata: z.unknown().
|
|
822
|
-
max_oracle_price_slippage: z.
|
|
823
|
-
}).
|
|
858
|
+
min_price: u128,
|
|
859
|
+
refund_ccm_metadata: z.unknown().nullish(),
|
|
860
|
+
max_oracle_price_slippage: z.number().nullish()
|
|
861
|
+
}).nullish(),
|
|
824
862
|
dca_params: z.object({
|
|
825
863
|
number_of_chunks: z.number(),
|
|
826
864
|
chunk_interval: z.number()
|
|
827
|
-
}).
|
|
865
|
+
}).nullish(),
|
|
828
866
|
max_boost_fee: z.number().optional()
|
|
829
867
|
});
|
|
830
868
|
const cfIngressEgressEvents = z.object({
|
|
@@ -844,6 +882,7 @@ const cfVaultAddresses = z.object({
|
|
|
844
882
|
Bitcoin: bitcoinAddresses
|
|
845
883
|
};
|
|
846
884
|
});
|
|
885
|
+
const cfAllLoans = z.array(cfLoan);
|
|
847
886
|
|
|
848
887
|
//#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 };
|
|
888
|
+
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.0
|
|
3
|
+
"version": "2.2.0",
|
|
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
|
},
|