@p2pdotme/sdk 1.1.8 → 1.2.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/index.cjs CHANGED
@@ -64,7 +64,7 @@ var ZodAddressSchema = import_zod.z.string().refine((s) => (0, import_viem.isAdd
64
64
  var ZodCurrencySchema = import_zod.z.enum(CURRENCY_CODES);
65
65
 
66
66
  // src/index.ts
67
- var VERSION = "1.1.8";
67
+ var VERSION = "1.2.0";
68
68
  // Annotate the CommonJS export names for ESM import in node:
69
69
  0 && (module.exports = {
70
70
  SdkError,
package/dist/index.mjs CHANGED
@@ -37,7 +37,7 @@ var ZodAddressSchema = z.string().refine((s) => isAddress(s), { message: "Invali
37
37
  var ZodCurrencySchema = z.enum(CURRENCY_CODES);
38
38
 
39
39
  // src/index.ts
40
- var VERSION = "1.1.8";
40
+ var VERSION = "1.2.0";
41
41
  export {
42
42
  SdkError,
43
43
  VERSION
package/dist/orders.cjs CHANGED
@@ -48,7 +48,7 @@ __export(orders_exports, {
48
48
  module.exports = __toCommonJS(orders_exports);
49
49
 
50
50
  // src/orders/client.ts
51
- var import_neverthrow15 = require("neverthrow");
51
+ var import_neverthrow16 = require("neverthrow");
52
52
 
53
53
  // src/contracts/order-processor/index.ts
54
54
  var import_neverthrow = require("neverthrow");
@@ -534,6 +534,104 @@ var p2pConfigFacetAbi = [
534
534
  }
535
535
  ];
536
536
 
537
+ // src/contracts/abis/p2p-stake-boost-facet.ts
538
+ var p2pStakeBoostFacetAbi = [
539
+ {
540
+ inputs: [{ internalType: "uint256", name: "tokens", type: "uint256" }],
541
+ name: "p2pBoostStake",
542
+ outputs: [],
543
+ stateMutability: "nonpayable",
544
+ type: "function"
545
+ },
546
+ {
547
+ inputs: [{ internalType: "uint256", name: "tokens", type: "uint256" }],
548
+ name: "p2pBoostTopUp",
549
+ outputs: [],
550
+ stateMutability: "nonpayable",
551
+ type: "function"
552
+ },
553
+ {
554
+ inputs: [],
555
+ name: "p2pBoostRequestUnstake",
556
+ outputs: [],
557
+ stateMutability: "nonpayable",
558
+ type: "function"
559
+ },
560
+ {
561
+ inputs: [],
562
+ name: "p2pBoostClaimUnstake",
563
+ outputs: [],
564
+ stateMutability: "nonpayable",
565
+ type: "function"
566
+ },
567
+ {
568
+ inputs: [],
569
+ name: "p2pBoostCancelUnstake",
570
+ outputs: [],
571
+ stateMutability: "nonpayable",
572
+ type: "function"
573
+ },
574
+ {
575
+ inputs: [{ internalType: "address", name: "user", type: "address" }],
576
+ name: "getUserStake",
577
+ outputs: [
578
+ {
579
+ components: [
580
+ { internalType: "uint128", name: "stakedAmount", type: "uint128" },
581
+ { internalType: "uint64", name: "cooldownEnd", type: "uint64" },
582
+ { internalType: "uint8", name: "status", type: "uint8" }
583
+ ],
584
+ internalType: "struct P2PStakeBoostStorage.UserStake",
585
+ name: "",
586
+ type: "tuple"
587
+ }
588
+ ],
589
+ stateMutability: "view",
590
+ type: "function"
591
+ },
592
+ {
593
+ inputs: [{ internalType: "bytes32", name: "currency", type: "bytes32" }],
594
+ name: "getStakeBoostConfig",
595
+ outputs: [
596
+ {
597
+ components: [
598
+ {
599
+ internalType: "uint256",
600
+ name: "tokensPerUsdNumerator",
601
+ type: "uint256"
602
+ },
603
+ {
604
+ internalType: "uint256",
605
+ name: "tokensPerUsdDenominator",
606
+ type: "uint256"
607
+ },
608
+ { internalType: "uint256", name: "maxBoostUsd", type: "uint256" }
609
+ ],
610
+ internalType: "struct P2PStakeBoostStorage.BoostConfig",
611
+ name: "",
612
+ type: "tuple"
613
+ }
614
+ ],
615
+ stateMutability: "view",
616
+ type: "function"
617
+ },
618
+ {
619
+ inputs: [],
620
+ name: "getStakeBoostGlobals",
621
+ outputs: [
622
+ { internalType: "address", name: "p2pToken", type: "address" },
623
+ { internalType: "address", name: "fraudReserve", type: "address" },
624
+ { internalType: "uint256", name: "maxStakeTokens", type: "uint256" },
625
+ { internalType: "uint256", name: "normalCooldown", type: "uint256" },
626
+ { internalType: "uint256", name: "blacklistCooldown", type: "uint256" },
627
+ { internalType: "uint8", name: "tokenDecimals", type: "uint8" },
628
+ { internalType: "uint256", name: "totalStaked", type: "uint256" }
629
+ ],
630
+ stateMutability: "view",
631
+ type: "function"
632
+ }
633
+ ];
634
+
537
635
  // src/contracts/abis/reputation-manager.ts
538
636
  var reputationManagerAbi = [
539
637
  {
@@ -740,14 +838,16 @@ var reputationManagerAbi = [
740
838
  var DIAMOND_ABI = [
741
839
  ...orderFlowFacetAbi,
742
840
  ...orderProcessorFacetAbi,
743
- ...p2pConfigFacetAbi
841
+ ...p2pConfigFacetAbi,
842
+ ...p2pStakeBoostFacetAbi
744
843
  ];
745
844
  var ABIS = {
746
845
  DIAMOND: DIAMOND_ABI,
747
846
  FACETS: {
748
847
  ORDER_FLOW: orderFlowFacetAbi,
749
848
  ORDER_PROCESSOR: orderProcessorFacetAbi,
750
- CONFIG: p2pConfigFacetAbi
849
+ CONFIG: p2pConfigFacetAbi,
850
+ STAKE: p2pStakeBoostFacetAbi
751
851
  },
752
852
  EXTERNAL: {
753
853
  USDC: import_viem.erc20Abi,
@@ -3425,15 +3525,15 @@ function weierstrassPoints(opts) {
3425
3525
  throw new Error("ProjectivePoint expected");
3426
3526
  }
3427
3527
  const toAffineMemo = memoized((p, iz) => {
3428
- const { px: x, py: y, pz: z9 } = p;
3429
- if (Fp.eql(z9, Fp.ONE))
3528
+ const { px: x, py: y, pz: z10 } = p;
3529
+ if (Fp.eql(z10, Fp.ONE))
3430
3530
  return { x, y };
3431
3531
  const is0 = p.is0();
3432
3532
  if (iz == null)
3433
- iz = is0 ? Fp.ONE : Fp.inv(z9);
3533
+ iz = is0 ? Fp.ONE : Fp.inv(z10);
3434
3534
  const ax = Fp.mul(x, iz);
3435
3535
  const ay = Fp.mul(y, iz);
3436
- const zz = Fp.mul(z9, iz);
3536
+ const zz = Fp.mul(z10, iz);
3437
3537
  if (is0)
3438
3538
  return { x: Fp.ZERO, y: Fp.ZERO };
3439
3539
  if (!Fp.eql(zz, Fp.ONE))
@@ -4428,7 +4528,7 @@ function createSetSellOrderUpiAction(input) {
4428
4528
  }
4429
4529
 
4430
4530
  // src/orders/internal/routing/client.ts
4431
- var import_viem16 = require("viem");
4531
+ var import_viem17 = require("viem");
4432
4532
 
4433
4533
  // src/contracts/error-messages.ts
4434
4534
  var contractErrorMessages = {
@@ -5211,109 +5311,131 @@ var ZodCurrencyScopedParamsSchema = import_zod6.z.object({
5211
5311
  currency: ZodCurrencySchema
5212
5312
  });
5213
5313
 
5214
- // src/contracts/reputation-manager/writes.ts
5314
+ // src/contracts/p2p-stake/index.ts
5215
5315
  var import_neverthrow9 = require("neverthrow");
5216
5316
  var import_viem13 = require("viem");
5217
5317
 
5218
- // src/zkkyc/validation.ts
5318
+ // src/stake/validation.ts
5219
5319
  var import_zod7 = require("zod");
5220
- var ZodAnonAadharProofParamsSchema = import_zod7.z.object({
5221
- nullifierSeed: import_zod7.z.bigint(),
5222
- nullifier: import_zod7.z.bigint(),
5223
- timestamp: import_zod7.z.bigint(),
5224
- signal: import_zod7.z.bigint(),
5225
- revealArray: import_zod7.z.tuple([import_zod7.z.bigint(), import_zod7.z.bigint(), import_zod7.z.bigint(), import_zod7.z.bigint()]),
5226
- packedGroth16Proof: import_zod7.z.tuple([
5227
- import_zod7.z.bigint(),
5228
- import_zod7.z.bigint(),
5229
- import_zod7.z.bigint(),
5230
- import_zod7.z.bigint(),
5231
- import_zod7.z.bigint(),
5232
- import_zod7.z.bigint(),
5233
- import_zod7.z.bigint(),
5234
- import_zod7.z.bigint()
5320
+ var ZodGetUserStakeParamsSchema = import_zod7.z.object({
5321
+ user: ZodAddressSchema
5322
+ });
5323
+ var ZodGetStakeBoostConfigParamsSchema = import_zod7.z.object({
5324
+ currency: ZodCurrencySchema
5325
+ });
5326
+ var ZodGetP2pTokenBalanceParamsSchema = import_zod7.z.object({
5327
+ address: ZodAddressSchema
5328
+ });
5329
+ var ZodStakeParamsSchema = import_zod7.z.object({
5330
+ tokens: import_zod7.z.bigint().positive()
5331
+ });
5332
+ var ZodTopUpParamsSchema = import_zod7.z.object({
5333
+ tokens: import_zod7.z.bigint().positive()
5334
+ });
5335
+
5336
+ // src/contracts/reputation-manager/writes.ts
5337
+ var import_neverthrow10 = require("neverthrow");
5338
+ var import_viem14 = require("viem");
5339
+
5340
+ // src/zkkyc/validation.ts
5341
+ var import_zod8 = require("zod");
5342
+ var ZodAnonAadharProofParamsSchema = import_zod8.z.object({
5343
+ nullifierSeed: import_zod8.z.bigint(),
5344
+ nullifier: import_zod8.z.bigint(),
5345
+ timestamp: import_zod8.z.bigint(),
5346
+ signal: import_zod8.z.bigint(),
5347
+ revealArray: import_zod8.z.tuple([import_zod8.z.bigint(), import_zod8.z.bigint(), import_zod8.z.bigint(), import_zod8.z.bigint()]),
5348
+ packedGroth16Proof: import_zod8.z.tuple([
5349
+ import_zod8.z.bigint(),
5350
+ import_zod8.z.bigint(),
5351
+ import_zod8.z.bigint(),
5352
+ import_zod8.z.bigint(),
5353
+ import_zod8.z.bigint(),
5354
+ import_zod8.z.bigint(),
5355
+ import_zod8.z.bigint(),
5356
+ import_zod8.z.bigint()
5235
5357
  ])
5236
5358
  });
5237
- var ZodSocialVerifyParamsSchema = import_zod7.z.object({
5238
- _socialName: import_zod7.z.string(),
5239
- proofs: import_zod7.z.array(
5240
- import_zod7.z.object({
5241
- claimInfo: import_zod7.z.object({
5242
- provider: import_zod7.z.string(),
5243
- parameters: import_zod7.z.string(),
5244
- context: import_zod7.z.string()
5359
+ var ZodSocialVerifyParamsSchema = import_zod8.z.object({
5360
+ _socialName: import_zod8.z.string(),
5361
+ proofs: import_zod8.z.array(
5362
+ import_zod8.z.object({
5363
+ claimInfo: import_zod8.z.object({
5364
+ provider: import_zod8.z.string(),
5365
+ parameters: import_zod8.z.string(),
5366
+ context: import_zod8.z.string()
5245
5367
  }),
5246
- signedClaim: import_zod7.z.object({
5247
- claim: import_zod7.z.object({
5248
- identifier: import_zod7.z.string(),
5368
+ signedClaim: import_zod8.z.object({
5369
+ claim: import_zod8.z.object({
5370
+ identifier: import_zod8.z.string(),
5249
5371
  owner: ZodAddressSchema,
5250
- timestampS: import_zod7.z.number(),
5251
- epoch: import_zod7.z.number()
5372
+ timestampS: import_zod8.z.number(),
5373
+ epoch: import_zod8.z.number()
5252
5374
  }),
5253
- signatures: import_zod7.z.array(import_zod7.z.string())
5375
+ signatures: import_zod8.z.array(import_zod8.z.string())
5254
5376
  })
5255
5377
  })
5256
5378
  )
5257
5379
  });
5258
- var ZodSolidityVerifierParametersSchema = import_zod7.z.object({
5259
- version: import_zod7.z.string().refine((val) => val.startsWith("0x"), {
5380
+ var ZodSolidityVerifierParametersSchema = import_zod8.z.object({
5381
+ version: import_zod8.z.string().refine((val) => val.startsWith("0x"), {
5260
5382
  message: "Version must be a hex string"
5261
5383
  }),
5262
- proofVerificationData: import_zod7.z.object({
5263
- vkeyHash: import_zod7.z.string().refine((val) => /^0x[a-fA-F0-9]{64}$/.test(val), {
5384
+ proofVerificationData: import_zod8.z.object({
5385
+ vkeyHash: import_zod8.z.string().refine((val) => /^0x[a-fA-F0-9]{64}$/.test(val), {
5264
5386
  message: "Invalid bytes32 hex string"
5265
5387
  }),
5266
- proof: import_zod7.z.string().refine((val) => val.startsWith("0x"), {
5388
+ proof: import_zod8.z.string().refine((val) => val.startsWith("0x"), {
5267
5389
  message: "Proof must be a hex string"
5268
5390
  }),
5269
- publicInputs: import_zod7.z.array(
5270
- import_zod7.z.string().refine((val) => /^0x[a-fA-F0-9]{64}$/.test(val), {
5391
+ publicInputs: import_zod8.z.array(
5392
+ import_zod8.z.string().refine((val) => /^0x[a-fA-F0-9]{64}$/.test(val), {
5271
5393
  message: "Each public input must be a valid bytes32 hex string"
5272
5394
  })
5273
5395
  )
5274
5396
  }),
5275
- committedInputs: import_zod7.z.string().refine((val) => val.startsWith("0x"), {
5397
+ committedInputs: import_zod8.z.string().refine((val) => val.startsWith("0x"), {
5276
5398
  message: "Committed inputs must be a hex string"
5277
5399
  }),
5278
- serviceConfig: import_zod7.z.object({
5279
- validityPeriodInSeconds: import_zod7.z.number().int().nonnegative(),
5280
- domain: import_zod7.z.string(),
5281
- scope: import_zod7.z.string(),
5282
- devMode: import_zod7.z.boolean()
5400
+ serviceConfig: import_zod8.z.object({
5401
+ validityPeriodInSeconds: import_zod8.z.number().int().nonnegative(),
5402
+ domain: import_zod8.z.string(),
5403
+ scope: import_zod8.z.string(),
5404
+ devMode: import_zod8.z.boolean()
5283
5405
  })
5284
5406
  });
5285
- var ZodZkPassportRegisterParamsSchema = import_zod7.z.object({
5407
+ var ZodZkPassportRegisterParamsSchema = import_zod8.z.object({
5286
5408
  params: ZodSolidityVerifierParametersSchema,
5287
- isIDCard: import_zod7.z.boolean()
5409
+ isIDCard: import_zod8.z.boolean()
5288
5410
  });
5289
5411
 
5290
5412
  // src/contracts/tx-limits/index.ts
5291
- var import_neverthrow10 = require("neverthrow");
5292
- var import_viem14 = require("viem");
5413
+ var import_neverthrow11 = require("neverthrow");
5414
+ var import_viem15 = require("viem");
5293
5415
 
5294
5416
  // src/profile/validation.ts
5295
- var import_zod8 = require("zod");
5296
- var ZodUsdcBalanceParamsSchema = import_zod8.z.object({
5417
+ var import_zod9 = require("zod");
5418
+ var ZodUsdcBalanceParamsSchema = import_zod9.z.object({
5297
5419
  address: ZodAddressSchema
5298
5420
  });
5299
- var ZodUsdcAllowanceParamsSchema = import_zod8.z.object({
5421
+ var ZodUsdcAllowanceParamsSchema = import_zod9.z.object({
5300
5422
  owner: ZodAddressSchema
5301
5423
  });
5302
- var ZodGetBalancesParamsSchema = import_zod8.z.object({
5424
+ var ZodGetBalancesParamsSchema = import_zod9.z.object({
5303
5425
  address: ZodAddressSchema,
5304
5426
  currency: ZodCurrencySchema
5305
5427
  });
5306
- var ZodTxLimitsParamsSchema = import_zod8.z.object({
5428
+ var ZodTxLimitsParamsSchema = import_zod9.z.object({
5307
5429
  address: ZodAddressSchema,
5308
5430
  currency: ZodCurrencySchema
5309
5431
  });
5310
5432
 
5311
5433
  // src/contracts/usdc/index.ts
5312
- var import_neverthrow11 = require("neverthrow");
5313
- var import_viem15 = require("viem");
5434
+ var import_neverthrow12 = require("neverthrow");
5435
+ var import_viem16 = require("viem");
5314
5436
 
5315
5437
  // src/orders/internal/routing/routing.ts
5316
- var import_neverthrow12 = require("neverthrow");
5438
+ var import_neverthrow13 = require("neverthrow");
5317
5439
  var EPSILON = 0.25;
5318
5440
  var RECOVERY_SCALE = 0.3;
5319
5441
  var BOOTSTRAP_MAX_WEIGHT = 25;
@@ -5380,7 +5502,7 @@ function selectCircleForOrderAsync(circles, orderCurrency, validateCircle, logge
5380
5502
  attemptsLeft,
5381
5503
  remainingCircles: remaining.length
5382
5504
  });
5383
- return (0, import_neverthrow12.errAsync)(
5505
+ return (0, import_neverthrow13.errAsync)(
5384
5506
  new OrderRoutingError("No eligible circles found", {
5385
5507
  code: "NO_ELIGIBLE_CIRCLES"
5386
5508
  })
@@ -5388,7 +5510,7 @@ function selectCircleForOrderAsync(circles, orderCurrency, validateCircle, logge
5388
5510
  }
5389
5511
  const selected = selectCircle(remaining);
5390
5512
  if (!selected) {
5391
- return (0, import_neverthrow12.errAsync)(
5513
+ return (0, import_neverthrow13.errAsync)(
5392
5514
  new OrderRoutingError("No eligible circles found", {
5393
5515
  code: "NO_ELIGIBLE_CIRCLES"
5394
5516
  })
@@ -5406,11 +5528,11 @@ function selectCircleForOrderAsync(circles, orderCurrency, validateCircle, logge
5406
5528
  circleId: String(circleId),
5407
5529
  error: String(error)
5408
5530
  });
5409
- return (0, import_neverthrow12.okAsync)(false);
5531
+ return (0, import_neverthrow13.okAsync)(false);
5410
5532
  }).andThen((isValid) => {
5411
5533
  if (isValid) {
5412
5534
  logger.info("circle validated successfully", { circleId: String(circleId) });
5413
- return (0, import_neverthrow12.okAsync)(circleId);
5535
+ return (0, import_neverthrow13.okAsync)(circleId);
5414
5536
  }
5415
5537
  logger.debug("circle failed validation, retrying", {
5416
5538
  circleId: String(circleId),
@@ -5488,7 +5610,7 @@ function createOrderRouter(config) {
5488
5610
  const logger = config.logger ?? noopLogger;
5489
5611
  return {
5490
5612
  selectCircle(params) {
5491
- const currencyHex = (0, import_viem16.stringToHex)(params.currency, { size: 32 });
5613
+ const currencyHex = (0, import_viem17.stringToHex)(params.currency, { size: 32 });
5492
5614
  logger.info("selectCircle started", {
5493
5615
  currency: params.currency,
5494
5616
  user: params.user,
@@ -5520,8 +5642,8 @@ function createOrderRouter(config) {
5520
5642
  }
5521
5643
 
5522
5644
  // src/orders/normalize.ts
5523
- var import_neverthrow13 = require("neverthrow");
5524
- var import_viem17 = require("viem");
5645
+ var import_neverthrow14 = require("neverthrow");
5646
+ var import_viem18 = require("viem");
5525
5647
  var ORDER_TYPE_MAP = {
5526
5648
  [ORDER_TYPE.BUY]: "buy",
5527
5649
  [ORDER_TYPE.SELL]: "sell",
@@ -5547,23 +5669,23 @@ function malformed(field, value, context) {
5547
5669
  }
5548
5670
  function mapOrderType(v, ctx) {
5549
5671
  const t = ORDER_TYPE_MAP[v];
5550
- return t ? (0, import_neverthrow13.ok)(t) : (0, import_neverthrow13.err)(malformed("orderType", v, ctx));
5672
+ return t ? (0, import_neverthrow14.ok)(t) : (0, import_neverthrow14.err)(malformed("orderType", v, ctx));
5551
5673
  }
5552
5674
  function mapOrderStatus(v, ctx) {
5553
5675
  const s = ORDER_STATUS_MAP[v];
5554
- return s ? (0, import_neverthrow13.ok)(s) : (0, import_neverthrow13.err)(malformed("status", v, ctx));
5676
+ return s ? (0, import_neverthrow14.ok)(s) : (0, import_neverthrow14.err)(malformed("status", v, ctx));
5555
5677
  }
5556
5678
  function mapDisputeStatus(v, ctx) {
5557
5679
  const s = DISPUTE_STATUS_MAP[v];
5558
- return s ? (0, import_neverthrow13.ok)(s) : (0, import_neverthrow13.err)(malformed("disputeStatus", v, ctx));
5680
+ return s ? (0, import_neverthrow14.ok)(s) : (0, import_neverthrow14.err)(malformed("disputeStatus", v, ctx));
5559
5681
  }
5560
5682
  function decodeCurrency(hex) {
5561
- return (0, import_viem17.hexToString)(hex, { size: 32 }).replaceAll("\0", "");
5683
+ return (0, import_viem18.hexToString)(hex, { size: 32 }).replaceAll("\0", "");
5562
5684
  }
5563
5685
  function normalizeContractOrder(raw, details) {
5564
- if (raw.id === 0n && (0, import_viem17.isAddressEqual)(raw.user, import_viem17.zeroAddress)) return (0, import_neverthrow13.ok)(null);
5686
+ if (raw.id === 0n && (0, import_viem18.isAddressEqual)(raw.user, import_viem18.zeroAddress)) return (0, import_neverthrow14.ok)(null);
5565
5687
  const ctx = { orderId: raw.id.toString() };
5566
- return import_neverthrow13.Result.combine([
5688
+ return import_neverthrow14.Result.combine([
5567
5689
  mapOrderType(raw.orderType, ctx),
5568
5690
  mapOrderStatus(raw.status, ctx),
5569
5691
  mapDisputeStatus(raw.disputeInfo.status, ctx)
@@ -5594,7 +5716,7 @@ function normalizeContractOrder(raw, details) {
5594
5716
  }
5595
5717
  function normalizeSubgraphOrder(raw) {
5596
5718
  const ctx = { orderId: raw.orderId };
5597
- return import_neverthrow13.Result.combine([
5719
+ return import_neverthrow14.Result.combine([
5598
5720
  mapOrderType(raw.type, ctx),
5599
5721
  mapOrderStatus(raw.status, ctx),
5600
5722
  mapDisputeStatus(raw.disputeStatus, ctx)
@@ -5627,7 +5749,7 @@ function normalizeSubgraphOrder(raw) {
5627
5749
  }
5628
5750
 
5629
5751
  // src/orders/subgraph/index.ts
5630
- var import_neverthrow14 = require("neverthrow");
5752
+ var import_neverthrow15 = require("neverthrow");
5631
5753
 
5632
5754
  // src/orders/subgraph/queries.ts
5633
5755
  var ORDERS_BY_USER_QUERY = (
@@ -5688,7 +5810,7 @@ function getOrdersForUser(subgraphUrl, userAddress, skip, limit, logger = noopLo
5688
5810
  context: { data: d }
5689
5811
  })
5690
5812
  ).andThen(
5691
- (validated) => import_neverthrow14.Result.combine(validated.orders_collection.map(normalizeSubgraphOrder))
5813
+ (validated) => import_neverthrow15.Result.combine(validated.orders_collection.map(normalizeSubgraphOrder))
5692
5814
  )
5693
5815
  );
5694
5816
  }
@@ -5842,7 +5964,7 @@ function createOrders(config) {
5842
5964
  ).andThen(
5843
5965
  ({ order, details }) => normalizeContractOrder(order, details).asyncAndThen((normalized) => {
5844
5966
  if (!normalized) {
5845
- return (0, import_neverthrow15.errAsync)(
5967
+ return (0, import_neverthrow16.errAsync)(
5846
5968
  new OrdersError("Order not found", {
5847
5969
  code: "ORDER_NOT_FOUND",
5848
5970
  context: { orderId: params.orderId.toString() }
@@ -5850,7 +5972,7 @@ function createOrders(config) {
5850
5972
  );
5851
5973
  }
5852
5974
  logger.debug("getOrder resolved", { orderId: params.orderId.toString() });
5853
- return (0, import_neverthrow15.okAsync)(normalized);
5975
+ return (0, import_neverthrow16.okAsync)(normalized);
5854
5976
  })
5855
5977
  );
5856
5978
  },