@zendfi/sdk 1.1.2 → 1.1.3

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 +10 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -261,6 +261,8 @@ zendfi.withdrawFromSubAccount(...)
261
261
  zendfi.withdrawSubAccountToBank(...)
262
262
  zendfi.createSubAccountAutomationToken(...)
263
263
  zendfi.revokeSubAccountAutomationToken(...)
264
+ zendfi.createSubAccountSigningGrant(...)
265
+ zendfi.revokeSubAccountSigningGrant(...)
264
266
  zendfi.closeSubAccount(...)
265
267
  ```
266
268
 
@@ -285,11 +287,17 @@ const token = await zendfi.mintSubAccountDelegationToken(sub.id, {
285
287
  });
286
288
  ```
287
289
 
288
- Sensitive sub-account operations such as `drainSubAccount`, `withdrawFromSubAccount`, and `withdrawSubAccountToBank` require `passkey_signature` payloads from your WebAuthn flow.
290
+ Sensitive sub-account operations such as `drainSubAccount` and `withdrawFromSubAccount` require `passkey_signature` payloads from your WebAuthn flow.
291
+
292
+ For `withdrawSubAccountToBank`, the recommended headless path is:
293
+
294
+ 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`.
289
297
 
290
298
  `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.
291
299
 
292
- For headless automation, mint bounded automation credentials with `createSubAccountAutomationToken`, then pass `automation_token` to `withdrawSubAccountToBank`.
300
+ `passkey_signature` on `withdrawSubAccountToBank` is now optional and should be treated as interactive fallback.
293
301
 
294
302
  Sub-account flows emit webhook lifecycle and transfer events:
295
303
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendfi/sdk",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
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",