@zendfi/sdk 1.1.3 → 1.1.5

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.
Files changed (2) hide show
  1. package/README.md +11 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -262,6 +262,8 @@ zendfi.withdrawSubAccountToBank(...)
262
262
  zendfi.createSubAccountAutomationToken(...)
263
263
  zendfi.revokeSubAccountAutomationToken(...)
264
264
  zendfi.createSubAccountSigningGrant(...)
265
+ zendfi.startSubAccountSigningGrantBrowserIntent(...)
266
+ zendfi.pollSubAccountSigningGrantBrowserIntent(...)
265
267
  zendfi.revokeSubAccountSigningGrant(...)
266
268
  zendfi.closeSubAccount(...)
267
269
  ```
@@ -287,17 +289,21 @@ const token = await zendfi.mintSubAccountDelegationToken(sub.id, {
287
289
  });
288
290
  ```
289
291
 
290
- Sensitive sub-account operations such as `drainSubAccount` and `withdrawFromSubAccount` require `passkey_signature` payloads from your WebAuthn flow.
292
+ Sensitive sub-account operations such as `drainSubAccount` require `passkey_signature` payloads from your WebAuthn flow.
291
293
 
292
- For `withdrawSubAccountToBank`, the recommended headless path is:
294
+ For `withdrawFromSubAccount` and `withdrawSubAccountToBank`, the recommended headless path is:
293
295
 
294
296
  1. Mint policy token via `createSubAccountAutomationToken` (or use delegation token).
295
- 2. Mint signing authorization via `createSubAccountSigningGrant` (one interactive passkey ceremony).
296
- 3. Execute `withdrawSubAccountToBank` using `automation_token`/`delegation_token` + `signing_grant`.
297
+ 2. Start browser intent via `startSubAccountSigningGrantBrowserIntent`.
298
+ 3. Open `approval_url` in a browser and complete passkey approval.
299
+ 4. Poll with `pollSubAccountSigningGrantBrowserIntent` until approved; consume returned `signing_grant`.
300
+ 5. Execute `withdrawFromSubAccount` or `withdrawSubAccountToBank` using `delegation_token` (or `automation_token` for bank) + `signing_grant`.
301
+
302
+ Legacy direct mint (`createSubAccountSigningGrant` with `passkey_signature`) remains available as fallback.
297
303
 
298
304
  `withdrawSubAccountToBank` executes PAJ offramp with server-side proxy-email OTP automation (same pattern as split bank withdrawals), so your integration does not need to collect OTP manually.
299
305
 
300
- `passkey_signature` on `withdrawSubAccountToBank` is now optional and should be treated as interactive fallback.
306
+ `passkey_signature` on `withdrawFromSubAccount` and `withdrawSubAccountToBank` is now optional and should be treated as interactive fallback.
301
307
 
302
308
  Sub-account flows emit webhook lifecycle and transfer events:
303
309
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendfi/sdk",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Zero-config TypeScript SDK for ZendFi. Global payments powered by stablecoins!",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",