@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.cjs
CHANGED
|
@@ -8,6 +8,7 @@ let _chainflip_utils_guard = require("@chainflip/utils/guard");
|
|
|
8
8
|
let _chainflip_utils_ss58 = require("@chainflip/utils/ss58");
|
|
9
9
|
_chainflip_utils_ss58 = require_runtime.__toESM(_chainflip_utils_ss58, 1);
|
|
10
10
|
let _chainflip_utils_string = require("@chainflip/utils/string");
|
|
11
|
+
let _chainflip_utils_tron = require("@chainflip/utils/tron");
|
|
11
12
|
|
|
12
13
|
//#region src/parsers.ts
|
|
13
14
|
const accountId = zod.z.string().refine((val) => val.startsWith("cF"));
|
|
@@ -19,6 +20,7 @@ const numberOrHex = zod.z.union([
|
|
|
19
20
|
u256,
|
|
20
21
|
numericString
|
|
21
22
|
]).transform((n) => BigInt(n));
|
|
23
|
+
const tronAddress = zod.z.string().refine(_chainflip_utils_tron.isValidTronAddress, { message: "Invalid tron address" });
|
|
22
24
|
const chainAssetMapFactory = (parser, defaultValue) => zod.z.object({
|
|
23
25
|
Bitcoin: zod.z.object({ BTC: parser }),
|
|
24
26
|
Ethereum: zod.z.object({
|
|
@@ -337,9 +339,12 @@ const requestSwapParameterEncoding = zod.z.discriminatedUnion("chain", [
|
|
|
337
339
|
}),
|
|
338
340
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: zod.z.literal("Ethereum") }),
|
|
339
341
|
evmBrokerRequestSwapParameterEncoding.extend({ chain: zod.z.literal("Arbitrum") }),
|
|
340
|
-
|
|
342
|
+
zod.z.object({
|
|
341
343
|
chain: zod.z.literal("Tron"),
|
|
342
|
-
|
|
344
|
+
to: tronAddress,
|
|
345
|
+
calldata: zod.z.string(),
|
|
346
|
+
note: hexString,
|
|
347
|
+
source_token_address: tronAddress.optional()
|
|
343
348
|
}),
|
|
344
349
|
zod.z.object({
|
|
345
350
|
chain: zod.z.literal("Solana"),
|
|
@@ -930,6 +935,7 @@ exports.requestSwapParameterEncoding = requestSwapParameterEncoding;
|
|
|
930
935
|
exports.rpcResponse = rpcResponse;
|
|
931
936
|
exports.stateGetMetadata = stateGetMetadata;
|
|
932
937
|
exports.stateGetRuntimeVersion = stateGetRuntimeVersion;
|
|
938
|
+
exports.tronAddress = tronAddress;
|
|
933
939
|
exports.u256 = u256;
|
|
934
940
|
exports.unregistered = unregistered;
|
|
935
941
|
exports.validator = validator;
|