@chainflip/rpc 2.1.5 → 2.1.7-dev.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/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
@@ -563,6 +567,14 @@ const cfTradingStrategy = zod.z.object({
563
567
  min_sell_tick: zod.z.number(),
564
568
  max_sell_tick: zod.z.number(),
565
569
  base_asset: rpcAssetSchema
570
+ }) }),
571
+ zod.z.object({ OracleTracking: zod.z.object({
572
+ min_buy_offset_tick: zod.z.number(),
573
+ max_buy_offset_tick: zod.z.number(),
574
+ min_sell_offset_tick: zod.z.number(),
575
+ max_sell_offset_tick: zod.z.number(),
576
+ base_asset: rpcAssetSchema,
577
+ quote_asset: rpcAssetSchema
566
578
  }) })
567
579
  ]),
568
580
  balance: zod.z.array(zod.z.tuple([rpcAssetSchema, numberOrHex]))
@@ -750,9 +762,9 @@ const ingressEgressDeposit = zod.z.object({
750
762
  chain: zod.z.string(),
751
763
  asset: zod.z.string()
752
764
  }),
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()
765
+ deposit_details: zod.z.union([zod.z.object({ tx_hashes: zod.z.array(hexString) }), zod.z.object({
766
+ tx_id: zod.z.string().transform((v) => v.startsWith("0x") ? v : `0x${v}`),
767
+ vout: zod.z.number().int()
756
768
  })]).nullable()
757
769
  });
758
770
  const ingressEgressBroadcast = zod.z.object({
@@ -777,11 +789,17 @@ const ingressEgressVaultDeposit = zod.z.object({
777
789
  ccm_deposit_metadata: zod.z.unknown().nullable().optional(),
778
790
  deposit_details: zod.z.unknown().nullable().optional(),
779
791
  broker_fee: zod.z.object({
780
- account: zod.z.string(),
792
+ account: zod.z.string().transform((v) => _chainflip_utils_ss58.encode({
793
+ data: _chainflip_utils_ss58.decode(v).data,
794
+ ss58Format: _chainflip_utils_consts.CHAINFLIP_SS58_PREFIX
795
+ })),
781
796
  bps: zod.z.number()
782
- }).nullable().optional(),
797
+ }).optional(),
783
798
  affiliate_fees: zod.z.array(zod.z.object({
784
- account: zod.z.string(),
799
+ account: zod.z.string().transform((v) => _chainflip_utils_ss58.encode({
800
+ data: _chainflip_utils_ss58.decode(v).data,
801
+ ss58Format: _chainflip_utils_consts.CHAINFLIP_SS58_PREFIX
802
+ })),
785
803
  bps: zod.z.number()
786
804
  })),
787
805
  refund_params: zod.z.object({