@pooflabs/web 0.0.78 → 0.0.79-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/index-6pNPzV1t.esm.js +6 -0
  2. package/dist/index-6pNPzV1t.esm.js.map +1 -0
  3. package/dist/{index-DE7k2G22.js → index-BHGEc97p.js} +883 -25
  4. package/dist/index-BHGEc97p.js.map +1 -0
  5. package/dist/{index-OAJ0rndN.esm.js → index-CiwYJvf8.esm.js} +882 -24
  6. package/dist/index-CiwYJvf8.esm.js.map +1 -0
  7. package/dist/{index-CwGoYY0Y.esm.js → index-CsIXFm8d.esm.js} +335 -517
  8. package/dist/index-CsIXFm8d.esm.js.map +1 -0
  9. package/dist/index-D9BY44i-.js +8 -0
  10. package/dist/index-D9BY44i-.js.map +1 -0
  11. package/dist/{index-Cp727oEW.js → index-DwU9hjtr.js} +334 -517
  12. package/dist/index-DwU9hjtr.js.map +1 -0
  13. package/dist/{index-Cmu0PVJD.esm.js → index-U-xlsKRI.esm.js} +881 -23
  14. package/dist/index-U-xlsKRI.esm.js.map +1 -0
  15. package/dist/{index-CKaaE12K.js → index-zS_Y-wbi.js} +882 -24
  16. package/dist/index-zS_Y-wbi.js.map +1 -0
  17. package/dist/{index.browser-DFeGGyO7.esm.js → index.browser-C9bFQZyQ.esm.js} +128 -5
  18. package/dist/index.browser-C9bFQZyQ.esm.js.map +1 -0
  19. package/dist/{index.browser-B4een3Gz.esm.js → index.browser-CMEwqnEe.esm.js} +2 -2
  20. package/dist/{index.browser-B4een3Gz.esm.js.map → index.browser-CMEwqnEe.esm.js.map} +1 -1
  21. package/dist/{index.browser-AZQ5TnZ4.js → index.browser-Cpi4W_1r.js} +2 -2
  22. package/dist/{index.browser-AZQ5TnZ4.js.map → index.browser-Cpi4W_1r.js.map} +1 -1
  23. package/dist/{index.browser-x87QUr4N.esm.js → index.browser-Dbq5Qf1G.esm.js} +128 -5
  24. package/dist/index.browser-Dbq5Qf1G.esm.js.map +1 -0
  25. package/dist/{index.browser-BMtEulGJ.js → index.browser-Df7yN8D5.js} +129 -6
  26. package/dist/index.browser-Df7yN8D5.js.map +1 -0
  27. package/dist/{index.browser-QPkAiPQp.js → index.browser-dszs5oe5.js} +129 -6
  28. package/dist/index.browser-dszs5oe5.js.map +1 -0
  29. package/dist/index.esm.js +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/{index.native-CjEJXA9y.esm.js → index.native-CEf5PJ_g.esm.js} +2690 -550
  32. package/dist/index.native-CEf5PJ_g.esm.js.map +1 -0
  33. package/dist/{index.native-D7IrIMX1.js → index.native-DtxPWD00.js} +2690 -549
  34. package/dist/index.native-DtxPWD00.js.map +1 -0
  35. package/dist/index.native.esm.js +1 -1
  36. package/dist/index.native.js +1 -1
  37. package/dist/{phantom-wallet-provider-B1TleWsy.esm.js → phantom-wallet-provider-B0UmUtfB.esm.js} +51 -4
  38. package/dist/{phantom-wallet-provider-B1TleWsy.esm.js.map → phantom-wallet-provider-B0UmUtfB.esm.js.map} +1 -1
  39. package/dist/{phantom-wallet-provider-DwmdHVd-.js → phantom-wallet-provider-BbyQIlro.js} +51 -4
  40. package/dist/{phantom-wallet-provider-DwmdHVd-.js.map → phantom-wallet-provider-BbyQIlro.js.map} +1 -1
  41. package/dist/{privy-wallet-provider-Cf6WgpK1.js → privy-wallet-provider-CoQzq0F4.js} +3 -3
  42. package/dist/privy-wallet-provider-CoQzq0F4.js.map +1 -0
  43. package/dist/{privy-wallet-provider-CZgiUwUN.esm.js → privy-wallet-provider-DGjYglh7.esm.js} +3 -3
  44. package/dist/privy-wallet-provider-DGjYglh7.esm.js.map +1 -0
  45. package/dist/{solana-mobile-wallet-provider-DZmpeNIS.js → solana-mobile-wallet-provider-BLoovRsJ.js} +4 -4
  46. package/dist/{solana-mobile-wallet-provider-DZmpeNIS.js.map → solana-mobile-wallet-provider-BLoovRsJ.js.map} +1 -1
  47. package/dist/{solana-mobile-wallet-provider-C9j8O3mD.esm.js → solana-mobile-wallet-provider-DIyP-Az5.esm.js} +4 -4
  48. package/dist/{solana-mobile-wallet-provider-C9j8O3mD.esm.js.map → solana-mobile-wallet-provider-DIyP-Az5.esm.js.map} +1 -1
  49. package/package.json +1 -1
  50. package/dist/index-Bdcc5821.js +0 -2375
  51. package/dist/index-Bdcc5821.js.map +0 -1
  52. package/dist/index-CKaaE12K.js.map +0 -1
  53. package/dist/index-Cmu0PVJD.esm.js.map +0 -1
  54. package/dist/index-Cp727oEW.js.map +0 -1
  55. package/dist/index-CrOVJFX9.esm.js +0 -2373
  56. package/dist/index-CrOVJFX9.esm.js.map +0 -1
  57. package/dist/index-CwGoYY0Y.esm.js.map +0 -1
  58. package/dist/index-DE7k2G22.js.map +0 -1
  59. package/dist/index-OAJ0rndN.esm.js.map +0 -1
  60. package/dist/index.browser-BMtEulGJ.js.map +0 -1
  61. package/dist/index.browser-DFeGGyO7.esm.js.map +0 -1
  62. package/dist/index.browser-QPkAiPQp.js.map +0 -1
  63. package/dist/index.browser-x87QUr4N.esm.js.map +0 -1
  64. package/dist/index.native-CjEJXA9y.esm.js.map +0 -1
  65. package/dist/index.native-D7IrIMX1.js.map +0 -1
  66. package/dist/privy-wallet-provider-CZgiUwUN.esm.js.map +0 -1
  67. package/dist/privy-wallet-provider-Cf6WgpK1.js.map +0 -1
@@ -22,6 +22,21 @@ function _interopNamespaceDefault(e) {
22
22
  return Object.freeze(n);
23
23
  }
24
24
 
25
+ function _mergeNamespaces(n, m) {
26
+ m.forEach(function (e) {
27
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
28
+ if (k !== 'default' && !(k in n)) {
29
+ var d = Object.getOwnPropertyDescriptor(e, k);
30
+ Object.defineProperty(n, k, d.get ? d : {
31
+ enumerable: true,
32
+ get: function () { return e[k]; }
33
+ });
34
+ }
35
+ });
36
+ });
37
+ return Object.freeze(n);
38
+ }
39
+
25
40
  var anchor__namespace = /*#__PURE__*/_interopNamespaceDefault(anchor);
26
41
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React$2);
27
42
 
@@ -6400,261 +6415,6 @@ var ReconnectingWebSocket = /** @class */ (function () {
6400
6415
  return ReconnectingWebSocket;
6401
6416
  }());
6402
6417
 
6403
- function getDefaultExportFromCjs (x) {
6404
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
6405
- }
6406
-
6407
- var isRetryAllowed$1;
6408
- var hasRequiredIsRetryAllowed;
6409
-
6410
- function requireIsRetryAllowed () {
6411
- if (hasRequiredIsRetryAllowed) return isRetryAllowed$1;
6412
- hasRequiredIsRetryAllowed = 1;
6413
-
6414
- const denyList = new Set([
6415
- 'ENOTFOUND',
6416
- 'ENETUNREACH',
6417
-
6418
- // SSL errors from https://github.com/nodejs/node/blob/fc8e3e2cdc521978351de257030db0076d79e0ab/src/crypto/crypto_common.cc#L301-L328
6419
- 'UNABLE_TO_GET_ISSUER_CERT',
6420
- 'UNABLE_TO_GET_CRL',
6421
- 'UNABLE_TO_DECRYPT_CERT_SIGNATURE',
6422
- 'UNABLE_TO_DECRYPT_CRL_SIGNATURE',
6423
- 'UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY',
6424
- 'CERT_SIGNATURE_FAILURE',
6425
- 'CRL_SIGNATURE_FAILURE',
6426
- 'CERT_NOT_YET_VALID',
6427
- 'CERT_HAS_EXPIRED',
6428
- 'CRL_NOT_YET_VALID',
6429
- 'CRL_HAS_EXPIRED',
6430
- 'ERROR_IN_CERT_NOT_BEFORE_FIELD',
6431
- 'ERROR_IN_CERT_NOT_AFTER_FIELD',
6432
- 'ERROR_IN_CRL_LAST_UPDATE_FIELD',
6433
- 'ERROR_IN_CRL_NEXT_UPDATE_FIELD',
6434
- 'OUT_OF_MEM',
6435
- 'DEPTH_ZERO_SELF_SIGNED_CERT',
6436
- 'SELF_SIGNED_CERT_IN_CHAIN',
6437
- 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
6438
- 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
6439
- 'CERT_CHAIN_TOO_LONG',
6440
- 'CERT_REVOKED',
6441
- 'INVALID_CA',
6442
- 'PATH_LENGTH_EXCEEDED',
6443
- 'INVALID_PURPOSE',
6444
- 'CERT_UNTRUSTED',
6445
- 'CERT_REJECTED',
6446
- 'HOSTNAME_MISMATCH'
6447
- ]);
6448
-
6449
- // TODO: Use `error?.code` when targeting Node.js 14
6450
- isRetryAllowed$1 = error => !denyList.has(error && error.code);
6451
- return isRetryAllowed$1;
6452
- }
6453
-
6454
- var isRetryAllowedExports = requireIsRetryAllowed();
6455
- var isRetryAllowed = /*@__PURE__*/getDefaultExportFromCjs(isRetryAllowedExports);
6456
-
6457
- const namespace = 'axios-retry';
6458
- function isNetworkError(error) {
6459
- const CODE_EXCLUDE_LIST = ['ERR_CANCELED', 'ECONNABORTED'];
6460
- if (error.response) {
6461
- return false;
6462
- }
6463
- if (!error.code) {
6464
- return false;
6465
- }
6466
- // Prevents retrying timed out & cancelled requests
6467
- if (CODE_EXCLUDE_LIST.includes(error.code)) {
6468
- return false;
6469
- }
6470
- // Prevents retrying unsafe errors
6471
- return isRetryAllowed(error);
6472
- }
6473
- const SAFE_HTTP_METHODS = ['get', 'head', 'options'];
6474
- const IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);
6475
- function isRetryableError(error) {
6476
- return (error.code !== 'ECONNABORTED' &&
6477
- (!error.response ||
6478
- error.response.status === 429 ||
6479
- (error.response.status >= 500 && error.response.status <= 599)));
6480
- }
6481
- function isSafeRequestError(error) {
6482
- if (!error.config?.method) {
6483
- // Cannot determine if the request can be retried
6484
- return false;
6485
- }
6486
- return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;
6487
- }
6488
- function isIdempotentRequestError(error) {
6489
- if (!error.config?.method) {
6490
- // Cannot determine if the request can be retried
6491
- return false;
6492
- }
6493
- return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;
6494
- }
6495
- function isNetworkOrIdempotentRequestError(error) {
6496
- return isNetworkError(error) || isIdempotentRequestError(error);
6497
- }
6498
- function retryAfter(error = undefined) {
6499
- const retryAfterHeader = error?.response?.headers['retry-after'];
6500
- if (!retryAfterHeader) {
6501
- return 0;
6502
- }
6503
- // if the retry after header is a number, convert it to milliseconds
6504
- let retryAfterMs = (Number(retryAfterHeader) || 0) * 1000;
6505
- // If the retry after header is a date, get the number of milliseconds until that date
6506
- if (retryAfterMs === 0) {
6507
- retryAfterMs = (new Date(retryAfterHeader).valueOf() || 0) - Date.now();
6508
- }
6509
- return Math.max(0, retryAfterMs);
6510
- }
6511
- function noDelay(_retryNumber = 0, error = undefined) {
6512
- return Math.max(0, retryAfter(error));
6513
- }
6514
- function exponentialDelay(retryNumber = 0, error = undefined, delayFactor = 100) {
6515
- const calculatedDelay = 2 ** retryNumber * delayFactor;
6516
- const delay = Math.max(calculatedDelay, retryAfter(error));
6517
- const randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay
6518
- return delay + randomSum;
6519
- }
6520
- /**
6521
- * Linear delay
6522
- * @param {number | undefined} delayFactor - delay factor in milliseconds (default: 100)
6523
- * @returns {function} (retryNumber: number, error: AxiosError | undefined) => number
6524
- */
6525
- function linearDelay(delayFactor = 100) {
6526
- return (retryNumber = 0, error = undefined) => {
6527
- const delay = retryNumber * delayFactor;
6528
- return Math.max(delay, retryAfter(error));
6529
- };
6530
- }
6531
- const DEFAULT_OPTIONS = {
6532
- retries: 3,
6533
- retryCondition: isNetworkOrIdempotentRequestError,
6534
- retryDelay: noDelay,
6535
- shouldResetTimeout: false,
6536
- onRetry: () => { },
6537
- onMaxRetryTimesExceeded: () => { },
6538
- validateResponse: null
6539
- };
6540
- function getRequestOptions(config, defaultOptions) {
6541
- return { ...DEFAULT_OPTIONS, ...defaultOptions, ...config[namespace] };
6542
- }
6543
- function setCurrentState(config, defaultOptions, resetLastRequestTime = false) {
6544
- const currentState = getRequestOptions(config, defaultOptions || {});
6545
- currentState.retryCount = currentState.retryCount || 0;
6546
- if (!currentState.lastRequestTime || resetLastRequestTime) {
6547
- currentState.lastRequestTime = Date.now();
6548
- }
6549
- config[namespace] = currentState;
6550
- return currentState;
6551
- }
6552
- function fixConfig(axiosInstance, config) {
6553
- // @ts-ignore
6554
- if (axiosInstance.defaults.agent === config.agent) {
6555
- // @ts-ignore
6556
- delete config.agent;
6557
- }
6558
- if (axiosInstance.defaults.httpAgent === config.httpAgent) {
6559
- delete config.httpAgent;
6560
- }
6561
- if (axiosInstance.defaults.httpsAgent === config.httpsAgent) {
6562
- delete config.httpsAgent;
6563
- }
6564
- }
6565
- async function shouldRetry(currentState, error) {
6566
- const { retries, retryCondition } = currentState;
6567
- const shouldRetryOrPromise = (currentState.retryCount || 0) < retries && retryCondition(error);
6568
- // This could be a promise
6569
- if (typeof shouldRetryOrPromise === 'object') {
6570
- try {
6571
- const shouldRetryPromiseResult = await shouldRetryOrPromise;
6572
- // keep return true unless shouldRetryPromiseResult return false for compatibility
6573
- return shouldRetryPromiseResult !== false;
6574
- }
6575
- catch (_err) {
6576
- return false;
6577
- }
6578
- }
6579
- return shouldRetryOrPromise;
6580
- }
6581
- async function handleRetry(axiosInstance, currentState, error, config) {
6582
- currentState.retryCount += 1;
6583
- const { retryDelay, shouldResetTimeout, onRetry } = currentState;
6584
- const delay = retryDelay(currentState.retryCount, error);
6585
- // Axios fails merging this configuration to the default configuration because it has an issue
6586
- // with circular structures: https://github.com/mzabriskie/axios/issues/370
6587
- fixConfig(axiosInstance, config);
6588
- if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {
6589
- const lastRequestDuration = Date.now() - currentState.lastRequestTime;
6590
- const timeout = config.timeout - lastRequestDuration - delay;
6591
- if (timeout <= 0) {
6592
- return Promise.reject(error);
6593
- }
6594
- config.timeout = timeout;
6595
- }
6596
- config.transformRequest = [(data) => data];
6597
- await onRetry(currentState.retryCount, error, config);
6598
- if (config.signal?.aborted) {
6599
- return Promise.resolve(axiosInstance(config));
6600
- }
6601
- return new Promise((resolve) => {
6602
- const abortListener = () => {
6603
- clearTimeout(timeout);
6604
- resolve(axiosInstance(config));
6605
- };
6606
- const timeout = setTimeout(() => {
6607
- resolve(axiosInstance(config));
6608
- if (config.signal?.removeEventListener) {
6609
- config.signal.removeEventListener('abort', abortListener);
6610
- }
6611
- }, delay);
6612
- if (config.signal?.addEventListener) {
6613
- config.signal.addEventListener('abort', abortListener, { once: true });
6614
- }
6615
- });
6616
- }
6617
- async function handleMaxRetryTimesExceeded(currentState, error) {
6618
- if (currentState.retryCount >= currentState.retries)
6619
- await currentState.onMaxRetryTimesExceeded(error, currentState.retryCount);
6620
- }
6621
- const axiosRetry = (axiosInstance, defaultOptions) => {
6622
- const requestInterceptorId = axiosInstance.interceptors.request.use((config) => {
6623
- setCurrentState(config, defaultOptions, true);
6624
- if (config[namespace]?.validateResponse) {
6625
- // by setting this, all HTTP responses will be go through the error interceptor first
6626
- config.validateStatus = () => false;
6627
- }
6628
- return config;
6629
- });
6630
- const responseInterceptorId = axiosInstance.interceptors.response.use(null, async (error) => {
6631
- const { config } = error;
6632
- // If we have no information to retry the request
6633
- if (!config) {
6634
- return Promise.reject(error);
6635
- }
6636
- const currentState = setCurrentState(config, defaultOptions);
6637
- if (error.response && currentState.validateResponse?.(error.response)) {
6638
- // no issue with response
6639
- return error.response;
6640
- }
6641
- if (await shouldRetry(currentState, error)) {
6642
- return handleRetry(axiosInstance, currentState, error, config);
6643
- }
6644
- await handleMaxRetryTimesExceeded(currentState, error);
6645
- return Promise.reject(error);
6646
- });
6647
- return { requestInterceptorId, responseInterceptorId };
6648
- };
6649
- // Compatibility with CommonJS
6650
- axiosRetry.isNetworkError = isNetworkError;
6651
- axiosRetry.isSafeRequestError = isSafeRequestError;
6652
- axiosRetry.isIdempotentRequestError = isIdempotentRequestError;
6653
- axiosRetry.isNetworkOrIdempotentRequestError = isNetworkOrIdempotentRequestError;
6654
- axiosRetry.exponentialDelay = exponentialDelay;
6655
- axiosRetry.linearDelay = linearDelay;
6656
- axiosRetry.isRetryableError = isRetryableError;
6657
-
6658
6418
  let axiosClient;
6659
6419
  async function getAxiosAuthClient() {
6660
6420
  if (!axiosClient) {
@@ -6664,7 +6424,6 @@ async function getAxiosAuthClient() {
6664
6424
  headers: {
6665
6425
  'Content-Type': 'application/json',
6666
6426
  },
6667
- timeout: 30000, // 30s timeout, matching makeApiRequest
6668
6427
  });
6669
6428
  }
6670
6429
  return axiosClient;
@@ -6711,41 +6470,15 @@ async function createSessionWithPrivy(authToken, address, privyIdToken) {
6711
6470
  });
6712
6471
  return response.data;
6713
6472
  }
6714
- // Deduplicate concurrent refreshSession calls to prevent multiple code paths
6715
- // (WebSocket reconnection, periodic refresh, API 401 retry) from all hitting
6716
- // /session/refresh simultaneously.
6717
- // Note: module-level state is shared across requests in SSR/Node — acceptable
6718
- // since there is only one active session per server instance (same pattern as
6719
- // refreshInFlight in api.ts).
6720
- let refreshInFlight$1 = null;
6721
- let refreshInFlightToken = null;
6722
6473
  async function refreshSession(refreshToken) {
6723
- if (refreshInFlight$1 && refreshInFlightToken === refreshToken) {
6724
- return refreshInFlight$1;
6725
- }
6726
- refreshInFlightToken = refreshToken;
6727
- let currentFlight;
6728
- currentFlight = refreshInFlight$1 = (async () => {
6729
- try {
6730
- const client = await getAxiosAuthClient();
6731
- const config = await getConfig();
6732
- const appId = config.appId;
6733
- const response = await client.post('/session/refresh', {
6734
- refreshToken,
6735
- appId
6736
- });
6737
- return response.data;
6738
- }
6739
- finally {
6740
- // Only clear if we're still the active in-flight request.
6741
- // A second call with a different token may have replaced us.
6742
- if (refreshInFlight$1 === currentFlight) {
6743
- refreshInFlight$1 = null;
6744
- refreshInFlightToken = null;
6745
- }
6746
- }
6747
- })();
6748
- return refreshInFlight$1;
6474
+ const client = await getAxiosAuthClient();
6475
+ const config = await getConfig();
6476
+ const appId = config.appId;
6477
+ const response = await client.post('/session/refresh', {
6478
+ refreshToken,
6479
+ appId
6480
+ });
6481
+ return response.data;
6749
6482
  }
6750
6483
  async function signSessionCreateMessage(_signMessageFunction) {
6751
6484
  }
@@ -6883,10 +6616,14 @@ class WebSessionManager {
6883
6616
  WebSessionManager.TAROBASE_SESSION_STORAGE_KEY = "tarobase_session_storage";
6884
6617
 
6885
6618
  var webSessionManager = /*#__PURE__*/Object.freeze({
6886
- __proto__: null,
6887
- WebSessionManager: WebSessionManager
6619
+ __proto__: null,
6620
+ WebSessionManager: WebSessionManager
6888
6621
  });
6889
6622
 
6623
+ function getDefaultExportFromCjs (x) {
6624
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
6625
+ }
6626
+
6890
6627
  var buffer$1 = {};
6891
6628
 
6892
6629
  var base64Js$1 = {};
@@ -9258,15 +8995,15 @@ function requireBuffer$1 () {
9258
8995
 
9259
8996
  var bufferExports$1 = requireBuffer$1();
9260
8997
 
9261
- var safeBuffer = {exports: {}};
8998
+ var safeBuffer$1 = {exports: {}};
9262
8999
 
9263
9000
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
9264
9001
 
9265
- var hasRequiredSafeBuffer;
9002
+ var hasRequiredSafeBuffer$1;
9266
9003
 
9267
- function requireSafeBuffer () {
9268
- if (hasRequiredSafeBuffer) return safeBuffer.exports;
9269
- hasRequiredSafeBuffer = 1;
9004
+ function requireSafeBuffer$1 () {
9005
+ if (hasRequiredSafeBuffer$1) return safeBuffer$1.exports;
9006
+ hasRequiredSafeBuffer$1 = 1;
9270
9007
  (function (module, exports$1) {
9271
9008
  /* eslint-disable node/no-deprecated-api */
9272
9009
  var buffer = requireBuffer$1();
@@ -9332,23 +9069,23 @@ function requireSafeBuffer () {
9332
9069
  }
9333
9070
  return buffer.SlowBuffer(size)
9334
9071
  };
9335
- } (safeBuffer, safeBuffer.exports));
9336
- return safeBuffer.exports;
9072
+ } (safeBuffer$1, safeBuffer$1.exports));
9073
+ return safeBuffer$1.exports;
9337
9074
  }
9338
9075
 
9339
- var src;
9340
- var hasRequiredSrc;
9076
+ var src$1;
9077
+ var hasRequiredSrc$1;
9341
9078
 
9342
- function requireSrc () {
9343
- if (hasRequiredSrc) return src;
9344
- hasRequiredSrc = 1;
9079
+ function requireSrc$1 () {
9080
+ if (hasRequiredSrc$1) return src$1;
9081
+ hasRequiredSrc$1 = 1;
9345
9082
  // base-x encoding / decoding
9346
9083
  // Copyright (c) 2018 base-x contributors
9347
9084
  // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
9348
9085
  // Distributed under the MIT software license, see the accompanying
9349
9086
  // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
9350
9087
  // @ts-ignore
9351
- var _Buffer = requireSafeBuffer().Buffer;
9088
+ var _Buffer = requireSafeBuffer$1().Buffer;
9352
9089
  function base (ALPHABET) {
9353
9090
  if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
9354
9091
  var BASE_MAP = new Uint8Array(256);
@@ -9463,25 +9200,25 @@ function requireSrc () {
9463
9200
  decode: decode
9464
9201
  }
9465
9202
  }
9466
- src = base;
9467
- return src;
9203
+ src$1 = base;
9204
+ return src$1;
9468
9205
  }
9469
9206
 
9470
- var bs58$1;
9471
- var hasRequiredBs58;
9207
+ var bs58$1$1;
9208
+ var hasRequiredBs58$1;
9472
9209
 
9473
- function requireBs58 () {
9474
- if (hasRequiredBs58) return bs58$1;
9475
- hasRequiredBs58 = 1;
9476
- var basex = requireSrc();
9210
+ function requireBs58$1 () {
9211
+ if (hasRequiredBs58$1) return bs58$1$1;
9212
+ hasRequiredBs58$1 = 1;
9213
+ var basex = requireSrc$1();
9477
9214
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9478
9215
 
9479
- bs58$1 = basex(ALPHABET);
9480
- return bs58$1;
9216
+ bs58$1$1 = basex(ALPHABET);
9217
+ return bs58$1$1;
9481
9218
  }
9482
9219
 
9483
- var bs58Exports = requireBs58();
9484
- var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
9220
+ var bs58Exports$1 = requireBs58$1();
9221
+ var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports$1);
9485
9222
 
9486
9223
  // ─────────────────────────────────────────────────────────────
9487
9224
  // Local implementation of getSimulationComputeUnits
@@ -9683,19 +9420,7 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
9683
9420
  }
9684
9421
  }
9685
9422
  else if (lutKey != null) {
9686
- // The LUT may have just been created server-side and the client's RPC node
9687
- // may not have indexed it yet (load-balancer split). Retry with exponential
9688
- // back-off; first retry at 100 ms almost always resolves it.
9689
- let table = null;
9690
- for (let attempt = 0; attempt < 5; attempt++) {
9691
- const { value } = await connection.getAddressLookupTable(new web3_js.PublicKey(lutKey));
9692
- if (value) {
9693
- table = value;
9694
- break;
9695
- }
9696
- if (attempt < 4)
9697
- await new Promise(r => setTimeout(r, 100 * Math.pow(2, attempt)));
9698
- }
9423
+ const { value: table } = await connection.getAddressLookupTable(new web3_js.PublicKey(lutKey));
9699
9424
  if (!table)
9700
9425
  throw new Error('LUT not found after creation/extend');
9701
9426
  lookupTables.push(table);
@@ -9830,8 +9555,8 @@ class ServerSessionManager {
9830
9555
  ServerSessionManager.instance = new ServerSessionManager();
9831
9556
 
9832
9557
  var serverSessionManager = /*#__PURE__*/Object.freeze({
9833
- __proto__: null,
9834
- ServerSessionManager: ServerSessionManager
9558
+ __proto__: null,
9559
+ ServerSessionManager: ServerSessionManager
9835
9560
  });
9836
9561
 
9837
9562
  /**
@@ -9930,23 +9655,6 @@ async function updateIdTokenAndAccessToken(idToken, accessToken, isServer = fals
9930
9655
  await WebSessionManager.updateIdTokenAndAccessToken(idToken, accessToken);
9931
9656
  }
9932
9657
 
9933
- const apiClient = globalAxios.create();
9934
- axiosRetry(apiClient, {
9935
- retries: 2,
9936
- retryCondition: (error) => {
9937
- var _a, _b;
9938
- // Only retry GET requests on network errors (ECONNRESET, ETIMEDOUT, etc.)
9939
- // Writes (POST/PUT) are not retried — the server may have processed
9940
- // the request before the connection was reset.
9941
- return axiosRetry.isNetworkError(error) && ((_b = (_a = error.config) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'get';
9942
- },
9943
- retryDelay: axiosRetry.exponentialDelay,
9944
- shouldResetTimeout: true,
9945
- onRetry: (retryCount, error, requestConfig) => {
9946
- var _a;
9947
- console.warn(`[tarobase-sdk] retry ${retryCount} for ${(_a = requestConfig.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()} ${requestConfig.url} — ${error.code || error.message}`);
9948
- },
9949
- });
9950
9658
  const refreshInFlight = new Map();
9951
9659
  async function refreshAuthSessionOnce(appId, isServer) {
9952
9660
  const key = `${isServer ? "server" : "web"}:${appId}`;
@@ -9993,7 +9701,6 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
9993
9701
  ServerSessionManager.instance.clearSession();
9994
9702
  };
9995
9703
  async function executeRequest() {
9996
- var _a;
9997
9704
  // When _getAuthHeaders is provided (wallet client), use it as the sole auth source.
9998
9705
  // Otherwise use the global createAuthHeader (default path).
9999
9706
  const authHeader = (_overrides === null || _overrides === void 0 ? void 0 : _overrides._getAuthHeaders)
@@ -10015,12 +9722,11 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
10015
9722
  method,
10016
9723
  url: `${config.apiUrl}${urlPath.startsWith("/") ? urlPath : `/${urlPath}`}`,
10017
9724
  headers,
10018
- timeout: (_a = _overrides === null || _overrides === void 0 ? void 0 : _overrides.timeout) !== null && _a !== void 0 ? _a : 30000,
10019
9725
  };
10020
9726
  if (method !== "GET" && method !== "get") {
10021
9727
  requestConfig.data = data ? JSON.stringify(data) : {};
10022
9728
  }
10023
- const response = await apiClient(requestConfig);
9729
+ const response = await globalAxios(requestConfig);
10024
9730
  return { data: response.data, status: response.status, headers: response.headers };
10025
9731
  }
10026
9732
  try {
@@ -10956,7 +10662,6 @@ function scheduleTokenRefresh(connection, isServer) {
10956
10662
  // This replaces the old single setTimeout approach which was unreliable for long
10957
10663
  // delays (browsers throttle/suspend timers in background tabs).
10958
10664
  connection.tokenRefreshTimer = setInterval(async () => {
10959
- var _a, _b;
10960
10665
  try {
10961
10666
  const currentToken = await getIdToken$1(isServer);
10962
10667
  if (!currentToken)
@@ -10987,17 +10692,6 @@ function scheduleTokenRefresh(connection, isServer) {
10987
10692
  }
10988
10693
  }
10989
10694
  catch (refreshError) {
10990
- // If the refresh token itself is invalid (401/403), stop retrying —
10991
- // the token won't magically become valid next interval, and continuing
10992
- // to hammer /session/refresh causes 429 rate-limit storms.
10993
- if (((_a = refreshError === null || refreshError === void 0 ? void 0 : refreshError.response) === null || _a === void 0 ? void 0 : _a.status) === 401 || ((_b = refreshError === null || refreshError === void 0 ? void 0 : refreshError.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
10994
- console.warn('[WS v2] Refresh token rejected (401/403), stopping periodic refresh');
10995
- if (connection.tokenRefreshTimer) {
10996
- clearInterval(connection.tokenRefreshTimer);
10997
- connection.tokenRefreshTimer = null;
10998
- }
10999
- return;
11000
- }
11001
10695
  console.warn('[WS v2] Proactive token refresh failed, will retry next interval:', refreshError);
11002
10696
  }
11003
10697
  }
@@ -11008,7 +10702,6 @@ function scheduleTokenRefresh(connection, isServer) {
11008
10702
  }, TOKEN_CHECK_INTERVAL);
11009
10703
  }
11010
10704
  async function getFreshAuthToken(isServer) {
11011
- var _a, _b;
11012
10705
  const currentToken = await getIdToken$1(isServer);
11013
10706
  if (!currentToken) {
11014
10707
  return null;
@@ -11031,17 +10724,6 @@ async function getFreshAuthToken(isServer) {
11031
10724
  }
11032
10725
  catch (error) {
11033
10726
  console.error('[WS v2] Error refreshing token:', error);
11034
- // If the refresh token is permanently invalid (401/403), clear the stale
11035
- // session from storage so future attempts don't keep retrying with it.
11036
- if (!isServer && (((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status) === 401 || ((_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.status) === 403)) {
11037
- try {
11038
- const { WebSessionManager } = await Promise.resolve().then(function () { return webSessionManager; });
11039
- WebSessionManager.clearSession();
11040
- }
11041
- catch (clearError) {
11042
- console.warn('[WS v2] Failed to clear stale session:', clearError);
11043
- }
11044
- }
11045
10727
  }
11046
10728
  // Return null instead of the expired token to prevent infinite 401 reconnect storms.
11047
10729
  // The server accepts unauthenticated connections; auth-required subscriptions will
@@ -11162,16 +10844,7 @@ async function getOrCreateConnection(appId, isServer) {
11162
10844
  ws.addEventListener('open', () => {
11163
10845
  connection.isConnecting = false;
11164
10846
  connection.isConnected = true;
11165
- // NOTE: Do NOT reset consecutiveAuthFailures here. It is reset when a
11166
- // fresh auth token is actually obtained (in urlProvider, line ~389) or on
11167
- // an explicit auth change (reconnectWithNewAuthV2, line ~854). Resetting
11168
- // on every 'open' event created an infinite loop: auth fails 5x → connect
11169
- // without auth → open resets counter → disconnect → auth fails 5x again →
11170
- // repeat forever, hammering /session/refresh and causing 429s.
11171
- //
11172
- // An elevated counter is safe for anonymous/guest sessions: when there's no
11173
- // token at all (getIdToken returns null), the counter is never checked —
11174
- // urlProvider skips straight to unauthenticated connection.
10847
+ connection.consecutiveAuthFailures = 0;
11175
10848
  // Schedule periodic token freshness checks
11176
10849
  scheduleTokenRefresh(connection, isServer);
11177
10850
  // Re-subscribe to all existing subscriptions after reconnect
@@ -15623,6 +15296,32 @@ async function confirmAndCheckTransaction(connection, signature) {
15623
15296
  }
15624
15297
 
15625
15298
  const VALID_PROVIDERS = ['injected', 'google', 'apple', 'deeplink', 'phantom'];
15299
+ // When the dApp runs inside an iframe whose parent origin is different from
15300
+ // (or can't inject into) the child frame — notably Phantom's Android in-app
15301
+ // browser, which injects window.phantom.solana only into the top frame —
15302
+ // the Phantom deeplink path tries to navigate phantom.app/ul/browse/... from
15303
+ // inside the iframe. Android App Links only hand off on top-level navigations,
15304
+ // and phantom.app refuses to be framed (X-Frame-Options: DENY), so the connect
15305
+ // fails. To get back to a working context we navigate the top window to the
15306
+ // dApp's own URL, dropping the iframe shell. Once top-level, the wallet
15307
+ // browser injects its provider and the normal injected flow succeeds.
15308
+ function isInIframe() {
15309
+ if (typeof window === 'undefined')
15310
+ return false;
15311
+ try {
15312
+ return window.top !== window.self;
15313
+ }
15314
+ catch (_a) {
15315
+ // Cross-origin access to window.top throws — if we can't read it, we're iframed.
15316
+ return true;
15317
+ }
15318
+ }
15319
+ function shouldBreakOutOfIframe(provider) {
15320
+ // Only break out when the user chose the deeplink provider. The modal only
15321
+ // offers deeplink on mobile when no injected Phantom is present, so this is
15322
+ // exactly the iframe-without-provider case we need to escape.
15323
+ return provider === 'deeplink' && isInIframe();
15324
+ }
15626
15325
  // Dynamically import React and Phantom SDK - only when needed
15627
15326
  let React$1;
15628
15327
  let ReactDOM$1;
@@ -15643,7 +15342,7 @@ async function loadDependencies() {
15643
15342
  const [reactModule, reactDomModule, phantomModule] = await Promise.all([
15644
15343
  import('react'),
15645
15344
  import('react-dom/client'),
15646
- Promise.resolve().then(function () { return require('./index-CKaaE12K.js'); })
15345
+ Promise.resolve().then(function () { return require('./index-zS_Y-wbi.js'); })
15647
15346
  ]);
15648
15347
  // Extract default export from ESM module namespace
15649
15348
  // Dynamic import() returns { default: Module, ...exports }, not the module directly
@@ -15991,6 +15690,27 @@ class PhantomWalletProvider {
15991
15690
  const handleWalletClick = async (options) => {
15992
15691
  walletClickedRef.current = true;
15993
15692
  setShowWalletModal(false);
15693
+ // If we're in an iframe and the user chose deeplink, Phantom's SDK
15694
+ // will navigate *this* iframe to phantom.app/ul/browse/..., which
15695
+ // Android App Links won't intercept and phantom.app won't let be
15696
+ // framed. Escape to top-level first so the wallet browser can
15697
+ // inject its provider and the normal injected flow takes over
15698
+ // on the user's next connect tap.
15699
+ if (shouldBreakOutOfIframe(options === null || options === void 0 ? void 0 : options.provider)) {
15700
+ try {
15701
+ // Same-site navigation (*.poof.new → *.poof.new) plus the
15702
+ // iframe's allow-top-navigation-by-user-activation sandbox
15703
+ // token make this go through.
15704
+ window.top.location.href = window.location.href;
15705
+ return;
15706
+ }
15707
+ catch (_a) {
15708
+ // Top-nav blocked (no sandbox grant, cross-origin top, etc.).
15709
+ // Fall through to the normal deeplink path — at least the
15710
+ // user gets the original broken-ish behavior instead of a
15711
+ // silently-dead button.
15712
+ }
15713
+ }
15994
15714
  try {
15995
15715
  if (options === null || options === void 0 ? void 0 : options.walletId) {
15996
15716
  await connect({ provider: 'injected', walletId: options.walletId });
@@ -19955,137 +19675,235 @@ function createSolanaRpcSubscriptionsFromTransport(transport) {
19955
19675
  });
19956
19676
  }
19957
19677
 
19958
- // base-x encoding / decoding
19959
- // Copyright (c) 2018 base-x contributors
19960
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
19961
- // Distributed under the MIT software license, see the accompanying
19962
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
19963
- function base (ALPHABET) {
19964
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
19965
- const BASE_MAP = new Uint8Array(256);
19966
- for (let j = 0; j < BASE_MAP.length; j++) {
19967
- BASE_MAP[j] = 255;
19968
- }
19969
- for (let i = 0; i < ALPHABET.length; i++) {
19970
- const x = ALPHABET.charAt(i);
19971
- const xc = x.charCodeAt(0);
19972
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
19973
- BASE_MAP[xc] = i;
19974
- }
19975
- const BASE = ALPHABET.length;
19976
- const LEADER = ALPHABET.charAt(0);
19977
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
19978
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
19979
- function encode (source) {
19980
- // eslint-disable-next-line no-empty
19981
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
19982
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
19983
- } else if (Array.isArray(source)) {
19984
- source = Uint8Array.from(source);
19985
- }
19986
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
19987
- if (source.length === 0) { return '' }
19988
- // Skip & count leading zeroes.
19989
- let zeroes = 0;
19990
- let length = 0;
19991
- let pbegin = 0;
19992
- const pend = source.length;
19993
- while (pbegin !== pend && source[pbegin] === 0) {
19994
- pbegin++;
19995
- zeroes++;
19996
- }
19997
- // Allocate enough space in big-endian base58 representation.
19998
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
19999
- const b58 = new Uint8Array(size);
20000
- // Process the bytes.
20001
- while (pbegin !== pend) {
20002
- let carry = source[pbegin];
20003
- // Apply "b58 = b58 * 256 + ch".
20004
- let i = 0;
20005
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
20006
- carry += (256 * b58[it1]) >>> 0;
20007
- b58[it1] = (carry % BASE) >>> 0;
20008
- carry = (carry / BASE) >>> 0;
20009
- }
20010
- if (carry !== 0) { throw new Error('Non-zero carry') }
20011
- length = i;
20012
- pbegin++;
20013
- }
20014
- // Skip leading zeroes in base58 result.
20015
- let it2 = size - length;
20016
- while (it2 !== size && b58[it2] === 0) {
20017
- it2++;
20018
- }
20019
- // Translate the result into a string.
20020
- let str = LEADER.repeat(zeroes);
20021
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
20022
- return str
20023
- }
20024
- function decodeUnsafe (source) {
20025
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
20026
- if (source.length === 0) { return new Uint8Array() }
20027
- let psz = 0;
20028
- // Skip and count leading '1's.
20029
- let zeroes = 0;
20030
- let length = 0;
20031
- while (source[psz] === LEADER) {
20032
- zeroes++;
20033
- psz++;
20034
- }
20035
- // Allocate enough space in big-endian base256 representation.
20036
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
20037
- const b256 = new Uint8Array(size);
20038
- // Process the characters.
20039
- while (psz < source.length) {
20040
- // Find code of next character
20041
- const charCode = source.charCodeAt(psz);
20042
- // Base map can not be indexed using char code
20043
- if (charCode > 255) { return }
20044
- // Decode character
20045
- let carry = BASE_MAP[charCode];
20046
- // Invalid character
20047
- if (carry === 255) { return }
20048
- let i = 0;
20049
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
20050
- carry += (BASE * b256[it3]) >>> 0;
20051
- b256[it3] = (carry % 256) >>> 0;
20052
- carry = (carry / 256) >>> 0;
20053
- }
20054
- if (carry !== 0) { throw new Error('Non-zero carry') }
20055
- length = i;
20056
- psz++;
20057
- }
20058
- // Skip leading zeroes in b256.
20059
- let it4 = size - length;
20060
- while (it4 !== size && b256[it4] === 0) {
20061
- it4++;
20062
- }
20063
- const vch = new Uint8Array(zeroes + (size - it4));
20064
- let j = zeroes;
20065
- while (it4 !== size) {
20066
- vch[j++] = b256[it4++];
20067
- }
20068
- return vch
20069
- }
20070
- function decode (string) {
20071
- const buffer = decodeUnsafe(string);
20072
- if (buffer) { return buffer }
20073
- throw new Error('Non-base' + BASE + ' character')
20074
- }
20075
- return {
20076
- encode,
20077
- decodeUnsafe,
20078
- decode
20079
- }
19678
+ var safeBuffer = {exports: {}};
19679
+
19680
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
19681
+
19682
+ var hasRequiredSafeBuffer;
19683
+
19684
+ function requireSafeBuffer () {
19685
+ if (hasRequiredSafeBuffer) return safeBuffer.exports;
19686
+ hasRequiredSafeBuffer = 1;
19687
+ (function (module, exports$1) {
19688
+ /* eslint-disable node/no-deprecated-api */
19689
+ var buffer = requireBuffer();
19690
+ var Buffer = buffer.Buffer;
19691
+
19692
+ // alternative to using Object.keys for old browsers
19693
+ function copyProps (src, dst) {
19694
+ for (var key in src) {
19695
+ dst[key] = src[key];
19696
+ }
19697
+ }
19698
+ if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
19699
+ module.exports = buffer;
19700
+ } else {
19701
+ // Copy properties from require('buffer')
19702
+ copyProps(buffer, exports$1);
19703
+ exports$1.Buffer = SafeBuffer;
19704
+ }
19705
+
19706
+ function SafeBuffer (arg, encodingOrOffset, length) {
19707
+ return Buffer(arg, encodingOrOffset, length)
19708
+ }
19709
+
19710
+ SafeBuffer.prototype = Object.create(Buffer.prototype);
19711
+
19712
+ // Copy static methods from Buffer
19713
+ copyProps(Buffer, SafeBuffer);
19714
+
19715
+ SafeBuffer.from = function (arg, encodingOrOffset, length) {
19716
+ if (typeof arg === 'number') {
19717
+ throw new TypeError('Argument must not be a number')
19718
+ }
19719
+ return Buffer(arg, encodingOrOffset, length)
19720
+ };
19721
+
19722
+ SafeBuffer.alloc = function (size, fill, encoding) {
19723
+ if (typeof size !== 'number') {
19724
+ throw new TypeError('Argument must be a number')
19725
+ }
19726
+ var buf = Buffer(size);
19727
+ if (fill !== undefined) {
19728
+ if (typeof encoding === 'string') {
19729
+ buf.fill(fill, encoding);
19730
+ } else {
19731
+ buf.fill(fill);
19732
+ }
19733
+ } else {
19734
+ buf.fill(0);
19735
+ }
19736
+ return buf
19737
+ };
19738
+
19739
+ SafeBuffer.allocUnsafe = function (size) {
19740
+ if (typeof size !== 'number') {
19741
+ throw new TypeError('Argument must be a number')
19742
+ }
19743
+ return Buffer(size)
19744
+ };
19745
+
19746
+ SafeBuffer.allocUnsafeSlow = function (size) {
19747
+ if (typeof size !== 'number') {
19748
+ throw new TypeError('Argument must be a number')
19749
+ }
19750
+ return buffer.SlowBuffer(size)
19751
+ };
19752
+ } (safeBuffer, safeBuffer.exports));
19753
+ return safeBuffer.exports;
20080
19754
  }
20081
19755
 
20082
- var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
20083
- var bs58 = base(ALPHABET);
19756
+ var src;
19757
+ var hasRequiredSrc;
20084
19758
 
20085
- var index = /*#__PURE__*/Object.freeze({
19759
+ function requireSrc () {
19760
+ if (hasRequiredSrc) return src;
19761
+ hasRequiredSrc = 1;
19762
+ // base-x encoding / decoding
19763
+ // Copyright (c) 2018 base-x contributors
19764
+ // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
19765
+ // Distributed under the MIT software license, see the accompanying
19766
+ // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
19767
+ // @ts-ignore
19768
+ var _Buffer = requireSafeBuffer().Buffer;
19769
+ function base (ALPHABET) {
19770
+ if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
19771
+ var BASE_MAP = new Uint8Array(256);
19772
+ for (var j = 0; j < BASE_MAP.length; j++) {
19773
+ BASE_MAP[j] = 255;
19774
+ }
19775
+ for (var i = 0; i < ALPHABET.length; i++) {
19776
+ var x = ALPHABET.charAt(i);
19777
+ var xc = x.charCodeAt(0);
19778
+ if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
19779
+ BASE_MAP[xc] = i;
19780
+ }
19781
+ var BASE = ALPHABET.length;
19782
+ var LEADER = ALPHABET.charAt(0);
19783
+ var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
19784
+ var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
19785
+ function encode (source) {
19786
+ if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source); }
19787
+ if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }
19788
+ if (source.length === 0) { return '' }
19789
+ // Skip & count leading zeroes.
19790
+ var zeroes = 0;
19791
+ var length = 0;
19792
+ var pbegin = 0;
19793
+ var pend = source.length;
19794
+ while (pbegin !== pend && source[pbegin] === 0) {
19795
+ pbegin++;
19796
+ zeroes++;
19797
+ }
19798
+ // Allocate enough space in big-endian base58 representation.
19799
+ var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
19800
+ var b58 = new Uint8Array(size);
19801
+ // Process the bytes.
19802
+ while (pbegin !== pend) {
19803
+ var carry = source[pbegin];
19804
+ // Apply "b58 = b58 * 256 + ch".
19805
+ var i = 0;
19806
+ for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
19807
+ carry += (256 * b58[it1]) >>> 0;
19808
+ b58[it1] = (carry % BASE) >>> 0;
19809
+ carry = (carry / BASE) >>> 0;
19810
+ }
19811
+ if (carry !== 0) { throw new Error('Non-zero carry') }
19812
+ length = i;
19813
+ pbegin++;
19814
+ }
19815
+ // Skip leading zeroes in base58 result.
19816
+ var it2 = size - length;
19817
+ while (it2 !== size && b58[it2] === 0) {
19818
+ it2++;
19819
+ }
19820
+ // Translate the result into a string.
19821
+ var str = LEADER.repeat(zeroes);
19822
+ for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
19823
+ return str
19824
+ }
19825
+ function decodeUnsafe (source) {
19826
+ if (typeof source !== 'string') { throw new TypeError('Expected String') }
19827
+ if (source.length === 0) { return _Buffer.alloc(0) }
19828
+ var psz = 0;
19829
+ // Skip and count leading '1's.
19830
+ var zeroes = 0;
19831
+ var length = 0;
19832
+ while (source[psz] === LEADER) {
19833
+ zeroes++;
19834
+ psz++;
19835
+ }
19836
+ // Allocate enough space in big-endian base256 representation.
19837
+ var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
19838
+ var b256 = new Uint8Array(size);
19839
+ // Process the characters.
19840
+ while (psz < source.length) {
19841
+ // Find code of next character
19842
+ var charCode = source.charCodeAt(psz);
19843
+ // Base map can not be indexed using char code
19844
+ if (charCode > 255) { return }
19845
+ // Decode character
19846
+ var carry = BASE_MAP[charCode];
19847
+ // Invalid character
19848
+ if (carry === 255) { return }
19849
+ var i = 0;
19850
+ for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
19851
+ carry += (BASE * b256[it3]) >>> 0;
19852
+ b256[it3] = (carry % 256) >>> 0;
19853
+ carry = (carry / 256) >>> 0;
19854
+ }
19855
+ if (carry !== 0) { throw new Error('Non-zero carry') }
19856
+ length = i;
19857
+ psz++;
19858
+ }
19859
+ // Skip leading zeroes in b256.
19860
+ var it4 = size - length;
19861
+ while (it4 !== size && b256[it4] === 0) {
19862
+ it4++;
19863
+ }
19864
+ var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
19865
+ vch.fill(0x00, 0, zeroes);
19866
+ var j = zeroes;
19867
+ while (it4 !== size) {
19868
+ vch[j++] = b256[it4++];
19869
+ }
19870
+ return vch
19871
+ }
19872
+ function decode (string) {
19873
+ var buffer = decodeUnsafe(string);
19874
+ if (buffer) { return buffer }
19875
+ throw new Error('Non-base' + BASE + ' character')
19876
+ }
19877
+ return {
19878
+ encode: encode,
19879
+ decodeUnsafe: decodeUnsafe,
19880
+ decode: decode
19881
+ }
19882
+ }
19883
+ src = base;
19884
+ return src;
19885
+ }
19886
+
19887
+ var bs58$1;
19888
+ var hasRequiredBs58;
19889
+
19890
+ function requireBs58 () {
19891
+ if (hasRequiredBs58) return bs58$1;
19892
+ hasRequiredBs58 = 1;
19893
+ var basex = requireSrc();
19894
+ var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
19895
+
19896
+ bs58$1 = basex(ALPHABET);
19897
+ return bs58$1;
19898
+ }
19899
+
19900
+ var bs58Exports = requireBs58();
19901
+ var bs58 = /*@__PURE__*/getDefaultExportFromCjs$1(bs58Exports);
19902
+
19903
+ var index = /*#__PURE__*/_mergeNamespaces({
20086
19904
  __proto__: null,
20087
19905
  default: bs58
20088
- });
19906
+ }, [bs58Exports]);
20089
19907
 
20090
19908
  const SURFNET_RPC_URL$1 = "https://surfpool.fly.dev";
20091
19909
  let React;
@@ -20999,7 +20817,7 @@ async function loadMwaProtocol() {
20999
20817
  return mwaProtocolLoadPromise;
21000
20818
  mwaProtocolLoadPromise = (async () => {
21001
20819
  try {
21002
- mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-BMtEulGJ.js'); });
20820
+ mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-Df7yN8D5.js'); });
21003
20821
  }
21004
20822
  catch (e) {
21005
20823
  console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
@@ -21021,7 +20839,7 @@ async function registerMobileWalletAdapter(config) {
21021
20839
  if (typeof window === 'undefined')
21022
20840
  return;
21023
20841
  try {
21024
- const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-AZQ5TnZ4.js'); });
20842
+ const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-Cpi4W_1r.js'); });
21025
20843
  const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
21026
20844
  if (!registerMwa) {
21027
20845
  console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
@@ -21941,7 +21759,6 @@ exports.ServerSessionManager = ServerSessionManager;
21941
21759
  exports.SolanaMobileWalletProvider = SolanaMobileWalletProvider;
21942
21760
  exports.WebSessionManager = WebSessionManager;
21943
21761
  exports.aggregate = aggregate;
21944
- exports.bs58 = bs58;
21945
21762
  exports.bufferExports = bufferExports;
21946
21763
  exports.buildSetDocumentsTransaction = buildSetDocumentsTransaction;
21947
21764
  exports.clearCache = clearCache;
@@ -21987,4 +21804,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
21987
21804
  exports.signTransaction = signTransaction;
21988
21805
  exports.subscribe = subscribe;
21989
21806
  exports.useAuth = useAuth;
21990
- //# sourceMappingURL=index-Cp727oEW.js.map
21807
+ //# sourceMappingURL=index-DwU9hjtr.js.map