@zkp2p/sdk 0.14.3 → 0.14.5-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-733AAIL5.mjs';
2
+ import './chunk-ZB22BZLZ.mjs';
3
+ import './chunk-A6LGLATV.mjs';
4
+ //# sourceMappingURL=protocolViewerParsers-XMFR3QT5.mjs.map
5
+ //# sourceMappingURL=protocolViewerParsers-XMFR3QT5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"protocolViewerParsers-2KR7YF7Z.mjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"protocolViewerParsers-XMFR3QT5.mjs"}
package/dist/react.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Z as Zkp2pClient, P as PostDepositDetailsRequest, a3 as SignalIntentMethodParams, bW as PreparedTransaction, a4 as FulfillIntentMethodParams, dG as SendTransactionFn, dH as SendBatchFn, dE as DelegationDepositTarget, dF as BatchResult, ak as IntentGuardianErrorCode, ag as IntentGuardianPolicy, ah as IntentGuardianQuote } from './vaultUtils-BmF7Ko7F.mjs';
2
- export { dC as DelegationRoute, dD as DelegationState, dK as VAULT_ZERO_ADDRESS, dw as ZERO_RATE_MANAGER_ID, dL as asErrorMessage, dM as assertDelegationMethodSupport, dB as classifyDelegationState, dA as getDelegationRoute, dx as isZeroRateManagerId, dy as normalizeRateManagerId, dz as normalizeRegistry } from './vaultUtils-BmF7Ko7F.mjs';
1
+ import { Z as Zkp2pClient, P as PostDepositDetailsRequest, a3 as SignalIntentMethodParams, bW as PreparedTransaction, a4 as FulfillIntentMethodParams, dG as SendTransactionFn, dH as SendBatchFn, dE as DelegationDepositTarget, dF as BatchResult, ak as IntentGuardianErrorCode, ag as IntentGuardianPolicy, ah as IntentGuardianQuote } from './vaultUtils-BadWrrW3.mjs';
2
+ export { dC as DelegationRoute, dD as DelegationState, dK as VAULT_ZERO_ADDRESS, dw as ZERO_RATE_MANAGER_ID, dL as asErrorMessage, dM as assertDelegationMethodSupport, dB as classifyDelegationState, dA as getDelegationRoute, dx as isZeroRateManagerId, dy as normalizeRateManagerId, dz as normalizeRegistry } from './vaultUtils-BadWrrW3.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 { Z as Zkp2pClient, P as PostDepositDetailsRequest, a3 as SignalIntentMethodParams, bW as PreparedTransaction, a4 as FulfillIntentMethodParams, dG as SendTransactionFn, dH as SendBatchFn, dE as DelegationDepositTarget, dF as BatchResult, ak as IntentGuardianErrorCode, ag as IntentGuardianPolicy, ah as IntentGuardianQuote } from './vaultUtils-BmF7Ko7F.js';
2
- export { dC as DelegationRoute, dD as DelegationState, dK as VAULT_ZERO_ADDRESS, dw as ZERO_RATE_MANAGER_ID, dL as asErrorMessage, dM as assertDelegationMethodSupport, dB as classifyDelegationState, dA as getDelegationRoute, dx as isZeroRateManagerId, dy as normalizeRateManagerId, dz as normalizeRegistry } from './vaultUtils-BmF7Ko7F.js';
1
+ import { Z as Zkp2pClient, P as PostDepositDetailsRequest, a3 as SignalIntentMethodParams, bW as PreparedTransaction, a4 as FulfillIntentMethodParams, dG as SendTransactionFn, dH as SendBatchFn, dE as DelegationDepositTarget, dF as BatchResult, ak as IntentGuardianErrorCode, ag as IntentGuardianPolicy, ah as IntentGuardianQuote } from './vaultUtils-BadWrrW3.js';
2
+ export { dC as DelegationRoute, dD as DelegationState, dK as VAULT_ZERO_ADDRESS, dw as ZERO_RATE_MANAGER_ID, dL as asErrorMessage, dM as assertDelegationMethodSupport, dB as classifyDelegationState, dA as getDelegationRoute, dx as isZeroRateManagerId, dy as normalizeRateManagerId, dz as normalizeRegistry } from './vaultUtils-BadWrrW3.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-BY77PPIP.mjs';
3
+ import './chunk-A6LGLATV.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-BY77PPIP.mjs';
2
+ import './chunk-A6LGLATV.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-5O5AVII5.mjs.map
34
- //# sourceMappingURL=timeout-5O5AVII5.mjs.map
33
+ //# sourceMappingURL=timeout-FE6VF7AY.mjs.map
34
+ //# sourceMappingURL=timeout-FE6VF7AY.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-5O5AVII5.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-FE6VF7AY.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;"]}
@@ -1829,7 +1829,7 @@ type GetOrderbookTableResponse = {
1829
1829
  rows: OrderbookTableRow[];
1830
1830
  };
1831
1831
 
1832
- declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26", "upi"];
1832
+ declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26", "upi", "xmoney"];
1833
1833
  type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
1834
1834
 
1835
1835
  type ReferralReadOptions$1 = {
@@ -3684,6 +3684,8 @@ declare class Zkp2pClient {
3684
3684
  intentGuardian?: Address;
3685
3685
  retainOnEmpty?: boolean;
3686
3686
  escrowAddress?: Address;
3687
+ /** Peer referral code (six alphanumeric characters) for deposit attribution. */
3688
+ referralCode?: string;
3687
3689
  txOverrides?: TxOverrides;
3688
3690
  }): Promise<{
3689
3691
  depositDetails: PostDepositDetailsRequest[];
@@ -3721,6 +3723,8 @@ declare class Zkp2pClient {
3721
3723
  intentGuardian?: Address;
3722
3724
  retainOnEmpty?: boolean;
3723
3725
  escrowAddress?: Address;
3726
+ /** Peer referral code (six alphanumeric characters) for deposit attribution. */
3727
+ referralCode?: string;
3724
3728
  txOverrides?: TxOverrides;
3725
3729
  }): Promise<{
3726
3730
  depositDetails: PostDepositDetailsRequest[];
@@ -1829,7 +1829,7 @@ type GetOrderbookTableResponse = {
1829
1829
  rows: OrderbookTableRow[];
1830
1830
  };
1831
1831
 
1832
- declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26", "upi"];
1832
+ declare const PAYMENT_PLATFORMS: readonly ["wise", "venmo", "revolut", "cashapp", "mercadopago", "zelle", "paypal", "monzo", "chime", "luxon", "n26", "upi", "xmoney"];
1833
1833
  type PaymentPlatformType = (typeof PAYMENT_PLATFORMS)[number];
1834
1834
 
1835
1835
  type ReferralReadOptions$1 = {
@@ -3684,6 +3684,8 @@ declare class Zkp2pClient {
3684
3684
  intentGuardian?: Address;
3685
3685
  retainOnEmpty?: boolean;
3686
3686
  escrowAddress?: Address;
3687
+ /** Peer referral code (six alphanumeric characters) for deposit attribution. */
3688
+ referralCode?: string;
3687
3689
  txOverrides?: TxOverrides;
3688
3690
  }): Promise<{
3689
3691
  depositDetails: PostDepositDetailsRequest[];
@@ -3721,6 +3723,8 @@ declare class Zkp2pClient {
3721
3723
  intentGuardian?: Address;
3722
3724
  retainOnEmpty?: boolean;
3723
3725
  escrowAddress?: Address;
3726
+ /** Peer referral code (six alphanumeric characters) for deposit attribution. */
3727
+ referralCode?: string;
3724
3728
  txOverrides?: TxOverrides;
3725
3729
  }): Promise<{
3726
3730
  depositDetails: PostDepositDetailsRequest[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/sdk",
3
- "version": "0.14.3",
3
+ "version": "0.14.5-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",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@zkp2p/indexer-schema": "0.22.0",
78
- "@zkp2p/contracts-v2": "0.4.2-rc.2",
78
+ "@zkp2p/contracts-v2": "0.4.2",
79
79
  "@zkp2p/zkp2p-attestation": "3.1.0",
80
80
  "ethers": "^6.0.0",
81
81
  "ox": "^0.11.1"
@@ -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-BY77PPIP.mjs","sourcesContent":["{\"schemaVersion\":2,\"source\":{\"repository\":\"zkp2p/zkp2p-clients\",\"commitSha\":\"e848bb1cab3615498514e767e43ea50ec464a633\",\"kind\":\"github\",\"distributable\":true},\"sdkPackageVersion\":\"0.14.3\",\"contractsPackageVersion\":\"0.4.2-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-2NJU3MGV.mjs';
2
- import './chunk-ZB22BZLZ.mjs';
3
- import './chunk-BY77PPIP.mjs';
4
- //# sourceMappingURL=protocolViewerParsers-2KR7YF7Z.mjs.map
5
- //# sourceMappingURL=protocolViewerParsers-2KR7YF7Z.mjs.map