@oasisprotocol/privana-sdk 0.5.4 → 0.5.6

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.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkFGWMLLEC_cjs = require('./chunk-FGWMLLEC.cjs');
4
+ var chunkTNR7AA52_cjs = require('./chunk-TNR7AA52.cjs');
5
5
  var react = require('react');
6
6
  var reactQuery = require('@tanstack/react-query');
7
7
  var wagmi = require('wagmi');
@@ -35,18 +35,18 @@ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive)
35
35
 
36
36
  // src/sdk/hooks/use-privana-client.ts
37
37
  function usePrivanaClient() {
38
- const { client } = chunkFGWMLLEC_cjs.usePrivanaContext();
38
+ const { client } = chunkTNR7AA52_cjs.usePrivanaContext();
39
39
  return client;
40
40
  }
41
41
  var hostedAuthExchangeInflight = /* @__PURE__ */ new Map();
42
42
  function normalizeHostedAuthError(error) {
43
- if (error instanceof chunkFGWMLLEC_cjs.AccountingApiError && error.detail) {
44
- return new chunkFGWMLLEC_cjs.HostedAuthError(error.detail);
43
+ if (error instanceof chunkTNR7AA52_cjs.AccountingApiError && error.detail) {
44
+ return new chunkTNR7AA52_cjs.HostedAuthError(error.detail);
45
45
  }
46
46
  if (error instanceof Error) {
47
47
  return error;
48
48
  }
49
- return new chunkFGWMLLEC_cjs.HostedAuthError("Hosted authentication failed.");
49
+ return new chunkTNR7AA52_cjs.HostedAuthError("Hosted authentication failed.");
50
50
  }
51
51
  function useHostedRedirectAuth() {
52
52
  const {
@@ -57,30 +57,30 @@ function useHostedRedirectAuth() {
57
57
  setHostedAuthSession,
58
58
  clearHostedAuthSession,
59
59
  refreshHostedAuthSession
60
- } = chunkFGWMLLEC_cjs.usePrivanaContext();
60
+ } = chunkTNR7AA52_cjs.usePrivanaContext();
61
61
  const [error, setError] = react.useState(null);
62
62
  const [isLoading, setIsLoading] = react.useState(false);
63
63
  const loginInflight = react.useRef(null);
64
64
  const completionInflight = react.useRef(null);
65
65
  const pendingStorageKey = react.useMemo(
66
- () => hostedAuthConfig ? chunkFGWMLLEC_cjs.createHostedAuthPendingStorageKey(client.getBaseUrl(), hostedAuthConfig) : null,
66
+ () => hostedAuthConfig ? chunkTNR7AA52_cjs.createHostedAuthPendingStorageKey(client.getBaseUrl(), hostedAuthConfig) : null,
67
67
  [client, hostedAuthConfig]
68
68
  );
69
69
  const clearPendingLogin = react.useCallback(() => {
70
70
  if (!pendingStorageKey || typeof window === "undefined") return;
71
- chunkFGWMLLEC_cjs.clearHostedAuthPendingTransaction(window.sessionStorage, pendingStorageKey);
71
+ chunkTNR7AA52_cjs.clearHostedAuthPendingTransaction(window.sessionStorage, pendingStorageKey);
72
72
  }, [pendingStorageKey]);
73
73
  const login = react.useCallback(async () => {
74
74
  if (!hostedAuthConfig) {
75
- throw new chunkFGWMLLEC_cjs.HostedAuthRequiredError(
75
+ throw new chunkTNR7AA52_cjs.HostedAuthRequiredError(
76
76
  "Hosted redirect authentication is not configured for this provider."
77
77
  );
78
78
  }
79
79
  if (typeof window === "undefined") {
80
- throw new chunkFGWMLLEC_cjs.HostedAuthError("Hosted redirect authentication requires a browser environment.");
80
+ throw new chunkTNR7AA52_cjs.HostedAuthError("Hosted redirect authentication requires a browser environment.");
81
81
  }
82
82
  if (!pendingStorageKey) {
83
- throw new chunkFGWMLLEC_cjs.HostedAuthError("Hosted redirect authentication storage is not configured.");
83
+ throw new chunkTNR7AA52_cjs.HostedAuthError("Hosted redirect authentication storage is not configured.");
84
84
  }
85
85
  if (loginInflight.current) {
86
86
  return loginInflight.current;
@@ -89,10 +89,10 @@ function useHostedRedirectAuth() {
89
89
  setIsLoading(true);
90
90
  setError(null);
91
91
  try {
92
- const verifier = chunkFGWMLLEC_cjs.createPkceVerifier();
93
- const codeChallenge = await chunkFGWMLLEC_cjs.createPkceChallenge(verifier);
94
- const state = chunkFGWMLLEC_cjs.createHostedAuthState();
95
- chunkFGWMLLEC_cjs.persistHostedAuthPendingTransaction(window.sessionStorage, pendingStorageKey, {
92
+ const verifier = chunkTNR7AA52_cjs.createPkceVerifier();
93
+ const codeChallenge = await chunkTNR7AA52_cjs.createPkceChallenge(verifier);
94
+ const state = chunkTNR7AA52_cjs.createHostedAuthState();
95
+ chunkTNR7AA52_cjs.persistHostedAuthPendingTransaction(window.sessionStorage, pendingStorageKey, {
96
96
  codeVerifier: verifier,
97
97
  state
98
98
  });
@@ -121,15 +121,15 @@ function useHostedRedirectAuth() {
121
121
  }, [clearPendingLogin, client, hostedAuthConfig, networkConfig.chainId, pendingStorageKey]);
122
122
  const completeLogin = react.useCallback(async () => {
123
123
  if (!hostedAuthConfig) {
124
- throw new chunkFGWMLLEC_cjs.HostedAuthRequiredError(
124
+ throw new chunkTNR7AA52_cjs.HostedAuthRequiredError(
125
125
  "Hosted redirect authentication is not configured for this provider."
126
126
  );
127
127
  }
128
128
  if (typeof window === "undefined") {
129
- throw new chunkFGWMLLEC_cjs.HostedAuthError("Hosted redirect authentication requires a browser environment.");
129
+ throw new chunkTNR7AA52_cjs.HostedAuthError("Hosted redirect authentication requires a browser environment.");
130
130
  }
131
131
  if (!pendingStorageKey) {
132
- throw new chunkFGWMLLEC_cjs.HostedAuthError("Hosted redirect authentication storage is not configured.");
132
+ throw new chunkTNR7AA52_cjs.HostedAuthError("Hosted redirect authentication storage is not configured.");
133
133
  }
134
134
  if (completionInflight.current) {
135
135
  return completionInflight.current;
@@ -139,30 +139,30 @@ function useHostedRedirectAuth() {
139
139
  setError(null);
140
140
  const callbackUrl = new URL(window.location.href);
141
141
  const cleanupCallbackUrl = () => {
142
- window.history.replaceState(null, "", chunkFGWMLLEC_cjs.stripHostedAuthCallbackParams(callbackUrl));
142
+ window.history.replaceState(null, "", chunkTNR7AA52_cjs.stripHostedAuthCallbackParams(callbackUrl));
143
143
  };
144
144
  try {
145
- const callback = chunkFGWMLLEC_cjs.parseHostedAuthCallback(callbackUrl, hostedAuthConfig.redirectUri);
145
+ const callback = chunkTNR7AA52_cjs.parseHostedAuthCallback(callbackUrl, hostedAuthConfig.redirectUri);
146
146
  if (!callback) {
147
147
  return null;
148
148
  }
149
- const pending = chunkFGWMLLEC_cjs.readHostedAuthPendingTransaction(window.sessionStorage, pendingStorageKey);
149
+ const pending = chunkTNR7AA52_cjs.readHostedAuthPendingTransaction(window.sessionStorage, pendingStorageKey);
150
150
  if (!pending) {
151
151
  clearPendingLogin();
152
152
  cleanupCallbackUrl();
153
- throw new chunkFGWMLLEC_cjs.HostedAuthError(
153
+ throw new chunkTNR7AA52_cjs.HostedAuthError(
154
154
  "Hosted authentication response could not be matched to a pending login request."
155
155
  );
156
156
  }
157
157
  if (!callback.state || callback.state !== pending.state) {
158
158
  clearPendingLogin();
159
159
  cleanupCallbackUrl();
160
- throw new chunkFGWMLLEC_cjs.HostedAuthStateMismatchError();
160
+ throw new chunkTNR7AA52_cjs.HostedAuthStateMismatchError();
161
161
  }
162
162
  if ("error" in callback) {
163
163
  clearPendingLogin();
164
164
  cleanupCallbackUrl();
165
- throw new chunkFGWMLLEC_cjs.HostedAuthError(
165
+ throw new chunkTNR7AA52_cjs.HostedAuthError(
166
166
  callback.errorDescription || callback.error || "Hosted authentication failed."
167
167
  );
168
168
  }
@@ -177,7 +177,7 @@ function useHostedRedirectAuth() {
177
177
  client_id: hostedAuthConfig.clientId,
178
178
  redirect_uri: hostedAuthConfig.redirectUri
179
179
  });
180
- const session = chunkFGWMLLEC_cjs.buildHostedAuthSession(response, hostedAuthConfig);
180
+ const session = chunkTNR7AA52_cjs.buildHostedAuthSession(response, hostedAuthConfig);
181
181
  setHostedAuthSession(session);
182
182
  clearPendingLogin();
183
183
  cleanupCallbackUrl();
@@ -222,7 +222,7 @@ function useHostedRedirectAuth() {
222
222
  try {
223
223
  return await refreshHostedAuthSession();
224
224
  } catch (refreshError) {
225
- const normalizedError = refreshError instanceof Error ? refreshError : new chunkFGWMLLEC_cjs.HostedAuthError("Hosted authentication refresh failed.");
225
+ const normalizedError = refreshError instanceof Error ? refreshError : new chunkTNR7AA52_cjs.HostedAuthError("Hosted authentication refresh failed.");
226
226
  setError(normalizedError);
227
227
  throw normalizedError;
228
228
  } finally {
@@ -242,12 +242,12 @@ function useHostedRedirectAuth() {
242
242
  }
243
243
  function useBalance(options = {}) {
244
244
  const queryClient = react.useContext(reactQuery.QueryClientContext);
245
- const accountingContext = chunkFGWMLLEC_cjs.useSafePrivanaContext();
245
+ const accountingContext = chunkTNR7AA52_cjs.useSafePrivanaContext();
246
246
  const hasProviders = !!queryClient && !!accountingContext;
247
247
  const client = accountingContext?.client;
248
248
  const defaultToken = accountingContext?.defaultToken;
249
249
  const pollingInterval = accountingContext?.pollingInterval ?? 1e4;
250
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
250
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkTNR7AA52_cjs.usePrivateReadRequest();
251
251
  const tokenId = options.tokenId ?? defaultToken?.id;
252
252
  const query = reactQuery.useQuery({
253
253
  queryKey: ["accounting-balance", ...privateReadQueryScope, tokenId],
@@ -264,7 +264,7 @@ function useBalance(options = {}) {
264
264
  return {
265
265
  balance: balanceWei,
266
266
  balanceWei,
267
- balanceFormatted: chunkFGWMLLEC_cjs.formatTokenAmount(balanceWei),
267
+ balanceFormatted: chunkTNR7AA52_cjs.formatTokenAmount(balanceWei),
268
268
  tokenSymbol: query.data?.token_symbol ?? "",
269
269
  chainId: query.data?.chain_id ?? "",
270
270
  isLoading: query.isPending || query.isLoading,
@@ -274,8 +274,8 @@ function useBalance(options = {}) {
274
274
  };
275
275
  }
276
276
  function useBatchBalances(options) {
277
- const { client, pollingInterval } = chunkFGWMLLEC_cjs.usePrivanaContext();
278
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
277
+ const { client, pollingInterval } = chunkTNR7AA52_cjs.usePrivanaContext();
278
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkTNR7AA52_cjs.usePrivateReadRequest();
279
279
  const query = reactQuery.useQuery({
280
280
  queryKey: ["accounting-batch-balances", ...privateReadQueryScope, options.tokenIds],
281
281
  queryFn: async () => {
@@ -296,21 +296,28 @@ function useBatchBalances(options) {
296
296
  };
297
297
  }
298
298
  var STALE_MS = 30 * 60 * 1e3;
299
+ function resolveConfirmations(depositAddress, chainId) {
300
+ const confirmations = depositAddress.finality_depth?.[String(chainId)];
301
+ if (confirmations === void 0) {
302
+ throw new Error(`Deposits are not supported on chain ${chainId}`);
303
+ }
304
+ return confirmations;
305
+ }
299
306
  function storageKey(address) {
300
307
  return `privana:pending-deposit:${address.toLowerCase()}`;
301
308
  }
302
309
  function savePendingDeposit(address, data) {
303
- const stored = chunkFGWMLLEC_cjs.setBrowserStorageItem(storageKey(address), JSON.stringify(data));
310
+ const stored = chunkTNR7AA52_cjs.setBrowserStorageItem(storageKey(address), JSON.stringify(data));
304
311
  if (!stored && data.signedLock) {
305
312
  throw new Error("Unable to persist pending locked deposit for recovery");
306
313
  }
307
314
  }
308
315
  function loadPendingDeposit(address) {
309
316
  try {
310
- const raw = chunkFGWMLLEC_cjs.getBrowserStorageItem(storageKey(address));
317
+ const raw = chunkTNR7AA52_cjs.getBrowserStorageItem(storageKey(address));
311
318
  if (!raw) return null;
312
319
  const data = JSON.parse(raw);
313
- if (Date.now() - data.savedAt > STALE_MS && !(data.signedLock && chunkFGWMLLEC_cjs.isSignedLockUsable(data.signedLock))) {
320
+ if (Date.now() - data.savedAt > STALE_MS && !(data.signedLock && chunkTNR7AA52_cjs.isSignedLockUsable(data.signedLock))) {
314
321
  clearPendingDeposit(address);
315
322
  return null;
316
323
  }
@@ -322,24 +329,23 @@ function loadPendingDeposit(address) {
322
329
  function clearPendingDeposit(address, onlyForTxHash) {
323
330
  if (onlyForTxHash) {
324
331
  try {
325
- const raw = chunkFGWMLLEC_cjs.getBrowserStorageItem(storageKey(address));
332
+ const raw = chunkTNR7AA52_cjs.getBrowserStorageItem(storageKey(address));
326
333
  const recordTxHash = raw ? JSON.parse(raw).txHash : void 0;
327
334
  if (recordTxHash && recordTxHash !== onlyForTxHash) return;
328
335
  } catch {
329
336
  }
330
337
  }
331
- chunkFGWMLLEC_cjs.removeBrowserStorageItem(storageKey(address));
338
+ chunkTNR7AA52_cjs.removeBrowserStorageItem(storageKey(address));
332
339
  }
333
340
  function useDeposit(options = {}) {
334
341
  const { address } = wagmi.useAccount();
335
- const { client, enabledTokens, getChainById: getChainById2, networkConfig, serviceAddress } = chunkFGWMLLEC_cjs.usePrivanaContext();
342
+ const { client, enabledTokens, getChainById: getChainById2, networkConfig, serviceAddress } = chunkTNR7AA52_cjs.usePrivanaContext();
336
343
  const { data: walletClient } = wagmi.useWalletClient();
337
344
  const queryClient = reactQuery.useQueryClient();
338
345
  const config = wagmi.useConfig();
339
- const { executePrivateRead, privateReadAddress } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
346
+ const { executePrivateRead, privateReadAddress } = chunkTNR7AA52_cjs.usePrivateReadRequest();
340
347
  const privateReadAddressRef = react.useRef(privateReadAddress);
341
348
  privateReadAddressRef.current = privateReadAddress;
342
- const confirmations = options.confirmations ?? 15;
343
349
  const [depositAddress, setDepositAddress] = react.useState(null);
344
350
  const [txHash, setTxHash] = react.useState();
345
351
  const [isSwitchingChain, setIsSwitchingChain] = react.useState(false);
@@ -376,7 +382,7 @@ function useDeposit(options = {}) {
376
382
  const submitPendingLockAfterCredit = react.useCallback(
377
383
  async (signedLock, creditedAmount) => {
378
384
  try {
379
- const result = await chunkFGWMLLEC_cjs.submitPendingLock({
385
+ const result = await chunkTNR7AA52_cjs.submitPendingLock({
380
386
  client,
381
387
  payload: signedLock,
382
388
  creditedAmount
@@ -387,7 +393,7 @@ function useDeposit(options = {}) {
387
393
  queryClient.invalidateQueries({ queryKey: ["accounting-history"] });
388
394
  onLockSubmittedRef.current?.(result);
389
395
  } catch (err) {
390
- const error2 = err instanceof chunkFGWMLLEC_cjs.PostDepositLockError ? err : new chunkFGWMLLEC_cjs.PostDepositLockError(
396
+ const error2 = err instanceof chunkTNR7AA52_cjs.PostDepositLockError ? err : new chunkTNR7AA52_cjs.PostDepositLockError(
391
397
  err instanceof Error ? err.message : "Lock submission failed",
392
398
  "submission-failed",
393
399
  BigInt(signedLock.amount),
@@ -406,7 +412,7 @@ function useDeposit(options = {}) {
406
412
  error: verificationError,
407
413
  verify,
408
414
  reset: resetVerification
409
- } = chunkFGWMLLEC_cjs.useDepositVerification({
415
+ } = chunkTNR7AA52_cjs.useDepositVerification({
410
416
  pollInterval: options.pollInterval,
411
417
  pollTimeout: options.pollTimeout,
412
418
  onCredited: (hash, response, creditedAmount) => {
@@ -456,7 +462,7 @@ function useDeposit(options = {}) {
456
462
  } = wagmi.useSendTransaction();
457
463
  const isSendingTx = isWritingContract || isSendingNative;
458
464
  const sendError = writeError ?? sendNativeError;
459
- const { ensureCorrectChain } = chunkFGWMLLEC_cjs.useEnsureCorrectChain();
465
+ const { ensureCorrectChain } = chunkTNR7AA52_cjs.useEnsureCorrectChain();
460
466
  const invalidateGeneration = react.useCallback(() => {
461
467
  generationRef.current++;
462
468
  }, []);
@@ -502,18 +508,19 @@ function useDeposit(options = {}) {
502
508
  const isStale = () => generation !== generationRef.current;
503
509
  (async () => {
504
510
  try {
511
+ const confirmations = resolveConfirmations(persisted.depositAddress, persisted.chainId);
505
512
  let confirmed = false;
506
513
  try {
507
- const receipt = await chunkFGWMLLEC_cjs.getTransactionReceipt(config, {
514
+ const receipt = await chunkTNR7AA52_cjs.getTransactionReceipt(config, {
508
515
  hash,
509
516
  chainId: persisted.chainId
510
517
  });
511
- const blockNumber = await chunkFGWMLLEC_cjs.getBlockNumber(config, { chainId: persisted.chainId });
518
+ const blockNumber = await chunkTNR7AA52_cjs.getBlockNumber(config, { chainId: persisted.chainId });
512
519
  confirmed = blockNumber - receipt.blockNumber + 1n >= BigInt(confirmations);
513
520
  } catch {
514
521
  }
515
522
  if (!confirmed) {
516
- await chunkFGWMLLEC_cjs.waitForTransactionReceipt(config, {
523
+ await chunkTNR7AA52_cjs.waitForTransactionReceipt(config, {
517
524
  hash,
518
525
  chainId: persisted.chainId,
519
526
  confirmations
@@ -533,7 +540,7 @@ function useDeposit(options = {}) {
533
540
  onErrorRef.current?.(error2);
534
541
  }
535
542
  })();
536
- }, [address, config, confirmations, queryClient, verify]);
543
+ }, [address, config, queryClient, verify]);
537
544
  const deposit = react.useCallback(
538
545
  async (params) => {
539
546
  if (verificationContextRef.current) {
@@ -564,13 +571,14 @@ function useDeposit(options = {}) {
564
571
  `Amount is below the minimum deposit (${minAmountStr}) for ${isNative ? "native" : "ERC-20"} on chain ${sourceChain.id}`
565
572
  );
566
573
  }
567
- if (params.postDepositLock && !chunkFGWMLLEC_cjs.canUseBrowserStorage()) {
574
+ const confirmations = resolveConfirmations(addrResponse, sourceChain.id);
575
+ if (params.postDepositLock && !chunkTNR7AA52_cjs.canUseBrowserStorage()) {
568
576
  throw new Error("Browser storage is required for locked deposit recovery");
569
577
  }
570
- const lockAmount = chunkFGWMLLEC_cjs.clampLockAmount(params.amount, params.postDepositLock?.maxAmount);
578
+ const lockAmount = chunkTNR7AA52_cjs.clampLockAmount(params.amount, params.postDepositLock?.maxAmount);
571
579
  let signedLock;
572
580
  if (params.postDepositLock) {
573
- const lockOwner = chunkFGWMLLEC_cjs.requireDepositLockOwner(address, privateReadAddress);
581
+ const lockOwner = chunkTNR7AA52_cjs.requireDepositLockOwner(address, privateReadAddress);
574
582
  setIsSwitchingChain(true);
575
583
  try {
576
584
  await ensureCorrectChain(networkConfig.chainId);
@@ -578,15 +586,15 @@ function useDeposit(options = {}) {
578
586
  if (!isStale()) setIsSwitchingChain(false);
579
587
  }
580
588
  if (isStale()) return;
581
- const signingWalletClient = await chunkFGWMLLEC_cjs.getWalletClient(config, {
589
+ const signingWalletClient = await chunkTNR7AA52_cjs.getWalletClient(config, {
582
590
  chainId: networkConfig.chainId
583
591
  });
584
- signedLock = await chunkFGWMLLEC_cjs.createSignedLockRequest({
592
+ signedLock = await chunkTNR7AA52_cjs.createSignedLockRequest({
585
593
  client,
586
594
  walletClient: signingWalletClient,
587
595
  userAddress: lockOwner,
588
596
  networkConfig,
589
- serviceAddress: chunkFGWMLLEC_cjs.requireServiceAddress(
597
+ serviceAddress: chunkTNR7AA52_cjs.requireServiceAddress(
590
598
  params.postDepositLock.serviceAddress ?? serviceAddress
591
599
  ),
592
600
  tokenId: params.tokenId,
@@ -640,7 +648,7 @@ function useDeposit(options = {}) {
640
648
  try {
641
649
  setIsWaitingForConfirmation(true);
642
650
  try {
643
- await chunkFGWMLLEC_cjs.waitForTransactionReceipt(config, {
651
+ await chunkTNR7AA52_cjs.waitForTransactionReceipt(config, {
644
652
  hash,
645
653
  chainId: sourceChain.id,
646
654
  confirmations
@@ -674,7 +682,6 @@ function useDeposit(options = {}) {
674
682
  client,
675
683
  getChainById2,
676
684
  config,
677
- confirmations,
678
685
  enabledTokens,
679
686
  ensureCorrectChain,
680
687
  networkConfig,
@@ -717,10 +724,10 @@ function useDeposit(options = {}) {
717
724
  }
718
725
  function useDepositAddress(options = {}) {
719
726
  const queryClient = react.useContext(reactQuery.QueryClientContext);
720
- const accountingContext = chunkFGWMLLEC_cjs.useSafePrivanaContext();
727
+ const accountingContext = chunkTNR7AA52_cjs.useSafePrivanaContext();
721
728
  const hasProviders = !!queryClient && !!accountingContext;
722
729
  const client = accountingContext?.client;
723
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
730
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkTNR7AA52_cjs.usePrivateReadRequest();
724
731
  const isReady = hasProviders && privateReadReady && !!privateReadAddress && !!client;
725
732
  const query = reactQuery.useQuery({
726
733
  queryKey: ["accounting-deposit-address", ...privateReadQueryScope],
@@ -744,9 +751,9 @@ function useDepositAddress(options = {}) {
744
751
  function useWithdraw(options = {}) {
745
752
  const { address } = wagmi.useAccount();
746
753
  const { data: walletClient } = wagmi.useWalletClient();
747
- const { client, networkConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
754
+ const { client, networkConfig } = chunkTNR7AA52_cjs.usePrivanaContext();
748
755
  const queryClient = reactQuery.useQueryClient();
749
- const { chainId, ensureCorrectChain } = chunkFGWMLLEC_cjs.useEnsureCorrectChain();
756
+ const { chainId, ensureCorrectChain } = chunkTNR7AA52_cjs.useEnsureCorrectChain();
750
757
  const pollInterval = options.pollInterval ?? 3e3;
751
758
  const pollTimeout = options.pollTimeout ?? 18e4;
752
759
  const [currentStep, setCurrentStep] = react.useState("idle");
@@ -814,7 +821,7 @@ function useWithdraw(options = {}) {
814
821
  if (isStale()) return void 0;
815
822
  const nonce = BigInt(nonceResponse.nonce);
816
823
  setCurrentStep("signing");
817
- const signature = await chunkFGWMLLEC_cjs.signWithdrawMessage({
824
+ const signature = await chunkTNR7AA52_cjs.signWithdrawMessage({
818
825
  walletClient,
819
826
  chainId: signingChainId,
820
827
  verifyingContract: networkConfig.accountingContract,
@@ -943,7 +950,7 @@ function useWithdraw(options = {}) {
943
950
  function useLockFunds(options = {}) {
944
951
  const { address } = wagmi.useAccount();
945
952
  const { data: walletClient } = wagmi.useWalletClient();
946
- const { client, networkConfig, serviceAddress } = chunkFGWMLLEC_cjs.usePrivanaContext();
953
+ const { client, networkConfig, serviceAddress } = chunkTNR7AA52_cjs.usePrivanaContext();
947
954
  const queryClient = reactQuery.useQueryClient();
948
955
  const mutation = reactQuery.useMutation({
949
956
  mutationFn: async (params) => {
@@ -954,7 +961,7 @@ function useLockFunds(options = {}) {
954
961
  throw new Error("Service address not configured");
955
962
  }
956
963
  const { nonce } = await client.getLockNonce(address);
957
- const signature = await chunkFGWMLLEC_cjs.signLockMessage({
964
+ const signature = await chunkTNR7AA52_cjs.signLockMessage({
958
965
  walletClient,
959
966
  chainId: networkConfig.chainId,
960
967
  verifyingContract: networkConfig.accountingContract,
@@ -1002,7 +1009,7 @@ function useLockFunds(options = {}) {
1002
1009
  }
1003
1010
  function useUnlockFunds(options = {}) {
1004
1011
  const { address } = wagmi.useAccount();
1005
- const { client } = chunkFGWMLLEC_cjs.usePrivanaContext();
1012
+ const { client } = chunkTNR7AA52_cjs.usePrivanaContext();
1006
1013
  const queryClient = reactQuery.useQueryClient();
1007
1014
  const unlockMutation = reactQuery.useMutation({
1008
1015
  mutationFn: async (params) => {
@@ -1072,7 +1079,7 @@ function useUnlockFunds(options = {}) {
1072
1079
  function useTransfer(options = {}) {
1073
1080
  const { address } = wagmi.useAccount();
1074
1081
  const { data: walletClient } = wagmi.useWalletClient();
1075
- const { client, networkConfig, serviceAddress } = chunkFGWMLLEC_cjs.usePrivanaContext();
1082
+ const { client, networkConfig, serviceAddress } = chunkTNR7AA52_cjs.usePrivanaContext();
1076
1083
  const queryClient = reactQuery.useQueryClient();
1077
1084
  const transferMutation = reactQuery.useMutation({
1078
1085
  mutationFn: async (params) => {
@@ -1080,7 +1087,7 @@ function useTransfer(options = {}) {
1080
1087
  throw new Error("Wallet not connected");
1081
1088
  }
1082
1089
  const { nonce } = await client.getTransferNonce(address);
1083
- const signature = await chunkFGWMLLEC_cjs.signTransferMessage({
1090
+ const signature = await chunkTNR7AA52_cjs.signTransferMessage({
1084
1091
  walletClient,
1085
1092
  chainId: networkConfig.chainId,
1086
1093
  verifyingContract: networkConfig.accountingContract,
@@ -1117,7 +1124,7 @@ function useTransfer(options = {}) {
1117
1124
  throw new Error("Service address not configured");
1118
1125
  }
1119
1126
  const { nonce } = await client.getTransferLockedNonce(serviceAddress);
1120
- const signature = await chunkFGWMLLEC_cjs.signTransferLockedMessage({
1127
+ const signature = await chunkTNR7AA52_cjs.signTransferLockedMessage({
1121
1128
  walletClient,
1122
1129
  chainId: networkConfig.chainId,
1123
1130
  verifyingContract: networkConfig.accountingContract,
@@ -1177,8 +1184,8 @@ function useTransfer(options = {}) {
1177
1184
  };
1178
1185
  }
1179
1186
  function useLockedFunds(options = {}) {
1180
- const { client, pollingInterval, serviceAddress } = chunkFGWMLLEC_cjs.usePrivanaContext();
1181
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1187
+ const { client, pollingInterval, serviceAddress } = chunkTNR7AA52_cjs.usePrivanaContext();
1188
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkTNR7AA52_cjs.usePrivateReadRequest();
1182
1189
  const query = reactQuery.useQuery({
1183
1190
  queryKey: ["accounting-locked-funds", ...privateReadQueryScope, serviceAddress ?? null],
1184
1191
  queryFn: async () => {
@@ -1200,8 +1207,8 @@ function useLockedFunds(options = {}) {
1200
1207
  };
1201
1208
  }
1202
1209
  function useTotalLockedBalance(options = {}) {
1203
- const { client, pollingInterval, defaultToken } = chunkFGWMLLEC_cjs.usePrivanaContext();
1204
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1210
+ const { client, pollingInterval, defaultToken } = chunkTNR7AA52_cjs.usePrivanaContext();
1211
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkTNR7AA52_cjs.usePrivateReadRequest();
1205
1212
  const tokenId = options.tokenId ?? defaultToken?.id;
1206
1213
  const query = reactQuery.useQuery({
1207
1214
  queryKey: ["accounting-total-locked-balance", ...privateReadQueryScope, tokenId],
@@ -1222,8 +1229,8 @@ function useTotalLockedBalance(options = {}) {
1222
1229
  };
1223
1230
  }
1224
1231
  function useExpiredLocks(options = {}) {
1225
- const { client, pollingInterval } = chunkFGWMLLEC_cjs.usePrivanaContext();
1226
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1232
+ const { client, pollingInterval } = chunkTNR7AA52_cjs.usePrivanaContext();
1233
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkTNR7AA52_cjs.usePrivateReadRequest();
1227
1234
  const query = reactQuery.useQuery({
1228
1235
  queryKey: ["accounting-expired-locks", ...privateReadQueryScope],
1229
1236
  queryFn: async () => {
@@ -1244,14 +1251,14 @@ function useExpiredLocks(options = {}) {
1244
1251
  };
1245
1252
  }
1246
1253
  function statusCodeOf(error) {
1247
- return error instanceof chunkFGWMLLEC_cjs.AccountingApiError ? error.statusCode : void 0;
1254
+ return error instanceof chunkTNR7AA52_cjs.AccountingApiError ? error.statusCode : void 0;
1248
1255
  }
1249
1256
  function usePendingDeposits(options = {}) {
1250
1257
  const queryClient = react.useContext(reactQuery.QueryClientContext);
1251
- const accountingContext = chunkFGWMLLEC_cjs.useSafePrivanaContext();
1258
+ const accountingContext = chunkTNR7AA52_cjs.useSafePrivanaContext();
1252
1259
  const hasProviders = !!queryClient && !!accountingContext;
1253
1260
  const client = accountingContext?.client;
1254
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1261
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkTNR7AA52_cjs.usePrivateReadRequest();
1255
1262
  const { chainId, tokenAddress, lookbackBlocks } = options;
1256
1263
  const query = reactQuery.useQuery({
1257
1264
  queryKey: ["accounting-pending-deposits", ...privateReadQueryScope, chainId, tokenAddress],
@@ -1298,7 +1305,7 @@ function usePendingDeposits(options = {}) {
1298
1305
  }
1299
1306
  function usePendingWithdrawals(options = {}) {
1300
1307
  const { address, isConnected } = wagmi.useAccount();
1301
- const { client, pollingInterval } = chunkFGWMLLEC_cjs.usePrivanaContext();
1308
+ const { client, pollingInterval } = chunkTNR7AA52_cjs.usePrivanaContext();
1302
1309
  const query = reactQuery.useQuery({
1303
1310
  queryKey: ["accounting-pending-withdrawals", address],
1304
1311
  queryFn: async () => {
@@ -1334,8 +1341,8 @@ function usePendingWithdrawals(options = {}) {
1334
1341
  };
1335
1342
  }
1336
1343
  function useHistory(options = {}) {
1337
- const { client, pollingInterval } = chunkFGWMLLEC_cjs.usePrivanaContext();
1338
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1344
+ const { client, pollingInterval } = chunkTNR7AA52_cjs.usePrivanaContext();
1345
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkTNR7AA52_cjs.usePrivateReadRequest();
1339
1346
  const offset = options.offset ?? -1;
1340
1347
  const limit = options.limit ?? 50;
1341
1348
  const query = reactQuery.useQuery({
@@ -1359,7 +1366,7 @@ function useHistory(options = {}) {
1359
1366
  };
1360
1367
  }
1361
1368
  function useTokenInfo(options = {}) {
1362
- const { client } = chunkFGWMLLEC_cjs.usePrivanaContext();
1369
+ const { client } = chunkTNR7AA52_cjs.usePrivanaContext();
1363
1370
  const { tokenId } = options;
1364
1371
  const query = reactQuery.useQuery({
1365
1372
  queryKey: ["accounting-token-info", tokenId],
@@ -1379,7 +1386,7 @@ function useTokenInfo(options = {}) {
1379
1386
  };
1380
1387
  }
1381
1388
  function useTokenList(options = {}) {
1382
- const { client } = chunkFGWMLLEC_cjs.usePrivanaContext();
1389
+ const { client } = chunkTNR7AA52_cjs.usePrivanaContext();
1383
1390
  const query = reactQuery.useQuery({
1384
1391
  queryKey: ["accounting-token-list"],
1385
1392
  queryFn: () => client.listTokens(),
@@ -1397,7 +1404,7 @@ function useTokenList(options = {}) {
1397
1404
  function useModifyLock(options = {}) {
1398
1405
  const { address } = wagmi.useAccount();
1399
1406
  const { data: walletClient } = wagmi.useWalletClient();
1400
- const { client, networkConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
1407
+ const { client, networkConfig } = chunkTNR7AA52_cjs.usePrivanaContext();
1401
1408
  const queryClient = reactQuery.useQueryClient();
1402
1409
  const mutation = reactQuery.useMutation({
1403
1410
  mutationFn: async (params) => {
@@ -1405,7 +1412,7 @@ function useModifyLock(options = {}) {
1405
1412
  throw new Error("Wallet not connected");
1406
1413
  }
1407
1414
  const { nonce } = await client.getModifyLockNonce(address);
1408
- const signature = await chunkFGWMLLEC_cjs.signModifyLockMessage({
1415
+ const signature = await chunkTNR7AA52_cjs.signModifyLockMessage({
1409
1416
  walletClient,
1410
1417
  chainId: networkConfig.chainId,
1411
1418
  verifyingContract: networkConfig.accountingContract,
@@ -1464,7 +1471,7 @@ function DialogOverlay({
1464
1471
  {
1465
1472
  "data-slot": "dialog-overlay",
1466
1473
  "data-privana": true,
1467
- className: chunkFGWMLLEC_cjs.cn(
1474
+ className: chunkTNR7AA52_cjs.cn(
1468
1475
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1469
1476
  className
1470
1477
  ),
@@ -1486,7 +1493,7 @@ function DialogContent({
1486
1493
  {
1487
1494
  "data-slot": "dialog-content",
1488
1495
  "data-privana": true,
1489
- className: chunkFGWMLLEC_cjs.cn(
1496
+ className: chunkTNR7AA52_cjs.cn(
1490
1497
  "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",
1491
1498
  className
1492
1499
  ),
@@ -1514,7 +1521,7 @@ function DialogTitle({ className, ...props }) {
1514
1521
  DialogPrimitive__namespace.Title,
1515
1522
  {
1516
1523
  "data-slot": "dialog-title",
1517
- className: chunkFGWMLLEC_cjs.cn("text-lg leading-none font-semibold", className),
1524
+ className: chunkTNR7AA52_cjs.cn("text-lg leading-none font-semibold", className),
1518
1525
  ...props
1519
1526
  }
1520
1527
  );
@@ -1527,7 +1534,7 @@ function DialogDescription({
1527
1534
  DialogPrimitive__namespace.Description,
1528
1535
  {
1529
1536
  "data-slot": "dialog-description",
1530
- className: chunkFGWMLLEC_cjs.cn("text-muted-foreground text-sm", className),
1537
+ className: chunkTNR7AA52_cjs.cn("text-muted-foreground text-sm", className),
1531
1538
  ...props
1532
1539
  }
1533
1540
  );
@@ -1569,7 +1576,7 @@ function sessionKey(owner, sessionId) {
1569
1576
  return `${SESSION_PREFIX}${owner.toLowerCase()}:${sessionId}`;
1570
1577
  }
1571
1578
  function activeSessionId(owner) {
1572
- const value = chunkFGWMLLEC_cjs.getSharedBrowserStorageItem(activeSessionKey(owner));
1579
+ const value = chunkTNR7AA52_cjs.getSharedBrowserStorageItem(activeSessionKey(owner));
1573
1580
  return value || void 0;
1574
1581
  }
1575
1582
  function isPositiveIntegerString(value) {
@@ -1601,7 +1608,7 @@ function isSessionRecord(value) {
1601
1608
  }
1602
1609
  function writeSessionRecord(session) {
1603
1610
  const id = externalDepositSessionId(session.chainId, session.tokenId);
1604
- return chunkFGWMLLEC_cjs.setSharedBrowserStorageItem(sessionKey(session.owner, id), JSON.stringify(session));
1611
+ return chunkTNR7AA52_cjs.setSharedBrowserStorageItem(sessionKey(session.owner, id), JSON.stringify(session));
1605
1612
  }
1606
1613
  function saveExternalDepositLockSession(session, expectedSession = null) {
1607
1614
  if (!isSessionRecord(session)) throw new Error("Invalid external deposit lock session");
@@ -1615,12 +1622,12 @@ function saveExternalDepositLockSession(session, expectedSession = null) {
1615
1622
  throw new Error("Unable to persist external deposit lock session");
1616
1623
  }
1617
1624
  if (previousId !== nextId) {
1618
- if (!chunkFGWMLLEC_cjs.setSharedBrowserStorageItem(activeSessionKey(session.owner), nextId)) {
1619
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(sessionKey(session.owner, nextId));
1625
+ if (!chunkTNR7AA52_cjs.setSharedBrowserStorageItem(activeSessionKey(session.owner), nextId)) {
1626
+ chunkTNR7AA52_cjs.removeSharedBrowserStorageItem(sessionKey(session.owner, nextId));
1620
1627
  throw new Error("Unable to persist external deposit lock session");
1621
1628
  }
1622
1629
  if (previousId) {
1623
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(sessionKey(session.owner, previousId));
1630
+ chunkTNR7AA52_cjs.removeSharedBrowserStorageItem(sessionKey(session.owner, previousId));
1624
1631
  }
1625
1632
  }
1626
1633
  }
@@ -1629,17 +1636,17 @@ function loadExternalDepositLockSession(owner) {
1629
1636
  if (!id) return void 0;
1630
1637
  const key = sessionKey(owner, id);
1631
1638
  try {
1632
- const raw = chunkFGWMLLEC_cjs.getSharedBrowserStorageItem(key);
1639
+ const raw = chunkTNR7AA52_cjs.getSharedBrowserStorageItem(key);
1633
1640
  const parsed = raw ? JSON.parse(raw) : void 0;
1634
1641
  if (!isSessionRecord(parsed) || parsed.owner.toLowerCase() !== owner.toLowerCase() || externalDepositSessionId(parsed.chainId, parsed.tokenId) !== id) {
1635
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(key);
1636
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1642
+ chunkTNR7AA52_cjs.removeSharedBrowserStorageItem(key);
1643
+ chunkTNR7AA52_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1637
1644
  return void 0;
1638
1645
  }
1639
1646
  return parsed;
1640
1647
  } catch {
1641
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(key);
1642
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1648
+ chunkTNR7AA52_cjs.removeSharedBrowserStorageItem(key);
1649
+ chunkTNR7AA52_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1643
1650
  return void 0;
1644
1651
  }
1645
1652
  }
@@ -1670,8 +1677,8 @@ function clearExternalDepositLockSession(owner, expectedSessionId, expectedGener
1670
1677
  const current = loadExternalDepositLockSession(owner);
1671
1678
  if (!current || current.generation !== expectedGeneration) return;
1672
1679
  }
1673
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(sessionKey(owner, id));
1674
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1680
+ chunkTNR7AA52_cjs.removeSharedBrowserStorageItem(sessionKey(owner, id));
1681
+ chunkTNR7AA52_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1675
1682
  }
1676
1683
  function isSameVerification(left, right) {
1677
1684
  if (!left || !right) return left === right;
@@ -1724,7 +1731,7 @@ function markSubmissionAmbiguous(session, signature) {
1724
1731
  return writeSessionRecord({ ...current, submissionAmbiguous: true });
1725
1732
  }
1726
1733
  function ambiguousSubmissionError(error) {
1727
- return new chunkFGWMLLEC_cjs.PostDepositLockError(
1734
+ return new chunkTNR7AA52_cjs.PostDepositLockError(
1728
1735
  "Lock submission could not be confirmed. Retry only the saved signature, or check locked funds before stopping recovery.",
1729
1736
  error.reason,
1730
1737
  error.signedAmount,
@@ -1737,7 +1744,7 @@ function ambiguousSubmissionError(error) {
1737
1744
  }
1738
1745
  function isDefinitiveSubmissionFailure(error) {
1739
1746
  const cause = error.cause;
1740
- return cause instanceof chunkFGWMLLEC_cjs.AccountingApiError && cause.statusCode !== 408 && cause.statusCode < 500;
1747
+ return cause instanceof chunkTNR7AA52_cjs.AccountingApiError && cause.statusCode !== 408 && cause.statusCode < 500;
1741
1748
  }
1742
1749
  function submissionLockName(session) {
1743
1750
  return `privana:external-deposit-lock:submit:${session.owner.toLowerCase()}:${externalDepositSessionId(session.chainId, session.tokenId)}`;
@@ -1757,7 +1764,7 @@ async function submitExternalDepositLock(client, session) {
1757
1764
  return withSubmissionLock(session, async (crossTabExclusive) => {
1758
1765
  const current = loadExternalDepositLockSession(session.owner);
1759
1766
  if (!current || current.generation !== session.generation) {
1760
- throw new chunkFGWMLLEC_cjs.PostDepositLockError(
1767
+ throw new chunkTNR7AA52_cjs.PostDepositLockError(
1761
1768
  "External deposit lock session changed before submission",
1762
1769
  "not-found",
1763
1770
  BigInt(session.maxLockAmount),
@@ -1776,7 +1783,7 @@ async function submitExternalDepositLock(client, session) {
1776
1783
  async function submitExternalDepositLockAttempt(client, session, crossTabExclusive) {
1777
1784
  const creditedAmount = session.creditedAmount ? BigInt(session.creditedAmount) : void 0;
1778
1785
  if (!creditedAmount) {
1779
- throw new chunkFGWMLLEC_cjs.PostDepositLockError(
1786
+ throw new chunkTNR7AA52_cjs.PostDepositLockError(
1780
1787
  "External deposit has not been credited",
1781
1788
  "submission-failed",
1782
1789
  BigInt(session.maxLockAmount)
@@ -1784,7 +1791,7 @@ async function submitExternalDepositLockAttempt(client, session, crossTabExclusi
1784
1791
  }
1785
1792
  const payload = session.payload;
1786
1793
  if (!payload) {
1787
- throw new chunkFGWMLLEC_cjs.PostDepositLockError(
1794
+ throw new chunkTNR7AA52_cjs.PostDepositLockError(
1788
1795
  "No persisted signed policy found for this deposit session",
1789
1796
  "not-found",
1790
1797
  BigInt(session.maxLockAmount),
@@ -1792,7 +1799,7 @@ async function submitExternalDepositLockAttempt(client, session, crossTabExclusi
1792
1799
  );
1793
1800
  }
1794
1801
  try {
1795
- return await chunkFGWMLLEC_cjs.submitPendingLock({
1802
+ return await chunkTNR7AA52_cjs.submitPendingLock({
1796
1803
  client,
1797
1804
  payload,
1798
1805
  creditedAmount,
@@ -1803,23 +1810,23 @@ async function submitExternalDepositLockAttempt(client, session, crossTabExclusi
1803
1810
  }
1804
1811
  });
1805
1812
  } catch (err) {
1806
- if (err instanceof chunkFGWMLLEC_cjs.PostDepositLockError && err.reason === "submission-failed" && crossTabExclusive && !session.submissionAmbiguous && isDefinitiveSubmissionFailure(err)) {
1813
+ if (err instanceof chunkTNR7AA52_cjs.PostDepositLockError && err.reason === "submission-failed" && crossTabExclusive && !session.submissionAmbiguous && isDefinitiveSubmissionFailure(err)) {
1807
1814
  if (!clearSubmittedPayload(session, payload.signature, true)) {
1808
1815
  const latest = loadExternalDepositLockSession(session.owner);
1809
1816
  if (latest?.submissionAmbiguous) throw ambiguousSubmissionError(err);
1810
1817
  }
1811
- } else if (err instanceof chunkFGWMLLEC_cjs.PostDepositLockError && err.reason === "submission-failed") {
1818
+ } else if (err instanceof chunkTNR7AA52_cjs.PostDepositLockError && err.reason === "submission-failed") {
1812
1819
  const ambiguous = markSubmissionAmbiguous(session, payload.signature) || loadExternalDepositLockSession(session.owner)?.submissionAmbiguous === true;
1813
1820
  if (ambiguous) throw ambiguousSubmissionError(err);
1814
1821
  } else {
1815
1822
  const current = loadExternalDepositLockSession(session.owner);
1816
1823
  if (session.submissionAmbiguous || current?.submissionAmbiguous) {
1817
- if (err instanceof chunkFGWMLLEC_cjs.PostDepositLockError) throw ambiguousSubmissionError(err);
1824
+ if (err instanceof chunkTNR7AA52_cjs.PostDepositLockError) throw ambiguousSubmissionError(err);
1818
1825
  throw err;
1819
1826
  }
1820
1827
  if (!clearSubmittedPayload(session, payload.signature)) {
1821
1828
  const latest = loadExternalDepositLockSession(session.owner);
1822
- if (latest?.submissionAmbiguous && err instanceof chunkFGWMLLEC_cjs.PostDepositLockError) {
1829
+ if (latest?.submissionAmbiguous && err instanceof chunkTNR7AA52_cjs.PostDepositLockError) {
1823
1830
  throw ambiguousSubmissionError(err);
1824
1831
  }
1825
1832
  }
@@ -1832,12 +1839,12 @@ function useExternalDepositLock({
1832
1839
  onLockSubmitted,
1833
1840
  onLockFailed
1834
1841
  }) {
1835
- const { client, networkConfig, serviceAddress, getTokenById, tokensStatus } = chunkFGWMLLEC_cjs.usePrivanaContext();
1842
+ const { client, networkConfig, serviceAddress, getTokenById, tokensStatus } = chunkTNR7AA52_cjs.usePrivanaContext();
1836
1843
  const config = wagmi.useConfig();
1837
1844
  const queryClient = reactQuery.useQueryClient();
1838
1845
  const { address } = wagmi.useAccount();
1839
- const { privateReadAddress } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1840
- const { ensureCorrectChain } = chunkFGWMLLEC_cjs.useEnsureCorrectChain();
1846
+ const { privateReadAddress } = chunkTNR7AA52_cjs.usePrivateReadRequest();
1847
+ const { ensureCorrectChain } = chunkTNR7AA52_cjs.useEnsureCorrectChain();
1841
1848
  const [isSigning, setIsSigning] = react.useState(false);
1842
1849
  const [isSubmittingLock, setIsSubmittingLock] = react.useState(false);
1843
1850
  const [session, setSession] = react.useState(null);
@@ -1897,7 +1904,7 @@ function useExternalDepositLock({
1897
1904
  result = await submitExternalDepositLock(client, submission);
1898
1905
  } catch (err) {
1899
1906
  const stored = loadExternalDepositLockSession(active.owner);
1900
- const error = err instanceof chunkFGWMLLEC_cjs.PostDepositLockError ? err : new chunkFGWMLLEC_cjs.PostDepositLockError(
1907
+ const error = err instanceof chunkTNR7AA52_cjs.PostDepositLockError ? err : new chunkTNR7AA52_cjs.PostDepositLockError(
1901
1908
  err instanceof Error ? err.message : "Lock submission failed",
1902
1909
  "submission-failed",
1903
1910
  BigInt(active.maxLockAmount),
@@ -1976,7 +1983,7 @@ function useExternalDepositLock({
1976
1983
  void submitSession(restored);
1977
1984
  } else if (restored.creditedAmount) {
1978
1985
  notifyFailure(
1979
- new chunkFGWMLLEC_cjs.PostDepositLockError(
1986
+ new chunkTNR7AA52_cjs.PostDepositLockError(
1980
1987
  "Deposit credited; sign a fresh policy to lock the funds",
1981
1988
  "not-found",
1982
1989
  BigInt(restored.maxLockAmount),
@@ -2016,10 +2023,10 @@ function useExternalDepositLock({
2016
2023
  if (signingRef.current || settlingRef.current) {
2017
2024
  throw new Error("A policy operation is already in progress");
2018
2025
  }
2019
- if (!chunkFGWMLLEC_cjs.canUseSharedBrowserStorage()) {
2026
+ if (!chunkTNR7AA52_cjs.canUseSharedBrowserStorage()) {
2020
2027
  throw new Error("Browser storage is required for locked deposit recovery");
2021
2028
  }
2022
- const owner = chunkFGWMLLEC_cjs.requireDepositLockOwner(address, privateReadAddress);
2029
+ const owner = chunkTNR7AA52_cjs.requireDepositLockOwner(address, privateReadAddress);
2023
2030
  if (sessionRef.current || loadExternalDepositLockSession(owner)) {
2024
2031
  throw new Error("Finish or cancel the active external deposit before starting another");
2025
2032
  }
@@ -2028,26 +2035,26 @@ function useExternalDepositLock({
2028
2035
  if (token.contract === viem.zeroAddress) {
2029
2036
  throw new Error("External deposits support ERC20 tokens only");
2030
2037
  }
2031
- const targetService = chunkFGWMLLEC_cjs.requireServiceAddress(serviceAddress);
2032
- const lockDuration = allowance.lockDuration ?? chunkFGWMLLEC_cjs.DEFAULT_LOCK_DURATION_SECONDS;
2038
+ const targetService = chunkTNR7AA52_cjs.requireServiceAddress(serviceAddress);
2039
+ const lockDuration = allowance.lockDuration ?? chunkTNR7AA52_cjs.DEFAULT_LOCK_DURATION_SECONDS;
2033
2040
  signingRef.current = true;
2034
2041
  setIsSigning(true);
2035
2042
  try {
2036
2043
  await ensureCorrectChain(networkConfig.chainId);
2037
- const signingWalletClient = await chunkFGWMLLEC_cjs.getWalletClient(config, {
2044
+ const signingWalletClient = await chunkTNR7AA52_cjs.getWalletClient(config, {
2038
2045
  chainId: networkConfig.chainId
2039
2046
  });
2040
- const payload = await chunkFGWMLLEC_cjs.createSignedLockRequest({
2047
+ const payload = await chunkTNR7AA52_cjs.createSignedLockRequest({
2041
2048
  client,
2042
2049
  walletClient: signingWalletClient,
2043
2050
  userAddress: owner,
2044
2051
  networkConfig,
2045
2052
  serviceAddress: targetService,
2046
2053
  tokenId: token.id,
2047
- amount: chunkFGWMLLEC_cjs.clampLockAmount(amount, BigInt(allowance.value)),
2054
+ amount: chunkTNR7AA52_cjs.clampLockAmount(amount, BigInt(allowance.value)),
2048
2055
  lockDuration
2049
2056
  });
2050
- const startBlock = await chunkFGWMLLEC_cjs.getBlockNumber(config, { chainId: token.chainId });
2057
+ const startBlock = await chunkTNR7AA52_cjs.getBlockNumber(config, { chainId: token.chainId });
2051
2058
  if (startBlock > BigInt(Number.MAX_SAFE_INTEGER)) {
2052
2059
  throw new Error("Source-chain block number exceeds the supported range");
2053
2060
  }
@@ -2113,7 +2120,7 @@ function useExternalDepositLock({
2113
2120
  pendingCreditedTransitionRef.current = { predecessor: active, credited };
2114
2121
  installSession(credited);
2115
2122
  notifyFailure(
2116
- new chunkFGWMLLEC_cjs.PostDepositLockError(
2123
+ new chunkTNR7AA52_cjs.PostDepositLockError(
2117
2124
  err instanceof Error ? err.message : "Unable to persist credited deposit state",
2118
2125
  "submission-failed",
2119
2126
  BigInt(active.maxLockAmount),
@@ -2173,7 +2180,7 @@ function useExternalDepositLock({
2173
2180
  if (!token || token.chainId !== active.chainId || token.contract === viem.zeroAddress) {
2174
2181
  throw new Error("The credited token is no longer available");
2175
2182
  }
2176
- const targetService = chunkFGWMLLEC_cjs.requireServiceAddress(serviceAddress);
2183
+ const targetService = chunkTNR7AA52_cjs.requireServiceAddress(serviceAddress);
2177
2184
  if (targetService.toLowerCase() !== active.serviceAddress.toLowerCase()) {
2178
2185
  throw new Error("The service for this credited deposit has changed");
2179
2186
  }
@@ -2186,17 +2193,17 @@ function useExternalDepositLock({
2186
2193
  "The previous lock submission may have succeeded; a fresh signature is unsafe"
2187
2194
  );
2188
2195
  }
2189
- const owner = chunkFGWMLLEC_cjs.requireDepositLockOwner(address, privateReadAddress);
2196
+ const owner = chunkTNR7AA52_cjs.requireDepositLockOwner(address, privateReadAddress);
2190
2197
  const amount = externalDepositRetryAmount(active);
2191
2198
  let retrySession;
2192
2199
  signingRef.current = true;
2193
2200
  setIsSigning(true);
2194
2201
  try {
2195
2202
  await ensureCorrectChain(networkConfig.chainId);
2196
- const signingWalletClient = await chunkFGWMLLEC_cjs.getWalletClient(config, {
2203
+ const signingWalletClient = await chunkTNR7AA52_cjs.getWalletClient(config, {
2197
2204
  chainId: networkConfig.chainId
2198
2205
  });
2199
- const payload = await chunkFGWMLLEC_cjs.createSignedLockRequest({
2206
+ const payload = await chunkTNR7AA52_cjs.createSignedLockRequest({
2200
2207
  client,
2201
2208
  walletClient: signingWalletClient,
2202
2209
  userAddress: owner,
@@ -2413,7 +2420,7 @@ function getChainIcon(chainId, size) {
2413
2420
  }
2414
2421
  }
2415
2422
  function TokenSelectorView({ selectedTokenId, onSelect }) {
2416
- const { enabledTokens } = chunkFGWMLLEC_cjs.usePrivanaContext();
2423
+ const { enabledTokens } = chunkTNR7AA52_cjs.usePrivanaContext();
2417
2424
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-muted flex flex-col rounded-[10px] p-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex max-h-72 flex-col gap-1 overflow-y-auto", children: [
2418
2425
  enabledTokens.map((token) => {
2419
2426
  const isSelected = selectedTokenId === token.id;
@@ -2422,7 +2429,7 @@ function TokenSelectorView({ selectedTokenId, onSelect }) {
2422
2429
  {
2423
2430
  type: "button",
2424
2431
  onClick: () => onSelect(token.id),
2425
- className: chunkFGWMLLEC_cjs.cn(
2432
+ className: chunkTNR7AA52_cjs.cn(
2426
2433
  "hover:bg-secondary flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors",
2427
2434
  isSelected && "bg-secondary"
2428
2435
  ),
@@ -2477,7 +2484,7 @@ function CreditCardWidgetView({
2477
2484
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "bg-muted flex flex-col gap-6 rounded-[10px] p-5", children: [
2478
2485
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-foreground text-[28px] leading-8 font-medium", children: "Complete your purchase" }),
2479
2486
  token && moonpayCurrencyCode ? /* @__PURE__ */ jsxRuntime.jsx(
2480
- chunkFGWMLLEC_cjs.FiatOnRampForm,
2487
+ chunkTNR7AA52_cjs.FiatOnRampForm,
2481
2488
  {
2482
2489
  tokenId: token.id,
2483
2490
  currencyCode: moonpayCurrencyCode,
@@ -2766,7 +2773,7 @@ function ChevronDownIcon({
2766
2773
  height: "16",
2767
2774
  viewBox: "0 0 16 16",
2768
2775
  fill: "none",
2769
- className: chunkFGWMLLEC_cjs.cn(
2776
+ className: chunkTNR7AA52_cjs.cn(
2770
2777
  "transition-transform",
2771
2778
  direction === "right" && "-rotate-90",
2772
2779
  direction === "up" && "rotate-180",
@@ -2919,7 +2926,7 @@ function PolicyTermRow({
2919
2926
  /* @__PURE__ */ jsxRuntime.jsx(
2920
2927
  "div",
2921
2928
  {
2922
- className: chunkFGWMLLEC_cjs.cn(
2929
+ className: chunkTNR7AA52_cjs.cn(
2923
2930
  "mt-0.5 shrink-0",
2924
2931
  kind === "permission" ? "text-emerald-500" : "text-orange-500"
2925
2932
  ),
@@ -2992,7 +2999,7 @@ function DepositView({
2992
2999
  onSubmit,
2993
3000
  isSubmitting = false
2994
3001
  }) {
2995
- const { getChainById: getChainById2, chains, serviceName, serviceIcon, networkConfig, hostedAuthConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
3002
+ const { getChainById: getChainById2, chains, serviceName, serviceIcon, networkConfig, hostedAuthConfig } = chunkTNR7AA52_cjs.usePrivanaContext();
2996
3003
  const { address, isConnected } = wagmi.useAccount();
2997
3004
  const appName = serviceName ?? "Privana";
2998
3005
  const chain = selectedToken ? getChainById2(selectedToken.chainId) : void 0;
@@ -3016,7 +3023,7 @@ function DepositView({
3016
3023
  query: { enabled: isConnectedSource && !!address && !!selectedToken && !isNative }
3017
3024
  });
3018
3025
  const walletBalance = isNative ? nativeBalanceData?.value : erc20Balance;
3019
- const formattedWalletBalance = walletBalance != null && selectedToken ? chunkFGWMLLEC_cjs.formatTokenAmount(walletBalance.toString(), selectedToken.decimals) : "0.00";
3026
+ const formattedWalletBalance = walletBalance != null && selectedToken ? chunkTNR7AA52_cjs.formatTokenAmount(walletBalance.toString(), selectedToken.decimals) : "0.00";
3020
3027
  const {
3021
3028
  minBuyAmount: moonpayMinBuy,
3022
3029
  isLoading: moonpayLimitsLoading,
@@ -3029,7 +3036,7 @@ function DepositView({
3029
3036
  const hasValidAmount = !!amount && parseFloat(amount) > 0;
3030
3037
  const maxAmountDecimals = isCreditCard ? 2 : selectedToken?.decimals;
3031
3038
  const tooManyDecimals = hasValidAmount && maxAmountDecimals != null && amount.includes(".") && amount.split(".")[1].length > maxAmountDecimals;
3032
- const exceedsBalance = isConnectedSource && hasValidAmount && !tooManyDecimals && !!selectedToken && walletBalance != null && chunkFGWMLLEC_cjs.parseTokenAmount(amount, selectedToken.decimals) > walletBalance;
3039
+ const exceedsBalance = isConnectedSource && hasValidAmount && !tooManyDecimals && !!selectedToken && walletBalance != null && chunkTNR7AA52_cjs.parseTokenAmount(amount, selectedToken.decimals) > walletBalance;
3033
3040
  const belowMoonpayMin = isCreditCard && hasValidAmount && moonpayMinBuy != null && parseFloat(amount) < moonpayMinBuy;
3034
3041
  const moonpayLimitsUnready = isCreditCard && !!selectedToken?.moonpayCurrencyCode && moonpayMinBuy == null;
3035
3042
  const creditCardUnavailable = isCreditCard && !!selectedToken && !selectedToken.moonpayCurrencyCode;
@@ -3037,7 +3044,7 @@ function DepositView({
3037
3044
  const externalMinimumRequired = isExternal && !!allowance && !!selectedToken;
3038
3045
  const externalMinimumLoading = externalMinimumRequired && externalMinimum === void 0;
3039
3046
  const externalMinimumUnavailable = externalMinimumRequired && externalMinimum === null;
3040
- const belowExternalMinimum = externalMinimumRequired && hasValidAmount && !tooManyDecimals && !!selectedToken && typeof externalMinimum === "bigint" && chunkFGWMLLEC_cjs.parseTokenAmount(amount, selectedToken.decimals) < externalMinimum;
3047
+ const belowExternalMinimum = externalMinimumRequired && hasValidAmount && !tooManyDecimals && !!selectedToken && typeof externalMinimum === "bigint" && chunkTNR7AA52_cjs.parseTokenAmount(amount, selectedToken.decimals) < externalMinimum;
3041
3048
  const externalNeedsWallet = isExternal && (!!allowance || !hostedAuthConfig);
3042
3049
  const needsConnect = (isConnectedSource || externalNeedsWallet) && !isConnected;
3043
3050
  const canDeposit = hasValidAmount && !!selectedToken && !tooManyDecimals && !exceedsBalance && !belowMoonpayMin && !moonpayLimitsUnready && !creditCardUnavailable && !externalTokenUnavailable && !externalMinimumLoading && !externalMinimumUnavailable && !belowExternalMinimum && !needsConnect;
@@ -3094,7 +3101,7 @@ function DepositView({
3094
3101
  /* @__PURE__ */ jsxRuntime.jsxs(
3095
3102
  "div",
3096
3103
  {
3097
- className: chunkFGWMLLEC_cjs.cn(
3104
+ className: chunkTNR7AA52_cjs.cn(
3098
3105
  "border-border bg-input flex items-center gap-2 rounded-[10px] border",
3099
3106
  isConnectedSource ? "py-1 pr-1 pl-3" : "px-3 py-3"
3100
3107
  ),
@@ -3234,7 +3241,7 @@ function ExternalDepositView({
3234
3241
  onDiscardLock,
3235
3242
  lock
3236
3243
  }) {
3237
- const { getChainById: getChainById2, getTokenById, serviceName } = chunkFGWMLLEC_cjs.usePrivanaContext();
3244
+ const { getChainById: getChainById2, getTokenById, serviceName } = chunkTNR7AA52_cjs.usePrivanaContext();
3238
3245
  const appName = serviceName ?? "Privana";
3239
3246
  const { depositAddress, isReady, isLoading } = depositAddressState;
3240
3247
  const chain = token ? getChainById2(token.chainId) : void 0;
@@ -3250,7 +3257,7 @@ function ExternalDepositView({
3250
3257
  const [nothingFound, setNothingFound] = react.useState(false);
3251
3258
  const [credited, setCredited] = react.useState(null);
3252
3259
  const [showCancelWarning, setShowCancelWarning] = react.useState(false);
3253
- const verification = chunkFGWMLLEC_cjs.useDepositVerification({
3260
+ const verification = chunkTNR7AA52_cjs.useDepositVerification({
3254
3261
  onCredited: (txHash, _response, creditedAmount) => {
3255
3262
  if (settleAfterCredit) {
3256
3263
  void settleAfterCredit(txHash, creditedAmount);
@@ -3374,11 +3381,11 @@ function ExternalDepositView({
3374
3381
  ] }),
3375
3382
  showDepositInstructions && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3376
3383
  !scanPaused && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: "Send the displayed amount in one transfer. Transfers below the minimum are not combined or automatically returned." }),
3377
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-secondary flex h-50 items-center justify-center rounded-[10px]", children: !isReady ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground px-6 text-center text-sm", children: "Connect your wallet to generate a deposit address." }) : depositAddress ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[10px] bg-white p-3", children: /* @__PURE__ */ jsxRuntime.jsx(qrcode_react.QRCodeSVG, { value: depositAddress, size: 160 }) }) : isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkFGWMLLEC_cjs.Skeleton, { className: "h-full w-full rounded-[10px]" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-sm", children: "Deposit address unavailable" }) }),
3384
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-secondary flex h-50 items-center justify-center rounded-[10px]", children: !isReady ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground px-6 text-center text-sm", children: "Connect your wallet to generate a deposit address." }) : depositAddress ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[10px] bg-white p-3", children: /* @__PURE__ */ jsxRuntime.jsx(qrcode_react.QRCodeSVG, { value: depositAddress, size: 160 }) }) : isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTNR7AA52_cjs.Skeleton, { className: "h-full w-full rounded-[10px]" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-sm", children: "Deposit address unavailable" }) }),
3378
3385
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
3379
3386
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: "Deposit Address" }),
3380
3387
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
3381
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-border flex h-10 min-w-0 flex-1 items-center rounded-[10px] border px-3", children: depositAddress ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground min-w-0 flex-1 truncate text-sm", children: depositAddress }) : isReady && isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkFGWMLLEC_cjs.Skeleton, { className: "h-4 w-3/4" }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: "\u2014" }) }),
3388
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-border flex h-10 min-w-0 flex-1 items-center rounded-[10px] border px-3", children: depositAddress ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-foreground min-w-0 flex-1 truncate text-sm", children: depositAddress }) : isReady && isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTNR7AA52_cjs.Skeleton, { className: "h-4 w-3/4" }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: "\u2014" }) }),
3382
3389
  /* @__PURE__ */ jsxRuntime.jsxs(
3383
3390
  "button",
3384
3391
  {
@@ -3433,7 +3440,7 @@ function ExternalDepositView({
3433
3440
  TransactionSuccessView,
3434
3441
  {
3435
3442
  title: "Deposit Credited",
3436
- message: `Transfer ${chunkFGWMLLEC_cjs.shortenAddress(credited.txHash)} has been credited to your Privana balance.`,
3443
+ message: `Transfer ${chunkTNR7AA52_cjs.shortenAddress(credited.txHash)} has been credited to your Privana balance.`,
3437
3444
  onDone: () => {
3438
3445
  setCredited(null);
3439
3446
  verification.reset();
@@ -3462,7 +3469,7 @@ function ExternalDepositView({
3462
3469
  {
3463
3470
  title: "Awaiting Deposit",
3464
3471
  subtitle: listening ? "We are listening for your incoming transaction for the next hour." : "We've stopped listening automatically. Use the button below to check for your deposit.",
3465
- remaining: listening ? chunkFGWMLLEC_cjs.formatCountdown(secondsLeft) : void 0
3472
+ remaining: listening ? chunkTNR7AA52_cjs.formatCountdown(secondsLeft) : void 0
3466
3473
  }
3467
3474
  ),
3468
3475
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
@@ -3491,7 +3498,7 @@ function ExternalDepositView({
3491
3498
  ] });
3492
3499
  }
3493
3500
  function MoonPayGate({ enabled, children }) {
3494
- const { networkConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
3501
+ const { networkConfig } = chunkTNR7AA52_cjs.usePrivanaContext();
3495
3502
  const apiKey = networkConfig.moonpayApiKey;
3496
3503
  if (!enabled || !apiKey) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3497
3504
  return /* @__PURE__ */ jsxRuntime.jsx(moonpayReact.MoonPayProvider, { apiKey, children });
@@ -3512,7 +3519,7 @@ function MethodTabs({
3512
3519
  /* @__PURE__ */ jsxRuntime.jsx(
3513
3520
  "div",
3514
3521
  {
3515
- className: chunkFGWMLLEC_cjs.cn(
3522
+ className: chunkTNR7AA52_cjs.cn(
3516
3523
  "bg-input absolute top-1 bottom-1 left-1 w-[calc(50%-8px)] rounded-md transition-transform duration-200",
3517
3524
  activeTab === "credit-card" && "translate-x-[calc(100%+8px)]"
3518
3525
  )
@@ -3523,7 +3530,7 @@ function MethodTabs({
3523
3530
  {
3524
3531
  type: "button",
3525
3532
  onClick: () => onTabChange("crypto"),
3526
- className: chunkFGWMLLEC_cjs.cn(
3533
+ className: chunkTNR7AA52_cjs.cn(
3527
3534
  "relative z-10 flex-1 cursor-pointer rounded-md px-3 py-[9px] text-sm font-medium transition-colors",
3528
3535
  activeTab === "crypto" ? "text-foreground" : "text-muted-foreground"
3529
3536
  ),
@@ -3535,7 +3542,7 @@ function MethodTabs({
3535
3542
  {
3536
3543
  type: "button",
3537
3544
  onClick: () => onTabChange("credit-card"),
3538
- className: chunkFGWMLLEC_cjs.cn(
3545
+ className: chunkTNR7AA52_cjs.cn(
3539
3546
  "relative z-10 flex-1 cursor-pointer rounded-md px-3 py-[9px] text-sm font-medium transition-colors",
3540
3547
  activeTab === "credit-card" ? "text-foreground" : "text-muted-foreground"
3541
3548
  ),
@@ -3579,7 +3586,7 @@ function DepositModalContent({
3579
3586
  onCloseBlockedChange,
3580
3587
  onExit
3581
3588
  }) {
3582
- const { serviceName, enabledTokens, defaultToken, hostedAuthConfig, getChainById: getChainById2, getTokenById } = chunkFGWMLLEC_cjs.usePrivanaContext();
3589
+ const { serviceName, enabledTokens, defaultToken, hostedAuthConfig, getChainById: getChainById2, getTokenById } = chunkTNR7AA52_cjs.usePrivanaContext();
3583
3590
  const { address } = wagmi.useAccount();
3584
3591
  const appName = serviceName ?? "Privana";
3585
3592
  const [activeTab, setActiveTab] = react.useState(defaultTab);
@@ -3714,7 +3721,7 @@ function DepositModalContent({
3714
3721
  sonner.toast.error("External deposits support ERC20 tokens only");
3715
3722
  return;
3716
3723
  }
3717
- const depositAmount = chunkFGWMLLEC_cjs.parseTokenAmount(args.amount, token2.decimals);
3724
+ const depositAmount = chunkTNR7AA52_cjs.parseTokenAmount(args.amount, token2.decimals);
3718
3725
  if (!allowance) {
3719
3726
  setView("external-deposit");
3720
3727
  return;
@@ -3747,7 +3754,7 @@ function DepositModalContent({
3747
3754
  setCancelled(false);
3748
3755
  deposit({
3749
3756
  tokenId: token.id,
3750
- amount: chunkFGWMLLEC_cjs.parseTokenAmount(args.amount, token.decimals),
3757
+ amount: chunkTNR7AA52_cjs.parseTokenAmount(args.amount, token.decimals),
3751
3758
  postDepositLock: allowance ? {
3752
3759
  maxAmount: BigInt(allowance.value),
3753
3760
  lockDuration: allowance.lockDuration
@@ -3788,7 +3795,7 @@ function DepositModalContent({
3788
3795
  ];
3789
3796
  const hasExternalLockRecovery = view === "external-deposit" && !!externalLock.session?.creditedAmount;
3790
3797
  const externalSubmissionAmbiguous = hasExternalLockRecovery && !!lockFailure?.submissionMayHaveSucceeded;
3791
- const savedExternalPayloadUsable = !!externalLock.session?.payload && chunkFGWMLLEC_cjs.isSignedLockUsable(externalLock.session.payload);
3798
+ const savedExternalPayloadUsable = !!externalLock.session?.payload && chunkTNR7AA52_cjs.isSignedLockUsable(externalLock.session.payload);
3792
3799
  const ambiguousRecoveryMustBeAbandoned = externalSubmissionAmbiguous && !savedExternalPayloadUsable;
3793
3800
  const externalRecoveryExitLabel = externalSubmissionAmbiguous ? "Stop recovery" : "Keep funds unlocked";
3794
3801
  const lockFailureToken = hasExternalLockRecovery && externalLock.session ? getTokenById(externalLock.session.tokenId) ?? selectedToken : selectedToken;
@@ -3858,7 +3865,7 @@ function DepositModalContent({
3858
3865
  onClick: onClose,
3859
3866
  disabled: isUnsafeToClose,
3860
3867
  "aria-label": "Close",
3861
- className: chunkFGWMLLEC_cjs.cn(
3868
+ className: chunkTNR7AA52_cjs.cn(
3862
3869
  "absolute top-6 right-5 z-20 flex h-5 w-5 items-center justify-center transition-colors",
3863
3870
  isUnsafeToClose ? "text-muted-foreground/40 cursor-not-allowed" : "text-muted-foreground hover:text-foreground cursor-pointer"
3864
3871
  ),
@@ -4066,7 +4073,7 @@ function DepositInlineModal({ className, ...handlers }) {
4066
4073
  "div",
4067
4074
  {
4068
4075
  "data-privana": true,
4069
- className: chunkFGWMLLEC_cjs.cn(
4076
+ className: chunkTNR7AA52_cjs.cn(
4070
4077
  "bg-card relative flex w-[560px] max-w-full flex-col gap-2 overflow-hidden rounded-2xl p-2 shadow-lg",
4071
4078
  className
4072
4079
  ),
@@ -4079,9 +4086,10 @@ function WithdrawView({
4079
4086
  amount,
4080
4087
  onAmountChange,
4081
4088
  onSelectToken,
4082
- onPendingChange
4089
+ onPendingChange,
4090
+ onWithdrawSuccess
4083
4091
  }) {
4084
- const { chains, getChainById: getChainById2 } = chunkFGWMLLEC_cjs.usePrivanaContext();
4092
+ const { chains, getChainById: getChainById2 } = chunkTNR7AA52_cjs.usePrivanaContext();
4085
4093
  const { isConnected, address } = wagmi.useAccount();
4086
4094
  const [showSuccess, setShowSuccess] = react.useState(false);
4087
4095
  const [showTimeout, setShowTimeout] = react.useState(false);
@@ -4095,18 +4103,23 @@ function WithdrawView({
4095
4103
  tokenId: selectedToken?.id,
4096
4104
  enabled: !!selectedToken
4097
4105
  });
4098
- const formattedBalance = selectedToken ? chunkFGWMLLEC_cjs.formatTokenAmount(balanceWei, selectedToken.decimals) : "0.00";
4106
+ const formattedBalance = selectedToken ? chunkTNR7AA52_cjs.formatTokenAmount(balanceWei, selectedToken.decimals) : "0.00";
4099
4107
  const { withdraw, isPending, currentStep, error, reset } = useWithdraw({
4100
4108
  onProcessingSuccess: () => {
4101
4109
  onAmountChange("");
4102
- setShowSuccess(true);
4110
+ if (onWithdrawSuccess) {
4111
+ reset();
4112
+ onWithdrawSuccess();
4113
+ } else {
4114
+ setShowSuccess(true);
4115
+ }
4103
4116
  },
4104
4117
  onProcessingTimeout: () => {
4105
4118
  onAmountChange("");
4106
4119
  setShowTimeout(true);
4107
4120
  }
4108
4121
  });
4109
- const explorerUrl = address && targetChain ? chunkFGWMLLEC_cjs.getExplorerAddressUrl(targetChain.id, address) : void 0;
4122
+ const explorerUrl = address && targetChain ? chunkTNR7AA52_cjs.getExplorerAddressUrl(targetChain.id, address) : void 0;
4110
4123
  const getStepStatus = (step, after) => {
4111
4124
  if (currentStep === step) return "active";
4112
4125
  if (after.includes(currentStep)) return "completed";
@@ -4131,7 +4144,7 @@ function WithdrawView({
4131
4144
  }, [isPending, cancelled, onPendingChange]);
4132
4145
  const hasValidAmount = !!amount && parseFloat(amount) > 0;
4133
4146
  const tooManyDecimals = !!hasValidAmount && !!selectedToken && amount.includes(".") && amount.split(".")[1].length > selectedToken.decimals;
4134
- const exceedsBalance = !!hasValidAmount && !tooManyDecimals && !!selectedToken && !isBalanceLoading && !isBalanceError && chunkFGWMLLEC_cjs.parseTokenAmount(amount, selectedToken.decimals) > BigInt(balanceWei);
4147
+ const exceedsBalance = !!hasValidAmount && !tooManyDecimals && !!selectedToken && !isBalanceLoading && !isBalanceError && chunkTNR7AA52_cjs.parseTokenAmount(amount, selectedToken.decimals) > BigInt(balanceWei);
4135
4148
  const canWithdraw = isConnected && hasValidAmount && !!selectedToken && !tooManyDecimals && !exceedsBalance;
4136
4149
  const handleMax = () => {
4137
4150
  if (!selectedToken) return;
@@ -4143,7 +4156,7 @@ function WithdrawView({
4143
4156
  setCancelled(false);
4144
4157
  await withdraw({
4145
4158
  tokenId: selectedToken.id,
4146
- amount: chunkFGWMLLEC_cjs.parseTokenAmount(amount, selectedToken.decimals)
4159
+ amount: chunkTNR7AA52_cjs.parseTokenAmount(amount, selectedToken.decimals)
4147
4160
  });
4148
4161
  };
4149
4162
  const handleCancel = () => {
@@ -4163,7 +4176,7 @@ function WithdrawView({
4163
4176
  title: "Withdrawal Complete",
4164
4177
  message: `Your ${selectedToken.symbol} withdrawal has been processed. Funds should appear in your wallet shortly.`,
4165
4178
  explorerUrl,
4166
- explorerLabel: targetChain ? chunkFGWMLLEC_cjs.getExplorerLabel(targetChain.id) : void 0,
4179
+ explorerLabel: targetChain ? chunkTNR7AA52_cjs.getExplorerLabel(targetChain.id) : void 0,
4167
4180
  onDone: handleDone
4168
4181
  }
4169
4182
  ) });
@@ -4272,9 +4285,10 @@ function WithdrawView({
4272
4285
  function WithdrawModalContent({
4273
4286
  onClose,
4274
4287
  onPendingChange,
4275
- onBack
4288
+ onBack,
4289
+ onWithdrawSuccess
4276
4290
  }) {
4277
- const { serviceName, enabledTokens, defaultToken, hostedAuthConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
4291
+ const { serviceName, enabledTokens, defaultToken, hostedAuthConfig } = chunkTNR7AA52_cjs.usePrivanaContext();
4278
4292
  const { address } = wagmi.useAccount();
4279
4293
  const appName = serviceName ?? "Privana";
4280
4294
  const [view, setView] = react.useState("form");
@@ -4338,7 +4352,8 @@ function WithdrawModalContent({
4338
4352
  amount,
4339
4353
  onAmountChange: setAmount,
4340
4354
  onSelectToken: () => setView("select-token"),
4341
- onPendingChange: handlePendingChange
4355
+ onPendingChange: handlePendingChange,
4356
+ onWithdrawSuccess
4342
4357
  }
4343
4358
  ),
4344
4359
  view === "select-token" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -4353,7 +4368,7 @@ function WithdrawModalContent({
4353
4368
  )
4354
4369
  ] });
4355
4370
  }
4356
- function WithdrawModal({ open, onClose }) {
4371
+ function WithdrawModal({ open, onClose, onWithdrawSuccess }) {
4357
4372
  const titleId = react.useId();
4358
4373
  const descId = react.useId();
4359
4374
  const [isCloseBlocked, setIsCloseBlocked] = react.useState(false);
@@ -4380,23 +4395,30 @@ function WithdrawModal({ open, onClose }) {
4380
4395
  children: [
4381
4396
  /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { id: titleId, className: "sr-only", children: "Withdraw" }),
4382
4397
  /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { id: descId, className: "sr-only", children: "Withdraw funds from your account." }),
4383
- /* @__PURE__ */ jsxRuntime.jsx(WithdrawModalContent, { onClose: handleClose, onPendingChange: setIsCloseBlocked })
4398
+ /* @__PURE__ */ jsxRuntime.jsx(
4399
+ WithdrawModalContent,
4400
+ {
4401
+ onClose: handleClose,
4402
+ onPendingChange: setIsCloseBlocked,
4403
+ onWithdrawSuccess
4404
+ }
4405
+ )
4384
4406
  ]
4385
4407
  }
4386
4408
  )
4387
4409
  }
4388
4410
  );
4389
4411
  }
4390
- function WithdrawInlineModal({ className }) {
4412
+ function WithdrawInlineModal({ className, onWithdrawSuccess }) {
4391
4413
  return /* @__PURE__ */ jsxRuntime.jsx(
4392
4414
  "div",
4393
4415
  {
4394
4416
  "data-privana": true,
4395
- className: chunkFGWMLLEC_cjs.cn(
4417
+ className: chunkTNR7AA52_cjs.cn(
4396
4418
  "bg-card relative flex w-[560px] max-w-full flex-col gap-2 overflow-hidden rounded-2xl p-2 shadow-lg",
4397
4419
  className
4398
4420
  ),
4399
- children: /* @__PURE__ */ jsxRuntime.jsx(WithdrawModalContent, {})
4421
+ children: /* @__PURE__ */ jsxRuntime.jsx(WithdrawModalContent, { onWithdrawSuccess })
4400
4422
  }
4401
4423
  );
4402
4424
  }
@@ -4436,14 +4458,14 @@ function SegmentedBalanceBar({
4436
4458
  showAvailable && /* @__PURE__ */ jsxRuntime.jsx(
4437
4459
  "div",
4438
4460
  {
4439
- className: chunkFGWMLLEC_cjs.cn(AVAILABLE_COLOR, "rounded-l-full", !showInUse && "rounded-r-full"),
4461
+ className: chunkTNR7AA52_cjs.cn(AVAILABLE_COLOR, "rounded-l-full", !showInUse && "rounded-r-full"),
4440
4462
  style: { flexGrow: grow(availableWei) }
4441
4463
  }
4442
4464
  ),
4443
4465
  showInUse && /* @__PURE__ */ jsxRuntime.jsx(
4444
4466
  "div",
4445
4467
  {
4446
- className: chunkFGWMLLEC_cjs.cn(IN_USE_COLOR, "rounded-r-full", !showAvailable && "rounded-l-full"),
4468
+ className: chunkTNR7AA52_cjs.cn(IN_USE_COLOR, "rounded-r-full", !showAvailable && "rounded-l-full"),
4447
4469
  style: { flexGrow: grow(inUseWei) }
4448
4470
  }
4449
4471
  )
@@ -4451,7 +4473,7 @@ function SegmentedBalanceBar({
4451
4473
  }
4452
4474
  function BalanceLegendItem({ color, label }) {
4453
4475
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
4454
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkFGWMLLEC_cjs.cn("h-2.5 w-2.5 rounded-full", color) }),
4476
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkTNR7AA52_cjs.cn("h-2.5 w-2.5 rounded-full", color) }),
4455
4477
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground text-sm leading-5", children: label })
4456
4478
  ] });
4457
4479
  }
@@ -4464,7 +4486,7 @@ function WalletBalanceView({
4464
4486
  onAddFunds,
4465
4487
  onWithdraw
4466
4488
  }) {
4467
- const { serviceName, serviceIcon, defaultToken } = chunkFGWMLLEC_cjs.usePrivanaContext();
4489
+ const { serviceName, serviceIcon, defaultToken } = chunkTNR7AA52_cjs.usePrivanaContext();
4468
4490
  const appName = serviceName ?? "Privana";
4469
4491
  const token = defaultToken;
4470
4492
  const {
@@ -4477,14 +4499,14 @@ function WalletBalanceView({
4477
4499
  const variant = !session ? "idle" : inUseWei === 0n ? "session-zero" : availableWei === 0n ? "fully-in-use" : "mixed";
4478
4500
  const expiry = session?.expiry;
4479
4501
  useNow(3e4, expiry != null);
4480
- const countdown = expiry != null ? chunkFGWMLLEC_cjs.formatTimeRemaining(expiry) : null;
4502
+ const countdown = expiry != null ? chunkTNR7AA52_cjs.formatTimeRemaining(expiry) : null;
4481
4503
  const decimals = token?.decimals ?? 18;
4482
- const totalFormatted = chunkFGWMLLEC_cjs.formatTokenAmount((availableWei + inUseWei).toString(), decimals);
4483
- const availableFormatted = chunkFGWMLLEC_cjs.formatTokenAmount(availableWei.toString(), decimals);
4484
- const inUseFormatted = chunkFGWMLLEC_cjs.formatTokenAmount(inUseWei.toString(), decimals);
4504
+ const totalFormatted = chunkTNR7AA52_cjs.formatTokenAmount((availableWei + inUseWei).toString(), decimals);
4505
+ const availableFormatted = chunkTNR7AA52_cjs.formatTokenAmount(availableWei.toString(), decimals);
4506
+ const inUseFormatted = chunkTNR7AA52_cjs.formatTokenAmount(inUseWei.toString(), decimals);
4485
4507
  const hasValidAmount = !!amount && parseFloat(amount) > 0;
4486
4508
  const tooManyDecimals = hasValidAmount && !!token && amount.includes(".") && amount.split(".")[1].length > token.decimals;
4487
- const exceedsBalance = hasValidAmount && !tooManyDecimals && !!token && !isBalanceLoading && !isBalanceError && chunkFGWMLLEC_cjs.parseTokenAmount(amount, token.decimals) > availableWei;
4509
+ const exceedsBalance = hasValidAmount && !tooManyDecimals && !!token && !isBalanceLoading && !isBalanceError && chunkTNR7AA52_cjs.parseTokenAmount(amount, token.decimals) > availableWei;
4488
4510
  const canFundSession = hasValidAmount && !!token && !tooManyDecimals && !exceedsBalance && !isBalanceLoading && !isBalanceError;
4489
4511
  const handleMax = () => {
4490
4512
  const max = availableFormatted.replace(/\s/g, "");
@@ -4502,7 +4524,7 @@ function WalletBalanceView({
4502
4524
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-sm leading-[14px]", children: "Total" }),
4503
4525
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-secondary text-muted-foreground rounded-full px-2 py-[5px] text-[10px] leading-[10px] font-bold", children: token?.symbol ?? "\u2014" })
4504
4526
  ] }),
4505
- isBalanceLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkFGWMLLEC_cjs.Skeleton, { className: "h-9 w-40" }) : isBalanceError ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-[32px] leading-9 font-medium", children: "\u2014" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground text-[32px] leading-9 font-medium", children: totalFormatted })
4527
+ isBalanceLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTNR7AA52_cjs.Skeleton, { className: "h-9 w-40" }) : isBalanceError ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-[32px] leading-9 font-medium", children: "\u2014" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground text-[32px] leading-9 font-medium", children: totalFormatted })
4506
4528
  ] }),
4507
4529
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
4508
4530
  /* @__PURE__ */ jsxRuntime.jsx(SegmentedBalanceBar, { availableWei, inUseWei }),
@@ -4648,11 +4670,12 @@ function WalletModalContent({
4648
4670
  onFundSession,
4649
4671
  onEndSession,
4650
4672
  onDepositSuccess,
4673
+ onWithdrawSuccess,
4651
4674
  onClose,
4652
4675
  onCloseBlockedChange,
4653
4676
  ...depositHandlers
4654
4677
  }) {
4655
- const { serviceName, hostedAuthConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
4678
+ const { serviceName, hostedAuthConfig } = chunkTNR7AA52_cjs.usePrivanaContext();
4656
4679
  const { address } = wagmi.useAccount();
4657
4680
  const appName = serviceName ?? "Privana";
4658
4681
  const [view, setView] = react.useState("balance");
@@ -4756,7 +4779,7 @@ function WalletModalContent({
4756
4779
  onClick: onClose,
4757
4780
  disabled: closeBlocked,
4758
4781
  "aria-label": "Close",
4759
- className: chunkFGWMLLEC_cjs.cn(
4782
+ className: chunkTNR7AA52_cjs.cn(
4760
4783
  "absolute top-6 right-5 z-20 flex h-5 w-5 items-center justify-center transition-colors",
4761
4784
  closeBlocked ? "text-muted-foreground/40 cursor-not-allowed" : "text-muted-foreground hover:text-foreground cursor-pointer"
4762
4785
  ),
@@ -4812,7 +4835,17 @@ function WalletModalContent({
4812
4835
  retryLabel: "Try again"
4813
4836
  }
4814
4837
  ) }),
4815
- view === "withdraw" && /* @__PURE__ */ jsxRuntime.jsx(WithdrawModalContent, { onBack: exitWithdraw, onPendingChange: setWithdrawPending }),
4838
+ view === "withdraw" && /* @__PURE__ */ jsxRuntime.jsx(
4839
+ WithdrawModalContent,
4840
+ {
4841
+ onBack: exitWithdraw,
4842
+ onPendingChange: setWithdrawPending,
4843
+ onWithdrawSuccess: () => {
4844
+ exitWithdraw();
4845
+ onWithdrawSuccess?.();
4846
+ }
4847
+ }
4848
+ ),
4816
4849
  view === "deposit" && /* @__PURE__ */ jsxRuntime.jsx(
4817
4850
  DepositModalContent,
4818
4851
  {
@@ -4874,7 +4907,7 @@ function WalletInlineModal({ className, ...handlers }) {
4874
4907
  "div",
4875
4908
  {
4876
4909
  "data-privana": true,
4877
- className: chunkFGWMLLEC_cjs.cn(
4910
+ className: chunkTNR7AA52_cjs.cn(
4878
4911
  "bg-card relative flex w-[560px] max-w-full flex-col gap-2 overflow-hidden rounded-2xl p-2 shadow-lg",
4879
4912
  className
4880
4913
  ),
@@ -4885,295 +4918,295 @@ function WalletInlineModal({ className, ...handlers }) {
4885
4918
 
4886
4919
  Object.defineProperty(exports, "AccountingApiError", {
4887
4920
  enumerable: true,
4888
- get: function () { return chunkFGWMLLEC_cjs.AccountingApiError; }
4921
+ get: function () { return chunkTNR7AA52_cjs.AccountingApiError; }
4889
4922
  });
4890
4923
  Object.defineProperty(exports, "Button", {
4891
4924
  enumerable: true,
4892
- get: function () { return chunkFGWMLLEC_cjs.Button; }
4925
+ get: function () { return chunkTNR7AA52_cjs.Button; }
4893
4926
  });
4894
4927
  Object.defineProperty(exports, "DEFAULT_LOCK_DURATION_SECONDS", {
4895
4928
  enumerable: true,
4896
- get: function () { return chunkFGWMLLEC_cjs.DEFAULT_LOCK_DURATION_SECONDS; }
4929
+ get: function () { return chunkTNR7AA52_cjs.DEFAULT_LOCK_DURATION_SECONDS; }
4897
4930
  });
4898
4931
  Object.defineProperty(exports, "DEFAULT_ONRAMP_LOCK_BUFFER", {
4899
4932
  enumerable: true,
4900
- get: function () { return chunkFGWMLLEC_cjs.DEFAULT_ONRAMP_LOCK_BUFFER; }
4933
+ get: function () { return chunkTNR7AA52_cjs.DEFAULT_ONRAMP_LOCK_BUFFER; }
4901
4934
  });
4902
4935
  Object.defineProperty(exports, "HOSTED_AUTH_CLOCK_SKEW_MS", {
4903
4936
  enumerable: true,
4904
- get: function () { return chunkFGWMLLEC_cjs.HOSTED_AUTH_CLOCK_SKEW_MS; }
4937
+ get: function () { return chunkTNR7AA52_cjs.HOSTED_AUTH_CLOCK_SKEW_MS; }
4905
4938
  });
4906
4939
  Object.defineProperty(exports, "HostedAuthError", {
4907
4940
  enumerable: true,
4908
- get: function () { return chunkFGWMLLEC_cjs.HostedAuthError; }
4941
+ get: function () { return chunkTNR7AA52_cjs.HostedAuthError; }
4909
4942
  });
4910
4943
  Object.defineProperty(exports, "HostedAuthRequiredError", {
4911
4944
  enumerable: true,
4912
- get: function () { return chunkFGWMLLEC_cjs.HostedAuthRequiredError; }
4945
+ get: function () { return chunkTNR7AA52_cjs.HostedAuthRequiredError; }
4913
4946
  });
4914
4947
  Object.defineProperty(exports, "HostedAuthStateMismatchError", {
4915
4948
  enumerable: true,
4916
- get: function () { return chunkFGWMLLEC_cjs.HostedAuthStateMismatchError; }
4949
+ get: function () { return chunkTNR7AA52_cjs.HostedAuthStateMismatchError; }
4917
4950
  });
4918
4951
  Object.defineProperty(exports, "HttpClient", {
4919
4952
  enumerable: true,
4920
- get: function () { return chunkFGWMLLEC_cjs.HttpClient; }
4953
+ get: function () { return chunkTNR7AA52_cjs.HttpClient; }
4921
4954
  });
4922
4955
  Object.defineProperty(exports, "LOCK_TYPES", {
4923
4956
  enumerable: true,
4924
- get: function () { return chunkFGWMLLEC_cjs.LOCK_TYPES; }
4957
+ get: function () { return chunkTNR7AA52_cjs.LOCK_TYPES; }
4925
4958
  });
4926
4959
  Object.defineProperty(exports, "MODIFY_LOCK_TYPES", {
4927
4960
  enumerable: true,
4928
- get: function () { return chunkFGWMLLEC_cjs.MODIFY_LOCK_TYPES; }
4961
+ get: function () { return chunkTNR7AA52_cjs.MODIFY_LOCK_TYPES; }
4929
4962
  });
4930
4963
  Object.defineProperty(exports, "NETWORK_CONFIG", {
4931
4964
  enumerable: true,
4932
- get: function () { return chunkFGWMLLEC_cjs.NETWORK_CONFIG; }
4965
+ get: function () { return chunkTNR7AA52_cjs.NETWORK_CONFIG; }
4933
4966
  });
4934
4967
  Object.defineProperty(exports, "NetworkError", {
4935
4968
  enumerable: true,
4936
- get: function () { return chunkFGWMLLEC_cjs.NetworkError; }
4969
+ get: function () { return chunkTNR7AA52_cjs.NetworkError; }
4937
4970
  });
4938
4971
  Object.defineProperty(exports, "PostDepositLockError", {
4939
4972
  enumerable: true,
4940
- get: function () { return chunkFGWMLLEC_cjs.PostDepositLockError; }
4973
+ get: function () { return chunkTNR7AA52_cjs.PostDepositLockError; }
4941
4974
  });
4942
4975
  Object.defineProperty(exports, "PrivanaClient", {
4943
4976
  enumerable: true,
4944
- get: function () { return chunkFGWMLLEC_cjs.PrivanaClient; }
4977
+ get: function () { return chunkTNR7AA52_cjs.PrivanaClient; }
4945
4978
  });
4946
4979
  Object.defineProperty(exports, "PrivanaProvider", {
4947
4980
  enumerable: true,
4948
- get: function () { return chunkFGWMLLEC_cjs.PrivanaProvider; }
4981
+ get: function () { return chunkTNR7AA52_cjs.PrivanaProvider; }
4949
4982
  });
4950
4983
  Object.defineProperty(exports, "SUPPORTED_CHAINS", {
4951
4984
  enumerable: true,
4952
- get: function () { return chunkFGWMLLEC_cjs.SUPPORTED_CHAINS; }
4985
+ get: function () { return chunkTNR7AA52_cjs.SUPPORTED_CHAINS; }
4953
4986
  });
4954
4987
  Object.defineProperty(exports, "SiweAuthProvider", {
4955
4988
  enumerable: true,
4956
- get: function () { return chunkFGWMLLEC_cjs.SiweAuthProvider; }
4989
+ get: function () { return chunkTNR7AA52_cjs.SiweAuthProvider; }
4957
4990
  });
4958
4991
  Object.defineProperty(exports, "Skeleton", {
4959
4992
  enumerable: true,
4960
- get: function () { return chunkFGWMLLEC_cjs.Skeleton; }
4993
+ get: function () { return chunkTNR7AA52_cjs.Skeleton; }
4961
4994
  });
4962
4995
  Object.defineProperty(exports, "TRANSFER_LOCKED_TYPES", {
4963
4996
  enumerable: true,
4964
- get: function () { return chunkFGWMLLEC_cjs.TRANSFER_LOCKED_TYPES; }
4997
+ get: function () { return chunkTNR7AA52_cjs.TRANSFER_LOCKED_TYPES; }
4965
4998
  });
4966
4999
  Object.defineProperty(exports, "TRANSFER_TYPES", {
4967
5000
  enumerable: true,
4968
- get: function () { return chunkFGWMLLEC_cjs.TRANSFER_TYPES; }
5001
+ get: function () { return chunkTNR7AA52_cjs.TRANSFER_TYPES; }
4969
5002
  });
4970
5003
  Object.defineProperty(exports, "ValidationError", {
4971
5004
  enumerable: true,
4972
- get: function () { return chunkFGWMLLEC_cjs.ValidationError; }
5005
+ get: function () { return chunkTNR7AA52_cjs.ValidationError; }
4973
5006
  });
4974
5007
  Object.defineProperty(exports, "WITHDRAW_FROM_LOCK_TYPES", {
4975
5008
  enumerable: true,
4976
- get: function () { return chunkFGWMLLEC_cjs.WITHDRAW_FROM_LOCK_TYPES; }
5009
+ get: function () { return chunkTNR7AA52_cjs.WITHDRAW_FROM_LOCK_TYPES; }
4977
5010
  });
4978
5011
  Object.defineProperty(exports, "WITHDRAW_TYPES", {
4979
5012
  enumerable: true,
4980
- get: function () { return chunkFGWMLLEC_cjs.WITHDRAW_TYPES; }
5013
+ get: function () { return chunkTNR7AA52_cjs.WITHDRAW_TYPES; }
4981
5014
  });
4982
5015
  Object.defineProperty(exports, "applyLockBuffer", {
4983
5016
  enumerable: true,
4984
- get: function () { return chunkFGWMLLEC_cjs.applyLockBuffer; }
5017
+ get: function () { return chunkTNR7AA52_cjs.applyLockBuffer; }
4985
5018
  });
4986
5019
  Object.defineProperty(exports, "applyRefreshResponse", {
4987
5020
  enumerable: true,
4988
- get: function () { return chunkFGWMLLEC_cjs.applyRefreshResponse; }
5021
+ get: function () { return chunkTNR7AA52_cjs.applyRefreshResponse; }
4989
5022
  });
4990
5023
  Object.defineProperty(exports, "buildHostedAuthSession", {
4991
5024
  enumerable: true,
4992
- get: function () { return chunkFGWMLLEC_cjs.buildHostedAuthSession; }
5025
+ get: function () { return chunkTNR7AA52_cjs.buildHostedAuthSession; }
4993
5026
  });
4994
5027
  Object.defineProperty(exports, "buildSiweStatement", {
4995
5028
  enumerable: true,
4996
- get: function () { return chunkFGWMLLEC_cjs.buildSiweStatement; }
5029
+ get: function () { return chunkTNR7AA52_cjs.buildSiweStatement; }
4997
5030
  });
4998
5031
  Object.defineProperty(exports, "buttonVariants", {
4999
5032
  enumerable: true,
5000
- get: function () { return chunkFGWMLLEC_cjs.buttonVariants; }
5033
+ get: function () { return chunkTNR7AA52_cjs.buttonVariants; }
5001
5034
  });
5002
5035
  Object.defineProperty(exports, "clampLockAmount", {
5003
5036
  enumerable: true,
5004
- get: function () { return chunkFGWMLLEC_cjs.clampLockAmount; }
5037
+ get: function () { return chunkTNR7AA52_cjs.clampLockAmount; }
5005
5038
  });
5006
5039
  Object.defineProperty(exports, "clearHostedAuthPendingTransaction", {
5007
5040
  enumerable: true,
5008
- get: function () { return chunkFGWMLLEC_cjs.clearHostedAuthPendingTransaction; }
5041
+ get: function () { return chunkTNR7AA52_cjs.clearHostedAuthPendingTransaction; }
5009
5042
  });
5010
5043
  Object.defineProperty(exports, "clearPendingLock", {
5011
5044
  enumerable: true,
5012
- get: function () { return chunkFGWMLLEC_cjs.clearPendingLock; }
5045
+ get: function () { return chunkTNR7AA52_cjs.clearPendingLock; }
5013
5046
  });
5014
5047
  Object.defineProperty(exports, "createDomain", {
5015
5048
  enumerable: true,
5016
- get: function () { return chunkFGWMLLEC_cjs.createDomain; }
5049
+ get: function () { return chunkTNR7AA52_cjs.createDomain; }
5017
5050
  });
5018
5051
  Object.defineProperty(exports, "createHostedAuthPendingStorageKey", {
5019
5052
  enumerable: true,
5020
- get: function () { return chunkFGWMLLEC_cjs.createHostedAuthPendingStorageKey; }
5053
+ get: function () { return chunkTNR7AA52_cjs.createHostedAuthPendingStorageKey; }
5021
5054
  });
5022
5055
  Object.defineProperty(exports, "createHostedAuthState", {
5023
5056
  enumerable: true,
5024
- get: function () { return chunkFGWMLLEC_cjs.createHostedAuthState; }
5057
+ get: function () { return chunkTNR7AA52_cjs.createHostedAuthState; }
5025
5058
  });
5026
5059
  Object.defineProperty(exports, "createHostedAuthStorageKey", {
5027
5060
  enumerable: true,
5028
- get: function () { return chunkFGWMLLEC_cjs.createHostedAuthStorageKey; }
5061
+ get: function () { return chunkTNR7AA52_cjs.createHostedAuthStorageKey; }
5029
5062
  });
5030
5063
  Object.defineProperty(exports, "createLockExpiry", {
5031
5064
  enumerable: true,
5032
- get: function () { return chunkFGWMLLEC_cjs.createLockExpiry; }
5065
+ get: function () { return chunkTNR7AA52_cjs.createLockExpiry; }
5033
5066
  });
5034
5067
  Object.defineProperty(exports, "createPkceChallenge", {
5035
5068
  enumerable: true,
5036
- get: function () { return chunkFGWMLLEC_cjs.createPkceChallenge; }
5069
+ get: function () { return chunkTNR7AA52_cjs.createPkceChallenge; }
5037
5070
  });
5038
5071
  Object.defineProperty(exports, "createPkceVerifier", {
5039
5072
  enumerable: true,
5040
- get: function () { return chunkFGWMLLEC_cjs.createPkceVerifier; }
5073
+ get: function () { return chunkTNR7AA52_cjs.createPkceVerifier; }
5041
5074
  });
5042
5075
  Object.defineProperty(exports, "createSignedLockRequest", {
5043
5076
  enumerable: true,
5044
- get: function () { return chunkFGWMLLEC_cjs.createSignedLockRequest; }
5077
+ get: function () { return chunkTNR7AA52_cjs.createSignedLockRequest; }
5045
5078
  });
5046
5079
  Object.defineProperty(exports, "getAccountingContract", {
5047
5080
  enumerable: true,
5048
- get: function () { return chunkFGWMLLEC_cjs.getAccountingContract; }
5081
+ get: function () { return chunkTNR7AA52_cjs.getAccountingContract; }
5049
5082
  });
5050
5083
  Object.defineProperty(exports, "getApiUrl", {
5051
5084
  enumerable: true,
5052
- get: function () { return chunkFGWMLLEC_cjs.getApiUrl; }
5085
+ get: function () { return chunkTNR7AA52_cjs.getApiUrl; }
5053
5086
  });
5054
5087
  Object.defineProperty(exports, "getChainById", {
5055
5088
  enumerable: true,
5056
- get: function () { return chunkFGWMLLEC_cjs.getChainById; }
5089
+ get: function () { return chunkTNR7AA52_cjs.getChainById; }
5057
5090
  });
5058
5091
  Object.defineProperty(exports, "getChainId", {
5059
5092
  enumerable: true,
5060
- get: function () { return chunkFGWMLLEC_cjs.getChainId; }
5093
+ get: function () { return chunkTNR7AA52_cjs.getChainId; }
5061
5094
  });
5062
5095
  Object.defineProperty(exports, "getExplorerAddressUrl", {
5063
5096
  enumerable: true,
5064
- get: function () { return chunkFGWMLLEC_cjs.getExplorerAddressUrl; }
5097
+ get: function () { return chunkTNR7AA52_cjs.getExplorerAddressUrl; }
5065
5098
  });
5066
5099
  Object.defineProperty(exports, "getExplorerLabel", {
5067
5100
  enumerable: true,
5068
- get: function () { return chunkFGWMLLEC_cjs.getExplorerLabel; }
5101
+ get: function () { return chunkTNR7AA52_cjs.getExplorerLabel; }
5069
5102
  });
5070
5103
  Object.defineProperty(exports, "isHostedAuthRefreshActive", {
5071
5104
  enumerable: true,
5072
- get: function () { return chunkFGWMLLEC_cjs.isHostedAuthRefreshActive; }
5105
+ get: function () { return chunkTNR7AA52_cjs.isHostedAuthRefreshActive; }
5073
5106
  });
5074
5107
  Object.defineProperty(exports, "isHostedAuthSessionActive", {
5075
5108
  enumerable: true,
5076
- get: function () { return chunkFGWMLLEC_cjs.isHostedAuthSessionActive; }
5109
+ get: function () { return chunkTNR7AA52_cjs.isHostedAuthSessionActive; }
5077
5110
  });
5078
5111
  Object.defineProperty(exports, "isSignedLockUsable", {
5079
5112
  enumerable: true,
5080
- get: function () { return chunkFGWMLLEC_cjs.isSignedLockUsable; }
5113
+ get: function () { return chunkTNR7AA52_cjs.isSignedLockUsable; }
5081
5114
  });
5082
5115
  Object.defineProperty(exports, "loadPendingLock", {
5083
5116
  enumerable: true,
5084
- get: function () { return chunkFGWMLLEC_cjs.loadPendingLock; }
5117
+ get: function () { return chunkTNR7AA52_cjs.loadPendingLock; }
5085
5118
  });
5086
5119
  Object.defineProperty(exports, "normalizeAddress", {
5087
5120
  enumerable: true,
5088
- get: function () { return chunkFGWMLLEC_cjs.normalizeAddress; }
5121
+ get: function () { return chunkTNR7AA52_cjs.normalizeAddress; }
5089
5122
  });
5090
5123
  Object.defineProperty(exports, "normalizeHex", {
5091
5124
  enumerable: true,
5092
- get: function () { return chunkFGWMLLEC_cjs.normalizeHex; }
5125
+ get: function () { return chunkTNR7AA52_cjs.normalizeHex; }
5093
5126
  });
5094
5127
  Object.defineProperty(exports, "parseHostedAuthCallback", {
5095
5128
  enumerable: true,
5096
- get: function () { return chunkFGWMLLEC_cjs.parseHostedAuthCallback; }
5129
+ get: function () { return chunkTNR7AA52_cjs.parseHostedAuthCallback; }
5097
5130
  });
5098
5131
  Object.defineProperty(exports, "persistHostedAuthPendingTransaction", {
5099
5132
  enumerable: true,
5100
- get: function () { return chunkFGWMLLEC_cjs.persistHostedAuthPendingTransaction; }
5133
+ get: function () { return chunkTNR7AA52_cjs.persistHostedAuthPendingTransaction; }
5101
5134
  });
5102
5135
  Object.defineProperty(exports, "readHostedAuthPendingTransaction", {
5103
5136
  enumerable: true,
5104
- get: function () { return chunkFGWMLLEC_cjs.readHostedAuthPendingTransaction; }
5137
+ get: function () { return chunkTNR7AA52_cjs.readHostedAuthPendingTransaction; }
5105
5138
  });
5106
5139
  Object.defineProperty(exports, "readStoredHostedAuthSession", {
5107
5140
  enumerable: true,
5108
- get: function () { return chunkFGWMLLEC_cjs.readStoredHostedAuthSession; }
5141
+ get: function () { return chunkTNR7AA52_cjs.readStoredHostedAuthSession; }
5109
5142
  });
5110
5143
  Object.defineProperty(exports, "requireDepositLockOwner", {
5111
5144
  enumerable: true,
5112
- get: function () { return chunkFGWMLLEC_cjs.requireDepositLockOwner; }
5145
+ get: function () { return chunkTNR7AA52_cjs.requireDepositLockOwner; }
5113
5146
  });
5114
5147
  Object.defineProperty(exports, "requireServiceAddress", {
5115
5148
  enumerable: true,
5116
- get: function () { return chunkFGWMLLEC_cjs.requireServiceAddress; }
5149
+ get: function () { return chunkTNR7AA52_cjs.requireServiceAddress; }
5117
5150
  });
5118
5151
  Object.defineProperty(exports, "savePendingLock", {
5119
5152
  enumerable: true,
5120
- get: function () { return chunkFGWMLLEC_cjs.savePendingLock; }
5153
+ get: function () { return chunkTNR7AA52_cjs.savePendingLock; }
5121
5154
  });
5122
5155
  Object.defineProperty(exports, "signLockMessage", {
5123
5156
  enumerable: true,
5124
- get: function () { return chunkFGWMLLEC_cjs.signLockMessage; }
5157
+ get: function () { return chunkTNR7AA52_cjs.signLockMessage; }
5125
5158
  });
5126
5159
  Object.defineProperty(exports, "signModifyLockMessage", {
5127
5160
  enumerable: true,
5128
- get: function () { return chunkFGWMLLEC_cjs.signModifyLockMessage; }
5161
+ get: function () { return chunkTNR7AA52_cjs.signModifyLockMessage; }
5129
5162
  });
5130
5163
  Object.defineProperty(exports, "signTransferLockedMessage", {
5131
5164
  enumerable: true,
5132
- get: function () { return chunkFGWMLLEC_cjs.signTransferLockedMessage; }
5165
+ get: function () { return chunkTNR7AA52_cjs.signTransferLockedMessage; }
5133
5166
  });
5134
5167
  Object.defineProperty(exports, "signTransferMessage", {
5135
5168
  enumerable: true,
5136
- get: function () { return chunkFGWMLLEC_cjs.signTransferMessage; }
5169
+ get: function () { return chunkTNR7AA52_cjs.signTransferMessage; }
5137
5170
  });
5138
5171
  Object.defineProperty(exports, "signWithdrawFromLockMessage", {
5139
5172
  enumerable: true,
5140
- get: function () { return chunkFGWMLLEC_cjs.signWithdrawFromLockMessage; }
5173
+ get: function () { return chunkTNR7AA52_cjs.signWithdrawFromLockMessage; }
5141
5174
  });
5142
5175
  Object.defineProperty(exports, "signWithdrawMessage", {
5143
5176
  enumerable: true,
5144
- get: function () { return chunkFGWMLLEC_cjs.signWithdrawMessage; }
5177
+ get: function () { return chunkTNR7AA52_cjs.signWithdrawMessage; }
5145
5178
  });
5146
5179
  Object.defineProperty(exports, "stripHostedAuthCallbackParams", {
5147
5180
  enumerable: true,
5148
- get: function () { return chunkFGWMLLEC_cjs.stripHostedAuthCallbackParams; }
5181
+ get: function () { return chunkTNR7AA52_cjs.stripHostedAuthCallbackParams; }
5149
5182
  });
5150
5183
  Object.defineProperty(exports, "submitPendingLock", {
5151
5184
  enumerable: true,
5152
- get: function () { return chunkFGWMLLEC_cjs.submitPendingLock; }
5185
+ get: function () { return chunkTNR7AA52_cjs.submitPendingLock; }
5153
5186
  });
5154
5187
  Object.defineProperty(exports, "syncHostedAuthSessionToClient", {
5155
5188
  enumerable: true,
5156
- get: function () { return chunkFGWMLLEC_cjs.syncHostedAuthSessionToClient; }
5189
+ get: function () { return chunkTNR7AA52_cjs.syncHostedAuthSessionToClient; }
5157
5190
  });
5158
5191
  Object.defineProperty(exports, "useDepositVerification", {
5159
5192
  enumerable: true,
5160
- get: function () { return chunkFGWMLLEC_cjs.useDepositVerification; }
5193
+ get: function () { return chunkTNR7AA52_cjs.useDepositVerification; }
5161
5194
  });
5162
5195
  Object.defineProperty(exports, "usePrivanaContext", {
5163
5196
  enumerable: true,
5164
- get: function () { return chunkFGWMLLEC_cjs.usePrivanaContext; }
5197
+ get: function () { return chunkTNR7AA52_cjs.usePrivanaContext; }
5165
5198
  });
5166
5199
  Object.defineProperty(exports, "useSafeAccount", {
5167
5200
  enumerable: true,
5168
- get: function () { return chunkFGWMLLEC_cjs.useSafeAccount; }
5201
+ get: function () { return chunkTNR7AA52_cjs.useSafeAccount; }
5169
5202
  });
5170
5203
  Object.defineProperty(exports, "useSafePrivanaContext", {
5171
5204
  enumerable: true,
5172
- get: function () { return chunkFGWMLLEC_cjs.useSafePrivanaContext; }
5205
+ get: function () { return chunkTNR7AA52_cjs.useSafePrivanaContext; }
5173
5206
  });
5174
5207
  Object.defineProperty(exports, "useSiweAuth", {
5175
5208
  enumerable: true,
5176
- get: function () { return chunkFGWMLLEC_cjs.useSiweAuth; }
5209
+ get: function () { return chunkTNR7AA52_cjs.useSiweAuth; }
5177
5210
  });
5178
5211
  exports.DepositInlineModal = DepositInlineModal;
5179
5212
  exports.DepositModal = DepositModal;