@chainflip/rpc 2.2.0-alpha.5 → 2.2.0-alpha.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.d.cts +1486 -1494
- package/dist/common.d.mts +1486 -1494
- package/dist/parsers.cjs +8 -2
- package/dist/parsers.d.cts +1386 -1389
- package/dist/parsers.d.mts +1386 -1389
- package/dist/parsers.mjs +8 -3
- package/package.json +1 -1
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({
|
|
@@ -334,9 +336,12 @@ const requestSwapParameterEncoding = z.discriminatedUnion("chain", [
|
|
|
334
336
|
}),
|
|
335
337
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Ethereum") }),
|
|
336
338
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: z.literal("Arbitrum") }),
|
|
337
|
-
|
|
339
|
+
z.object({
|
|
338
340
|
chain: z.literal("Tron"),
|
|
339
|
-
|
|
341
|
+
to: tronAddress,
|
|
342
|
+
calldata: z.string(),
|
|
343
|
+
note: hexString,
|
|
344
|
+
source_token_address: tronAddress.optional()
|
|
340
345
|
}),
|
|
341
346
|
z.object({
|
|
342
347
|
chain: z.literal("Solana"),
|
|
@@ -875,4 +880,4 @@ const cfVaultAddresses = z.object({
|
|
|
875
880
|
const cfAllLoans = z.array(cfLoan);
|
|
876
881
|
|
|
877
882
|
//#endregion
|
|
878
|
-
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, u256, unregistered, validator };
|
|
883
|
+
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 };
|