@zkp2p/sdk 0.12.0 → 0.12.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 +6 -5
- package/dist/{chunk-RYBXFY6X.mjs → chunk-DZQOCRT4.mjs} +99 -859
- package/dist/{chunk-RYBXFY6X.mjs.map → chunk-DZQOCRT4.mjs.map} +1 -1
- package/dist/index.cjs +183 -957
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +9 -11
- package/dist/index.mjs.map +1 -1
- package/dist/protocolViewerParsers-WK2QPJH7.mjs +5 -0
- package/dist/{protocolViewerParsers-LCSRVC7F.mjs.map → protocolViewerParsers-WK2QPJH7.mjs.map} +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/{vaultUtils-xNLHO5lY.d.mts → vaultUtils-Bc9KwywX.d.mts} +0 -3
- package/dist/{vaultUtils-xNLHO5lY.d.ts → vaultUtils-Bc9KwywX.d.ts} +0 -3
- package/package.json +1 -1
- package/dist/protocolViewerParsers-LCSRVC7F.mjs +0 -5
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
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
|
-
|
|
10
|
-
|
|
9
|
+
Install `@zkp2p/sdk@latest` for the stable Curator v3, OrchestratorV3, staking,
|
|
10
|
+
and chargeback-risk surface. The workspace version lives in `package.json`.
|
|
11
11
|
|
|
12
12
|
## Why This SDK
|
|
13
13
|
|
|
@@ -30,7 +30,7 @@ v3 routes and OrchestratorV3 hard cut.
|
|
|
30
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.
|
|
31
31
|
- Indexer for history and filtering: use `client.indexer.*` for pagination, historical volumes, fund activities, daily snapshots, and vault analytics.
|
|
32
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.
|
|
33
|
-
- Modular internals: intent, guardian, access-policy, vault, and ProtocolViewer logic are extracted from `Zkp2pClient`, keeping the main client focused on orchestration.
|
|
33
|
+
- Modular internals: intent, guardian, access-policy, staking, vault, and ProtocolViewer logic are extracted from `Zkp2pClient`, keeping the main client focused on orchestration.
|
|
34
34
|
- App-level rollout control: the SDK is capability-based. Product gating and phase flags belong in your app layer, not inside transaction helpers.
|
|
35
35
|
|
|
36
36
|
## Installation
|
|
@@ -107,8 +107,8 @@ Indexer defaults by environment:
|
|
|
107
107
|
| Indexer | `client.indexer.getDeposits`, `getDepositsWithRelations`, `getDepositById`, `getDepositsByIds`, `getDepositsByIdsWithRelations`, `getDepositsByPayeeHash`, `getIntentsForDeposits`, `getOwnerIntents`, `getIntentsByRateManager`, `getIntentByHash`, `getExpiredIntents`, `getFulfilledIntentEvents`, `getIntentFulfillmentAmounts`, `getFulfillmentAndPayment`, `getDepositFundActivities`, `getMakerFundActivities`, `getDepositDailySnapshots`, `getProfitSnapshotsByDeposits`, `getRateManagers`, `getRateManagerDetail`, `getRateManagerDelegations`, `getDelegationForDeposit`, `getManagerDailySnapshots`, `getManualRateUpdates`, `getOracleConfigUpdates`, `query` |
|
|
108
108
|
| React hooks | `@zkp2p/sdk/react` exports hooks for deposits, intents, delegation, vaults, and payment methods |
|
|
109
109
|
| Attribution | ERC-8021 helpers like `sendTransactionWithAttribution`, `encodeWithAttribution`, and `txOverrides.referrer` support |
|
|
110
|
-
| Taker staking | `ensureStakeAllowance`, `depositStake`, `withdrawStake`, `claim`, `setTakerAuthorization`, `selectStakeOwner`, `clearStakeOwner`, direct StakeVault reads, and `client.indexer.getStakingState()`
|
|
111
|
-
| Chargeback keepers | `releaseMaturedChargebackIntent`, `releaseMaturedChargebackIntents`, with caller-pinned `chargebackPolicyAddress` support
|
|
110
|
+
| Taker staking | `ensureStakeAllowance`, `depositStake`, `withdrawStake`, `claim`, `setTakerAuthorization`, `selectStakeOwner`, `clearStakeOwner`, direct StakeVault reads, and `client.indexer.getStakingState()` |
|
|
111
|
+
| Chargeback keepers | `releaseMaturedChargebackIntent`, `releaseMaturedChargebackIntents`, with caller-pinned `chargebackPolicyAddress` support |
|
|
112
112
|
|
|
113
113
|
## Extension Metadata Bridge
|
|
114
114
|
|
|
@@ -190,6 +190,7 @@ environment. Production and preproduction use
|
|
|
190
190
|
`0x83671606454fA72ba1e2831E18C5090D25629414`, enabling prepaid intent-lifetime
|
|
191
191
|
extensions. Pass `intentGuardian` explicitly only when integrating a custom
|
|
192
192
|
guardian.
|
|
193
|
+
|
|
193
194
|
## Payee Registration and Quotes
|
|
194
195
|
|
|
195
196
|
```ts
|