@zerohash-sdk/csp-crypto-withdrawals-js 1.6.1 → 1.6.2

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/dist/index.d.ts +34 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -318,6 +318,11 @@ declare type CommonCallbacks<TEvent = AppEvent> = {
318
318
  onEvent?: (event: TEvent) => void;
319
319
  /** Called when the widget has loaded and is ready */
320
320
  onLoaded?: () => void;
321
+ /**
322
+ * Called when a deposit reaches a terminal state (success/failure/verifying).
323
+ * Optional — only SDKs that drive the integrations deposit flow emit it.
324
+ */
325
+ onDeposit?: (deposit: DepositCompletedPayload) => void;
321
326
  };
322
327
 
323
328
  /**
@@ -406,6 +411,35 @@ declare type CspCryptoWithdrawalsEvent = AppEvent<CspCryptoWithdrawalsEventType>
406
411
  */
407
412
  declare type CspCryptoWithdrawalsEventType = string;
408
413
 
414
+ /**
415
+ * Deposit completed payload — emitted by SDKs that drive a deposit through
416
+ * the integrations flow. Lives on `CommonCallbacks` because both Auth and
417
+ * any SDK embedding `@zerohash/integrations-flow` (e.g. fund with `useAuth`)
418
+ * resolve through the same deposit-status hook.
419
+ */
420
+ declare type DepositCompletedPayload = {
421
+ data: {
422
+ depositId: string;
423
+ status: DepositStatus;
424
+ assetId: string;
425
+ networkId: string;
426
+ amount?: string;
427
+ accountMatchingValidation?: {
428
+ status: 'PENDING' | 'VALID' | 'INVALID' | 'ERROR';
429
+ reason?: string;
430
+ };
431
+ };
432
+ };
433
+
434
+ /**
435
+ * Deposit status object — shared across SDKs that surface deposit completion.
436
+ */
437
+ declare type DepositStatus = {
438
+ value: string;
439
+ details: string;
440
+ occurredAt: string;
441
+ };
442
+
409
443
  /**
410
444
  * Environment configuration for the SDK
411
445
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerohash-sdk/csp-crypto-withdrawals-js",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",