@pafi-dev/issuer 0.1.2 → 0.3.0-alpha.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 +58 -0
- package/dist/index.cjs +644 -135
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +491 -94
- package/dist/index.d.ts +491 -94
- package/dist/index.js +640 -135
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,6 +6,64 @@ of the mint-and-cash-out flow: authentication, point ledger, policy
|
|
|
6
6
|
engine, EIP-712 issuer signing, relay submission, mint event indexing,
|
|
7
7
|
and framework-agnostic HTTP handlers.
|
|
8
8
|
|
|
9
|
+
## What's new in 0.3.0-alpha.0 — sponsored UserOp flow (v1.4 preview)
|
|
10
|
+
|
|
11
|
+
Preview release that wires the SDK into the new **sponsored path**:
|
|
12
|
+
user EOAs delegate to a BatchExecutor via EIP-7702, UserOps are
|
|
13
|
+
signed by the user and submitted to a Bundler, and gas is paid by
|
|
14
|
+
Coinbase Paymaster — proxied through the new PAFI-hosted
|
|
15
|
+
`paymaster-proxy` service.
|
|
16
|
+
|
|
17
|
+
**What ships in this alpha:**
|
|
18
|
+
|
|
19
|
+
- `PafiBackendClient` — HTTP client for `paymaster-proxy` with retry +
|
|
20
|
+
backoff on `safeToRetry` errors (opt-in via `retry.maxAttempts`)
|
|
21
|
+
- `BalanceAggregator` — merge off-chain + on-chain balance into one number
|
|
22
|
+
- `BurnIndexer` — watches `Transfer(user → 0x0)` events, finalizes
|
|
23
|
+
pending off-chain credits for the reverse flow
|
|
24
|
+
- `IPointLedger.reservePendingCredit()` / `resolveCreditByBurnTx()` —
|
|
25
|
+
additive ledger methods for burn→credit flow
|
|
26
|
+
- `ApiConfigResponse.pafiWebUrl` + `contracts.pointTokens[]` — new
|
|
27
|
+
fields surfaced by `handleConfig()`
|
|
28
|
+
- `FeeManager` slimmed: no more `operatorWallet` /
|
|
29
|
+
`usdtAddress` / `nativeWrappedAddress`; rebalancing gone (operator
|
|
30
|
+
doesn't hold ETH anymore); `quoteNativeToFee` replaces
|
|
31
|
+
`quoteNativeToUsdt` so fee currency is caller-chosen (PT for
|
|
32
|
+
mint/burn, USDT for swap/perp_deposit)
|
|
33
|
+
|
|
34
|
+
**What's still blocked (comes in 0.3.0-beta / stable):**
|
|
35
|
+
|
|
36
|
+
- `processMint()` / `processBurn()` — blocked on SC Relayer v2 ABI
|
|
37
|
+
(blocker B1). Current `processMintAndCashOut()` is `@deprecated`
|
|
38
|
+
but still works
|
|
39
|
+
- `PTRedeemHandler` + `TopUpRedemptionHandler` — blocked on B1 +
|
|
40
|
+
`paymaster-proxy` staging env being live
|
|
41
|
+
- Deletion of legacy `claimAndSwap` flow — kept for v0.2.x consumers
|
|
42
|
+
until 2.0
|
|
43
|
+
|
|
44
|
+
**Install the alpha:**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pnpm add @pafi-dev/issuer@0.3.0-alpha.0 @pafi-dev/core@0.3.0-alpha.0
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Pin the exact version, or use the `@alpha` dist-tag.
|
|
51
|
+
|
|
52
|
+
## What's new in 0.2.0 — multi-token support
|
|
53
|
+
|
|
54
|
+
An issuer backend can now support more than one PointToken in a single
|
|
55
|
+
service instance. Pass `pointTokenAddresses: Address[]` in
|
|
56
|
+
`IssuerServiceConfig`; the factory creates one `PointIndexer` per token
|
|
57
|
+
and handlers validate the requested `pointTokenAddress` against the
|
|
58
|
+
configured set.
|
|
59
|
+
|
|
60
|
+
`IPointLedger` methods take an optional `tokenAddress?: Address` param.
|
|
61
|
+
Single-token issuers can ignore it — legacy 0.1.x code keeps working.
|
|
62
|
+
Multi-token issuers must persist balances keyed by `(user, token)`.
|
|
63
|
+
|
|
64
|
+
Legacy `pointTokenAddress: Address` still works as a shorthand for a
|
|
65
|
+
one-element list. No code change is required if you only have one token.
|
|
66
|
+
|
|
9
67
|
## Install
|
|
10
68
|
|
|
11
69
|
```bash
|