@zerohash-sdk/crypto-account-link-js 1.6.0 → 1.6.1

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
  /**
@@ -426,6 +431,35 @@ declare type CryptoAccountLinkEvent = AppEvent<CryptoAccountLinkEventType>;
426
431
  */
427
432
  declare type CryptoAccountLinkEventType = string;
428
433
 
434
+ /**
435
+ * Deposit completed payload — emitted by SDKs that drive a deposit through
436
+ * the integrations flow. Lives on `CommonCallbacks` because both Auth and
437
+ * any SDK embedding `@zerohash/integrations-flow` (e.g. fund with `useAuth`)
438
+ * resolve through the same deposit-status hook.
439
+ */
440
+ declare type DepositCompletedPayload = {
441
+ data: {
442
+ depositId: string;
443
+ status: DepositStatus;
444
+ assetId: string;
445
+ networkId: string;
446
+ amount?: string;
447
+ accountMatchingValidation?: {
448
+ status: 'PENDING' | 'VALID' | 'INVALID' | 'ERROR';
449
+ reason?: string;
450
+ };
451
+ };
452
+ };
453
+
454
+ /**
455
+ * Deposit status object — shared across SDKs that surface deposit completion.
456
+ */
457
+ declare type DepositStatus = {
458
+ value: string;
459
+ details: string;
460
+ occurredAt: string;
461
+ };
462
+
429
463
  /**
430
464
  * Environment configuration for the SDK
431
465
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerohash-sdk/crypto-account-link-js",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",