@zendfi/sdk 1.1.1 → 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.
- package/README.md +11 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -255,11 +255,14 @@ zendfi.getSubAccount(...)
|
|
|
255
255
|
zendfi.getSubAccountBalance(...)
|
|
256
256
|
zendfi.mintSubAccountDelegationToken(...)
|
|
257
257
|
zendfi.freezeSubAccount(...)
|
|
258
|
+
zendfi.unfreezeSubAccount(...)
|
|
258
259
|
zendfi.drainSubAccount(...)
|
|
259
260
|
zendfi.withdrawFromSubAccount(...)
|
|
260
261
|
zendfi.withdrawSubAccountToBank(...)
|
|
261
262
|
zendfi.createSubAccountAutomationToken(...)
|
|
262
263
|
zendfi.revokeSubAccountAutomationToken(...)
|
|
264
|
+
zendfi.createSubAccountSigningGrant(...)
|
|
265
|
+
zendfi.revokeSubAccountSigningGrant(...)
|
|
263
266
|
zendfi.closeSubAccount(...)
|
|
264
267
|
```
|
|
265
268
|
|
|
@@ -284,11 +287,17 @@ const token = await zendfi.mintSubAccountDelegationToken(sub.id, {
|
|
|
284
287
|
});
|
|
285
288
|
```
|
|
286
289
|
|
|
287
|
-
Sensitive sub-account operations such as `drainSubAccount
|
|
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`.
|
|
288
297
|
|
|
289
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.
|
|
290
299
|
|
|
291
|
-
|
|
300
|
+
`passkey_signature` on `withdrawSubAccountToBank` is now optional and should be treated as interactive fallback.
|
|
292
301
|
|
|
293
302
|
Sub-account flows emit webhook lifecycle and transfer events:
|
|
294
303
|
|