@rhinestone/deposit-modal 0.13.0 → 0.14.0

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 (57) hide show
  1. package/README.md +43 -2
  2. package/bridge-transcript.json +653 -0
  3. package/dist/ClaimModal-IKTJU43Y.cjs +13 -0
  4. package/dist/ClaimModal-SEKNWRMA.mjs +13 -0
  5. package/dist/{DepositModalReown-YNNHLAV2.cjs → DepositModalReown-46LPVFB6.cjs} +16 -15
  6. package/dist/{DepositModalReown-3H75G3XQ.mjs → DepositModalReown-Q2JMLT47.mjs} +6 -5
  7. package/dist/WithdrawModal-5ICGD4HJ.mjs +12 -0
  8. package/dist/WithdrawModal-VP6PMIRO.cjs +12 -0
  9. package/dist/{chunk-GACIGCSN.cjs → chunk-6KG642KH.cjs} +1 -1
  10. package/dist/{chunk-RAADLTSW.cjs → chunk-7ICSHJFE.cjs} +179 -138
  11. package/dist/{chunk-COCBCQQC.mjs → chunk-7SR7ENVJ.mjs} +46 -5
  12. package/dist/{chunk-OLCD75JK.mjs → chunk-CFKC77SV.mjs} +451 -131
  13. package/dist/{chunk-EOMT5LKX.mjs → chunk-IN77XSWO.mjs} +526 -3
  14. package/dist/{chunk-FZ5FZFIG.mjs → chunk-K4H6TGBE.mjs} +1 -1
  15. package/dist/{chunk-DSIZNRWA.mjs → chunk-KTUVSKR4.mjs} +979 -360
  16. package/dist/{chunk-HOGZKHHY.cjs → chunk-LZFRL2AL.cjs} +3 -3
  17. package/dist/{chunk-7N77GIP4.cjs → chunk-MTFJSE52.cjs} +465 -171
  18. package/dist/{chunk-LTMMETAB.mjs → chunk-PKML3XVS.mjs} +404 -110
  19. package/dist/{chunk-ZMT4ATHR.cjs → chunk-V2OBGLJD.cjs} +564 -41
  20. package/dist/{chunk-XYJFEN5D.mjs → chunk-WUJIKCFU.mjs} +1 -1
  21. package/dist/{chunk-CVGNCUVU.cjs → chunk-X2IPAPXU.cjs} +22 -13
  22. package/dist/{chunk-2G2EIN4A.cjs → chunk-YCQZJQO6.cjs} +1272 -653
  23. package/dist/{chunk-5NUIKYSF.cjs → chunk-YWMWI7PZ.cjs} +458 -138
  24. package/dist/{chunk-YREVFB64.mjs → chunk-ZEO6ADM3.mjs} +16 -7
  25. package/dist/claim.cjs +6 -6
  26. package/dist/claim.d.cts +3 -3
  27. package/dist/claim.d.ts +3 -3
  28. package/dist/claim.mjs +5 -5
  29. package/dist/constants.cjs +2 -2
  30. package/dist/constants.d.cts +1 -1
  31. package/dist/constants.d.ts +1 -1
  32. package/dist/constants.mjs +1 -1
  33. package/dist/deposit.cjs +6 -6
  34. package/dist/deposit.d.cts +2 -2
  35. package/dist/deposit.d.ts +2 -2
  36. package/dist/deposit.mjs +5 -5
  37. package/dist/embed.cjs +310 -102
  38. package/dist/embed.d.cts +7 -1
  39. package/dist/embed.d.ts +7 -1
  40. package/dist/embed.mjs +285 -77
  41. package/dist/index.cjs +9 -9
  42. package/dist/index.d.cts +1 -1
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.mjs +8 -8
  45. package/dist/types-Bho4OA03.d.ts +982 -0
  46. package/dist/types-DP_3KwlD.d.cts +982 -0
  47. package/dist/withdraw.cjs +5 -5
  48. package/dist/withdraw.d.cts +3 -3
  49. package/dist/withdraw.d.ts +3 -3
  50. package/dist/withdraw.mjs +4 -4
  51. package/package.json +28 -7
  52. package/dist/ClaimModal-CREZO27I.mjs +0 -11
  53. package/dist/ClaimModal-JRIA32U2.cjs +0 -11
  54. package/dist/WithdrawModal-NVRX44IZ.mjs +0 -10
  55. package/dist/WithdrawModal-YYSBPCJJ.cjs +0 -10
  56. package/dist/types-B89I8_8H.d.ts +0 -638
  57. package/dist/types-nnDR4tqA.d.cts +0 -638
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CdnIcon,
3
3
  ChevronRightIcon
4
- } from "./chunk-EOMT5LKX.mjs";
4
+ } from "./chunk-IN77XSWO.mjs";
5
5
 
6
6
  // src/components/ui/ListRow.tsx
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkZMT4ATHRcjs = require('./chunk-ZMT4ATHR.cjs');
4
+ var _chunkV2OBGLJDcjs = require('./chunk-V2OBGLJD.cjs');
5
5
 
6
6
 
7
- var _chunkGACIGCSNcjs = require('./chunk-GACIGCSN.cjs');
7
+ var _chunk6KG642KHcjs = require('./chunk-6KG642KH.cjs');
8
8
 
9
9
  // src/core/recovery.ts
10
10
  var RECOVER_DOMAIN = {
@@ -18,12 +18,13 @@ var RECOVER_TYPES = {
18
18
  ]
19
19
  };
20
20
  var RecoveryError = class extends Error {
21
- constructor(message, status, code, retryable = false) {
21
+ constructor(message, status, code, retryable = false, phase = "response") {
22
22
  super(message);
23
23
  this.name = "RecoveryError";
24
24
  this.status = status;
25
25
  this.code = code;
26
26
  this.retryable = retryable;
27
+ this.phase = phase;
27
28
  }
28
29
  };
29
30
  function formatRecoveryError(status, code, serverMessage) {
@@ -90,12 +91,13 @@ async function submitSignedRecovery(params) {
90
91
  destination
91
92
  });
92
93
  } catch (error) {
93
- _chunkZMT4ATHRcjs.debugError.call(void 0, debug, scope, "signRecovery:failed", error);
94
+ _chunkV2OBGLJDcjs.debugError.call(void 0, debug, scope, "signRecovery:failed", error);
94
95
  throw new RecoveryError(
95
96
  "Signature request was declined. Approve it in your wallet to recover this deposit.",
96
97
  0,
97
98
  void 0,
98
- true
99
+ true,
100
+ "signature"
99
101
  );
100
102
  }
101
103
  if (!signature) {
@@ -103,11 +105,12 @@ async function submitSignedRecovery(params) {
103
105
  "Signature request was declined. Approve it in your wallet to recover this deposit.",
104
106
  0,
105
107
  void 0,
106
- true
108
+ true,
109
+ "signature"
107
110
  );
108
111
  }
109
112
  const url = `${backendUrl.replace(/\/$/, "")}/deposits/recover`;
110
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, scope, "submitSignedRecovery:request", {
113
+ _chunkV2OBGLJDcjs.debugLog.call(void 0, debug, scope, "submitSignedRecovery:request", {
111
114
  url,
112
115
  depositId,
113
116
  signer
@@ -119,19 +122,19 @@ async function submitSignedRecovery(params) {
119
122
  // The shared const, so recovery carries `x-deposit-modal-version` like
120
123
  // every other backend call. Without it this path would be invisible in the
121
124
  // per-client version telemetry the processor records.
122
- headers: _chunkGACIGCSNcjs.serviceHeaders.call(void 0, ),
125
+ headers: _chunk6KG642KHcjs.serviceHeaders.call(void 0, ),
123
126
  // `depositId` as a string: it is a uint256 upstream and JSON numbers lose
124
127
  // precision well before that range.
125
128
  body: JSON.stringify({ depositId, destination, signature })
126
129
  });
127
130
  } catch (error) {
128
- _chunkZMT4ATHRcjs.debugError.call(void 0, debug, scope, "submitSignedRecovery:network", error);
131
+ _chunkV2OBGLJDcjs.debugError.call(void 0, debug, scope, "submitSignedRecovery:network", error);
129
132
  const { message, retryable } = formatRecoveryError(0);
130
- throw new RecoveryError(message, 0, void 0, retryable);
133
+ throw new RecoveryError(message, 0, void 0, retryable, "request");
131
134
  }
132
135
  if (!response.ok) {
133
136
  const body = await response.json().catch(() => ({}));
134
- _chunkZMT4ATHRcjs.debugError.call(void 0, debug, scope, "submitSignedRecovery:failed", body, {
137
+ _chunkV2OBGLJDcjs.debugError.call(void 0, debug, scope, "submitSignedRecovery:failed", body, {
135
138
  status: response.status
136
139
  });
137
140
  const { message, retryable } = formatRecoveryError(
@@ -139,10 +142,16 @@ async function submitSignedRecovery(params) {
139
142
  body.code,
140
143
  body.error
141
144
  );
142
- throw new RecoveryError(message, response.status, body.code, retryable);
145
+ throw new RecoveryError(
146
+ message,
147
+ response.status,
148
+ body.code,
149
+ retryable,
150
+ "response"
151
+ );
143
152
  }
144
153
  const result = await response.json();
145
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, scope, "submitSignedRecovery:success", {
154
+ _chunkV2OBGLJDcjs.debugLog.call(void 0, debug, scope, "submitSignedRecovery:success", {
146
155
  transactionHash: result.transactionHash
147
156
  });
148
157
  return result;