@zkp2p/sdk 0.14.1 → 0.14.2-rc.1

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.mjs CHANGED
@@ -2,11 +2,11 @@ import { IntentGuardianOperations } from './chunk-YA67SM3A.mjs';
2
2
  export { ZERO_RATE_MANAGER_ID, classifyDelegationState, classifyIntentGuardianError, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-YA67SM3A.mjs';
3
3
  import { NetworkError, ValidationError, APIError } from './chunk-3J4FPMPW.mjs';
4
4
  export { APIError, ContractError, ErrorCode, NetworkError, ValidationError, ZKP2PError } from './chunk-3J4FPMPW.mjs';
5
- import { OrchestratorRegistry_default, DISPUTE_PROTECTION_POLICY_ABI, DisputeProtectionPolicy_default, METHOD_NAME_TO_HASH, matchesQuotePaymentMethod, matchesPaymentMethodNameAndHash, MultiAttestationVerifier_default, getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, SUPPORTED_PAYMENT_METHOD_HASHES, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash, OrchestratorV3_default, DisputeNullifierRegistry_default, DisputeVerifier_default, WhitelistPolicy_default, StakeVault_default, IntentLifecycleHookV1_default } from './chunk-4KACMRKF.mjs';
6
- export { DISPUTE_PROTECTION_POLICY_ABI2 as DISPUTE_PROTECTION_POLICY_ABI, ORCHESTRATOR_V3_ABI, PAYMENT_PLATFORMS, STAKE_VAULT_ABI, asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getDisputeProtectionPolicyContract, getGatingServiceAddress, getIntentGuardianContract, getOrchestratorV3Contract, getPaymentMethodsCatalog, getRateManagerContracts, getStakeVaultContract, hasIntentGuardian, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-4KACMRKF.mjs';
5
+ import { OrchestratorRegistry_default, DISPUTE_PROTECTION_POLICY_ABI, DisputeProtectionPolicy_default, METHOD_NAME_TO_HASH, matchesQuotePaymentMethod, matchesPaymentMethodNameAndHash, MultiAttestationVerifier_default, getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, SUPPORTED_PAYMENT_METHOD_HASHES, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash, OrchestratorV3_default, DisputeNullifierRegistry_default, DisputeVerifier_default, WhitelistPolicy_default, StakeVault_default, IntentLifecycleHookV1_default } from './chunk-DOZJKZTL.mjs';
6
+ export { DISPUTE_PROTECTION_POLICY_ABI2 as DISPUTE_PROTECTION_POLICY_ABI, ORCHESTRATOR_V3_ABI, PAYMENT_PLATFORMS, STAKE_VAULT_ABI, asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getDisputeProtectionPolicyContract, getGatingServiceAddress, getIntentGuardianContract, getOrchestratorV3Contract, getPaymentMethodsCatalog, getRateManagerContracts, getStakeVaultContract, hasIntentGuardian, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-DOZJKZTL.mjs';
7
7
  import { Currency, currencyKeccak256 } from './chunk-ZB22BZLZ.mjs';
8
8
  export { Currency, currencyInfo, getCurrencyCodeFromHash, getCurrencyInfoFromCountryCode, getCurrencyInfoFromHash, isSupportedCurrencyHash, mapConversionRatesToOnchainMinRate } from './chunk-ZB22BZLZ.mjs';
9
- import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-5MBWIMIB.mjs';
9
+ import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-PBNUROW5.mjs';
10
10
  import { keccak256, concatHex, encodeFunctionData, encodeAbiParameters, createPublicClient, http, isAddress, zeroAddress, formatUnits } from 'viem';
11
11
  import { hardhat, base } from 'viem/chains';
12
12
  import { createEncryptedBuyerTeeSessionMaterial as createEncryptedBuyerTeeSessionMaterial$1, createEncryptedSellerCredentialUpload } from '@zkp2p/zkp2p-attestation';
@@ -357,7 +357,7 @@ async function withRetry(fn, maxRetries = 3, delayMs = 1e3, timeoutMs, shouldRet
357
357
  for (let i = 0; i < maxRetries; i++) {
358
358
  try {
359
359
  if (timeoutMs) {
360
- const { withTimeout } = await import('./timeout-7H5K6BBB.mjs');
360
+ const { withTimeout } = await import('./timeout-7LS5AHSS.mjs');
361
361
  return await withTimeout(fn(), timeoutMs, `Operation timed out after ${timeoutMs}ms`);
362
362
  }
363
363
  return await fn();
@@ -863,7 +863,7 @@ async function sendTransactionWithAttribution(walletClient, request, referrer, o
863
863
  // src/utils/constants.ts
864
864
  var DEFAULT_BASE_API_URL = "https://api.zkp2p.xyz";
865
865
 
866
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.1_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/oracleFeeds/chainlink.json
866
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.2-rc.2_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/oracleFeeds/chainlink.json
867
867
  var chainlink_default = {
868
868
  feeds: [
869
869
  {
@@ -1909,7 +1909,7 @@ var ProtocolViewerReader = class {
1909
1909
  if (inputCount === null) {
1910
1910
  throw new Error("Configured ProtocolViewer ABI does not expose getDeposit");
1911
1911
  }
1912
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
1912
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-WVXVSWCY.mjs');
1913
1913
  if (inputCount >= 3) {
1914
1914
  return tryContexts(
1915
1915
  protocolViewerContexts,
@@ -1995,7 +1995,7 @@ var ProtocolViewerReader = class {
1995
1995
  return Promise.all(ids.map((id) => this.config.host.getPvDepositById(id)));
1996
1996
  }
1997
1997
  const bn = ids.map((id) => typeof id === "bigint" ? id : parseRawDepositId(id));
1998
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
1998
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-WVXVSWCY.mjs');
1999
1999
  if (inputCount >= 2) {
2000
2000
  const requests = ids.map((id, index) => ({
2001
2001
  index,
@@ -2100,7 +2100,7 @@ var ProtocolViewerReader = class {
2100
2100
  if (!protocolViewerAddress || !protocolViewerAbi || inputCount === null) {
2101
2101
  return this.config.host.getPvAccountDepositsFromIndexer(owner);
2102
2102
  }
2103
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
2103
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-WVXVSWCY.mjs');
2104
2104
  const { address, abi } = this.config.host.requireProtocolViewer();
2105
2105
  if (inputCount >= 2) {
2106
2106
  const readAndFilter = async (raw2) => {
@@ -2171,7 +2171,7 @@ var ProtocolViewerReader = class {
2171
2171
  if (protocolViewerEntries.length === 0) {
2172
2172
  throw new Error("ProtocolViewer not available for this network");
2173
2173
  }
2174
- const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
2174
+ const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-WVXVSWCY.mjs');
2175
2175
  const intentsByHash = /* @__PURE__ */ new Map();
2176
2176
  let attemptedRead = false;
2177
2177
  let hadSuccessfulRead = false;
@@ -2279,7 +2279,7 @@ var ProtocolViewerReader = class {
2279
2279
  if (protocolViewerEntries.length === 0) {
2280
2280
  throw new Error("ProtocolViewer not available for this network");
2281
2281
  }
2282
- const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-S6VTWVVJ.mjs');
2282
+ const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-WVXVSWCY.mjs');
2283
2283
  let lastError;
2284
2284
  for (const pvEntry of protocolViewerEntries) {
2285
2285
  const inputCount = this.pvEntryFunctionInputCount(pvEntry, "getIntent");
@@ -7666,10 +7666,10 @@ var IndexerStakingService = class {
7666
7666
  }
7667
7667
  };
7668
7668
 
7669
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.1_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/index.js
7670
- var version = "0.4.1";
7669
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.2-rc.2_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/index.js
7670
+ var version = "0.4.2-rc.2";
7671
7671
 
7672
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.1_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/base.js
7672
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.2-rc.2_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/base.js
7673
7673
  var data = {
7674
7674
  "schemaVersion": 2,
7675
7675
  "network": "base",
@@ -7839,7 +7839,7 @@ var data = {
7839
7839
  };
7840
7840
  var base_default = data;
7841
7841
 
7842
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.1_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/baseStaging.js
7842
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.2-rc.2_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/baseStaging.js
7843
7843
  var data2 = {
7844
7844
  "schemaVersion": 2,
7845
7845
  "network": "base_staging",
@@ -7988,6 +7988,7 @@ var data2 = {
7988
7988
  "0x90262a3db0edd0be2369c6b28f9e8511ec0bac7136cefbada0880602f87e7268": "1209600",
7989
7989
  "0xa5418819c024239299ea32e09defae8ec412c03e58f5c75f1b2fe84c857f5483": "0",
7990
7990
  "0xcac9daea62d7b89d75ac73af4ee14dcf25721012ae82b568c2ea5c808eaa04ff": "0",
7991
+ "0xe99a5081226cbbff9440a63da5caa04fa30f210c12c4dd9976132ac075054cd9": "0",
7991
7992
  "0xf752c7d19698ecb0bb8988abf9b9a53a4c3657f3bc8850a6fb59fdf3e3ce8cd3": "0",
7992
7993
  "0xf81480907d808d639ad3230869e4b05a3b01b2d34e323af40f2efab807effd32": "0"
7993
7994
  },
@@ -11481,7 +11482,7 @@ var Zkp2pClient = class {
11481
11482
  }
11482
11483
  }
11483
11484
  });
11484
- const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-KDDCBZU2.mjs');
11485
+ const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-DFRG54XQ.mjs');
11485
11486
  currencies = mapConversionRatesToOnchainMinRate2(
11486
11487
  params.conversionRates,
11487
11488
  paymentMethods.length