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