@zkp2p/sdk 0.14.11-rc.0 → 0.14.11

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, ContractError, 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-QDSNHQGS.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-QDSNHQGS.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-SAKAXMW3.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-SAKAXMW3.mjs';
7
7
  import { Currency, currencyKeccak256 } from './chunk-WDEEWFEU.mjs';
8
8
  export { Currency, currencyInfo, getCurrencyCodeFromHash, getCurrencyInfoFromCountryCode, getCurrencyInfoFromHash, isSupportedCurrencyHash, mapConversionRatesToOnchainMinRate } from './chunk-WDEEWFEU.mjs';
9
- import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-IYYNDUDP.mjs';
9
+ import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-DUNGZUAT.mjs';
10
10
  import { keccak256, parseUnits, concatHex, encodeFunctionData, encodeAbiParameters, createPublicClient, http, parseEventLogs, isAddressEqual, isAddress, zeroAddress, stringToBytes, formatUnits } from 'viem';
11
11
  import { hardhat, base } from 'viem/chains';
12
12
  import { hashUtf8, createNitroAttestationClient, verifySellerCredentialBundle, NitroAttestationError, createEncryptedBuyerTeeSessionMaterial as createEncryptedBuyerTeeSessionMaterial$1, createEncryptedSellerCredentialUpload } from '@zkp2p/zkp2p-attestation';
@@ -1039,7 +1039,7 @@ async function withRetry(fn, maxRetries = 3, delayMs = 1e3, timeoutMs, shouldRet
1039
1039
  for (let i = 0; i < maxRetries; i++) {
1040
1040
  try {
1041
1041
  if (timeoutMs) {
1042
- const { withTimeout } = await import('./timeout-G23BY4BS.mjs');
1042
+ const { withTimeout } = await import('./timeout-H7CB7A3D.mjs');
1043
1043
  return await withTimeout(fn(), timeoutMs, `Operation timed out after ${timeoutMs}ms`);
1044
1044
  }
1045
1045
  return await fn();
@@ -2664,7 +2664,7 @@ var ProtocolViewerReader = class {
2664
2664
  if (inputCount === null) {
2665
2665
  throw new Error("Configured ProtocolViewer ABI does not expose getDeposit");
2666
2666
  }
2667
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-XBMV53ND.mjs');
2667
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-E3UHTM6X.mjs');
2668
2668
  if (inputCount >= 3) {
2669
2669
  return tryContexts(
2670
2670
  protocolViewerContexts,
@@ -2750,7 +2750,7 @@ var ProtocolViewerReader = class {
2750
2750
  return Promise.all(ids.map((id) => this.config.host.getPvDepositById(id)));
2751
2751
  }
2752
2752
  const bn = ids.map((id) => typeof id === "bigint" ? id : parseRawDepositId(id));
2753
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-XBMV53ND.mjs');
2753
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-E3UHTM6X.mjs');
2754
2754
  if (inputCount >= 2) {
2755
2755
  const requests = ids.map((id, index) => ({
2756
2756
  index,
@@ -2855,7 +2855,7 @@ var ProtocolViewerReader = class {
2855
2855
  if (!protocolViewerAddress || !protocolViewerAbi || inputCount === null) {
2856
2856
  return this.config.host.getPvAccountDepositsFromIndexer(owner);
2857
2857
  }
2858
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-XBMV53ND.mjs');
2858
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-E3UHTM6X.mjs');
2859
2859
  const { address, abi } = this.config.host.requireProtocolViewer();
2860
2860
  if (inputCount >= 2) {
2861
2861
  const readAndFilter = async (raw2) => {
@@ -2926,7 +2926,7 @@ var ProtocolViewerReader = class {
2926
2926
  if (protocolViewerEntries.length === 0) {
2927
2927
  throw new Error("ProtocolViewer not available for this network");
2928
2928
  }
2929
- const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-XBMV53ND.mjs');
2929
+ const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-E3UHTM6X.mjs');
2930
2930
  const intentsByHash = /* @__PURE__ */ new Map();
2931
2931
  let attemptedRead = false;
2932
2932
  let hadSuccessfulRead = false;
@@ -3034,7 +3034,7 @@ var ProtocolViewerReader = class {
3034
3034
  if (protocolViewerEntries.length === 0) {
3035
3035
  throw new Error("ProtocolViewer not available for this network");
3036
3036
  }
3037
- const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-XBMV53ND.mjs');
3037
+ const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-E3UHTM6X.mjs');
3038
3038
  let lastError;
3039
3039
  for (const pvEntry of protocolViewerEntries) {
3040
3040
  const inputCount = this.pvEntryFunctionInputCount(pvEntry, "getIntent");
@@ -12095,7 +12095,7 @@ var Zkp2pClient = class {
12095
12095
  }
12096
12096
  }
12097
12097
  });
12098
- const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-224A3JT3.mjs');
12098
+ const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-ACJPV5CV.mjs');
12099
12099
  currencies = mapConversionRatesToOnchainMinRate2(
12100
12100
  params.conversionRates,
12101
12101
  paymentMethods.length