@zkp2p/sdk 0.11.0-rc.6 → 0.11.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/README.md CHANGED
@@ -6,13 +6,14 @@
6
6
 
7
7
  Stable TypeScript SDK for trustless fiat-to-crypto on Base. ZKP2P combines escrowed on-chain settlement, TLS attestations for payment verification, and API/indexer helpers so makers, takers, wallets, and embedded ramps can ship production-grade fiat liquidity flows without building their own contract or indexing stack.
8
8
 
9
- Current version: `0.10.0`
9
+ Workspace version: `0.11.0`. Install `@zkp2p/sdk@latest` for the stable Curator
10
+ v3 routes and OrchestratorV3 hard cut.
10
11
 
11
12
  ## Why This SDK
12
13
 
13
14
  - Build maker, taker, vault, and embedded ramp flows from one client.
14
15
  - Read live protocol state directly from ProtocolViewer instead of waiting on indexer sync.
15
- - Route against the EscrowV2/OrchestratorV2 stack — legacy V1 resolution has been removed.
16
+ - Signal new intents through EscrowV2/OrchestratorV3 and resolve existing intent owners across OrchestratorV2/V3 — legacy V1 resolution has been removed.
16
17
  - Use prepareable write methods for smart accounts, relayers, gas estimation, and batching.
17
18
  - Keep advanced analytics, fund activity history, and vault stats behind `client.indexer.*`.
18
19
 
@@ -28,7 +29,7 @@ Current version: `0.10.0`
28
29
 
29
30
  - RPC-first reads: primary reads use ProtocolViewer and on-chain fallbacks, so `getDeposits()`, `getDeposit()`, `getIntents()`, `getIntent()`, and the `getPv*` methods are not blocked on indexer lag.
30
31
  - Indexer for history and filtering: use `client.indexer.*` for pagination, historical volumes, fund activities, daily snapshots, and vault analytics.
31
- - V2-only routing: the client resolves against EscrowV2 and OrchestratorV2. Legacy V1 escrow/orchestrator fallbacks have been removed from both read and write paths.
32
+ - Version-aware routing: new intents use EscrowV2 and OrchestratorV3; existing intent reads and lifecycle writes resolve their OrchestratorV2 or V3 owner. Legacy V1 fallbacks have been removed.
32
33
  - Modular internals: intent, guardian, access-policy, vault, and ProtocolViewer logic are extracted from `Zkp2pClient`, keeping the main client focused on orchestration.
33
34
  - App-level rollout control: the SDK is capability-based. Product gating and phase flags belong in your app layer, not inside transaction helpers.
34
35
 
@@ -95,11 +96,11 @@ Indexer defaults by environment:
95
96
  | Deposits | `createDeposit`, `addFunds`, `removeFunds`, `withdrawDeposit`, `ensureAllowance`, `setAcceptingIntents`, `setIntentRange`, `setCurrencyMinRate`, `setRetainOnEmpty` |
96
97
  | Payment methods and currencies | `addPaymentMethods`, `removePaymentMethod`, `setPaymentMethodActive`, `addCurrencies`, `removeCurrency`, `deactivateCurrency`, `pruneExpiredIntents` |
97
98
  | Intents | `signalIntent`, `fulfillIntent`, `cancelIntent`, `releaseFundsToPayer`, `getFulfillIntentInputs`, `getIntentGuardianPolicy`, `quoteIntentExtension`, `getIntentGuardianPayerFunding`, `extendIntentLifetime` |
98
- | Deposit access policy | `client.accessPolicy.*`, `planAccessPolicyUpdate`, `diffAccessPolicy` |
99
+ | Deposit access policy | `client.accessPolicy.*`, `planAccessPolicyUpdate`, `diffAccessPolicy`; production enforcement runs through OrchestratorV3's active lifecycle hook |
99
100
  | Prepared transactions | `client.prepareCreateDeposit(...)`, `client.signalIntent.prepare(...)`, `client.fulfillIntent.prepare(...)`, `client.setVaultFee.prepare(...)`, and equivalent prepare flows across the rest of the prepareable write surface |
100
101
  | Payee and quote APIs | `registerPayeeDetails`, `resolvePayeeHash`, `getQuote`, `getQuotesBestByPlatform` |
101
102
  | Seller automated release | `uploadSellerCredential`, `getSellerCredentialStatus`, `verifySellerPayment` |
102
- | Delegation and hooks | `setDelegate`, `removeDelegate`, `setRateManager`, `clearRateManager`, `setDepositRateManager`, `clearDepositRateManager`, `setDepositPreIntentHook`, `setDepositWhitelistHook` |
103
+ | Delegation and hooks | `setDelegate`, `removeDelegate`, `setRateManager`, `clearRateManager`, `setDepositRateManager`, `clearDepositRateManager`, `setDepositPreIntentHook`; whitelist-hook helpers remain for V2 integrations |
103
104
  | Vault / DRM | `createRateManager`, `setVaultMinRate`, `setVaultMinRatesBatch`, `setVaultFee`, `setVaultConfig`, `getDepositRateManager`, `getManagerFee`, `getEffectiveRate` |
104
105
  | Oracle config | `setOracleRateConfig`, `setOracleRateConfigBatch`, `removeOracleRateConfig`, `updateCurrencyConfigBatch`, `deactivateCurrenciesBatch`, `supportsInlineOracleRateConfig`, `validateOracleFeedsOnChain` |
105
106
  | RPC reads | `getDeposits`, `getDeposit`, `getDepositsById`, `getIntents`, `getIntent`, `getPvDepositById`, `getPvDepositsFromIds`, `getPvAccountDeposits`, `getPvAccountIntents`, `getPvIntent` |
@@ -278,7 +279,7 @@ await client.releaseFundsToPayer({
278
279
  });
279
280
  ```
280
281
 
281
- Use `referralFees[]` for multi-recipient fee distribution on OrchestratorV2.
282
+ Use `referralFees[]` for multi-recipient fee distribution on OrchestratorV2 and V3.
282
283
 
283
284
  ## Extend an Intent Lifetime
284
285
 
@@ -453,7 +454,7 @@ You should still handle generic `Error` for lower-level transport or wallet fail
453
454
 
454
455
  ## Oracle Configuration
455
456
 
456
- The SDK exports Chainlink and Pyth adapter helpers, plus a Chainlink-first `getSpreadOracleConfig()` resolver for bundled feed metadata.
457
+ The SDK resolves bundled ARM feed metadata through Chainlink. Pyth constants and encoders remain deprecated compatibility exports; the bundled Pyth feed map is empty and is not a fallback.
457
458
 
458
459
  ```ts
459
460
  import {
@@ -508,9 +509,9 @@ console.log([...availableFeeds].sort());
508
509
  Useful helpers and methods in this area:
509
510
 
510
511
  - `CHAINLINK_ORACLE_ADAPTER`
511
- - `PYTH_ORACLE_ADAPTER`
512
+ - `PYTH_ORACLE_ADAPTER` (deprecated compatibility export)
512
513
  - `encodeSpreadOracleAdapterConfig`
513
- - `encodePythAdapterConfig`
514
+ - `encodePythAdapterConfig` (deprecated compatibility helper)
514
515
  - `getSpreadOracleConfig`
515
516
  - `setOracleRateConfigBatch`
516
517
  - `updateCurrencyConfigBatch`