@oasisprotocol/privana-sdk 0.5.4 → 0.5.5

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 chunk7VNAGKRC_cjs = require('./chunk-7VNAGKRC.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 } = chunk7VNAGKRC_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 chunk7VNAGKRC_cjs.AccountingApiError && error.detail) {
44
+ return new chunk7VNAGKRC_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 chunk7VNAGKRC_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
+ } = chunk7VNAGKRC_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 ? chunk7VNAGKRC_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
+ chunk7VNAGKRC_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 chunk7VNAGKRC_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 chunk7VNAGKRC_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 chunk7VNAGKRC_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 = chunk7VNAGKRC_cjs.createPkceVerifier();
93
+ const codeChallenge = await chunk7VNAGKRC_cjs.createPkceChallenge(verifier);
94
+ const state = chunk7VNAGKRC_cjs.createHostedAuthState();
95
+ chunk7VNAGKRC_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 chunk7VNAGKRC_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 chunk7VNAGKRC_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 chunk7VNAGKRC_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, "", chunk7VNAGKRC_cjs.stripHostedAuthCallbackParams(callbackUrl));
143
143
  };
144
144
  try {
145
- const callback = chunkFGWMLLEC_cjs.parseHostedAuthCallback(callbackUrl, hostedAuthConfig.redirectUri);
145
+ const callback = chunk7VNAGKRC_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 = chunk7VNAGKRC_cjs.readHostedAuthPendingTransaction(window.sessionStorage, pendingStorageKey);
150
150
  if (!pending) {
151
151
  clearPendingLogin();
152
152
  cleanupCallbackUrl();
153
- throw new chunkFGWMLLEC_cjs.HostedAuthError(
153
+ throw new chunk7VNAGKRC_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 chunk7VNAGKRC_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 chunk7VNAGKRC_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 = chunk7VNAGKRC_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 chunk7VNAGKRC_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 = chunk7VNAGKRC_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 } = chunk7VNAGKRC_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: chunk7VNAGKRC_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 } = chunk7VNAGKRC_cjs.usePrivanaContext();
278
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
279
279
  const query = reactQuery.useQuery({
280
280
  queryKey: ["accounting-batch-balances", ...privateReadQueryScope, options.tokenIds],
281
281
  queryFn: async () => {
@@ -300,17 +300,17 @@ function storageKey(address) {
300
300
  return `privana:pending-deposit:${address.toLowerCase()}`;
301
301
  }
302
302
  function savePendingDeposit(address, data) {
303
- const stored = chunkFGWMLLEC_cjs.setBrowserStorageItem(storageKey(address), JSON.stringify(data));
303
+ const stored = chunk7VNAGKRC_cjs.setBrowserStorageItem(storageKey(address), JSON.stringify(data));
304
304
  if (!stored && data.signedLock) {
305
305
  throw new Error("Unable to persist pending locked deposit for recovery");
306
306
  }
307
307
  }
308
308
  function loadPendingDeposit(address) {
309
309
  try {
310
- const raw = chunkFGWMLLEC_cjs.getBrowserStorageItem(storageKey(address));
310
+ const raw = chunk7VNAGKRC_cjs.getBrowserStorageItem(storageKey(address));
311
311
  if (!raw) return null;
312
312
  const data = JSON.parse(raw);
313
- if (Date.now() - data.savedAt > STALE_MS && !(data.signedLock && chunkFGWMLLEC_cjs.isSignedLockUsable(data.signedLock))) {
313
+ if (Date.now() - data.savedAt > STALE_MS && !(data.signedLock && chunk7VNAGKRC_cjs.isSignedLockUsable(data.signedLock))) {
314
314
  clearPendingDeposit(address);
315
315
  return null;
316
316
  }
@@ -322,21 +322,21 @@ function loadPendingDeposit(address) {
322
322
  function clearPendingDeposit(address, onlyForTxHash) {
323
323
  if (onlyForTxHash) {
324
324
  try {
325
- const raw = chunkFGWMLLEC_cjs.getBrowserStorageItem(storageKey(address));
325
+ const raw = chunk7VNAGKRC_cjs.getBrowserStorageItem(storageKey(address));
326
326
  const recordTxHash = raw ? JSON.parse(raw).txHash : void 0;
327
327
  if (recordTxHash && recordTxHash !== onlyForTxHash) return;
328
328
  } catch {
329
329
  }
330
330
  }
331
- chunkFGWMLLEC_cjs.removeBrowserStorageItem(storageKey(address));
331
+ chunk7VNAGKRC_cjs.removeBrowserStorageItem(storageKey(address));
332
332
  }
333
333
  function useDeposit(options = {}) {
334
334
  const { address } = wagmi.useAccount();
335
- const { client, enabledTokens, getChainById: getChainById2, networkConfig, serviceAddress } = chunkFGWMLLEC_cjs.usePrivanaContext();
335
+ const { client, enabledTokens, getChainById: getChainById2, networkConfig, serviceAddress } = chunk7VNAGKRC_cjs.usePrivanaContext();
336
336
  const { data: walletClient } = wagmi.useWalletClient();
337
337
  const queryClient = reactQuery.useQueryClient();
338
338
  const config = wagmi.useConfig();
339
- const { executePrivateRead, privateReadAddress } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
339
+ const { executePrivateRead, privateReadAddress } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
340
340
  const privateReadAddressRef = react.useRef(privateReadAddress);
341
341
  privateReadAddressRef.current = privateReadAddress;
342
342
  const confirmations = options.confirmations ?? 15;
@@ -376,7 +376,7 @@ function useDeposit(options = {}) {
376
376
  const submitPendingLockAfterCredit = react.useCallback(
377
377
  async (signedLock, creditedAmount) => {
378
378
  try {
379
- const result = await chunkFGWMLLEC_cjs.submitPendingLock({
379
+ const result = await chunk7VNAGKRC_cjs.submitPendingLock({
380
380
  client,
381
381
  payload: signedLock,
382
382
  creditedAmount
@@ -387,7 +387,7 @@ function useDeposit(options = {}) {
387
387
  queryClient.invalidateQueries({ queryKey: ["accounting-history"] });
388
388
  onLockSubmittedRef.current?.(result);
389
389
  } catch (err) {
390
- const error2 = err instanceof chunkFGWMLLEC_cjs.PostDepositLockError ? err : new chunkFGWMLLEC_cjs.PostDepositLockError(
390
+ const error2 = err instanceof chunk7VNAGKRC_cjs.PostDepositLockError ? err : new chunk7VNAGKRC_cjs.PostDepositLockError(
391
391
  err instanceof Error ? err.message : "Lock submission failed",
392
392
  "submission-failed",
393
393
  BigInt(signedLock.amount),
@@ -406,7 +406,7 @@ function useDeposit(options = {}) {
406
406
  error: verificationError,
407
407
  verify,
408
408
  reset: resetVerification
409
- } = chunkFGWMLLEC_cjs.useDepositVerification({
409
+ } = chunk7VNAGKRC_cjs.useDepositVerification({
410
410
  pollInterval: options.pollInterval,
411
411
  pollTimeout: options.pollTimeout,
412
412
  onCredited: (hash, response, creditedAmount) => {
@@ -456,7 +456,7 @@ function useDeposit(options = {}) {
456
456
  } = wagmi.useSendTransaction();
457
457
  const isSendingTx = isWritingContract || isSendingNative;
458
458
  const sendError = writeError ?? sendNativeError;
459
- const { ensureCorrectChain } = chunkFGWMLLEC_cjs.useEnsureCorrectChain();
459
+ const { ensureCorrectChain } = chunk7VNAGKRC_cjs.useEnsureCorrectChain();
460
460
  const invalidateGeneration = react.useCallback(() => {
461
461
  generationRef.current++;
462
462
  }, []);
@@ -504,16 +504,16 @@ function useDeposit(options = {}) {
504
504
  try {
505
505
  let confirmed = false;
506
506
  try {
507
- const receipt = await chunkFGWMLLEC_cjs.getTransactionReceipt(config, {
507
+ const receipt = await chunk7VNAGKRC_cjs.getTransactionReceipt(config, {
508
508
  hash,
509
509
  chainId: persisted.chainId
510
510
  });
511
- const blockNumber = await chunkFGWMLLEC_cjs.getBlockNumber(config, { chainId: persisted.chainId });
511
+ const blockNumber = await chunk7VNAGKRC_cjs.getBlockNumber(config, { chainId: persisted.chainId });
512
512
  confirmed = blockNumber - receipt.blockNumber + 1n >= BigInt(confirmations);
513
513
  } catch {
514
514
  }
515
515
  if (!confirmed) {
516
- await chunkFGWMLLEC_cjs.waitForTransactionReceipt(config, {
516
+ await chunk7VNAGKRC_cjs.waitForTransactionReceipt(config, {
517
517
  hash,
518
518
  chainId: persisted.chainId,
519
519
  confirmations
@@ -564,13 +564,13 @@ function useDeposit(options = {}) {
564
564
  `Amount is below the minimum deposit (${minAmountStr}) for ${isNative ? "native" : "ERC-20"} on chain ${sourceChain.id}`
565
565
  );
566
566
  }
567
- if (params.postDepositLock && !chunkFGWMLLEC_cjs.canUseBrowserStorage()) {
567
+ if (params.postDepositLock && !chunk7VNAGKRC_cjs.canUseBrowserStorage()) {
568
568
  throw new Error("Browser storage is required for locked deposit recovery");
569
569
  }
570
- const lockAmount = chunkFGWMLLEC_cjs.clampLockAmount(params.amount, params.postDepositLock?.maxAmount);
570
+ const lockAmount = chunk7VNAGKRC_cjs.clampLockAmount(params.amount, params.postDepositLock?.maxAmount);
571
571
  let signedLock;
572
572
  if (params.postDepositLock) {
573
- const lockOwner = chunkFGWMLLEC_cjs.requireDepositLockOwner(address, privateReadAddress);
573
+ const lockOwner = chunk7VNAGKRC_cjs.requireDepositLockOwner(address, privateReadAddress);
574
574
  setIsSwitchingChain(true);
575
575
  try {
576
576
  await ensureCorrectChain(networkConfig.chainId);
@@ -578,15 +578,15 @@ function useDeposit(options = {}) {
578
578
  if (!isStale()) setIsSwitchingChain(false);
579
579
  }
580
580
  if (isStale()) return;
581
- const signingWalletClient = await chunkFGWMLLEC_cjs.getWalletClient(config, {
581
+ const signingWalletClient = await chunk7VNAGKRC_cjs.getWalletClient(config, {
582
582
  chainId: networkConfig.chainId
583
583
  });
584
- signedLock = await chunkFGWMLLEC_cjs.createSignedLockRequest({
584
+ signedLock = await chunk7VNAGKRC_cjs.createSignedLockRequest({
585
585
  client,
586
586
  walletClient: signingWalletClient,
587
587
  userAddress: lockOwner,
588
588
  networkConfig,
589
- serviceAddress: chunkFGWMLLEC_cjs.requireServiceAddress(
589
+ serviceAddress: chunk7VNAGKRC_cjs.requireServiceAddress(
590
590
  params.postDepositLock.serviceAddress ?? serviceAddress
591
591
  ),
592
592
  tokenId: params.tokenId,
@@ -640,7 +640,7 @@ function useDeposit(options = {}) {
640
640
  try {
641
641
  setIsWaitingForConfirmation(true);
642
642
  try {
643
- await chunkFGWMLLEC_cjs.waitForTransactionReceipt(config, {
643
+ await chunk7VNAGKRC_cjs.waitForTransactionReceipt(config, {
644
644
  hash,
645
645
  chainId: sourceChain.id,
646
646
  confirmations
@@ -717,10 +717,10 @@ function useDeposit(options = {}) {
717
717
  }
718
718
  function useDepositAddress(options = {}) {
719
719
  const queryClient = react.useContext(reactQuery.QueryClientContext);
720
- const accountingContext = chunkFGWMLLEC_cjs.useSafePrivanaContext();
720
+ const accountingContext = chunk7VNAGKRC_cjs.useSafePrivanaContext();
721
721
  const hasProviders = !!queryClient && !!accountingContext;
722
722
  const client = accountingContext?.client;
723
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
723
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
724
724
  const isReady = hasProviders && privateReadReady && !!privateReadAddress && !!client;
725
725
  const query = reactQuery.useQuery({
726
726
  queryKey: ["accounting-deposit-address", ...privateReadQueryScope],
@@ -744,9 +744,9 @@ function useDepositAddress(options = {}) {
744
744
  function useWithdraw(options = {}) {
745
745
  const { address } = wagmi.useAccount();
746
746
  const { data: walletClient } = wagmi.useWalletClient();
747
- const { client, networkConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
747
+ const { client, networkConfig } = chunk7VNAGKRC_cjs.usePrivanaContext();
748
748
  const queryClient = reactQuery.useQueryClient();
749
- const { chainId, ensureCorrectChain } = chunkFGWMLLEC_cjs.useEnsureCorrectChain();
749
+ const { chainId, ensureCorrectChain } = chunk7VNAGKRC_cjs.useEnsureCorrectChain();
750
750
  const pollInterval = options.pollInterval ?? 3e3;
751
751
  const pollTimeout = options.pollTimeout ?? 18e4;
752
752
  const [currentStep, setCurrentStep] = react.useState("idle");
@@ -814,7 +814,7 @@ function useWithdraw(options = {}) {
814
814
  if (isStale()) return void 0;
815
815
  const nonce = BigInt(nonceResponse.nonce);
816
816
  setCurrentStep("signing");
817
- const signature = await chunkFGWMLLEC_cjs.signWithdrawMessage({
817
+ const signature = await chunk7VNAGKRC_cjs.signWithdrawMessage({
818
818
  walletClient,
819
819
  chainId: signingChainId,
820
820
  verifyingContract: networkConfig.accountingContract,
@@ -943,7 +943,7 @@ function useWithdraw(options = {}) {
943
943
  function useLockFunds(options = {}) {
944
944
  const { address } = wagmi.useAccount();
945
945
  const { data: walletClient } = wagmi.useWalletClient();
946
- const { client, networkConfig, serviceAddress } = chunkFGWMLLEC_cjs.usePrivanaContext();
946
+ const { client, networkConfig, serviceAddress } = chunk7VNAGKRC_cjs.usePrivanaContext();
947
947
  const queryClient = reactQuery.useQueryClient();
948
948
  const mutation = reactQuery.useMutation({
949
949
  mutationFn: async (params) => {
@@ -954,7 +954,7 @@ function useLockFunds(options = {}) {
954
954
  throw new Error("Service address not configured");
955
955
  }
956
956
  const { nonce } = await client.getLockNonce(address);
957
- const signature = await chunkFGWMLLEC_cjs.signLockMessage({
957
+ const signature = await chunk7VNAGKRC_cjs.signLockMessage({
958
958
  walletClient,
959
959
  chainId: networkConfig.chainId,
960
960
  verifyingContract: networkConfig.accountingContract,
@@ -1002,7 +1002,7 @@ function useLockFunds(options = {}) {
1002
1002
  }
1003
1003
  function useUnlockFunds(options = {}) {
1004
1004
  const { address } = wagmi.useAccount();
1005
- const { client } = chunkFGWMLLEC_cjs.usePrivanaContext();
1005
+ const { client } = chunk7VNAGKRC_cjs.usePrivanaContext();
1006
1006
  const queryClient = reactQuery.useQueryClient();
1007
1007
  const unlockMutation = reactQuery.useMutation({
1008
1008
  mutationFn: async (params) => {
@@ -1072,7 +1072,7 @@ function useUnlockFunds(options = {}) {
1072
1072
  function useTransfer(options = {}) {
1073
1073
  const { address } = wagmi.useAccount();
1074
1074
  const { data: walletClient } = wagmi.useWalletClient();
1075
- const { client, networkConfig, serviceAddress } = chunkFGWMLLEC_cjs.usePrivanaContext();
1075
+ const { client, networkConfig, serviceAddress } = chunk7VNAGKRC_cjs.usePrivanaContext();
1076
1076
  const queryClient = reactQuery.useQueryClient();
1077
1077
  const transferMutation = reactQuery.useMutation({
1078
1078
  mutationFn: async (params) => {
@@ -1080,7 +1080,7 @@ function useTransfer(options = {}) {
1080
1080
  throw new Error("Wallet not connected");
1081
1081
  }
1082
1082
  const { nonce } = await client.getTransferNonce(address);
1083
- const signature = await chunkFGWMLLEC_cjs.signTransferMessage({
1083
+ const signature = await chunk7VNAGKRC_cjs.signTransferMessage({
1084
1084
  walletClient,
1085
1085
  chainId: networkConfig.chainId,
1086
1086
  verifyingContract: networkConfig.accountingContract,
@@ -1117,7 +1117,7 @@ function useTransfer(options = {}) {
1117
1117
  throw new Error("Service address not configured");
1118
1118
  }
1119
1119
  const { nonce } = await client.getTransferLockedNonce(serviceAddress);
1120
- const signature = await chunkFGWMLLEC_cjs.signTransferLockedMessage({
1120
+ const signature = await chunk7VNAGKRC_cjs.signTransferLockedMessage({
1121
1121
  walletClient,
1122
1122
  chainId: networkConfig.chainId,
1123
1123
  verifyingContract: networkConfig.accountingContract,
@@ -1177,8 +1177,8 @@ function useTransfer(options = {}) {
1177
1177
  };
1178
1178
  }
1179
1179
  function useLockedFunds(options = {}) {
1180
- const { client, pollingInterval, serviceAddress } = chunkFGWMLLEC_cjs.usePrivanaContext();
1181
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1180
+ const { client, pollingInterval, serviceAddress } = chunk7VNAGKRC_cjs.usePrivanaContext();
1181
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
1182
1182
  const query = reactQuery.useQuery({
1183
1183
  queryKey: ["accounting-locked-funds", ...privateReadQueryScope, serviceAddress ?? null],
1184
1184
  queryFn: async () => {
@@ -1200,8 +1200,8 @@ function useLockedFunds(options = {}) {
1200
1200
  };
1201
1201
  }
1202
1202
  function useTotalLockedBalance(options = {}) {
1203
- const { client, pollingInterval, defaultToken } = chunkFGWMLLEC_cjs.usePrivanaContext();
1204
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1203
+ const { client, pollingInterval, defaultToken } = chunk7VNAGKRC_cjs.usePrivanaContext();
1204
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
1205
1205
  const tokenId = options.tokenId ?? defaultToken?.id;
1206
1206
  const query = reactQuery.useQuery({
1207
1207
  queryKey: ["accounting-total-locked-balance", ...privateReadQueryScope, tokenId],
@@ -1222,8 +1222,8 @@ function useTotalLockedBalance(options = {}) {
1222
1222
  };
1223
1223
  }
1224
1224
  function useExpiredLocks(options = {}) {
1225
- const { client, pollingInterval } = chunkFGWMLLEC_cjs.usePrivanaContext();
1226
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1225
+ const { client, pollingInterval } = chunk7VNAGKRC_cjs.usePrivanaContext();
1226
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
1227
1227
  const query = reactQuery.useQuery({
1228
1228
  queryKey: ["accounting-expired-locks", ...privateReadQueryScope],
1229
1229
  queryFn: async () => {
@@ -1244,14 +1244,14 @@ function useExpiredLocks(options = {}) {
1244
1244
  };
1245
1245
  }
1246
1246
  function statusCodeOf(error) {
1247
- return error instanceof chunkFGWMLLEC_cjs.AccountingApiError ? error.statusCode : void 0;
1247
+ return error instanceof chunk7VNAGKRC_cjs.AccountingApiError ? error.statusCode : void 0;
1248
1248
  }
1249
1249
  function usePendingDeposits(options = {}) {
1250
1250
  const queryClient = react.useContext(reactQuery.QueryClientContext);
1251
- const accountingContext = chunkFGWMLLEC_cjs.useSafePrivanaContext();
1251
+ const accountingContext = chunk7VNAGKRC_cjs.useSafePrivanaContext();
1252
1252
  const hasProviders = !!queryClient && !!accountingContext;
1253
1253
  const client = accountingContext?.client;
1254
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1254
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
1255
1255
  const { chainId, tokenAddress, lookbackBlocks } = options;
1256
1256
  const query = reactQuery.useQuery({
1257
1257
  queryKey: ["accounting-pending-deposits", ...privateReadQueryScope, chainId, tokenAddress],
@@ -1298,7 +1298,7 @@ function usePendingDeposits(options = {}) {
1298
1298
  }
1299
1299
  function usePendingWithdrawals(options = {}) {
1300
1300
  const { address, isConnected } = wagmi.useAccount();
1301
- const { client, pollingInterval } = chunkFGWMLLEC_cjs.usePrivanaContext();
1301
+ const { client, pollingInterval } = chunk7VNAGKRC_cjs.usePrivanaContext();
1302
1302
  const query = reactQuery.useQuery({
1303
1303
  queryKey: ["accounting-pending-withdrawals", address],
1304
1304
  queryFn: async () => {
@@ -1334,8 +1334,8 @@ function usePendingWithdrawals(options = {}) {
1334
1334
  };
1335
1335
  }
1336
1336
  function useHistory(options = {}) {
1337
- const { client, pollingInterval } = chunkFGWMLLEC_cjs.usePrivanaContext();
1338
- const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1337
+ const { client, pollingInterval } = chunk7VNAGKRC_cjs.usePrivanaContext();
1338
+ const { executePrivateRead, privateReadAddress, privateReadQueryScope, privateReadReady } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
1339
1339
  const offset = options.offset ?? -1;
1340
1340
  const limit = options.limit ?? 50;
1341
1341
  const query = reactQuery.useQuery({
@@ -1359,7 +1359,7 @@ function useHistory(options = {}) {
1359
1359
  };
1360
1360
  }
1361
1361
  function useTokenInfo(options = {}) {
1362
- const { client } = chunkFGWMLLEC_cjs.usePrivanaContext();
1362
+ const { client } = chunk7VNAGKRC_cjs.usePrivanaContext();
1363
1363
  const { tokenId } = options;
1364
1364
  const query = reactQuery.useQuery({
1365
1365
  queryKey: ["accounting-token-info", tokenId],
@@ -1379,7 +1379,7 @@ function useTokenInfo(options = {}) {
1379
1379
  };
1380
1380
  }
1381
1381
  function useTokenList(options = {}) {
1382
- const { client } = chunkFGWMLLEC_cjs.usePrivanaContext();
1382
+ const { client } = chunk7VNAGKRC_cjs.usePrivanaContext();
1383
1383
  const query = reactQuery.useQuery({
1384
1384
  queryKey: ["accounting-token-list"],
1385
1385
  queryFn: () => client.listTokens(),
@@ -1397,7 +1397,7 @@ function useTokenList(options = {}) {
1397
1397
  function useModifyLock(options = {}) {
1398
1398
  const { address } = wagmi.useAccount();
1399
1399
  const { data: walletClient } = wagmi.useWalletClient();
1400
- const { client, networkConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
1400
+ const { client, networkConfig } = chunk7VNAGKRC_cjs.usePrivanaContext();
1401
1401
  const queryClient = reactQuery.useQueryClient();
1402
1402
  const mutation = reactQuery.useMutation({
1403
1403
  mutationFn: async (params) => {
@@ -1405,7 +1405,7 @@ function useModifyLock(options = {}) {
1405
1405
  throw new Error("Wallet not connected");
1406
1406
  }
1407
1407
  const { nonce } = await client.getModifyLockNonce(address);
1408
- const signature = await chunkFGWMLLEC_cjs.signModifyLockMessage({
1408
+ const signature = await chunk7VNAGKRC_cjs.signModifyLockMessage({
1409
1409
  walletClient,
1410
1410
  chainId: networkConfig.chainId,
1411
1411
  verifyingContract: networkConfig.accountingContract,
@@ -1464,7 +1464,7 @@ function DialogOverlay({
1464
1464
  {
1465
1465
  "data-slot": "dialog-overlay",
1466
1466
  "data-privana": true,
1467
- className: chunkFGWMLLEC_cjs.cn(
1467
+ className: chunk7VNAGKRC_cjs.cn(
1468
1468
  "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
1469
  className
1470
1470
  ),
@@ -1486,7 +1486,7 @@ function DialogContent({
1486
1486
  {
1487
1487
  "data-slot": "dialog-content",
1488
1488
  "data-privana": true,
1489
- className: chunkFGWMLLEC_cjs.cn(
1489
+ className: chunk7VNAGKRC_cjs.cn(
1490
1490
  "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
1491
  className
1492
1492
  ),
@@ -1514,7 +1514,7 @@ function DialogTitle({ className, ...props }) {
1514
1514
  DialogPrimitive__namespace.Title,
1515
1515
  {
1516
1516
  "data-slot": "dialog-title",
1517
- className: chunkFGWMLLEC_cjs.cn("text-lg leading-none font-semibold", className),
1517
+ className: chunk7VNAGKRC_cjs.cn("text-lg leading-none font-semibold", className),
1518
1518
  ...props
1519
1519
  }
1520
1520
  );
@@ -1527,7 +1527,7 @@ function DialogDescription({
1527
1527
  DialogPrimitive__namespace.Description,
1528
1528
  {
1529
1529
  "data-slot": "dialog-description",
1530
- className: chunkFGWMLLEC_cjs.cn("text-muted-foreground text-sm", className),
1530
+ className: chunk7VNAGKRC_cjs.cn("text-muted-foreground text-sm", className),
1531
1531
  ...props
1532
1532
  }
1533
1533
  );
@@ -1569,7 +1569,7 @@ function sessionKey(owner, sessionId) {
1569
1569
  return `${SESSION_PREFIX}${owner.toLowerCase()}:${sessionId}`;
1570
1570
  }
1571
1571
  function activeSessionId(owner) {
1572
- const value = chunkFGWMLLEC_cjs.getSharedBrowserStorageItem(activeSessionKey(owner));
1572
+ const value = chunk7VNAGKRC_cjs.getSharedBrowserStorageItem(activeSessionKey(owner));
1573
1573
  return value || void 0;
1574
1574
  }
1575
1575
  function isPositiveIntegerString(value) {
@@ -1601,7 +1601,7 @@ function isSessionRecord(value) {
1601
1601
  }
1602
1602
  function writeSessionRecord(session) {
1603
1603
  const id = externalDepositSessionId(session.chainId, session.tokenId);
1604
- return chunkFGWMLLEC_cjs.setSharedBrowserStorageItem(sessionKey(session.owner, id), JSON.stringify(session));
1604
+ return chunk7VNAGKRC_cjs.setSharedBrowserStorageItem(sessionKey(session.owner, id), JSON.stringify(session));
1605
1605
  }
1606
1606
  function saveExternalDepositLockSession(session, expectedSession = null) {
1607
1607
  if (!isSessionRecord(session)) throw new Error("Invalid external deposit lock session");
@@ -1615,12 +1615,12 @@ function saveExternalDepositLockSession(session, expectedSession = null) {
1615
1615
  throw new Error("Unable to persist external deposit lock session");
1616
1616
  }
1617
1617
  if (previousId !== nextId) {
1618
- if (!chunkFGWMLLEC_cjs.setSharedBrowserStorageItem(activeSessionKey(session.owner), nextId)) {
1619
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(sessionKey(session.owner, nextId));
1618
+ if (!chunk7VNAGKRC_cjs.setSharedBrowserStorageItem(activeSessionKey(session.owner), nextId)) {
1619
+ chunk7VNAGKRC_cjs.removeSharedBrowserStorageItem(sessionKey(session.owner, nextId));
1620
1620
  throw new Error("Unable to persist external deposit lock session");
1621
1621
  }
1622
1622
  if (previousId) {
1623
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(sessionKey(session.owner, previousId));
1623
+ chunk7VNAGKRC_cjs.removeSharedBrowserStorageItem(sessionKey(session.owner, previousId));
1624
1624
  }
1625
1625
  }
1626
1626
  }
@@ -1629,17 +1629,17 @@ function loadExternalDepositLockSession(owner) {
1629
1629
  if (!id) return void 0;
1630
1630
  const key = sessionKey(owner, id);
1631
1631
  try {
1632
- const raw = chunkFGWMLLEC_cjs.getSharedBrowserStorageItem(key);
1632
+ const raw = chunk7VNAGKRC_cjs.getSharedBrowserStorageItem(key);
1633
1633
  const parsed = raw ? JSON.parse(raw) : void 0;
1634
1634
  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));
1635
+ chunk7VNAGKRC_cjs.removeSharedBrowserStorageItem(key);
1636
+ chunk7VNAGKRC_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1637
1637
  return void 0;
1638
1638
  }
1639
1639
  return parsed;
1640
1640
  } catch {
1641
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(key);
1642
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1641
+ chunk7VNAGKRC_cjs.removeSharedBrowserStorageItem(key);
1642
+ chunk7VNAGKRC_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1643
1643
  return void 0;
1644
1644
  }
1645
1645
  }
@@ -1670,8 +1670,8 @@ function clearExternalDepositLockSession(owner, expectedSessionId, expectedGener
1670
1670
  const current = loadExternalDepositLockSession(owner);
1671
1671
  if (!current || current.generation !== expectedGeneration) return;
1672
1672
  }
1673
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(sessionKey(owner, id));
1674
- chunkFGWMLLEC_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1673
+ chunk7VNAGKRC_cjs.removeSharedBrowserStorageItem(sessionKey(owner, id));
1674
+ chunk7VNAGKRC_cjs.removeSharedBrowserStorageItem(activeSessionKey(owner));
1675
1675
  }
1676
1676
  function isSameVerification(left, right) {
1677
1677
  if (!left || !right) return left === right;
@@ -1724,7 +1724,7 @@ function markSubmissionAmbiguous(session, signature) {
1724
1724
  return writeSessionRecord({ ...current, submissionAmbiguous: true });
1725
1725
  }
1726
1726
  function ambiguousSubmissionError(error) {
1727
- return new chunkFGWMLLEC_cjs.PostDepositLockError(
1727
+ return new chunk7VNAGKRC_cjs.PostDepositLockError(
1728
1728
  "Lock submission could not be confirmed. Retry only the saved signature, or check locked funds before stopping recovery.",
1729
1729
  error.reason,
1730
1730
  error.signedAmount,
@@ -1737,7 +1737,7 @@ function ambiguousSubmissionError(error) {
1737
1737
  }
1738
1738
  function isDefinitiveSubmissionFailure(error) {
1739
1739
  const cause = error.cause;
1740
- return cause instanceof chunkFGWMLLEC_cjs.AccountingApiError && cause.statusCode !== 408 && cause.statusCode < 500;
1740
+ return cause instanceof chunk7VNAGKRC_cjs.AccountingApiError && cause.statusCode !== 408 && cause.statusCode < 500;
1741
1741
  }
1742
1742
  function submissionLockName(session) {
1743
1743
  return `privana:external-deposit-lock:submit:${session.owner.toLowerCase()}:${externalDepositSessionId(session.chainId, session.tokenId)}`;
@@ -1757,7 +1757,7 @@ async function submitExternalDepositLock(client, session) {
1757
1757
  return withSubmissionLock(session, async (crossTabExclusive) => {
1758
1758
  const current = loadExternalDepositLockSession(session.owner);
1759
1759
  if (!current || current.generation !== session.generation) {
1760
- throw new chunkFGWMLLEC_cjs.PostDepositLockError(
1760
+ throw new chunk7VNAGKRC_cjs.PostDepositLockError(
1761
1761
  "External deposit lock session changed before submission",
1762
1762
  "not-found",
1763
1763
  BigInt(session.maxLockAmount),
@@ -1776,7 +1776,7 @@ async function submitExternalDepositLock(client, session) {
1776
1776
  async function submitExternalDepositLockAttempt(client, session, crossTabExclusive) {
1777
1777
  const creditedAmount = session.creditedAmount ? BigInt(session.creditedAmount) : void 0;
1778
1778
  if (!creditedAmount) {
1779
- throw new chunkFGWMLLEC_cjs.PostDepositLockError(
1779
+ throw new chunk7VNAGKRC_cjs.PostDepositLockError(
1780
1780
  "External deposit has not been credited",
1781
1781
  "submission-failed",
1782
1782
  BigInt(session.maxLockAmount)
@@ -1784,7 +1784,7 @@ async function submitExternalDepositLockAttempt(client, session, crossTabExclusi
1784
1784
  }
1785
1785
  const payload = session.payload;
1786
1786
  if (!payload) {
1787
- throw new chunkFGWMLLEC_cjs.PostDepositLockError(
1787
+ throw new chunk7VNAGKRC_cjs.PostDepositLockError(
1788
1788
  "No persisted signed policy found for this deposit session",
1789
1789
  "not-found",
1790
1790
  BigInt(session.maxLockAmount),
@@ -1792,7 +1792,7 @@ async function submitExternalDepositLockAttempt(client, session, crossTabExclusi
1792
1792
  );
1793
1793
  }
1794
1794
  try {
1795
- return await chunkFGWMLLEC_cjs.submitPendingLock({
1795
+ return await chunk7VNAGKRC_cjs.submitPendingLock({
1796
1796
  client,
1797
1797
  payload,
1798
1798
  creditedAmount,
@@ -1803,23 +1803,23 @@ async function submitExternalDepositLockAttempt(client, session, crossTabExclusi
1803
1803
  }
1804
1804
  });
1805
1805
  } catch (err) {
1806
- if (err instanceof chunkFGWMLLEC_cjs.PostDepositLockError && err.reason === "submission-failed" && crossTabExclusive && !session.submissionAmbiguous && isDefinitiveSubmissionFailure(err)) {
1806
+ if (err instanceof chunk7VNAGKRC_cjs.PostDepositLockError && err.reason === "submission-failed" && crossTabExclusive && !session.submissionAmbiguous && isDefinitiveSubmissionFailure(err)) {
1807
1807
  if (!clearSubmittedPayload(session, payload.signature, true)) {
1808
1808
  const latest = loadExternalDepositLockSession(session.owner);
1809
1809
  if (latest?.submissionAmbiguous) throw ambiguousSubmissionError(err);
1810
1810
  }
1811
- } else if (err instanceof chunkFGWMLLEC_cjs.PostDepositLockError && err.reason === "submission-failed") {
1811
+ } else if (err instanceof chunk7VNAGKRC_cjs.PostDepositLockError && err.reason === "submission-failed") {
1812
1812
  const ambiguous = markSubmissionAmbiguous(session, payload.signature) || loadExternalDepositLockSession(session.owner)?.submissionAmbiguous === true;
1813
1813
  if (ambiguous) throw ambiguousSubmissionError(err);
1814
1814
  } else {
1815
1815
  const current = loadExternalDepositLockSession(session.owner);
1816
1816
  if (session.submissionAmbiguous || current?.submissionAmbiguous) {
1817
- if (err instanceof chunkFGWMLLEC_cjs.PostDepositLockError) throw ambiguousSubmissionError(err);
1817
+ if (err instanceof chunk7VNAGKRC_cjs.PostDepositLockError) throw ambiguousSubmissionError(err);
1818
1818
  throw err;
1819
1819
  }
1820
1820
  if (!clearSubmittedPayload(session, payload.signature)) {
1821
1821
  const latest = loadExternalDepositLockSession(session.owner);
1822
- if (latest?.submissionAmbiguous && err instanceof chunkFGWMLLEC_cjs.PostDepositLockError) {
1822
+ if (latest?.submissionAmbiguous && err instanceof chunk7VNAGKRC_cjs.PostDepositLockError) {
1823
1823
  throw ambiguousSubmissionError(err);
1824
1824
  }
1825
1825
  }
@@ -1832,12 +1832,12 @@ function useExternalDepositLock({
1832
1832
  onLockSubmitted,
1833
1833
  onLockFailed
1834
1834
  }) {
1835
- const { client, networkConfig, serviceAddress, getTokenById, tokensStatus } = chunkFGWMLLEC_cjs.usePrivanaContext();
1835
+ const { client, networkConfig, serviceAddress, getTokenById, tokensStatus } = chunk7VNAGKRC_cjs.usePrivanaContext();
1836
1836
  const config = wagmi.useConfig();
1837
1837
  const queryClient = reactQuery.useQueryClient();
1838
1838
  const { address } = wagmi.useAccount();
1839
- const { privateReadAddress } = chunkFGWMLLEC_cjs.usePrivateReadRequest();
1840
- const { ensureCorrectChain } = chunkFGWMLLEC_cjs.useEnsureCorrectChain();
1839
+ const { privateReadAddress } = chunk7VNAGKRC_cjs.usePrivateReadRequest();
1840
+ const { ensureCorrectChain } = chunk7VNAGKRC_cjs.useEnsureCorrectChain();
1841
1841
  const [isSigning, setIsSigning] = react.useState(false);
1842
1842
  const [isSubmittingLock, setIsSubmittingLock] = react.useState(false);
1843
1843
  const [session, setSession] = react.useState(null);
@@ -1897,7 +1897,7 @@ function useExternalDepositLock({
1897
1897
  result = await submitExternalDepositLock(client, submission);
1898
1898
  } catch (err) {
1899
1899
  const stored = loadExternalDepositLockSession(active.owner);
1900
- const error = err instanceof chunkFGWMLLEC_cjs.PostDepositLockError ? err : new chunkFGWMLLEC_cjs.PostDepositLockError(
1900
+ const error = err instanceof chunk7VNAGKRC_cjs.PostDepositLockError ? err : new chunk7VNAGKRC_cjs.PostDepositLockError(
1901
1901
  err instanceof Error ? err.message : "Lock submission failed",
1902
1902
  "submission-failed",
1903
1903
  BigInt(active.maxLockAmount),
@@ -1976,7 +1976,7 @@ function useExternalDepositLock({
1976
1976
  void submitSession(restored);
1977
1977
  } else if (restored.creditedAmount) {
1978
1978
  notifyFailure(
1979
- new chunkFGWMLLEC_cjs.PostDepositLockError(
1979
+ new chunk7VNAGKRC_cjs.PostDepositLockError(
1980
1980
  "Deposit credited; sign a fresh policy to lock the funds",
1981
1981
  "not-found",
1982
1982
  BigInt(restored.maxLockAmount),
@@ -2016,10 +2016,10 @@ function useExternalDepositLock({
2016
2016
  if (signingRef.current || settlingRef.current) {
2017
2017
  throw new Error("A policy operation is already in progress");
2018
2018
  }
2019
- if (!chunkFGWMLLEC_cjs.canUseSharedBrowserStorage()) {
2019
+ if (!chunk7VNAGKRC_cjs.canUseSharedBrowserStorage()) {
2020
2020
  throw new Error("Browser storage is required for locked deposit recovery");
2021
2021
  }
2022
- const owner = chunkFGWMLLEC_cjs.requireDepositLockOwner(address, privateReadAddress);
2022
+ const owner = chunk7VNAGKRC_cjs.requireDepositLockOwner(address, privateReadAddress);
2023
2023
  if (sessionRef.current || loadExternalDepositLockSession(owner)) {
2024
2024
  throw new Error("Finish or cancel the active external deposit before starting another");
2025
2025
  }
@@ -2028,26 +2028,26 @@ function useExternalDepositLock({
2028
2028
  if (token.contract === viem.zeroAddress) {
2029
2029
  throw new Error("External deposits support ERC20 tokens only");
2030
2030
  }
2031
- const targetService = chunkFGWMLLEC_cjs.requireServiceAddress(serviceAddress);
2032
- const lockDuration = allowance.lockDuration ?? chunkFGWMLLEC_cjs.DEFAULT_LOCK_DURATION_SECONDS;
2031
+ const targetService = chunk7VNAGKRC_cjs.requireServiceAddress(serviceAddress);
2032
+ const lockDuration = allowance.lockDuration ?? chunk7VNAGKRC_cjs.DEFAULT_LOCK_DURATION_SECONDS;
2033
2033
  signingRef.current = true;
2034
2034
  setIsSigning(true);
2035
2035
  try {
2036
2036
  await ensureCorrectChain(networkConfig.chainId);
2037
- const signingWalletClient = await chunkFGWMLLEC_cjs.getWalletClient(config, {
2037
+ const signingWalletClient = await chunk7VNAGKRC_cjs.getWalletClient(config, {
2038
2038
  chainId: networkConfig.chainId
2039
2039
  });
2040
- const payload = await chunkFGWMLLEC_cjs.createSignedLockRequest({
2040
+ const payload = await chunk7VNAGKRC_cjs.createSignedLockRequest({
2041
2041
  client,
2042
2042
  walletClient: signingWalletClient,
2043
2043
  userAddress: owner,
2044
2044
  networkConfig,
2045
2045
  serviceAddress: targetService,
2046
2046
  tokenId: token.id,
2047
- amount: chunkFGWMLLEC_cjs.clampLockAmount(amount, BigInt(allowance.value)),
2047
+ amount: chunk7VNAGKRC_cjs.clampLockAmount(amount, BigInt(allowance.value)),
2048
2048
  lockDuration
2049
2049
  });
2050
- const startBlock = await chunkFGWMLLEC_cjs.getBlockNumber(config, { chainId: token.chainId });
2050
+ const startBlock = await chunk7VNAGKRC_cjs.getBlockNumber(config, { chainId: token.chainId });
2051
2051
  if (startBlock > BigInt(Number.MAX_SAFE_INTEGER)) {
2052
2052
  throw new Error("Source-chain block number exceeds the supported range");
2053
2053
  }
@@ -2113,7 +2113,7 @@ function useExternalDepositLock({
2113
2113
  pendingCreditedTransitionRef.current = { predecessor: active, credited };
2114
2114
  installSession(credited);
2115
2115
  notifyFailure(
2116
- new chunkFGWMLLEC_cjs.PostDepositLockError(
2116
+ new chunk7VNAGKRC_cjs.PostDepositLockError(
2117
2117
  err instanceof Error ? err.message : "Unable to persist credited deposit state",
2118
2118
  "submission-failed",
2119
2119
  BigInt(active.maxLockAmount),
@@ -2173,7 +2173,7 @@ function useExternalDepositLock({
2173
2173
  if (!token || token.chainId !== active.chainId || token.contract === viem.zeroAddress) {
2174
2174
  throw new Error("The credited token is no longer available");
2175
2175
  }
2176
- const targetService = chunkFGWMLLEC_cjs.requireServiceAddress(serviceAddress);
2176
+ const targetService = chunk7VNAGKRC_cjs.requireServiceAddress(serviceAddress);
2177
2177
  if (targetService.toLowerCase() !== active.serviceAddress.toLowerCase()) {
2178
2178
  throw new Error("The service for this credited deposit has changed");
2179
2179
  }
@@ -2186,17 +2186,17 @@ function useExternalDepositLock({
2186
2186
  "The previous lock submission may have succeeded; a fresh signature is unsafe"
2187
2187
  );
2188
2188
  }
2189
- const owner = chunkFGWMLLEC_cjs.requireDepositLockOwner(address, privateReadAddress);
2189
+ const owner = chunk7VNAGKRC_cjs.requireDepositLockOwner(address, privateReadAddress);
2190
2190
  const amount = externalDepositRetryAmount(active);
2191
2191
  let retrySession;
2192
2192
  signingRef.current = true;
2193
2193
  setIsSigning(true);
2194
2194
  try {
2195
2195
  await ensureCorrectChain(networkConfig.chainId);
2196
- const signingWalletClient = await chunkFGWMLLEC_cjs.getWalletClient(config, {
2196
+ const signingWalletClient = await chunk7VNAGKRC_cjs.getWalletClient(config, {
2197
2197
  chainId: networkConfig.chainId
2198
2198
  });
2199
- const payload = await chunkFGWMLLEC_cjs.createSignedLockRequest({
2199
+ const payload = await chunk7VNAGKRC_cjs.createSignedLockRequest({
2200
2200
  client,
2201
2201
  walletClient: signingWalletClient,
2202
2202
  userAddress: owner,
@@ -2413,7 +2413,7 @@ function getChainIcon(chainId, size) {
2413
2413
  }
2414
2414
  }
2415
2415
  function TokenSelectorView({ selectedTokenId, onSelect }) {
2416
- const { enabledTokens } = chunkFGWMLLEC_cjs.usePrivanaContext();
2416
+ const { enabledTokens } = chunk7VNAGKRC_cjs.usePrivanaContext();
2417
2417
  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
2418
  enabledTokens.map((token) => {
2419
2419
  const isSelected = selectedTokenId === token.id;
@@ -2422,7 +2422,7 @@ function TokenSelectorView({ selectedTokenId, onSelect }) {
2422
2422
  {
2423
2423
  type: "button",
2424
2424
  onClick: () => onSelect(token.id),
2425
- className: chunkFGWMLLEC_cjs.cn(
2425
+ className: chunk7VNAGKRC_cjs.cn(
2426
2426
  "hover:bg-secondary flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors",
2427
2427
  isSelected && "bg-secondary"
2428
2428
  ),
@@ -2477,7 +2477,7 @@ function CreditCardWidgetView({
2477
2477
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "bg-muted flex flex-col gap-6 rounded-[10px] p-5", children: [
2478
2478
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-foreground text-[28px] leading-8 font-medium", children: "Complete your purchase" }),
2479
2479
  token && moonpayCurrencyCode ? /* @__PURE__ */ jsxRuntime.jsx(
2480
- chunkFGWMLLEC_cjs.FiatOnRampForm,
2480
+ chunk7VNAGKRC_cjs.FiatOnRampForm,
2481
2481
  {
2482
2482
  tokenId: token.id,
2483
2483
  currencyCode: moonpayCurrencyCode,
@@ -2766,7 +2766,7 @@ function ChevronDownIcon({
2766
2766
  height: "16",
2767
2767
  viewBox: "0 0 16 16",
2768
2768
  fill: "none",
2769
- className: chunkFGWMLLEC_cjs.cn(
2769
+ className: chunk7VNAGKRC_cjs.cn(
2770
2770
  "transition-transform",
2771
2771
  direction === "right" && "-rotate-90",
2772
2772
  direction === "up" && "rotate-180",
@@ -2919,7 +2919,7 @@ function PolicyTermRow({
2919
2919
  /* @__PURE__ */ jsxRuntime.jsx(
2920
2920
  "div",
2921
2921
  {
2922
- className: chunkFGWMLLEC_cjs.cn(
2922
+ className: chunk7VNAGKRC_cjs.cn(
2923
2923
  "mt-0.5 shrink-0",
2924
2924
  kind === "permission" ? "text-emerald-500" : "text-orange-500"
2925
2925
  ),
@@ -2992,7 +2992,7 @@ function DepositView({
2992
2992
  onSubmit,
2993
2993
  isSubmitting = false
2994
2994
  }) {
2995
- const { getChainById: getChainById2, chains, serviceName, serviceIcon, networkConfig, hostedAuthConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
2995
+ const { getChainById: getChainById2, chains, serviceName, serviceIcon, networkConfig, hostedAuthConfig } = chunk7VNAGKRC_cjs.usePrivanaContext();
2996
2996
  const { address, isConnected } = wagmi.useAccount();
2997
2997
  const appName = serviceName ?? "Privana";
2998
2998
  const chain = selectedToken ? getChainById2(selectedToken.chainId) : void 0;
@@ -3016,7 +3016,7 @@ function DepositView({
3016
3016
  query: { enabled: isConnectedSource && !!address && !!selectedToken && !isNative }
3017
3017
  });
3018
3018
  const walletBalance = isNative ? nativeBalanceData?.value : erc20Balance;
3019
- const formattedWalletBalance = walletBalance != null && selectedToken ? chunkFGWMLLEC_cjs.formatTokenAmount(walletBalance.toString(), selectedToken.decimals) : "0.00";
3019
+ const formattedWalletBalance = walletBalance != null && selectedToken ? chunk7VNAGKRC_cjs.formatTokenAmount(walletBalance.toString(), selectedToken.decimals) : "0.00";
3020
3020
  const {
3021
3021
  minBuyAmount: moonpayMinBuy,
3022
3022
  isLoading: moonpayLimitsLoading,
@@ -3029,7 +3029,7 @@ function DepositView({
3029
3029
  const hasValidAmount = !!amount && parseFloat(amount) > 0;
3030
3030
  const maxAmountDecimals = isCreditCard ? 2 : selectedToken?.decimals;
3031
3031
  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;
3032
+ const exceedsBalance = isConnectedSource && hasValidAmount && !tooManyDecimals && !!selectedToken && walletBalance != null && chunk7VNAGKRC_cjs.parseTokenAmount(amount, selectedToken.decimals) > walletBalance;
3033
3033
  const belowMoonpayMin = isCreditCard && hasValidAmount && moonpayMinBuy != null && parseFloat(amount) < moonpayMinBuy;
3034
3034
  const moonpayLimitsUnready = isCreditCard && !!selectedToken?.moonpayCurrencyCode && moonpayMinBuy == null;
3035
3035
  const creditCardUnavailable = isCreditCard && !!selectedToken && !selectedToken.moonpayCurrencyCode;
@@ -3037,7 +3037,7 @@ function DepositView({
3037
3037
  const externalMinimumRequired = isExternal && !!allowance && !!selectedToken;
3038
3038
  const externalMinimumLoading = externalMinimumRequired && externalMinimum === void 0;
3039
3039
  const externalMinimumUnavailable = externalMinimumRequired && externalMinimum === null;
3040
- const belowExternalMinimum = externalMinimumRequired && hasValidAmount && !tooManyDecimals && !!selectedToken && typeof externalMinimum === "bigint" && chunkFGWMLLEC_cjs.parseTokenAmount(amount, selectedToken.decimals) < externalMinimum;
3040
+ const belowExternalMinimum = externalMinimumRequired && hasValidAmount && !tooManyDecimals && !!selectedToken && typeof externalMinimum === "bigint" && chunk7VNAGKRC_cjs.parseTokenAmount(amount, selectedToken.decimals) < externalMinimum;
3041
3041
  const externalNeedsWallet = isExternal && (!!allowance || !hostedAuthConfig);
3042
3042
  const needsConnect = (isConnectedSource || externalNeedsWallet) && !isConnected;
3043
3043
  const canDeposit = hasValidAmount && !!selectedToken && !tooManyDecimals && !exceedsBalance && !belowMoonpayMin && !moonpayLimitsUnready && !creditCardUnavailable && !externalTokenUnavailable && !externalMinimumLoading && !externalMinimumUnavailable && !belowExternalMinimum && !needsConnect;
@@ -3094,7 +3094,7 @@ function DepositView({
3094
3094
  /* @__PURE__ */ jsxRuntime.jsxs(
3095
3095
  "div",
3096
3096
  {
3097
- className: chunkFGWMLLEC_cjs.cn(
3097
+ className: chunk7VNAGKRC_cjs.cn(
3098
3098
  "border-border bg-input flex items-center gap-2 rounded-[10px] border",
3099
3099
  isConnectedSource ? "py-1 pr-1 pl-3" : "px-3 py-3"
3100
3100
  ),
@@ -3234,7 +3234,7 @@ function ExternalDepositView({
3234
3234
  onDiscardLock,
3235
3235
  lock
3236
3236
  }) {
3237
- const { getChainById: getChainById2, getTokenById, serviceName } = chunkFGWMLLEC_cjs.usePrivanaContext();
3237
+ const { getChainById: getChainById2, getTokenById, serviceName } = chunk7VNAGKRC_cjs.usePrivanaContext();
3238
3238
  const appName = serviceName ?? "Privana";
3239
3239
  const { depositAddress, isReady, isLoading } = depositAddressState;
3240
3240
  const chain = token ? getChainById2(token.chainId) : void 0;
@@ -3250,7 +3250,7 @@ function ExternalDepositView({
3250
3250
  const [nothingFound, setNothingFound] = react.useState(false);
3251
3251
  const [credited, setCredited] = react.useState(null);
3252
3252
  const [showCancelWarning, setShowCancelWarning] = react.useState(false);
3253
- const verification = chunkFGWMLLEC_cjs.useDepositVerification({
3253
+ const verification = chunk7VNAGKRC_cjs.useDepositVerification({
3254
3254
  onCredited: (txHash, _response, creditedAmount) => {
3255
3255
  if (settleAfterCredit) {
3256
3256
  void settleAfterCredit(txHash, creditedAmount);
@@ -3374,11 +3374,11 @@ function ExternalDepositView({
3374
3374
  ] }),
3375
3375
  showDepositInstructions && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3376
3376
  !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" }) }),
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(chunk7VNAGKRC_cjs.Skeleton, { className: "h-full w-full rounded-[10px]" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-sm", children: "Deposit address unavailable" }) }),
3378
3378
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
3379
3379
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: "Deposit Address" }),
3380
3380
  /* @__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" }) }),
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(chunk7VNAGKRC_cjs.Skeleton, { className: "h-4 w-3/4" }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: "\u2014" }) }),
3382
3382
  /* @__PURE__ */ jsxRuntime.jsxs(
3383
3383
  "button",
3384
3384
  {
@@ -3433,7 +3433,7 @@ function ExternalDepositView({
3433
3433
  TransactionSuccessView,
3434
3434
  {
3435
3435
  title: "Deposit Credited",
3436
- message: `Transfer ${chunkFGWMLLEC_cjs.shortenAddress(credited.txHash)} has been credited to your Privana balance.`,
3436
+ message: `Transfer ${chunk7VNAGKRC_cjs.shortenAddress(credited.txHash)} has been credited to your Privana balance.`,
3437
3437
  onDone: () => {
3438
3438
  setCredited(null);
3439
3439
  verification.reset();
@@ -3462,7 +3462,7 @@ function ExternalDepositView({
3462
3462
  {
3463
3463
  title: "Awaiting Deposit",
3464
3464
  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
3465
+ remaining: listening ? chunk7VNAGKRC_cjs.formatCountdown(secondsLeft) : void 0
3466
3466
  }
3467
3467
  ),
3468
3468
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
@@ -3491,7 +3491,7 @@ function ExternalDepositView({
3491
3491
  ] });
3492
3492
  }
3493
3493
  function MoonPayGate({ enabled, children }) {
3494
- const { networkConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
3494
+ const { networkConfig } = chunk7VNAGKRC_cjs.usePrivanaContext();
3495
3495
  const apiKey = networkConfig.moonpayApiKey;
3496
3496
  if (!enabled || !apiKey) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
3497
3497
  return /* @__PURE__ */ jsxRuntime.jsx(moonpayReact.MoonPayProvider, { apiKey, children });
@@ -3512,7 +3512,7 @@ function MethodTabs({
3512
3512
  /* @__PURE__ */ jsxRuntime.jsx(
3513
3513
  "div",
3514
3514
  {
3515
- className: chunkFGWMLLEC_cjs.cn(
3515
+ className: chunk7VNAGKRC_cjs.cn(
3516
3516
  "bg-input absolute top-1 bottom-1 left-1 w-[calc(50%-8px)] rounded-md transition-transform duration-200",
3517
3517
  activeTab === "credit-card" && "translate-x-[calc(100%+8px)]"
3518
3518
  )
@@ -3523,7 +3523,7 @@ function MethodTabs({
3523
3523
  {
3524
3524
  type: "button",
3525
3525
  onClick: () => onTabChange("crypto"),
3526
- className: chunkFGWMLLEC_cjs.cn(
3526
+ className: chunk7VNAGKRC_cjs.cn(
3527
3527
  "relative z-10 flex-1 cursor-pointer rounded-md px-3 py-[9px] text-sm font-medium transition-colors",
3528
3528
  activeTab === "crypto" ? "text-foreground" : "text-muted-foreground"
3529
3529
  ),
@@ -3535,7 +3535,7 @@ function MethodTabs({
3535
3535
  {
3536
3536
  type: "button",
3537
3537
  onClick: () => onTabChange("credit-card"),
3538
- className: chunkFGWMLLEC_cjs.cn(
3538
+ className: chunk7VNAGKRC_cjs.cn(
3539
3539
  "relative z-10 flex-1 cursor-pointer rounded-md px-3 py-[9px] text-sm font-medium transition-colors",
3540
3540
  activeTab === "credit-card" ? "text-foreground" : "text-muted-foreground"
3541
3541
  ),
@@ -3579,7 +3579,7 @@ function DepositModalContent({
3579
3579
  onCloseBlockedChange,
3580
3580
  onExit
3581
3581
  }) {
3582
- const { serviceName, enabledTokens, defaultToken, hostedAuthConfig, getChainById: getChainById2, getTokenById } = chunkFGWMLLEC_cjs.usePrivanaContext();
3582
+ const { serviceName, enabledTokens, defaultToken, hostedAuthConfig, getChainById: getChainById2, getTokenById } = chunk7VNAGKRC_cjs.usePrivanaContext();
3583
3583
  const { address } = wagmi.useAccount();
3584
3584
  const appName = serviceName ?? "Privana";
3585
3585
  const [activeTab, setActiveTab] = react.useState(defaultTab);
@@ -3714,7 +3714,7 @@ function DepositModalContent({
3714
3714
  sonner.toast.error("External deposits support ERC20 tokens only");
3715
3715
  return;
3716
3716
  }
3717
- const depositAmount = chunkFGWMLLEC_cjs.parseTokenAmount(args.amount, token2.decimals);
3717
+ const depositAmount = chunk7VNAGKRC_cjs.parseTokenAmount(args.amount, token2.decimals);
3718
3718
  if (!allowance) {
3719
3719
  setView("external-deposit");
3720
3720
  return;
@@ -3747,7 +3747,7 @@ function DepositModalContent({
3747
3747
  setCancelled(false);
3748
3748
  deposit({
3749
3749
  tokenId: token.id,
3750
- amount: chunkFGWMLLEC_cjs.parseTokenAmount(args.amount, token.decimals),
3750
+ amount: chunk7VNAGKRC_cjs.parseTokenAmount(args.amount, token.decimals),
3751
3751
  postDepositLock: allowance ? {
3752
3752
  maxAmount: BigInt(allowance.value),
3753
3753
  lockDuration: allowance.lockDuration
@@ -3788,7 +3788,7 @@ function DepositModalContent({
3788
3788
  ];
3789
3789
  const hasExternalLockRecovery = view === "external-deposit" && !!externalLock.session?.creditedAmount;
3790
3790
  const externalSubmissionAmbiguous = hasExternalLockRecovery && !!lockFailure?.submissionMayHaveSucceeded;
3791
- const savedExternalPayloadUsable = !!externalLock.session?.payload && chunkFGWMLLEC_cjs.isSignedLockUsable(externalLock.session.payload);
3791
+ const savedExternalPayloadUsable = !!externalLock.session?.payload && chunk7VNAGKRC_cjs.isSignedLockUsable(externalLock.session.payload);
3792
3792
  const ambiguousRecoveryMustBeAbandoned = externalSubmissionAmbiguous && !savedExternalPayloadUsable;
3793
3793
  const externalRecoveryExitLabel = externalSubmissionAmbiguous ? "Stop recovery" : "Keep funds unlocked";
3794
3794
  const lockFailureToken = hasExternalLockRecovery && externalLock.session ? getTokenById(externalLock.session.tokenId) ?? selectedToken : selectedToken;
@@ -3858,7 +3858,7 @@ function DepositModalContent({
3858
3858
  onClick: onClose,
3859
3859
  disabled: isUnsafeToClose,
3860
3860
  "aria-label": "Close",
3861
- className: chunkFGWMLLEC_cjs.cn(
3861
+ className: chunk7VNAGKRC_cjs.cn(
3862
3862
  "absolute top-6 right-5 z-20 flex h-5 w-5 items-center justify-center transition-colors",
3863
3863
  isUnsafeToClose ? "text-muted-foreground/40 cursor-not-allowed" : "text-muted-foreground hover:text-foreground cursor-pointer"
3864
3864
  ),
@@ -4066,7 +4066,7 @@ function DepositInlineModal({ className, ...handlers }) {
4066
4066
  "div",
4067
4067
  {
4068
4068
  "data-privana": true,
4069
- className: chunkFGWMLLEC_cjs.cn(
4069
+ className: chunk7VNAGKRC_cjs.cn(
4070
4070
  "bg-card relative flex w-[560px] max-w-full flex-col gap-2 overflow-hidden rounded-2xl p-2 shadow-lg",
4071
4071
  className
4072
4072
  ),
@@ -4079,9 +4079,10 @@ function WithdrawView({
4079
4079
  amount,
4080
4080
  onAmountChange,
4081
4081
  onSelectToken,
4082
- onPendingChange
4082
+ onPendingChange,
4083
+ onWithdrawSuccess
4083
4084
  }) {
4084
- const { chains, getChainById: getChainById2 } = chunkFGWMLLEC_cjs.usePrivanaContext();
4085
+ const { chains, getChainById: getChainById2 } = chunk7VNAGKRC_cjs.usePrivanaContext();
4085
4086
  const { isConnected, address } = wagmi.useAccount();
4086
4087
  const [showSuccess, setShowSuccess] = react.useState(false);
4087
4088
  const [showTimeout, setShowTimeout] = react.useState(false);
@@ -4095,18 +4096,23 @@ function WithdrawView({
4095
4096
  tokenId: selectedToken?.id,
4096
4097
  enabled: !!selectedToken
4097
4098
  });
4098
- const formattedBalance = selectedToken ? chunkFGWMLLEC_cjs.formatTokenAmount(balanceWei, selectedToken.decimals) : "0.00";
4099
+ const formattedBalance = selectedToken ? chunk7VNAGKRC_cjs.formatTokenAmount(balanceWei, selectedToken.decimals) : "0.00";
4099
4100
  const { withdraw, isPending, currentStep, error, reset } = useWithdraw({
4100
4101
  onProcessingSuccess: () => {
4101
4102
  onAmountChange("");
4102
- setShowSuccess(true);
4103
+ if (onWithdrawSuccess) {
4104
+ reset();
4105
+ onWithdrawSuccess();
4106
+ } else {
4107
+ setShowSuccess(true);
4108
+ }
4103
4109
  },
4104
4110
  onProcessingTimeout: () => {
4105
4111
  onAmountChange("");
4106
4112
  setShowTimeout(true);
4107
4113
  }
4108
4114
  });
4109
- const explorerUrl = address && targetChain ? chunkFGWMLLEC_cjs.getExplorerAddressUrl(targetChain.id, address) : void 0;
4115
+ const explorerUrl = address && targetChain ? chunk7VNAGKRC_cjs.getExplorerAddressUrl(targetChain.id, address) : void 0;
4110
4116
  const getStepStatus = (step, after) => {
4111
4117
  if (currentStep === step) return "active";
4112
4118
  if (after.includes(currentStep)) return "completed";
@@ -4131,7 +4137,7 @@ function WithdrawView({
4131
4137
  }, [isPending, cancelled, onPendingChange]);
4132
4138
  const hasValidAmount = !!amount && parseFloat(amount) > 0;
4133
4139
  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);
4140
+ const exceedsBalance = !!hasValidAmount && !tooManyDecimals && !!selectedToken && !isBalanceLoading && !isBalanceError && chunk7VNAGKRC_cjs.parseTokenAmount(amount, selectedToken.decimals) > BigInt(balanceWei);
4135
4141
  const canWithdraw = isConnected && hasValidAmount && !!selectedToken && !tooManyDecimals && !exceedsBalance;
4136
4142
  const handleMax = () => {
4137
4143
  if (!selectedToken) return;
@@ -4143,7 +4149,7 @@ function WithdrawView({
4143
4149
  setCancelled(false);
4144
4150
  await withdraw({
4145
4151
  tokenId: selectedToken.id,
4146
- amount: chunkFGWMLLEC_cjs.parseTokenAmount(amount, selectedToken.decimals)
4152
+ amount: chunk7VNAGKRC_cjs.parseTokenAmount(amount, selectedToken.decimals)
4147
4153
  });
4148
4154
  };
4149
4155
  const handleCancel = () => {
@@ -4163,7 +4169,7 @@ function WithdrawView({
4163
4169
  title: "Withdrawal Complete",
4164
4170
  message: `Your ${selectedToken.symbol} withdrawal has been processed. Funds should appear in your wallet shortly.`,
4165
4171
  explorerUrl,
4166
- explorerLabel: targetChain ? chunkFGWMLLEC_cjs.getExplorerLabel(targetChain.id) : void 0,
4172
+ explorerLabel: targetChain ? chunk7VNAGKRC_cjs.getExplorerLabel(targetChain.id) : void 0,
4167
4173
  onDone: handleDone
4168
4174
  }
4169
4175
  ) });
@@ -4272,9 +4278,10 @@ function WithdrawView({
4272
4278
  function WithdrawModalContent({
4273
4279
  onClose,
4274
4280
  onPendingChange,
4275
- onBack
4281
+ onBack,
4282
+ onWithdrawSuccess
4276
4283
  }) {
4277
- const { serviceName, enabledTokens, defaultToken, hostedAuthConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
4284
+ const { serviceName, enabledTokens, defaultToken, hostedAuthConfig } = chunk7VNAGKRC_cjs.usePrivanaContext();
4278
4285
  const { address } = wagmi.useAccount();
4279
4286
  const appName = serviceName ?? "Privana";
4280
4287
  const [view, setView] = react.useState("form");
@@ -4338,7 +4345,8 @@ function WithdrawModalContent({
4338
4345
  amount,
4339
4346
  onAmountChange: setAmount,
4340
4347
  onSelectToken: () => setView("select-token"),
4341
- onPendingChange: handlePendingChange
4348
+ onPendingChange: handlePendingChange,
4349
+ onWithdrawSuccess
4342
4350
  }
4343
4351
  ),
4344
4352
  view === "select-token" && /* @__PURE__ */ jsxRuntime.jsx(
@@ -4353,7 +4361,7 @@ function WithdrawModalContent({
4353
4361
  )
4354
4362
  ] });
4355
4363
  }
4356
- function WithdrawModal({ open, onClose }) {
4364
+ function WithdrawModal({ open, onClose, onWithdrawSuccess }) {
4357
4365
  const titleId = react.useId();
4358
4366
  const descId = react.useId();
4359
4367
  const [isCloseBlocked, setIsCloseBlocked] = react.useState(false);
@@ -4380,23 +4388,30 @@ function WithdrawModal({ open, onClose }) {
4380
4388
  children: [
4381
4389
  /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { id: titleId, className: "sr-only", children: "Withdraw" }),
4382
4390
  /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { id: descId, className: "sr-only", children: "Withdraw funds from your account." }),
4383
- /* @__PURE__ */ jsxRuntime.jsx(WithdrawModalContent, { onClose: handleClose, onPendingChange: setIsCloseBlocked })
4391
+ /* @__PURE__ */ jsxRuntime.jsx(
4392
+ WithdrawModalContent,
4393
+ {
4394
+ onClose: handleClose,
4395
+ onPendingChange: setIsCloseBlocked,
4396
+ onWithdrawSuccess
4397
+ }
4398
+ )
4384
4399
  ]
4385
4400
  }
4386
4401
  )
4387
4402
  }
4388
4403
  );
4389
4404
  }
4390
- function WithdrawInlineModal({ className }) {
4405
+ function WithdrawInlineModal({ className, onWithdrawSuccess }) {
4391
4406
  return /* @__PURE__ */ jsxRuntime.jsx(
4392
4407
  "div",
4393
4408
  {
4394
4409
  "data-privana": true,
4395
- className: chunkFGWMLLEC_cjs.cn(
4410
+ className: chunk7VNAGKRC_cjs.cn(
4396
4411
  "bg-card relative flex w-[560px] max-w-full flex-col gap-2 overflow-hidden rounded-2xl p-2 shadow-lg",
4397
4412
  className
4398
4413
  ),
4399
- children: /* @__PURE__ */ jsxRuntime.jsx(WithdrawModalContent, {})
4414
+ children: /* @__PURE__ */ jsxRuntime.jsx(WithdrawModalContent, { onWithdrawSuccess })
4400
4415
  }
4401
4416
  );
4402
4417
  }
@@ -4436,14 +4451,14 @@ function SegmentedBalanceBar({
4436
4451
  showAvailable && /* @__PURE__ */ jsxRuntime.jsx(
4437
4452
  "div",
4438
4453
  {
4439
- className: chunkFGWMLLEC_cjs.cn(AVAILABLE_COLOR, "rounded-l-full", !showInUse && "rounded-r-full"),
4454
+ className: chunk7VNAGKRC_cjs.cn(AVAILABLE_COLOR, "rounded-l-full", !showInUse && "rounded-r-full"),
4440
4455
  style: { flexGrow: grow(availableWei) }
4441
4456
  }
4442
4457
  ),
4443
4458
  showInUse && /* @__PURE__ */ jsxRuntime.jsx(
4444
4459
  "div",
4445
4460
  {
4446
- className: chunkFGWMLLEC_cjs.cn(IN_USE_COLOR, "rounded-r-full", !showAvailable && "rounded-l-full"),
4461
+ className: chunk7VNAGKRC_cjs.cn(IN_USE_COLOR, "rounded-r-full", !showAvailable && "rounded-l-full"),
4447
4462
  style: { flexGrow: grow(inUseWei) }
4448
4463
  }
4449
4464
  )
@@ -4451,7 +4466,7 @@ function SegmentedBalanceBar({
4451
4466
  }
4452
4467
  function BalanceLegendItem({ color, label }) {
4453
4468
  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) }),
4469
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk7VNAGKRC_cjs.cn("h-2.5 w-2.5 rounded-full", color) }),
4455
4470
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground text-sm leading-5", children: label })
4456
4471
  ] });
4457
4472
  }
@@ -4464,7 +4479,7 @@ function WalletBalanceView({
4464
4479
  onAddFunds,
4465
4480
  onWithdraw
4466
4481
  }) {
4467
- const { serviceName, serviceIcon, defaultToken } = chunkFGWMLLEC_cjs.usePrivanaContext();
4482
+ const { serviceName, serviceIcon, defaultToken } = chunk7VNAGKRC_cjs.usePrivanaContext();
4468
4483
  const appName = serviceName ?? "Privana";
4469
4484
  const token = defaultToken;
4470
4485
  const {
@@ -4477,14 +4492,14 @@ function WalletBalanceView({
4477
4492
  const variant = !session ? "idle" : inUseWei === 0n ? "session-zero" : availableWei === 0n ? "fully-in-use" : "mixed";
4478
4493
  const expiry = session?.expiry;
4479
4494
  useNow(3e4, expiry != null);
4480
- const countdown = expiry != null ? chunkFGWMLLEC_cjs.formatTimeRemaining(expiry) : null;
4495
+ const countdown = expiry != null ? chunk7VNAGKRC_cjs.formatTimeRemaining(expiry) : null;
4481
4496
  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);
4497
+ const totalFormatted = chunk7VNAGKRC_cjs.formatTokenAmount((availableWei + inUseWei).toString(), decimals);
4498
+ const availableFormatted = chunk7VNAGKRC_cjs.formatTokenAmount(availableWei.toString(), decimals);
4499
+ const inUseFormatted = chunk7VNAGKRC_cjs.formatTokenAmount(inUseWei.toString(), decimals);
4485
4500
  const hasValidAmount = !!amount && parseFloat(amount) > 0;
4486
4501
  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;
4502
+ const exceedsBalance = hasValidAmount && !tooManyDecimals && !!token && !isBalanceLoading && !isBalanceError && chunk7VNAGKRC_cjs.parseTokenAmount(amount, token.decimals) > availableWei;
4488
4503
  const canFundSession = hasValidAmount && !!token && !tooManyDecimals && !exceedsBalance && !isBalanceLoading && !isBalanceError;
4489
4504
  const handleMax = () => {
4490
4505
  const max = availableFormatted.replace(/\s/g, "");
@@ -4502,7 +4517,7 @@ function WalletBalanceView({
4502
4517
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-sm leading-[14px]", children: "Total" }),
4503
4518
  /* @__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
4519
  ] }),
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 })
4520
+ isBalanceLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk7VNAGKRC_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
4521
  ] }),
4507
4522
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
4508
4523
  /* @__PURE__ */ jsxRuntime.jsx(SegmentedBalanceBar, { availableWei, inUseWei }),
@@ -4648,11 +4663,12 @@ function WalletModalContent({
4648
4663
  onFundSession,
4649
4664
  onEndSession,
4650
4665
  onDepositSuccess,
4666
+ onWithdrawSuccess,
4651
4667
  onClose,
4652
4668
  onCloseBlockedChange,
4653
4669
  ...depositHandlers
4654
4670
  }) {
4655
- const { serviceName, hostedAuthConfig } = chunkFGWMLLEC_cjs.usePrivanaContext();
4671
+ const { serviceName, hostedAuthConfig } = chunk7VNAGKRC_cjs.usePrivanaContext();
4656
4672
  const { address } = wagmi.useAccount();
4657
4673
  const appName = serviceName ?? "Privana";
4658
4674
  const [view, setView] = react.useState("balance");
@@ -4756,7 +4772,7 @@ function WalletModalContent({
4756
4772
  onClick: onClose,
4757
4773
  disabled: closeBlocked,
4758
4774
  "aria-label": "Close",
4759
- className: chunkFGWMLLEC_cjs.cn(
4775
+ className: chunk7VNAGKRC_cjs.cn(
4760
4776
  "absolute top-6 right-5 z-20 flex h-5 w-5 items-center justify-center transition-colors",
4761
4777
  closeBlocked ? "text-muted-foreground/40 cursor-not-allowed" : "text-muted-foreground hover:text-foreground cursor-pointer"
4762
4778
  ),
@@ -4812,7 +4828,17 @@ function WalletModalContent({
4812
4828
  retryLabel: "Try again"
4813
4829
  }
4814
4830
  ) }),
4815
- view === "withdraw" && /* @__PURE__ */ jsxRuntime.jsx(WithdrawModalContent, { onBack: exitWithdraw, onPendingChange: setWithdrawPending }),
4831
+ view === "withdraw" && /* @__PURE__ */ jsxRuntime.jsx(
4832
+ WithdrawModalContent,
4833
+ {
4834
+ onBack: exitWithdraw,
4835
+ onPendingChange: setWithdrawPending,
4836
+ onWithdrawSuccess: () => {
4837
+ exitWithdraw();
4838
+ onWithdrawSuccess?.();
4839
+ }
4840
+ }
4841
+ ),
4816
4842
  view === "deposit" && /* @__PURE__ */ jsxRuntime.jsx(
4817
4843
  DepositModalContent,
4818
4844
  {
@@ -4874,7 +4900,7 @@ function WalletInlineModal({ className, ...handlers }) {
4874
4900
  "div",
4875
4901
  {
4876
4902
  "data-privana": true,
4877
- className: chunkFGWMLLEC_cjs.cn(
4903
+ className: chunk7VNAGKRC_cjs.cn(
4878
4904
  "bg-card relative flex w-[560px] max-w-full flex-col gap-2 overflow-hidden rounded-2xl p-2 shadow-lg",
4879
4905
  className
4880
4906
  ),
@@ -4885,295 +4911,295 @@ function WalletInlineModal({ className, ...handlers }) {
4885
4911
 
4886
4912
  Object.defineProperty(exports, "AccountingApiError", {
4887
4913
  enumerable: true,
4888
- get: function () { return chunkFGWMLLEC_cjs.AccountingApiError; }
4914
+ get: function () { return chunk7VNAGKRC_cjs.AccountingApiError; }
4889
4915
  });
4890
4916
  Object.defineProperty(exports, "Button", {
4891
4917
  enumerable: true,
4892
- get: function () { return chunkFGWMLLEC_cjs.Button; }
4918
+ get: function () { return chunk7VNAGKRC_cjs.Button; }
4893
4919
  });
4894
4920
  Object.defineProperty(exports, "DEFAULT_LOCK_DURATION_SECONDS", {
4895
4921
  enumerable: true,
4896
- get: function () { return chunkFGWMLLEC_cjs.DEFAULT_LOCK_DURATION_SECONDS; }
4922
+ get: function () { return chunk7VNAGKRC_cjs.DEFAULT_LOCK_DURATION_SECONDS; }
4897
4923
  });
4898
4924
  Object.defineProperty(exports, "DEFAULT_ONRAMP_LOCK_BUFFER", {
4899
4925
  enumerable: true,
4900
- get: function () { return chunkFGWMLLEC_cjs.DEFAULT_ONRAMP_LOCK_BUFFER; }
4926
+ get: function () { return chunk7VNAGKRC_cjs.DEFAULT_ONRAMP_LOCK_BUFFER; }
4901
4927
  });
4902
4928
  Object.defineProperty(exports, "HOSTED_AUTH_CLOCK_SKEW_MS", {
4903
4929
  enumerable: true,
4904
- get: function () { return chunkFGWMLLEC_cjs.HOSTED_AUTH_CLOCK_SKEW_MS; }
4930
+ get: function () { return chunk7VNAGKRC_cjs.HOSTED_AUTH_CLOCK_SKEW_MS; }
4905
4931
  });
4906
4932
  Object.defineProperty(exports, "HostedAuthError", {
4907
4933
  enumerable: true,
4908
- get: function () { return chunkFGWMLLEC_cjs.HostedAuthError; }
4934
+ get: function () { return chunk7VNAGKRC_cjs.HostedAuthError; }
4909
4935
  });
4910
4936
  Object.defineProperty(exports, "HostedAuthRequiredError", {
4911
4937
  enumerable: true,
4912
- get: function () { return chunkFGWMLLEC_cjs.HostedAuthRequiredError; }
4938
+ get: function () { return chunk7VNAGKRC_cjs.HostedAuthRequiredError; }
4913
4939
  });
4914
4940
  Object.defineProperty(exports, "HostedAuthStateMismatchError", {
4915
4941
  enumerable: true,
4916
- get: function () { return chunkFGWMLLEC_cjs.HostedAuthStateMismatchError; }
4942
+ get: function () { return chunk7VNAGKRC_cjs.HostedAuthStateMismatchError; }
4917
4943
  });
4918
4944
  Object.defineProperty(exports, "HttpClient", {
4919
4945
  enumerable: true,
4920
- get: function () { return chunkFGWMLLEC_cjs.HttpClient; }
4946
+ get: function () { return chunk7VNAGKRC_cjs.HttpClient; }
4921
4947
  });
4922
4948
  Object.defineProperty(exports, "LOCK_TYPES", {
4923
4949
  enumerable: true,
4924
- get: function () { return chunkFGWMLLEC_cjs.LOCK_TYPES; }
4950
+ get: function () { return chunk7VNAGKRC_cjs.LOCK_TYPES; }
4925
4951
  });
4926
4952
  Object.defineProperty(exports, "MODIFY_LOCK_TYPES", {
4927
4953
  enumerable: true,
4928
- get: function () { return chunkFGWMLLEC_cjs.MODIFY_LOCK_TYPES; }
4954
+ get: function () { return chunk7VNAGKRC_cjs.MODIFY_LOCK_TYPES; }
4929
4955
  });
4930
4956
  Object.defineProperty(exports, "NETWORK_CONFIG", {
4931
4957
  enumerable: true,
4932
- get: function () { return chunkFGWMLLEC_cjs.NETWORK_CONFIG; }
4958
+ get: function () { return chunk7VNAGKRC_cjs.NETWORK_CONFIG; }
4933
4959
  });
4934
4960
  Object.defineProperty(exports, "NetworkError", {
4935
4961
  enumerable: true,
4936
- get: function () { return chunkFGWMLLEC_cjs.NetworkError; }
4962
+ get: function () { return chunk7VNAGKRC_cjs.NetworkError; }
4937
4963
  });
4938
4964
  Object.defineProperty(exports, "PostDepositLockError", {
4939
4965
  enumerable: true,
4940
- get: function () { return chunkFGWMLLEC_cjs.PostDepositLockError; }
4966
+ get: function () { return chunk7VNAGKRC_cjs.PostDepositLockError; }
4941
4967
  });
4942
4968
  Object.defineProperty(exports, "PrivanaClient", {
4943
4969
  enumerable: true,
4944
- get: function () { return chunkFGWMLLEC_cjs.PrivanaClient; }
4970
+ get: function () { return chunk7VNAGKRC_cjs.PrivanaClient; }
4945
4971
  });
4946
4972
  Object.defineProperty(exports, "PrivanaProvider", {
4947
4973
  enumerable: true,
4948
- get: function () { return chunkFGWMLLEC_cjs.PrivanaProvider; }
4974
+ get: function () { return chunk7VNAGKRC_cjs.PrivanaProvider; }
4949
4975
  });
4950
4976
  Object.defineProperty(exports, "SUPPORTED_CHAINS", {
4951
4977
  enumerable: true,
4952
- get: function () { return chunkFGWMLLEC_cjs.SUPPORTED_CHAINS; }
4978
+ get: function () { return chunk7VNAGKRC_cjs.SUPPORTED_CHAINS; }
4953
4979
  });
4954
4980
  Object.defineProperty(exports, "SiweAuthProvider", {
4955
4981
  enumerable: true,
4956
- get: function () { return chunkFGWMLLEC_cjs.SiweAuthProvider; }
4982
+ get: function () { return chunk7VNAGKRC_cjs.SiweAuthProvider; }
4957
4983
  });
4958
4984
  Object.defineProperty(exports, "Skeleton", {
4959
4985
  enumerable: true,
4960
- get: function () { return chunkFGWMLLEC_cjs.Skeleton; }
4986
+ get: function () { return chunk7VNAGKRC_cjs.Skeleton; }
4961
4987
  });
4962
4988
  Object.defineProperty(exports, "TRANSFER_LOCKED_TYPES", {
4963
4989
  enumerable: true,
4964
- get: function () { return chunkFGWMLLEC_cjs.TRANSFER_LOCKED_TYPES; }
4990
+ get: function () { return chunk7VNAGKRC_cjs.TRANSFER_LOCKED_TYPES; }
4965
4991
  });
4966
4992
  Object.defineProperty(exports, "TRANSFER_TYPES", {
4967
4993
  enumerable: true,
4968
- get: function () { return chunkFGWMLLEC_cjs.TRANSFER_TYPES; }
4994
+ get: function () { return chunk7VNAGKRC_cjs.TRANSFER_TYPES; }
4969
4995
  });
4970
4996
  Object.defineProperty(exports, "ValidationError", {
4971
4997
  enumerable: true,
4972
- get: function () { return chunkFGWMLLEC_cjs.ValidationError; }
4998
+ get: function () { return chunk7VNAGKRC_cjs.ValidationError; }
4973
4999
  });
4974
5000
  Object.defineProperty(exports, "WITHDRAW_FROM_LOCK_TYPES", {
4975
5001
  enumerable: true,
4976
- get: function () { return chunkFGWMLLEC_cjs.WITHDRAW_FROM_LOCK_TYPES; }
5002
+ get: function () { return chunk7VNAGKRC_cjs.WITHDRAW_FROM_LOCK_TYPES; }
4977
5003
  });
4978
5004
  Object.defineProperty(exports, "WITHDRAW_TYPES", {
4979
5005
  enumerable: true,
4980
- get: function () { return chunkFGWMLLEC_cjs.WITHDRAW_TYPES; }
5006
+ get: function () { return chunk7VNAGKRC_cjs.WITHDRAW_TYPES; }
4981
5007
  });
4982
5008
  Object.defineProperty(exports, "applyLockBuffer", {
4983
5009
  enumerable: true,
4984
- get: function () { return chunkFGWMLLEC_cjs.applyLockBuffer; }
5010
+ get: function () { return chunk7VNAGKRC_cjs.applyLockBuffer; }
4985
5011
  });
4986
5012
  Object.defineProperty(exports, "applyRefreshResponse", {
4987
5013
  enumerable: true,
4988
- get: function () { return chunkFGWMLLEC_cjs.applyRefreshResponse; }
5014
+ get: function () { return chunk7VNAGKRC_cjs.applyRefreshResponse; }
4989
5015
  });
4990
5016
  Object.defineProperty(exports, "buildHostedAuthSession", {
4991
5017
  enumerable: true,
4992
- get: function () { return chunkFGWMLLEC_cjs.buildHostedAuthSession; }
5018
+ get: function () { return chunk7VNAGKRC_cjs.buildHostedAuthSession; }
4993
5019
  });
4994
5020
  Object.defineProperty(exports, "buildSiweStatement", {
4995
5021
  enumerable: true,
4996
- get: function () { return chunkFGWMLLEC_cjs.buildSiweStatement; }
5022
+ get: function () { return chunk7VNAGKRC_cjs.buildSiweStatement; }
4997
5023
  });
4998
5024
  Object.defineProperty(exports, "buttonVariants", {
4999
5025
  enumerable: true,
5000
- get: function () { return chunkFGWMLLEC_cjs.buttonVariants; }
5026
+ get: function () { return chunk7VNAGKRC_cjs.buttonVariants; }
5001
5027
  });
5002
5028
  Object.defineProperty(exports, "clampLockAmount", {
5003
5029
  enumerable: true,
5004
- get: function () { return chunkFGWMLLEC_cjs.clampLockAmount; }
5030
+ get: function () { return chunk7VNAGKRC_cjs.clampLockAmount; }
5005
5031
  });
5006
5032
  Object.defineProperty(exports, "clearHostedAuthPendingTransaction", {
5007
5033
  enumerable: true,
5008
- get: function () { return chunkFGWMLLEC_cjs.clearHostedAuthPendingTransaction; }
5034
+ get: function () { return chunk7VNAGKRC_cjs.clearHostedAuthPendingTransaction; }
5009
5035
  });
5010
5036
  Object.defineProperty(exports, "clearPendingLock", {
5011
5037
  enumerable: true,
5012
- get: function () { return chunkFGWMLLEC_cjs.clearPendingLock; }
5038
+ get: function () { return chunk7VNAGKRC_cjs.clearPendingLock; }
5013
5039
  });
5014
5040
  Object.defineProperty(exports, "createDomain", {
5015
5041
  enumerable: true,
5016
- get: function () { return chunkFGWMLLEC_cjs.createDomain; }
5042
+ get: function () { return chunk7VNAGKRC_cjs.createDomain; }
5017
5043
  });
5018
5044
  Object.defineProperty(exports, "createHostedAuthPendingStorageKey", {
5019
5045
  enumerable: true,
5020
- get: function () { return chunkFGWMLLEC_cjs.createHostedAuthPendingStorageKey; }
5046
+ get: function () { return chunk7VNAGKRC_cjs.createHostedAuthPendingStorageKey; }
5021
5047
  });
5022
5048
  Object.defineProperty(exports, "createHostedAuthState", {
5023
5049
  enumerable: true,
5024
- get: function () { return chunkFGWMLLEC_cjs.createHostedAuthState; }
5050
+ get: function () { return chunk7VNAGKRC_cjs.createHostedAuthState; }
5025
5051
  });
5026
5052
  Object.defineProperty(exports, "createHostedAuthStorageKey", {
5027
5053
  enumerable: true,
5028
- get: function () { return chunkFGWMLLEC_cjs.createHostedAuthStorageKey; }
5054
+ get: function () { return chunk7VNAGKRC_cjs.createHostedAuthStorageKey; }
5029
5055
  });
5030
5056
  Object.defineProperty(exports, "createLockExpiry", {
5031
5057
  enumerable: true,
5032
- get: function () { return chunkFGWMLLEC_cjs.createLockExpiry; }
5058
+ get: function () { return chunk7VNAGKRC_cjs.createLockExpiry; }
5033
5059
  });
5034
5060
  Object.defineProperty(exports, "createPkceChallenge", {
5035
5061
  enumerable: true,
5036
- get: function () { return chunkFGWMLLEC_cjs.createPkceChallenge; }
5062
+ get: function () { return chunk7VNAGKRC_cjs.createPkceChallenge; }
5037
5063
  });
5038
5064
  Object.defineProperty(exports, "createPkceVerifier", {
5039
5065
  enumerable: true,
5040
- get: function () { return chunkFGWMLLEC_cjs.createPkceVerifier; }
5066
+ get: function () { return chunk7VNAGKRC_cjs.createPkceVerifier; }
5041
5067
  });
5042
5068
  Object.defineProperty(exports, "createSignedLockRequest", {
5043
5069
  enumerable: true,
5044
- get: function () { return chunkFGWMLLEC_cjs.createSignedLockRequest; }
5070
+ get: function () { return chunk7VNAGKRC_cjs.createSignedLockRequest; }
5045
5071
  });
5046
5072
  Object.defineProperty(exports, "getAccountingContract", {
5047
5073
  enumerable: true,
5048
- get: function () { return chunkFGWMLLEC_cjs.getAccountingContract; }
5074
+ get: function () { return chunk7VNAGKRC_cjs.getAccountingContract; }
5049
5075
  });
5050
5076
  Object.defineProperty(exports, "getApiUrl", {
5051
5077
  enumerable: true,
5052
- get: function () { return chunkFGWMLLEC_cjs.getApiUrl; }
5078
+ get: function () { return chunk7VNAGKRC_cjs.getApiUrl; }
5053
5079
  });
5054
5080
  Object.defineProperty(exports, "getChainById", {
5055
5081
  enumerable: true,
5056
- get: function () { return chunkFGWMLLEC_cjs.getChainById; }
5082
+ get: function () { return chunk7VNAGKRC_cjs.getChainById; }
5057
5083
  });
5058
5084
  Object.defineProperty(exports, "getChainId", {
5059
5085
  enumerable: true,
5060
- get: function () { return chunkFGWMLLEC_cjs.getChainId; }
5086
+ get: function () { return chunk7VNAGKRC_cjs.getChainId; }
5061
5087
  });
5062
5088
  Object.defineProperty(exports, "getExplorerAddressUrl", {
5063
5089
  enumerable: true,
5064
- get: function () { return chunkFGWMLLEC_cjs.getExplorerAddressUrl; }
5090
+ get: function () { return chunk7VNAGKRC_cjs.getExplorerAddressUrl; }
5065
5091
  });
5066
5092
  Object.defineProperty(exports, "getExplorerLabel", {
5067
5093
  enumerable: true,
5068
- get: function () { return chunkFGWMLLEC_cjs.getExplorerLabel; }
5094
+ get: function () { return chunk7VNAGKRC_cjs.getExplorerLabel; }
5069
5095
  });
5070
5096
  Object.defineProperty(exports, "isHostedAuthRefreshActive", {
5071
5097
  enumerable: true,
5072
- get: function () { return chunkFGWMLLEC_cjs.isHostedAuthRefreshActive; }
5098
+ get: function () { return chunk7VNAGKRC_cjs.isHostedAuthRefreshActive; }
5073
5099
  });
5074
5100
  Object.defineProperty(exports, "isHostedAuthSessionActive", {
5075
5101
  enumerable: true,
5076
- get: function () { return chunkFGWMLLEC_cjs.isHostedAuthSessionActive; }
5102
+ get: function () { return chunk7VNAGKRC_cjs.isHostedAuthSessionActive; }
5077
5103
  });
5078
5104
  Object.defineProperty(exports, "isSignedLockUsable", {
5079
5105
  enumerable: true,
5080
- get: function () { return chunkFGWMLLEC_cjs.isSignedLockUsable; }
5106
+ get: function () { return chunk7VNAGKRC_cjs.isSignedLockUsable; }
5081
5107
  });
5082
5108
  Object.defineProperty(exports, "loadPendingLock", {
5083
5109
  enumerable: true,
5084
- get: function () { return chunkFGWMLLEC_cjs.loadPendingLock; }
5110
+ get: function () { return chunk7VNAGKRC_cjs.loadPendingLock; }
5085
5111
  });
5086
5112
  Object.defineProperty(exports, "normalizeAddress", {
5087
5113
  enumerable: true,
5088
- get: function () { return chunkFGWMLLEC_cjs.normalizeAddress; }
5114
+ get: function () { return chunk7VNAGKRC_cjs.normalizeAddress; }
5089
5115
  });
5090
5116
  Object.defineProperty(exports, "normalizeHex", {
5091
5117
  enumerable: true,
5092
- get: function () { return chunkFGWMLLEC_cjs.normalizeHex; }
5118
+ get: function () { return chunk7VNAGKRC_cjs.normalizeHex; }
5093
5119
  });
5094
5120
  Object.defineProperty(exports, "parseHostedAuthCallback", {
5095
5121
  enumerable: true,
5096
- get: function () { return chunkFGWMLLEC_cjs.parseHostedAuthCallback; }
5122
+ get: function () { return chunk7VNAGKRC_cjs.parseHostedAuthCallback; }
5097
5123
  });
5098
5124
  Object.defineProperty(exports, "persistHostedAuthPendingTransaction", {
5099
5125
  enumerable: true,
5100
- get: function () { return chunkFGWMLLEC_cjs.persistHostedAuthPendingTransaction; }
5126
+ get: function () { return chunk7VNAGKRC_cjs.persistHostedAuthPendingTransaction; }
5101
5127
  });
5102
5128
  Object.defineProperty(exports, "readHostedAuthPendingTransaction", {
5103
5129
  enumerable: true,
5104
- get: function () { return chunkFGWMLLEC_cjs.readHostedAuthPendingTransaction; }
5130
+ get: function () { return chunk7VNAGKRC_cjs.readHostedAuthPendingTransaction; }
5105
5131
  });
5106
5132
  Object.defineProperty(exports, "readStoredHostedAuthSession", {
5107
5133
  enumerable: true,
5108
- get: function () { return chunkFGWMLLEC_cjs.readStoredHostedAuthSession; }
5134
+ get: function () { return chunk7VNAGKRC_cjs.readStoredHostedAuthSession; }
5109
5135
  });
5110
5136
  Object.defineProperty(exports, "requireDepositLockOwner", {
5111
5137
  enumerable: true,
5112
- get: function () { return chunkFGWMLLEC_cjs.requireDepositLockOwner; }
5138
+ get: function () { return chunk7VNAGKRC_cjs.requireDepositLockOwner; }
5113
5139
  });
5114
5140
  Object.defineProperty(exports, "requireServiceAddress", {
5115
5141
  enumerable: true,
5116
- get: function () { return chunkFGWMLLEC_cjs.requireServiceAddress; }
5142
+ get: function () { return chunk7VNAGKRC_cjs.requireServiceAddress; }
5117
5143
  });
5118
5144
  Object.defineProperty(exports, "savePendingLock", {
5119
5145
  enumerable: true,
5120
- get: function () { return chunkFGWMLLEC_cjs.savePendingLock; }
5146
+ get: function () { return chunk7VNAGKRC_cjs.savePendingLock; }
5121
5147
  });
5122
5148
  Object.defineProperty(exports, "signLockMessage", {
5123
5149
  enumerable: true,
5124
- get: function () { return chunkFGWMLLEC_cjs.signLockMessage; }
5150
+ get: function () { return chunk7VNAGKRC_cjs.signLockMessage; }
5125
5151
  });
5126
5152
  Object.defineProperty(exports, "signModifyLockMessage", {
5127
5153
  enumerable: true,
5128
- get: function () { return chunkFGWMLLEC_cjs.signModifyLockMessage; }
5154
+ get: function () { return chunk7VNAGKRC_cjs.signModifyLockMessage; }
5129
5155
  });
5130
5156
  Object.defineProperty(exports, "signTransferLockedMessage", {
5131
5157
  enumerable: true,
5132
- get: function () { return chunkFGWMLLEC_cjs.signTransferLockedMessage; }
5158
+ get: function () { return chunk7VNAGKRC_cjs.signTransferLockedMessage; }
5133
5159
  });
5134
5160
  Object.defineProperty(exports, "signTransferMessage", {
5135
5161
  enumerable: true,
5136
- get: function () { return chunkFGWMLLEC_cjs.signTransferMessage; }
5162
+ get: function () { return chunk7VNAGKRC_cjs.signTransferMessage; }
5137
5163
  });
5138
5164
  Object.defineProperty(exports, "signWithdrawFromLockMessage", {
5139
5165
  enumerable: true,
5140
- get: function () { return chunkFGWMLLEC_cjs.signWithdrawFromLockMessage; }
5166
+ get: function () { return chunk7VNAGKRC_cjs.signWithdrawFromLockMessage; }
5141
5167
  });
5142
5168
  Object.defineProperty(exports, "signWithdrawMessage", {
5143
5169
  enumerable: true,
5144
- get: function () { return chunkFGWMLLEC_cjs.signWithdrawMessage; }
5170
+ get: function () { return chunk7VNAGKRC_cjs.signWithdrawMessage; }
5145
5171
  });
5146
5172
  Object.defineProperty(exports, "stripHostedAuthCallbackParams", {
5147
5173
  enumerable: true,
5148
- get: function () { return chunkFGWMLLEC_cjs.stripHostedAuthCallbackParams; }
5174
+ get: function () { return chunk7VNAGKRC_cjs.stripHostedAuthCallbackParams; }
5149
5175
  });
5150
5176
  Object.defineProperty(exports, "submitPendingLock", {
5151
5177
  enumerable: true,
5152
- get: function () { return chunkFGWMLLEC_cjs.submitPendingLock; }
5178
+ get: function () { return chunk7VNAGKRC_cjs.submitPendingLock; }
5153
5179
  });
5154
5180
  Object.defineProperty(exports, "syncHostedAuthSessionToClient", {
5155
5181
  enumerable: true,
5156
- get: function () { return chunkFGWMLLEC_cjs.syncHostedAuthSessionToClient; }
5182
+ get: function () { return chunk7VNAGKRC_cjs.syncHostedAuthSessionToClient; }
5157
5183
  });
5158
5184
  Object.defineProperty(exports, "useDepositVerification", {
5159
5185
  enumerable: true,
5160
- get: function () { return chunkFGWMLLEC_cjs.useDepositVerification; }
5186
+ get: function () { return chunk7VNAGKRC_cjs.useDepositVerification; }
5161
5187
  });
5162
5188
  Object.defineProperty(exports, "usePrivanaContext", {
5163
5189
  enumerable: true,
5164
- get: function () { return chunkFGWMLLEC_cjs.usePrivanaContext; }
5190
+ get: function () { return chunk7VNAGKRC_cjs.usePrivanaContext; }
5165
5191
  });
5166
5192
  Object.defineProperty(exports, "useSafeAccount", {
5167
5193
  enumerable: true,
5168
- get: function () { return chunkFGWMLLEC_cjs.useSafeAccount; }
5194
+ get: function () { return chunk7VNAGKRC_cjs.useSafeAccount; }
5169
5195
  });
5170
5196
  Object.defineProperty(exports, "useSafePrivanaContext", {
5171
5197
  enumerable: true,
5172
- get: function () { return chunkFGWMLLEC_cjs.useSafePrivanaContext; }
5198
+ get: function () { return chunk7VNAGKRC_cjs.useSafePrivanaContext; }
5173
5199
  });
5174
5200
  Object.defineProperty(exports, "useSiweAuth", {
5175
5201
  enumerable: true,
5176
- get: function () { return chunkFGWMLLEC_cjs.useSiweAuth; }
5202
+ get: function () { return chunk7VNAGKRC_cjs.useSiweAuth; }
5177
5203
  });
5178
5204
  exports.DepositInlineModal = DepositInlineModal;
5179
5205
  exports.DepositModal = DepositModal;