@chainflip/rpc 2.1.5 → 2.1.6

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/parsers.cjs CHANGED
@@ -1,8 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
2
3
  let zod = require("zod");
3
4
  let _chainflip_utils_bytes = require("@chainflip/utils/bytes");
4
5
  let _chainflip_utils_chainflip = require("@chainflip/utils/chainflip");
6
+ let _chainflip_utils_consts = require("@chainflip/utils/consts");
5
7
  let _chainflip_utils_guard = require("@chainflip/utils/guard");
8
+ let _chainflip_utils_ss58 = require("@chainflip/utils/ss58");
9
+ _chainflip_utils_ss58 = require_runtime.__toESM(_chainflip_utils_ss58);
6
10
  let _chainflip_utils_string = require("@chainflip/utils/string");
7
11
 
8
12
  //#region src/parsers.ts
@@ -750,9 +754,9 @@ const ingressEgressDeposit = zod.z.object({
750
754
  chain: zod.z.string(),
751
755
  asset: zod.z.string()
752
756
  }),
753
- deposit_details: zod.z.union([zod.z.object({ tx_hashes: zod.z.array(zod.z.string()) }), zod.z.object({
754
- tx_id: zod.z.string(),
755
- vout: zod.z.number()
757
+ deposit_details: zod.z.union([zod.z.object({ tx_hashes: zod.z.array(hexString) }), zod.z.object({
758
+ tx_id: zod.z.string().transform((v) => v.startsWith("0x") ? v : `0x${v}`),
759
+ vout: zod.z.number().int()
756
760
  })]).nullable()
757
761
  });
758
762
  const ingressEgressBroadcast = zod.z.object({
@@ -777,11 +781,17 @@ const ingressEgressVaultDeposit = zod.z.object({
777
781
  ccm_deposit_metadata: zod.z.unknown().nullable().optional(),
778
782
  deposit_details: zod.z.unknown().nullable().optional(),
779
783
  broker_fee: zod.z.object({
780
- account: zod.z.string(),
784
+ account: zod.z.string().transform((v) => _chainflip_utils_ss58.encode({
785
+ data: _chainflip_utils_ss58.decode(v).data,
786
+ ss58Format: _chainflip_utils_consts.CHAINFLIP_SS58_PREFIX
787
+ })),
781
788
  bps: zod.z.number()
782
- }).nullable().optional(),
789
+ }).optional(),
783
790
  affiliate_fees: zod.z.array(zod.z.object({
784
- account: zod.z.string(),
791
+ account: zod.z.string().transform((v) => _chainflip_utils_ss58.encode({
792
+ data: _chainflip_utils_ss58.decode(v).data,
793
+ ss58Format: _chainflip_utils_consts.CHAINFLIP_SS58_PREFIX
794
+ })),
785
795
  bps: zod.z.number()
786
796
  })),
787
797
  refund_params: zod.z.object({