@zerohash-sdk/fund-js 1.9.1 → 1.10.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 +18 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -458,6 +458,14 @@ export default Fund;
458
458
  declare type FundCallbacks = CommonCallbacks<FundEvent> & {
459
459
  /** Called when the fund deposit is successfully completed */
460
460
  onCompleted?: (data: FundCompletedData) => void;
461
+ /**
462
+ * Called when a deposit transaction reaches a terminal **failed** state (the
463
+ * "Transaction failed" page). Distinct from `onError`, which signals an SDK/
464
+ * request error — `onFailed` carries the failed transaction's details.
465
+ */
466
+ onFailed?: (data: FundCompletedData) => void;
467
+ /** Called when the user taps "Provide info" on the travel-rule pending screen; the host opens the Travel Rule SDK scoped to `depositId`. */
468
+ onProvideInfo?: (data: FundProvideInfoData) => void;
461
469
  };
462
470
 
463
471
  declare type FundCompletedData = {
@@ -469,6 +477,12 @@ declare type FundCompletedData = {
469
477
  assetSymbol?: string;
470
478
  /** Amount to be deposited */
471
479
  amount?: string;
480
+ /** Backend transaction id for the deposit */
481
+ transactionId?: string;
482
+ /** Fund id the deposit was credited to */
483
+ fundId?: string;
484
+ /** Notional (fiat) amount of the deposit */
485
+ notionalAmount?: string;
472
486
  };
473
487
 
474
488
  export declare interface FundConfig extends BaseConfig<FundEvent>, FundCallbacks {
@@ -495,6 +509,10 @@ declare type FundEvent = AppEvent<FundEventType>;
495
509
  */
496
510
  declare type FundEventType = string;
497
511
 
512
+ declare type FundProvideInfoData = {
513
+ depositId: string;
514
+ };
515
+
498
516
  /**
499
517
  * Generic HTMLElement representing a web component with custom config
500
518
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerohash-sdk/fund-js",
3
- "version": "1.9.1",
3
+ "version": "1.10.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",