@zerohash-sdk/crypto-deposits-js 0.1.1 → 0.2.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 +8 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -343,6 +343,8 @@ declare type CommonCallbacks<TEvent = AppEvent> = {
343
343
  * env: 'prod',
344
344
  * theme: 'light',
345
345
  * onCompleted: ({ depositId, assetSymbol }) => console.log('Deposit', depositId, assetSymbol),
346
+ * onFailed: ({ depositId, assetSymbol }) => console.log('Deposit failed', depositId, assetSymbol),
347
+ * onDeposit: ({ data }) => console.log('Deposit status', data.status.value),
346
348
  * onClose: () => console.log('Closed'),
347
349
  * onError: ({ errorCode, reason }) => console.error(errorCode, reason),
348
350
  * });
@@ -376,6 +378,12 @@ export default CryptoDeposits;
376
378
  declare type CryptoDepositsCallbacks = CommonCallbacks<CryptoDepositsEvent> & {
377
379
  /** Called when the flow is successfully completed */
378
380
  onCompleted?: (data: CryptoDepositsCompletedData) => void;
381
+ /**
382
+ * Called when a deposit transaction reaches a terminal **failed** state (the
383
+ * "Transaction failed" page). Distinct from `onError`, which signals an SDK/
384
+ * request error — `onFailed` carries the failed transaction's details.
385
+ */
386
+ onFailed?: (data: CryptoDepositsCompletedData) => void;
379
387
  };
380
388
 
381
389
  declare type CryptoDepositsCompletedData = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerohash-sdk/crypto-deposits-js",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",