@zkp2p/sdk 0.11.0-rc.6 → 0.11.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/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` |
@@ -181,6 +182,12 @@ console.log(result.depositDetails);
181
182
 
182
183
  If you do not pass `payeeDetailsHashes`, `createDeposit()` can register the payee details for you. If you want to pre-register or reuse hashes across deposits, use `registerPayeeDetails()` first.
183
184
 
185
+ New deposits default to the paid intent guardian deployed for the client's
186
+ environment. Production and preproduction use
187
+ `0x83671606454fA72ba1e2831E18C5090D25629414`, enabling prepaid intent-lifetime
188
+ extensions. Pass `intentGuardian` explicitly only when integrating a custom
189
+ guardian.
190
+
184
191
  ## Payee Registration and Quotes
185
192
 
186
193
  ```ts
@@ -278,7 +285,7 @@ await client.releaseFundsToPayer({
278
285
  });
279
286
  ```
280
287
 
281
- Use `referralFees[]` for multi-recipient fee distribution on OrchestratorV2.
288
+ Use `referralFees[]` for multi-recipient fee distribution on OrchestratorV2 and V3.
282
289
 
283
290
  ## Extend an Intent Lifetime
284
291
 
@@ -453,7 +460,7 @@ You should still handle generic `Error` for lower-level transport or wallet fail
453
460
 
454
461
  ## Oracle Configuration
455
462
 
456
- The SDK exports Chainlink and Pyth adapter helpers, plus a Chainlink-first `getSpreadOracleConfig()` resolver for bundled feed metadata.
463
+ 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
464
 
458
465
  ```ts
459
466
  import {
@@ -508,9 +515,9 @@ console.log([...availableFeeds].sort());
508
515
  Useful helpers and methods in this area:
509
516
 
510
517
  - `CHAINLINK_ORACLE_ADAPTER`
511
- - `PYTH_ORACLE_ADAPTER`
518
+ - `PYTH_ORACLE_ADAPTER` (deprecated compatibility export)
512
519
  - `encodeSpreadOracleAdapterConfig`
513
- - `encodePythAdapterConfig`
520
+ - `encodePythAdapterConfig` (deprecated compatibility helper)
514
521
  - `getSpreadOracleConfig`
515
522
  - `setOracleRateConfigBatch`
516
523
  - `updateCurrencyConfigBatch`