@connect-xyz/withdraw-js 0.44.0 → 0.45.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
|
@@ -323,10 +323,44 @@ declare type CommonCallbacks<TEvent = AppEvent> = {
|
|
|
323
323
|
onEvent?: (event: TEvent) => void;
|
|
324
324
|
/** Called when the widget has loaded and is ready */
|
|
325
325
|
onLoaded?: () => void;
|
|
326
|
+
/**
|
|
327
|
+
* Called when a deposit reaches a terminal state (success/failure/verifying).
|
|
328
|
+
* Optional — only SDKs that drive the integrations deposit flow emit it.
|
|
329
|
+
*/
|
|
330
|
+
onDeposit?: (deposit: DepositCompletedPayload) => void;
|
|
326
331
|
};
|
|
327
332
|
|
|
328
333
|
export declare type ConnectWithdrawElement = SdkElement<WithdrawConfig>;
|
|
329
334
|
|
|
335
|
+
/**
|
|
336
|
+
* Deposit completed payload — emitted by SDKs that drive a deposit through
|
|
337
|
+
* the integrations flow. Lives on `CommonCallbacks` because both Auth and
|
|
338
|
+
* any SDK embedding `@zerohash/integrations-flow` (e.g. fund with `useAuth`)
|
|
339
|
+
* resolve through the same deposit-status hook.
|
|
340
|
+
*/
|
|
341
|
+
declare type DepositCompletedPayload = {
|
|
342
|
+
data: {
|
|
343
|
+
depositId: string;
|
|
344
|
+
status: DepositStatus;
|
|
345
|
+
assetId: string;
|
|
346
|
+
networkId: string;
|
|
347
|
+
amount?: string;
|
|
348
|
+
accountMatchingValidation?: {
|
|
349
|
+
status: 'PENDING' | 'VALID' | 'INVALID' | 'ERROR';
|
|
350
|
+
reason?: string;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Deposit status object — shared across SDKs that surface deposit completion.
|
|
357
|
+
*/
|
|
358
|
+
declare type DepositStatus = {
|
|
359
|
+
value: string;
|
|
360
|
+
details: string;
|
|
361
|
+
occurredAt: string;
|
|
362
|
+
};
|
|
363
|
+
|
|
330
364
|
/**
|
|
331
365
|
* Environment configuration for the SDK
|
|
332
366
|
*/
|