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