@chainflip/rpc 2.1.10 → 2.2.0-dev.2

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.mjs CHANGED
@@ -697,7 +697,7 @@ const cfLendingPools = z.array(z.object({
697
697
  const cfLendingConfig = z.object({
698
698
  ltv_thresholds: z.object({
699
699
  target: z.number(),
700
- topup: z.number().nullable(),
700
+ topup: z.number().nullish(),
701
701
  soft_liquidation: z.number(),
702
702
  soft_liquidation_abort: z.number(),
703
703
  hard_liquidation: z.number(),
@@ -752,10 +752,15 @@ const cfLendingPoolSupplyBalances = z.array(z.intersection(rpcAssetSchema, z.obj
752
752
  lp_id: accountId,
753
753
  total_amount: numberOrHex
754
754
  })) })));
755
+ const u128 = z.union([
756
+ z.number(),
757
+ numericString,
758
+ hexString
759
+ ]).transform((arg) => BigInt(arg));
755
760
  const ingressEgressDeposit = z.object({
756
761
  deposit_chain_block_height: z.number(),
757
762
  deposit_address: z.string(),
758
- amount: z.string(),
763
+ amount: u128,
759
764
  asset: z.object({
760
765
  chain: z.string(),
761
766
  asset: z.string()
@@ -763,13 +768,18 @@ const ingressEgressDeposit = z.object({
763
768
  deposit_details: z.union([z.object({ tx_hashes: z.array(hexString) }), z.object({
764
769
  tx_id: z.string().transform((v) => v.startsWith("0x") ? v : `0x${v}`),
765
770
  vout: z.number().int()
766
- })]).nullable()
771
+ })]).nullable().optional()
767
772
  });
773
+ const txRef = z.object({ hash: z.string() });
774
+ const txOutId = z.union([z.object({ hash: z.string() }), z.object({ signature: z.object({
775
+ s: z.array(z.number()),
776
+ k_times_g_address: z.array(z.number())
777
+ }) })]);
768
778
  const ingressEgressBroadcast = z.object({
769
779
  broadcast_id: z.number(),
770
780
  broadcast_chain_block_height: z.number(),
771
- tx_out_id: z.unknown(),
772
- tx_ref: z.unknown()
781
+ tx_out_id: txOutId,
782
+ tx_ref: txRef
773
783
  });
774
784
  const ingressEgressVaultDeposit = z.object({
775
785
  tx_id: z.string(),
@@ -782,7 +792,7 @@ const ingressEgressVaultDeposit = z.object({
782
792
  chain: z.string(),
783
793
  asset: z.string()
784
794
  }),
785
- amount: z.string(),
795
+ amount: u128,
786
796
  destination_address: z.string(),
787
797
  ccm_deposit_metadata: z.unknown().nullable().optional(),
788
798
  deposit_details: z.unknown().nullable().optional(),
@@ -803,9 +813,9 @@ const ingressEgressVaultDeposit = z.object({
803
813
  refund_params: z.object({
804
814
  retry_duration: z.number(),
805
815
  refund_address: z.string(),
806
- min_price: z.string(),
816
+ min_price: u128,
807
817
  refund_ccm_metadata: z.unknown().nullable().optional(),
808
- max_oracle_price_slippage: z.unknown().nullable().optional()
818
+ max_oracle_price_slippage: z.number().nullable().optional()
809
819
  }).nullable().optional(),
810
820
  dca_params: z.object({
811
821
  number_of_chunks: z.number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/rpc",
3
- "version": "2.1.10",
3
+ "version": "2.2.0-dev.2",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@chainflip/utils": "2.1.2",