@zerohash-sdk/crypto-buy-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.
- package/dist/index.d.ts +34 -0
- 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
|
/**
|
|
@@ -410,6 +415,35 @@ declare type CryptoBuyEvent = AppEvent<CryptoBuyEventType>;
|
|
|
410
415
|
|
|
411
416
|
declare type CryptoBuyEventType = string;
|
|
412
417
|
|
|
418
|
+
/**
|
|
419
|
+
* Deposit completed payload — emitted by SDKs that drive a deposit through
|
|
420
|
+
* the integrations flow. Lives on `CommonCallbacks` because both Auth and
|
|
421
|
+
* any SDK embedding `@zerohash/integrations-flow` (e.g. fund with `useAuth`)
|
|
422
|
+
* resolve through the same deposit-status hook.
|
|
423
|
+
*/
|
|
424
|
+
declare type DepositCompletedPayload = {
|
|
425
|
+
data: {
|
|
426
|
+
depositId: string;
|
|
427
|
+
status: DepositStatus;
|
|
428
|
+
assetId: string;
|
|
429
|
+
networkId: string;
|
|
430
|
+
amount?: string;
|
|
431
|
+
accountMatchingValidation?: {
|
|
432
|
+
status: 'PENDING' | 'VALID' | 'INVALID' | 'ERROR';
|
|
433
|
+
reason?: string;
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Deposit status object — shared across SDKs that surface deposit completion.
|
|
440
|
+
*/
|
|
441
|
+
declare type DepositStatus = {
|
|
442
|
+
value: string;
|
|
443
|
+
details: string;
|
|
444
|
+
occurredAt: string;
|
|
445
|
+
};
|
|
446
|
+
|
|
413
447
|
/**
|
|
414
448
|
* Environment configuration for the SDK
|
|
415
449
|
*/
|