@zkp2p/sdk 0.14.9 → 0.14.11-rc.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.
@@ -0,0 +1,5 @@
1
+ export { enrichPvDepositView, enrichPvIntentView, parseDepositView, parseIntentView } from './chunk-QDSNHQGS.mjs';
2
+ import './chunk-WDEEWFEU.mjs';
3
+ import './chunk-IYYNDUDP.mjs';
4
+ //# sourceMappingURL=protocolViewerParsers-XBMV53ND.mjs.map
5
+ //# sourceMappingURL=protocolViewerParsers-XBMV53ND.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"protocolViewerParsers-O5WTGTUK.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"protocolViewerParsers-XBMV53ND.mjs"}
package/dist/react.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as Zkp2pClient, P as PostDepositDetailsRequest, a4 as SignalIntentMethodParams, b_ as PreparedTransaction, a5 as FulfillIntentMethodParams, dL as SendTransactionFn, dM as SendBatchFn, dJ as DelegationDepositTarget, dK as BatchResult, al as IntentGuardianErrorCode, ah as IntentGuardianPolicy, ai as IntentGuardianQuote } from './vaultUtils-PRhZBjwX.mjs';
2
- export { dH as DelegationRoute, dI as DelegationState, dV as VAULT_ZERO_ADDRESS, dB as ZERO_RATE_MANAGER_ID, dW as asErrorMessage, dX as assertDelegationMethodSupport, dG as classifyDelegationState, dF as getDelegationRoute, dC as isZeroRateManagerId, dD as normalizeRateManagerId, dE as normalizeRegistry } from './vaultUtils-PRhZBjwX.mjs';
1
+ import { _ as Zkp2pClient, P as PostDepositDetailsRequest, a4 as SignalIntentMethodParams, b_ as PreparedTransaction, a5 as FulfillIntentMethodParams, dL as SendTransactionFn, dM as SendBatchFn, dJ as DelegationDepositTarget, dK as BatchResult, al as IntentGuardianErrorCode, ah as IntentGuardianPolicy, ai as IntentGuardianQuote } from './vaultUtils-rtYn04WQ.mjs';
2
+ export { dH as DelegationRoute, dI as DelegationState, dV as VAULT_ZERO_ADDRESS, dB as ZERO_RATE_MANAGER_ID, dW as asErrorMessage, dX as assertDelegationMethodSupport, dG as classifyDelegationState, dF as getDelegationRoute, dC as isZeroRateManagerId, dD as normalizeRateManagerId, dE as normalizeRegistry } from './vaultUtils-rtYn04WQ.mjs';
3
3
  import { Hash, Address, Hex } from 'viem';
4
4
  import '@zkp2p/indexer-schema';
5
5
  import 'abitype';
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as Zkp2pClient, P as PostDepositDetailsRequest, a4 as SignalIntentMethodParams, b_ as PreparedTransaction, a5 as FulfillIntentMethodParams, dL as SendTransactionFn, dM as SendBatchFn, dJ as DelegationDepositTarget, dK as BatchResult, al as IntentGuardianErrorCode, ah as IntentGuardianPolicy, ai as IntentGuardianQuote } from './vaultUtils-PRhZBjwX.js';
2
- export { dH as DelegationRoute, dI as DelegationState, dV as VAULT_ZERO_ADDRESS, dB as ZERO_RATE_MANAGER_ID, dW as asErrorMessage, dX as assertDelegationMethodSupport, dG as classifyDelegationState, dF as getDelegationRoute, dC as isZeroRateManagerId, dD as normalizeRateManagerId, dE as normalizeRegistry } from './vaultUtils-PRhZBjwX.js';
1
+ import { _ as Zkp2pClient, P as PostDepositDetailsRequest, a4 as SignalIntentMethodParams, b_ as PreparedTransaction, a5 as FulfillIntentMethodParams, dL as SendTransactionFn, dM as SendBatchFn, dJ as DelegationDepositTarget, dK as BatchResult, al as IntentGuardianErrorCode, ah as IntentGuardianPolicy, ai as IntentGuardianQuote } from './vaultUtils-rtYn04WQ.js';
2
+ export { dH as DelegationRoute, dI as DelegationState, dV as VAULT_ZERO_ADDRESS, dB as ZERO_RATE_MANAGER_ID, dW as asErrorMessage, dX as assertDelegationMethodSupport, dG as classifyDelegationState, dF as getDelegationRoute, dC as isZeroRateManagerId, dD as normalizeRateManagerId, dE as normalizeRegistry } from './vaultUtils-rtYn04WQ.js';
3
3
  import { Hash, Address, Hex } from 'viem';
4
4
  import '@zkp2p/indexer-schema';
5
5
  import 'abitype';
package/dist/react.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { asErrorMessage, ZERO_ADDRESS, getDelegationRoute, assertDelegationMethodSupport, prepareClearDelegationTx, normalizeRateManagerId, normalizeRegistry, isZeroRateManagerId, assertAtomicDelegationSwitchSupport, prepareSetDelegationTx, classifyIntentGuardianError } from './chunk-YA67SM3A.mjs';
2
2
  export { ZERO_ADDRESS as VAULT_ZERO_ADDRESS, ZERO_RATE_MANAGER_ID, asErrorMessage, assertDelegationMethodSupport, classifyDelegationState, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-YA67SM3A.mjs';
3
- import './chunk-ERJIIFAV.mjs';
3
+ import './chunk-IYYNDUDP.mjs';
4
4
  import { useState, useCallback, useMemo } from 'react';
5
5
 
6
6
  function useCreateDeposit({ client, onSuccess, onError }) {
@@ -1,5 +1,5 @@
1
1
  import { NetworkError } from './chunk-3J4FPMPW.mjs';
2
- import './chunk-ERJIIFAV.mjs';
2
+ import './chunk-IYYNDUDP.mjs';
3
3
 
4
4
  // src/utils/timeout.ts
5
5
  async function withTimeout(promise, timeoutMs, timeoutMessage) {
@@ -30,5 +30,5 @@ var DEFAULT_TIMEOUTS = {
30
30
  };
31
31
 
32
32
  export { DEFAULT_TIMEOUTS, withTimeout };
33
- //# sourceMappingURL=timeout-RXDD3LQG.mjs.map
34
- //# sourceMappingURL=timeout-RXDD3LQG.mjs.map
33
+ //# sourceMappingURL=timeout-G23BY4BS.mjs.map
34
+ //# sourceMappingURL=timeout-G23BY4BS.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/timeout.ts"],"names":[],"mappings":";;;;AASA,eAAsB,WAAA,CACpB,OAAA,EACA,SAAA,EACA,cAAA,EACY;AACZ,EAAA,IAAI,SAAA;AAEJ,EAAA,MAAM,cAAA,GAAiB,IAAI,OAAA,CAAe,CAAC,GAAG,MAAA,KAAW;AACvD,IAAA,SAAA,GAAY,WAAW,MAAM;AAC3B,MAAA,MAAA,CAAO,IAAI,YAAA,CAAa,cAAA,EAAgB,EAAE,OAAA,EAAS,SAAA,EAAW,CAAC,CAAA;AAAA,IACjE,GAAG,SAAS,CAAA;AAAA,EACd,CAAC,CAAA;AAED,EAAA,IAAI;AACF,IAAA,MAAM,SAAS,MAAM,OAAA,CAAQ,KAAK,CAAC,OAAA,EAAS,cAAc,CAAC,CAAA;AAC3D,IAAA,IAAI,SAAA,eAAwB,SAAS,CAAA;AACrC,IAAA,OAAO,MAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,IAAI,SAAA,eAAwB,SAAS,CAAA;AACrC,IAAA,MAAM,KAAA;AAAA,EACR;AACF;AAKO,IAAM,gBAAA,GAAmB;AAAA;AAAA,EAE9B,GAAA,EAAK,GAAA;AAAA;AAAA,EAEL,WAAA,EAAa,GAAA;AAAA;AAAA,EAEb,gBAAA,EAAkB,IAAA;AAAA;AAAA,EAElB,SAAA,EAAW;AACb","file":"timeout-RXDD3LQG.mjs","sourcesContent":["import { NetworkError } from '../errors';\n\n/**\n * Wraps a promise with a timeout\n * @param promise - The promise to wrap\n * @param timeoutMs - Timeout in milliseconds\n * @param timeoutMessage - Error message when timeout occurs\n * @returns Promise that rejects if timeout occurs\n */\nexport async function withTimeout<T>(\n promise: Promise<T>,\n timeoutMs: number,\n timeoutMessage: string\n): Promise<T> {\n let timeoutId: NodeJS.Timeout | undefined;\n\n const timeoutPromise = new Promise<never>((_, reject) => {\n timeoutId = setTimeout(() => {\n reject(new NetworkError(timeoutMessage, { timeout: timeoutMs }));\n }, timeoutMs);\n });\n\n try {\n const result = await Promise.race([promise, timeoutPromise]);\n if (timeoutId) clearTimeout(timeoutId);\n return result;\n } catch (error) {\n if (timeoutId) clearTimeout(timeoutId);\n throw error;\n }\n}\n\n/**\n * Default timeout values for different operation types\n */\nexport const DEFAULT_TIMEOUTS = {\n /** API call timeout (30 seconds) */\n API: 30000,\n /** Blockchain transaction timeout (60 seconds) */\n TRANSACTION: 60000,\n /** Proof generation timeout (120 seconds) */\n PROOF_GENERATION: 120000,\n /** Extension communication timeout (60 seconds) */\n EXTENSION: 60000,\n} as const;"]}
1
+ {"version":3,"sources":["../src/utils/timeout.ts"],"names":[],"mappings":";;;;AASA,eAAsB,WAAA,CACpB,OAAA,EACA,SAAA,EACA,cAAA,EACY;AACZ,EAAA,IAAI,SAAA;AAEJ,EAAA,MAAM,cAAA,GAAiB,IAAI,OAAA,CAAe,CAAC,GAAG,MAAA,KAAW;AACvD,IAAA,SAAA,GAAY,WAAW,MAAM;AAC3B,MAAA,MAAA,CAAO,IAAI,YAAA,CAAa,cAAA,EAAgB,EAAE,OAAA,EAAS,SAAA,EAAW,CAAC,CAAA;AAAA,IACjE,GAAG,SAAS,CAAA;AAAA,EACd,CAAC,CAAA;AAED,EAAA,IAAI;AACF,IAAA,MAAM,SAAS,MAAM,OAAA,CAAQ,KAAK,CAAC,OAAA,EAAS,cAAc,CAAC,CAAA;AAC3D,IAAA,IAAI,SAAA,eAAwB,SAAS,CAAA;AACrC,IAAA,OAAO,MAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,IAAI,SAAA,eAAwB,SAAS,CAAA;AACrC,IAAA,MAAM,KAAA;AAAA,EACR;AACF;AAKO,IAAM,gBAAA,GAAmB;AAAA;AAAA,EAE9B,GAAA,EAAK,GAAA;AAAA;AAAA,EAEL,WAAA,EAAa,GAAA;AAAA;AAAA,EAEb,gBAAA,EAAkB,IAAA;AAAA;AAAA,EAElB,SAAA,EAAW;AACb","file":"timeout-G23BY4BS.mjs","sourcesContent":["import { NetworkError } from '../errors';\n\n/**\n * Wraps a promise with a timeout\n * @param promise - The promise to wrap\n * @param timeoutMs - Timeout in milliseconds\n * @param timeoutMessage - Error message when timeout occurs\n * @returns Promise that rejects if timeout occurs\n */\nexport async function withTimeout<T>(\n promise: Promise<T>,\n timeoutMs: number,\n timeoutMessage: string\n): Promise<T> {\n let timeoutId: NodeJS.Timeout | undefined;\n\n const timeoutPromise = new Promise<never>((_, reject) => {\n timeoutId = setTimeout(() => {\n reject(new NetworkError(timeoutMessage, { timeout: timeoutMs }));\n }, timeoutMs);\n });\n\n try {\n const result = await Promise.race([promise, timeoutPromise]);\n if (timeoutId) clearTimeout(timeoutId);\n return result;\n } catch (error) {\n if (timeoutId) clearTimeout(timeoutId);\n throw error;\n }\n}\n\n/**\n * Default timeout values for different operation types\n */\nexport const DEFAULT_TIMEOUTS = {\n /** API call timeout (30 seconds) */\n API: 30000,\n /** Blockchain transaction timeout (60 seconds) */\n TRANSACTION: 60000,\n /** Proof generation timeout (120 seconds) */\n PROOF_GENERATION: 120000,\n /** Extension communication timeout (60 seconds) */\n EXTENSION: 60000,\n} as const;"]}
@@ -813,7 +813,7 @@ type FulfillIntentParams = {
813
813
  timestampBufferMs?: number | string;
814
814
  /**
815
815
  * Alternate attestation-service origins, tried after network failures only.
816
- * Omit for the default Railway proxy; pass [] to disable fallback.
816
+ * Omit for the attestor's own proxy; pass [] to disable fallback.
817
817
  */
818
818
  attestationServiceFallbackUrls?: string[];
819
819
  /** Override the attestation service base URL */
@@ -1062,7 +1062,7 @@ type BuyerTeeSessionMaterialEncryptionInput = {
1062
1062
  actionType: string;
1063
1063
  /**
1064
1064
  * Alternate attestation-service origins, tried after network failures only.
1065
- * Omit for the default Railway proxy; pass [] to disable fallback.
1065
+ * Omit for the attestor's own proxy; pass [] to disable fallback.
1066
1066
  */
1067
1067
  attestationServiceFallbackUrls?: string[];
1068
1068
  attestationRuntime?: SellerCredentialAttestationRuntime;
@@ -1200,7 +1200,7 @@ type UploadSellerCredentialOptions = {
1200
1200
  baseApiUrl?: string;
1201
1201
  /**
1202
1202
  * Alternate attestation-service origins, tried after network failures only.
1203
- * Omit for the default Railway proxy; pass [] to disable fallback.
1203
+ * Omit for the attestor's own proxy; pass [] to disable fallback.
1204
1204
  */
1205
1205
  attestationServiceFallbackUrls?: string[];
1206
1206
  attestationServiceUrl?: string;
@@ -2941,7 +2941,7 @@ type FulfillIntentMethodParams = {
2941
2941
  timestampBufferMs?: string;
2942
2942
  /**
2943
2943
  * Alternate attestation-service origins, tried after network failures only.
2944
- * Omit for the default Railway proxy; pass [] to disable fallback.
2944
+ * Omit for the attestor's own proxy; pass [] to disable fallback.
2945
2945
  */
2946
2946
  attestationServiceFallbackUrls?: string[];
2947
2947
  /** Override attestation service URL */
@@ -4679,9 +4679,11 @@ declare class Zkp2pClient {
4679
4679
  /**
4680
4680
  * Connect an iCloud Mail receipt inbox for PayPal, Venmo or X Money seller automated
4681
4681
  * release. The app-specific password is encrypted to the attested enclave and
4682
- * posted directly to the attestor (no proxy, no retry). The returned bundle is
4683
- * verified against the pinned enclave signer, platform and registered maker,
4684
- * then stored unchanged for that maker; the maker is not re-registered.
4682
+ * posted to the attestor. A request that fails at the network layer is sent
4683
+ * once through that attestor's proxy; nothing else is retried. The returned
4684
+ * bundle is verified against the pinned enclave signer, platform and
4685
+ * registered maker, then stored unchanged for that maker; the maker is not
4686
+ * re-registered.
4685
4687
  *
4686
4688
  * Rejects with `ICloudMailCredentialError` (`reason` names the failure)
4687
4689
  * before any mailbox work when the payee does not hash to `payeeDetails`,
@@ -813,7 +813,7 @@ type FulfillIntentParams = {
813
813
  timestampBufferMs?: number | string;
814
814
  /**
815
815
  * Alternate attestation-service origins, tried after network failures only.
816
- * Omit for the default Railway proxy; pass [] to disable fallback.
816
+ * Omit for the attestor's own proxy; pass [] to disable fallback.
817
817
  */
818
818
  attestationServiceFallbackUrls?: string[];
819
819
  /** Override the attestation service base URL */
@@ -1062,7 +1062,7 @@ type BuyerTeeSessionMaterialEncryptionInput = {
1062
1062
  actionType: string;
1063
1063
  /**
1064
1064
  * Alternate attestation-service origins, tried after network failures only.
1065
- * Omit for the default Railway proxy; pass [] to disable fallback.
1065
+ * Omit for the attestor's own proxy; pass [] to disable fallback.
1066
1066
  */
1067
1067
  attestationServiceFallbackUrls?: string[];
1068
1068
  attestationRuntime?: SellerCredentialAttestationRuntime;
@@ -1200,7 +1200,7 @@ type UploadSellerCredentialOptions = {
1200
1200
  baseApiUrl?: string;
1201
1201
  /**
1202
1202
  * Alternate attestation-service origins, tried after network failures only.
1203
- * Omit for the default Railway proxy; pass [] to disable fallback.
1203
+ * Omit for the attestor's own proxy; pass [] to disable fallback.
1204
1204
  */
1205
1205
  attestationServiceFallbackUrls?: string[];
1206
1206
  attestationServiceUrl?: string;
@@ -2941,7 +2941,7 @@ type FulfillIntentMethodParams = {
2941
2941
  timestampBufferMs?: string;
2942
2942
  /**
2943
2943
  * Alternate attestation-service origins, tried after network failures only.
2944
- * Omit for the default Railway proxy; pass [] to disable fallback.
2944
+ * Omit for the attestor's own proxy; pass [] to disable fallback.
2945
2945
  */
2946
2946
  attestationServiceFallbackUrls?: string[];
2947
2947
  /** Override attestation service URL */
@@ -4679,9 +4679,11 @@ declare class Zkp2pClient {
4679
4679
  /**
4680
4680
  * Connect an iCloud Mail receipt inbox for PayPal, Venmo or X Money seller automated
4681
4681
  * release. The app-specific password is encrypted to the attested enclave and
4682
- * posted directly to the attestor (no proxy, no retry). The returned bundle is
4683
- * verified against the pinned enclave signer, platform and registered maker,
4684
- * then stored unchanged for that maker; the maker is not re-registered.
4682
+ * posted to the attestor. A request that fails at the network layer is sent
4683
+ * once through that attestor's proxy; nothing else is retried. The returned
4684
+ * bundle is verified against the pinned enclave signer, platform and
4685
+ * registered maker, then stored unchanged for that maker; the maker is not
4686
+ * re-registered.
4685
4687
  *
4686
4688
  * Rejects with `ICloudMailCredentialError` (`reason` names the failure)
4687
4689
  * before any mailbox work when the payee does not hash to `payeeDetails`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/sdk",
3
- "version": "0.14.9",
3
+ "version": "0.14.11-rc.0",
4
4
  "description": "ZKP2P Client SDK - TypeScript SDK for deposit management, liquidity provision, and onramping",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs",
@@ -1,12 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- // <define:__ZKP2P_SDK_BUILD_METADATA__>
8
- var define_ZKP2P_SDK_BUILD_METADATA_default = { schemaVersion: 2, source: { repository: "zkp2p/zkp2p-clients", commitSha: "d2e1cd11fec30f7b401b43a3842414c11379ab35", kind: "github", distributable: true }, sdkPackageVersion: "0.14.9", contractsPackageVersion: "0.4.4-rc.2", indexerSchemaPackageVersion: "0.22.0", activeDisputeStack: { base: { version: 2, selectionHash: "ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c" }, baseStaging: { version: 2, selectionHash: "6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9" } } };
9
-
10
- export { __export, define_ZKP2P_SDK_BUILD_METADATA_default };
11
- //# sourceMappingURL=chunk-ERJIIFAV.mjs.map
12
- //# sourceMappingURL=chunk-ERJIIFAV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["%3Cdefine:__ZKP2P_SDK_BUILD_METADATA__%3E"],"names":[],"mappings":";;;;;;;AAAA,IAAA,uCAAA,GAAA,EAAC,aAAA,EAAgB,CAAA,EAAE,MAAA,EAAS,EAAC,YAAa,qBAAA,EAAsB,SAAA,EAAY,0CAAA,EAA2C,IAAA,EAAO,UAAS,aAAA,EAAgB,IAAA,EAAI,EAAE,iBAAA,EAAoB,UAAS,uBAAA,EAA0B,YAAA,EAAa,2BAAA,EAA8B,QAAA,EAAS,oBAAqB,EAAC,IAAA,EAAO,EAAC,OAAA,EAAU,GAAE,aAAA,EAAgB,kEAAA,EAAkE,EAAE,WAAA,EAAc,EAAC,OAAA,EAAU,CAAA,EAAE,aAAA,EAAgB,kEAAA,IAAmE","file":"chunk-ERJIIFAV.mjs","sourcesContent":["{\"schemaVersion\":2,\"source\":{\"repository\":\"zkp2p/zkp2p-clients\",\"commitSha\":\"d2e1cd11fec30f7b401b43a3842414c11379ab35\",\"kind\":\"github\",\"distributable\":true},\"sdkPackageVersion\":\"0.14.9\",\"contractsPackageVersion\":\"0.4.4-rc.2\",\"indexerSchemaPackageVersion\":\"0.22.0\",\"activeDisputeStack\":{\"base\":{\"version\":2,\"selectionHash\":\"ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c\"},\"baseStaging\":{\"version\":2,\"selectionHash\":\"6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9\"}}}"]}
@@ -1,5 +0,0 @@
1
- export { enrichPvDepositView, enrichPvIntentView, parseDepositView, parseIntentView } from './chunk-4GCGSZA2.mjs';
2
- import './chunk-WDEEWFEU.mjs';
3
- import './chunk-ERJIIFAV.mjs';
4
- //# sourceMappingURL=protocolViewerParsers-O5WTGTUK.mjs.map
5
- //# sourceMappingURL=protocolViewerParsers-O5WTGTUK.mjs.map