@zerohash-sdk/fiat-deposits-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
|
@@ -309,10 +309,44 @@ declare type CommonCallbacks<TEvent = AppEvent> = {
|
|
|
309
309
|
onEvent?: (event: TEvent) => void;
|
|
310
310
|
/** Called when the widget has loaded and is ready */
|
|
311
311
|
onLoaded?: () => void;
|
|
312
|
+
/**
|
|
313
|
+
* Called when a deposit reaches a terminal state (success/failure/verifying).
|
|
314
|
+
* Optional — only SDKs that drive the integrations deposit flow emit it.
|
|
315
|
+
*/
|
|
316
|
+
onDeposit?: (deposit: DepositCompletedPayload) => void;
|
|
312
317
|
};
|
|
313
318
|
|
|
314
319
|
export declare type ConnectFiatDepositsElement = SdkElement<FiatDepositsConfig>;
|
|
315
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Deposit completed payload — emitted by SDKs that drive a deposit through
|
|
323
|
+
* the integrations flow. Lives on `CommonCallbacks` because both Auth and
|
|
324
|
+
* any SDK embedding `@zerohash/integrations-flow` (e.g. fund with `useAuth`)
|
|
325
|
+
* resolve through the same deposit-status hook.
|
|
326
|
+
*/
|
|
327
|
+
declare type DepositCompletedPayload = {
|
|
328
|
+
data: {
|
|
329
|
+
depositId: string;
|
|
330
|
+
status: DepositStatus;
|
|
331
|
+
assetId: string;
|
|
332
|
+
networkId: string;
|
|
333
|
+
amount?: string;
|
|
334
|
+
accountMatchingValidation?: {
|
|
335
|
+
status: 'PENDING' | 'VALID' | 'INVALID' | 'ERROR';
|
|
336
|
+
reason?: string;
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Deposit status object — shared across SDKs that surface deposit completion.
|
|
343
|
+
*/
|
|
344
|
+
declare type DepositStatus = {
|
|
345
|
+
value: string;
|
|
346
|
+
details: string;
|
|
347
|
+
occurredAt: string;
|
|
348
|
+
};
|
|
349
|
+
|
|
316
350
|
/**
|
|
317
351
|
* Environment configuration for the SDK
|
|
318
352
|
*/
|