@pooflabs/web 0.0.75 → 0.0.77

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 (83) hide show
  1. package/README.md +32 -0
  2. package/dist/auth/providers/sol/sol-utils.d.ts +2 -0
  3. package/dist/{index-BcDe_euX.js → index-Bfk81d8_.js} +883 -25
  4. package/dist/index-Bfk81d8_.js.map +1 -0
  5. package/dist/{index-Dho2J3X6.esm.js → index-CFh1x-M0.esm.js} +368 -162
  6. package/dist/index-CFh1x-M0.esm.js.map +1 -0
  7. package/dist/index-CdOv7Nw2.esm.js +6 -0
  8. package/dist/index-CdOv7Nw2.esm.js.map +1 -0
  9. package/dist/{index-_vhjpl1l.esm.js → index-CeQ8hE3s.esm.js} +881 -24
  10. package/dist/index-CeQ8hE3s.esm.js.map +1 -0
  11. package/dist/index-DDXzCx2W.js +8 -0
  12. package/dist/index-DDXzCx2W.js.map +1 -0
  13. package/dist/{index-CMeewi-G.js → index-DQVpAl5t.js} +368 -161
  14. package/dist/index-DQVpAl5t.js.map +1 -0
  15. package/dist/{index-BHYrnHi6.js → index-KUU0aVzP.js} +882 -24
  16. package/dist/index-KUU0aVzP.js.map +1 -0
  17. package/dist/{index-BqDvUK9s.esm.js → index-R7t9pRt_.esm.js} +882 -23
  18. package/dist/index-R7t9pRt_.esm.js.map +1 -0
  19. package/dist/{index.browser-Br0p4bjw.esm.js → index.browser-BE44CEaJ.esm.js} +3 -3
  20. package/dist/{index.browser-Br0p4bjw.esm.js.map → index.browser-BE44CEaJ.esm.js.map} +1 -1
  21. package/dist/{index.browser-DZjyUgtx.esm.js → index.browser-C-_FEr5M.esm.js} +449 -479
  22. package/dist/index.browser-C-_FEr5M.esm.js.map +1 -0
  23. package/dist/index.browser-C9bFQZyQ.esm.js +1373 -0
  24. package/dist/index.browser-C9bFQZyQ.esm.js.map +1 -0
  25. package/dist/index.browser-Dbq5Qf1G.esm.js +242 -0
  26. package/dist/index.browser-Dbq5Qf1G.esm.js.map +1 -0
  27. package/dist/index.browser-Df7yN8D5.js +245 -0
  28. package/dist/index.browser-Df7yN8D5.js.map +1 -0
  29. package/dist/{index.browser-BzHjnrpD.js → index.browser-Di1_YZpi.js} +3 -3
  30. package/dist/{index.browser-BzHjnrpD.js.map → index.browser-Di1_YZpi.js.map} +1 -1
  31. package/dist/{index.browser-BOJRGZWX.js → index.browser-DjEZSiqI.js} +449 -479
  32. package/dist/index.browser-DjEZSiqI.js.map +1 -0
  33. package/dist/index.browser-dszs5oe5.js +1376 -0
  34. package/dist/index.browser-dszs5oe5.js.map +1 -0
  35. package/dist/index.d.ts +1 -0
  36. package/dist/index.esm.js +1 -1
  37. package/dist/index.js +3 -1
  38. package/dist/index.js.map +1 -1
  39. package/dist/{index.native-DcKDTqvq.js → index.native-CKd2b3_F.js} +2767 -188
  40. package/dist/index.native-CKd2b3_F.js.map +1 -0
  41. package/dist/{index.native-BB7er4-z.esm.js → index.native-DAyMVhFq.esm.js} +2766 -190
  42. package/dist/index.native-DAyMVhFq.esm.js.map +1 -0
  43. package/dist/index.native.d.ts +1 -0
  44. package/dist/index.native.esm.js +1 -1
  45. package/dist/index.native.js +3 -1
  46. package/dist/index.native.js.map +1 -1
  47. package/dist/{phantom-wallet-provider-DMxFAUC4.js → phantom-wallet-provider-DJ6qf2VB.js} +4 -4
  48. package/dist/{phantom-wallet-provider-DMxFAUC4.js.map → phantom-wallet-provider-DJ6qf2VB.js.map} +1 -1
  49. package/dist/{phantom-wallet-provider-DHok8ui3.esm.js → phantom-wallet-provider-DQ0uhl2v.esm.js} +4 -4
  50. package/dist/{phantom-wallet-provider-DHok8ui3.esm.js.map → phantom-wallet-provider-DQ0uhl2v.esm.js.map} +1 -1
  51. package/dist/{privy-wallet-provider-CFuoQYuv.esm.js → privy-wallet-provider-BhiHnphv.esm.js} +7 -8
  52. package/dist/privy-wallet-provider-BhiHnphv.esm.js.map +1 -0
  53. package/dist/{privy-wallet-provider-Bhvw0t1d.js → privy-wallet-provider-CMCv5g3O.js} +7 -8
  54. package/dist/privy-wallet-provider-CMCv5g3O.js.map +1 -0
  55. package/dist/{solana-mobile-wallet-provider-BpQghAgC.esm.js → solana-mobile-wallet-provider-DSSk_6CR.esm.js} +4 -4
  56. package/dist/{solana-mobile-wallet-provider-BpQghAgC.esm.js.map → solana-mobile-wallet-provider-DSSk_6CR.esm.js.map} +1 -1
  57. package/dist/{solana-mobile-wallet-provider-D8b5y-By.js → solana-mobile-wallet-provider-DaFNesCe.js} +4 -4
  58. package/dist/{solana-mobile-wallet-provider-D8b5y-By.js.map → solana-mobile-wallet-provider-DaFNesCe.js.map} +1 -1
  59. package/package.json +2 -2
  60. package/dist/index-BHYrnHi6.js.map +0 -1
  61. package/dist/index-BcDe_euX.js.map +0 -1
  62. package/dist/index-Bdcc5821.js +0 -2375
  63. package/dist/index-Bdcc5821.js.map +0 -1
  64. package/dist/index-BqDvUK9s.esm.js.map +0 -1
  65. package/dist/index-CMeewi-G.js.map +0 -1
  66. package/dist/index-CrOVJFX9.esm.js +0 -2373
  67. package/dist/index-CrOVJFX9.esm.js.map +0 -1
  68. package/dist/index-Dho2J3X6.esm.js.map +0 -1
  69. package/dist/index-_vhjpl1l.esm.js.map +0 -1
  70. package/dist/index.browser-BOJRGZWX.js.map +0 -1
  71. package/dist/index.browser-Btm3sRKb.esm.js +0 -307
  72. package/dist/index.browser-Btm3sRKb.esm.js.map +0 -1
  73. package/dist/index.browser-CGfjPfzM.esm.js +0 -1468
  74. package/dist/index.browser-CGfjPfzM.esm.js.map +0 -1
  75. package/dist/index.browser-DZjyUgtx.esm.js.map +0 -1
  76. package/dist/index.browser-Dapjfbl6.js +0 -310
  77. package/dist/index.browser-Dapjfbl6.js.map +0 -1
  78. package/dist/index.browser-JX3F6oPV.js +0 -1471
  79. package/dist/index.browser-JX3F6oPV.js.map +0 -1
  80. package/dist/index.native-BB7er4-z.esm.js.map +0 -1
  81. package/dist/index.native-DcKDTqvq.js.map +0 -1
  82. package/dist/privy-wallet-provider-Bhvw0t1d.js.map +0 -1
  83. package/dist/privy-wallet-provider-CFuoQYuv.esm.js.map +0 -1
@@ -1,9 +1,24 @@
1
1
  import globalAxios from 'axios';
2
- import { PublicKey, SystemProgram, TransactionInstruction, ComputeBudgetProgram, Keypair, VersionedTransaction, TransactionMessage, Connection, Transaction } from '@solana/web3.js';
2
+ import { PublicKey, SystemProgram, TransactionInstruction, ComputeBudgetProgram, Keypair, VersionedTransaction, TransactionMessage, Transaction, Connection } from '@solana/web3.js';
3
3
  import * as anchor from '@coral-xyz/anchor';
4
4
  import { Program } from '@coral-xyz/anchor';
5
5
  import * as React$2 from 'react';
6
6
 
7
+ function _mergeNamespaces(n, m) {
8
+ m.forEach(function (e) {
9
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
10
+ if (k !== 'default' && !(k in n)) {
11
+ var d = Object.getOwnPropertyDescriptor(e, k);
12
+ Object.defineProperty(n, k, d.get ? d : {
13
+ enumerable: true,
14
+ get: function () { return e[k]; }
15
+ });
16
+ }
17
+ });
18
+ });
19
+ return Object.freeze(n);
20
+ }
21
+
7
22
  function getDefaultExportFromCjs$1 (x) {
8
23
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
9
24
  }
@@ -8959,15 +8974,15 @@ function requireBuffer$1 () {
8959
8974
 
8960
8975
  var bufferExports$1 = requireBuffer$1();
8961
8976
 
8962
- var safeBuffer = {exports: {}};
8977
+ var safeBuffer$1 = {exports: {}};
8963
8978
 
8964
8979
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
8965
8980
 
8966
- var hasRequiredSafeBuffer;
8981
+ var hasRequiredSafeBuffer$1;
8967
8982
 
8968
- function requireSafeBuffer () {
8969
- if (hasRequiredSafeBuffer) return safeBuffer.exports;
8970
- hasRequiredSafeBuffer = 1;
8983
+ function requireSafeBuffer$1 () {
8984
+ if (hasRequiredSafeBuffer$1) return safeBuffer$1.exports;
8985
+ hasRequiredSafeBuffer$1 = 1;
8971
8986
  (function (module, exports$1) {
8972
8987
  /* eslint-disable node/no-deprecated-api */
8973
8988
  var buffer = requireBuffer$1();
@@ -9033,23 +9048,23 @@ function requireSafeBuffer () {
9033
9048
  }
9034
9049
  return buffer.SlowBuffer(size)
9035
9050
  };
9036
- } (safeBuffer, safeBuffer.exports));
9037
- return safeBuffer.exports;
9051
+ } (safeBuffer$1, safeBuffer$1.exports));
9052
+ return safeBuffer$1.exports;
9038
9053
  }
9039
9054
 
9040
- var src;
9041
- var hasRequiredSrc;
9055
+ var src$1;
9056
+ var hasRequiredSrc$1;
9042
9057
 
9043
- function requireSrc () {
9044
- if (hasRequiredSrc) return src;
9045
- hasRequiredSrc = 1;
9058
+ function requireSrc$1 () {
9059
+ if (hasRequiredSrc$1) return src$1;
9060
+ hasRequiredSrc$1 = 1;
9046
9061
  // base-x encoding / decoding
9047
9062
  // Copyright (c) 2018 base-x contributors
9048
9063
  // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
9049
9064
  // Distributed under the MIT software license, see the accompanying
9050
9065
  // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
9051
9066
  // @ts-ignore
9052
- var _Buffer = requireSafeBuffer().Buffer;
9067
+ var _Buffer = requireSafeBuffer$1().Buffer;
9053
9068
  function base (ALPHABET) {
9054
9069
  if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
9055
9070
  var BASE_MAP = new Uint8Array(256);
@@ -9164,25 +9179,25 @@ function requireSrc () {
9164
9179
  decode: decode
9165
9180
  }
9166
9181
  }
9167
- src = base;
9168
- return src;
9182
+ src$1 = base;
9183
+ return src$1;
9169
9184
  }
9170
9185
 
9171
- var bs58$1;
9172
- var hasRequiredBs58;
9186
+ var bs58$1$1;
9187
+ var hasRequiredBs58$1;
9173
9188
 
9174
- function requireBs58 () {
9175
- if (hasRequiredBs58) return bs58$1;
9176
- hasRequiredBs58 = 1;
9177
- var basex = requireSrc();
9189
+ function requireBs58$1 () {
9190
+ if (hasRequiredBs58$1) return bs58$1$1;
9191
+ hasRequiredBs58$1 = 1;
9192
+ var basex = requireSrc$1();
9178
9193
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9179
9194
 
9180
- bs58$1 = basex(ALPHABET);
9181
- return bs58$1;
9195
+ bs58$1$1 = basex(ALPHABET);
9196
+ return bs58$1$1;
9182
9197
  }
9183
9198
 
9184
- var bs58Exports = requireBs58();
9185
- var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
9199
+ var bs58Exports$1 = requireBs58$1();
9200
+ var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports$1);
9186
9201
 
9187
9202
  // ─────────────────────────────────────────────────────────────
9188
9203
  // Local implementation of getSimulationComputeUnits
@@ -10101,6 +10116,90 @@ function cleanupExpiredCache() {
10101
10116
  });
10102
10117
  lastCacheCleanup = now;
10103
10118
  }
10119
+ async function getMany(paths, opts = {}) {
10120
+ if (paths.length === 0) {
10121
+ return [];
10122
+ }
10123
+ if (paths.length > 30) {
10124
+ throw new Error('Cannot fetch more than 30 documents at once');
10125
+ }
10126
+ const normalizedPaths = [];
10127
+ for (const path of paths) {
10128
+ let normalizedPath = path.startsWith("/") ? path.slice(1) : path;
10129
+ if (normalizedPath.endsWith("*") && normalizedPath.length > 1) {
10130
+ normalizedPath = normalizedPath.slice(0, -1);
10131
+ }
10132
+ if (!normalizedPath || normalizedPath.length === 0) {
10133
+ throw new Error(`Invalid path provided: ${path}`);
10134
+ }
10135
+ const pathIsDocument = normalizedPath.split("/").length % 2 === 0;
10136
+ if (!pathIsDocument) {
10137
+ throw new Error(`Path must point to a document (even number of segments): ${path}`);
10138
+ }
10139
+ normalizedPaths.push(normalizedPath);
10140
+ }
10141
+ const now = Date.now();
10142
+ const results = new Array(paths.length);
10143
+ const uncachedIndices = [];
10144
+ const uncachedPaths = [];
10145
+ for (let i = 0; i < normalizedPaths.length; i++) {
10146
+ const normalizedPath = normalizedPaths[i];
10147
+ const cacheKey = `${normalizedPath}:`;
10148
+ if (!opts.bypassCache && getCache[cacheKey] && now < getCache[cacheKey].expiresAt) {
10149
+ results[i] = { path: normalizedPath, data: getCache[cacheKey].data };
10150
+ }
10151
+ else {
10152
+ uncachedIndices.push(i);
10153
+ uncachedPaths.push(normalizedPath);
10154
+ }
10155
+ }
10156
+ if (uncachedPaths.length > 0) {
10157
+ try {
10158
+ const response = await makeApiRequest('POST', 'items/batch', { paths: uncachedPaths }, opts._overrides);
10159
+ const serverResults = response.data.results;
10160
+ const serverResultsMap = new Map();
10161
+ for (const result of serverResults) {
10162
+ serverResultsMap.set(result.path, result);
10163
+ }
10164
+ for (let i = 0; i < uncachedIndices.length; i++) {
10165
+ const originalIndex = uncachedIndices[i];
10166
+ const normalizedPath = uncachedPaths[i];
10167
+ const serverResult = serverResultsMap.get(normalizedPath);
10168
+ if (serverResult) {
10169
+ results[originalIndex] = serverResult;
10170
+ if (!serverResult.error && !opts.bypassCache) {
10171
+ const cacheKey = `${normalizedPath}:`;
10172
+ getCache[cacheKey] = {
10173
+ data: serverResult.data,
10174
+ expiresAt: now + GET_CACHE_TTL
10175
+ };
10176
+ }
10177
+ }
10178
+ else {
10179
+ results[originalIndex] = {
10180
+ path: normalizedPath,
10181
+ data: null,
10182
+ error: { code: 'NOT_FOUND', message: `No result returned for path ${normalizedPath}` }
10183
+ };
10184
+ }
10185
+ }
10186
+ if (now - lastCacheCleanup > 5000) {
10187
+ cleanupExpiredCache();
10188
+ lastCacheCleanup = now;
10189
+ }
10190
+ }
10191
+ catch (error) {
10192
+ for (const originalIndex of uncachedIndices) {
10193
+ results[originalIndex] = {
10194
+ path: normalizedPaths[originalIndex],
10195
+ data: null,
10196
+ error: { code: 'NOT_FOUND', message: error instanceof Error ? error.message : 'Unknown error' }
10197
+ };
10198
+ }
10199
+ }
10200
+ }
10201
+ return results;
10202
+ }
10104
10203
  async function runQuery(absolutePath, queryName, queryArgs, opts) {
10105
10204
  const result = await runQueryMany([{ absolutePath, queryName, queryArgs }], opts);
10106
10205
  return result[0];
@@ -12741,6 +12840,16 @@ function useAuth() {
12741
12840
  };
12742
12841
  }
12743
12842
 
12843
+ async function deserializeTransaction(tx) {
12844
+ const buf = Buffer.isBuffer(tx) ? tx : Buffer.from(tx, 'base64');
12845
+ if ((buf[0] & 0x80) !== 0) {
12846
+ return VersionedTransaction.deserialize(buf);
12847
+ }
12848
+ else {
12849
+ return Transaction.from(buf);
12850
+ }
12851
+ }
12852
+
12744
12853
  // Wrapper for getIdToken - passes isServer=false for client-side usage
12745
12854
  async function getIdToken() {
12746
12855
  return getIdToken$1(false);
@@ -15186,7 +15295,7 @@ async function loadDependencies() {
15186
15295
  const [reactModule, reactDomModule, phantomModule] = await Promise.all([
15187
15296
  import('react'),
15188
15297
  import('react-dom/client'),
15189
- import('./index-BqDvUK9s.esm.js')
15298
+ import('./index-CeQ8hE3s.esm.js')
15190
15299
  ]);
15191
15300
  // Extract default export from ESM module namespace
15192
15301
  // Dynamic import() returns { default: Module, ...exports }, not the module directly
@@ -19498,137 +19607,235 @@ function createSolanaRpcSubscriptionsFromTransport(transport) {
19498
19607
  });
19499
19608
  }
19500
19609
 
19501
- // base-x encoding / decoding
19502
- // Copyright (c) 2018 base-x contributors
19503
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
19504
- // Distributed under the MIT software license, see the accompanying
19505
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
19506
- function base (ALPHABET) {
19507
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
19508
- const BASE_MAP = new Uint8Array(256);
19509
- for (let j = 0; j < BASE_MAP.length; j++) {
19510
- BASE_MAP[j] = 255;
19511
- }
19512
- for (let i = 0; i < ALPHABET.length; i++) {
19513
- const x = ALPHABET.charAt(i);
19514
- const xc = x.charCodeAt(0);
19515
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
19516
- BASE_MAP[xc] = i;
19517
- }
19518
- const BASE = ALPHABET.length;
19519
- const LEADER = ALPHABET.charAt(0);
19520
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
19521
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
19522
- function encode (source) {
19523
- // eslint-disable-next-line no-empty
19524
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
19525
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
19526
- } else if (Array.isArray(source)) {
19527
- source = Uint8Array.from(source);
19528
- }
19529
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
19530
- if (source.length === 0) { return '' }
19531
- // Skip & count leading zeroes.
19532
- let zeroes = 0;
19533
- let length = 0;
19534
- let pbegin = 0;
19535
- const pend = source.length;
19536
- while (pbegin !== pend && source[pbegin] === 0) {
19537
- pbegin++;
19538
- zeroes++;
19539
- }
19540
- // Allocate enough space in big-endian base58 representation.
19541
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
19542
- const b58 = new Uint8Array(size);
19543
- // Process the bytes.
19544
- while (pbegin !== pend) {
19545
- let carry = source[pbegin];
19546
- // Apply "b58 = b58 * 256 + ch".
19547
- let i = 0;
19548
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
19549
- carry += (256 * b58[it1]) >>> 0;
19550
- b58[it1] = (carry % BASE) >>> 0;
19551
- carry = (carry / BASE) >>> 0;
19552
- }
19553
- if (carry !== 0) { throw new Error('Non-zero carry') }
19554
- length = i;
19555
- pbegin++;
19556
- }
19557
- // Skip leading zeroes in base58 result.
19558
- let it2 = size - length;
19559
- while (it2 !== size && b58[it2] === 0) {
19560
- it2++;
19561
- }
19562
- // Translate the result into a string.
19563
- let str = LEADER.repeat(zeroes);
19564
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
19565
- return str
19566
- }
19567
- function decodeUnsafe (source) {
19568
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
19569
- if (source.length === 0) { return new Uint8Array() }
19570
- let psz = 0;
19571
- // Skip and count leading '1's.
19572
- let zeroes = 0;
19573
- let length = 0;
19574
- while (source[psz] === LEADER) {
19575
- zeroes++;
19576
- psz++;
19577
- }
19578
- // Allocate enough space in big-endian base256 representation.
19579
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
19580
- const b256 = new Uint8Array(size);
19581
- // Process the characters.
19582
- while (psz < source.length) {
19583
- // Find code of next character
19584
- const charCode = source.charCodeAt(psz);
19585
- // Base map can not be indexed using char code
19586
- if (charCode > 255) { return }
19587
- // Decode character
19588
- let carry = BASE_MAP[charCode];
19589
- // Invalid character
19590
- if (carry === 255) { return }
19591
- let i = 0;
19592
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
19593
- carry += (BASE * b256[it3]) >>> 0;
19594
- b256[it3] = (carry % 256) >>> 0;
19595
- carry = (carry / 256) >>> 0;
19596
- }
19597
- if (carry !== 0) { throw new Error('Non-zero carry') }
19598
- length = i;
19599
- psz++;
19600
- }
19601
- // Skip leading zeroes in b256.
19602
- let it4 = size - length;
19603
- while (it4 !== size && b256[it4] === 0) {
19604
- it4++;
19605
- }
19606
- const vch = new Uint8Array(zeroes + (size - it4));
19607
- let j = zeroes;
19608
- while (it4 !== size) {
19609
- vch[j++] = b256[it4++];
19610
- }
19611
- return vch
19612
- }
19613
- function decode (string) {
19614
- const buffer = decodeUnsafe(string);
19615
- if (buffer) { return buffer }
19616
- throw new Error('Non-base' + BASE + ' character')
19617
- }
19618
- return {
19619
- encode,
19620
- decodeUnsafe,
19621
- decode
19622
- }
19610
+ var safeBuffer = {exports: {}};
19611
+
19612
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
19613
+
19614
+ var hasRequiredSafeBuffer;
19615
+
19616
+ function requireSafeBuffer () {
19617
+ if (hasRequiredSafeBuffer) return safeBuffer.exports;
19618
+ hasRequiredSafeBuffer = 1;
19619
+ (function (module, exports$1) {
19620
+ /* eslint-disable node/no-deprecated-api */
19621
+ var buffer = requireBuffer();
19622
+ var Buffer = buffer.Buffer;
19623
+
19624
+ // alternative to using Object.keys for old browsers
19625
+ function copyProps (src, dst) {
19626
+ for (var key in src) {
19627
+ dst[key] = src[key];
19628
+ }
19629
+ }
19630
+ if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
19631
+ module.exports = buffer;
19632
+ } else {
19633
+ // Copy properties from require('buffer')
19634
+ copyProps(buffer, exports$1);
19635
+ exports$1.Buffer = SafeBuffer;
19636
+ }
19637
+
19638
+ function SafeBuffer (arg, encodingOrOffset, length) {
19639
+ return Buffer(arg, encodingOrOffset, length)
19640
+ }
19641
+
19642
+ SafeBuffer.prototype = Object.create(Buffer.prototype);
19643
+
19644
+ // Copy static methods from Buffer
19645
+ copyProps(Buffer, SafeBuffer);
19646
+
19647
+ SafeBuffer.from = function (arg, encodingOrOffset, length) {
19648
+ if (typeof arg === 'number') {
19649
+ throw new TypeError('Argument must not be a number')
19650
+ }
19651
+ return Buffer(arg, encodingOrOffset, length)
19652
+ };
19653
+
19654
+ SafeBuffer.alloc = function (size, fill, encoding) {
19655
+ if (typeof size !== 'number') {
19656
+ throw new TypeError('Argument must be a number')
19657
+ }
19658
+ var buf = Buffer(size);
19659
+ if (fill !== undefined) {
19660
+ if (typeof encoding === 'string') {
19661
+ buf.fill(fill, encoding);
19662
+ } else {
19663
+ buf.fill(fill);
19664
+ }
19665
+ } else {
19666
+ buf.fill(0);
19667
+ }
19668
+ return buf
19669
+ };
19670
+
19671
+ SafeBuffer.allocUnsafe = function (size) {
19672
+ if (typeof size !== 'number') {
19673
+ throw new TypeError('Argument must be a number')
19674
+ }
19675
+ return Buffer(size)
19676
+ };
19677
+
19678
+ SafeBuffer.allocUnsafeSlow = function (size) {
19679
+ if (typeof size !== 'number') {
19680
+ throw new TypeError('Argument must be a number')
19681
+ }
19682
+ return buffer.SlowBuffer(size)
19683
+ };
19684
+ } (safeBuffer, safeBuffer.exports));
19685
+ return safeBuffer.exports;
19686
+ }
19687
+
19688
+ var src;
19689
+ var hasRequiredSrc;
19690
+
19691
+ function requireSrc () {
19692
+ if (hasRequiredSrc) return src;
19693
+ hasRequiredSrc = 1;
19694
+ // base-x encoding / decoding
19695
+ // Copyright (c) 2018 base-x contributors
19696
+ // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
19697
+ // Distributed under the MIT software license, see the accompanying
19698
+ // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
19699
+ // @ts-ignore
19700
+ var _Buffer = requireSafeBuffer().Buffer;
19701
+ function base (ALPHABET) {
19702
+ if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
19703
+ var BASE_MAP = new Uint8Array(256);
19704
+ for (var j = 0; j < BASE_MAP.length; j++) {
19705
+ BASE_MAP[j] = 255;
19706
+ }
19707
+ for (var i = 0; i < ALPHABET.length; i++) {
19708
+ var x = ALPHABET.charAt(i);
19709
+ var xc = x.charCodeAt(0);
19710
+ if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
19711
+ BASE_MAP[xc] = i;
19712
+ }
19713
+ var BASE = ALPHABET.length;
19714
+ var LEADER = ALPHABET.charAt(0);
19715
+ var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
19716
+ var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
19717
+ function encode (source) {
19718
+ if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source); }
19719
+ if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }
19720
+ if (source.length === 0) { return '' }
19721
+ // Skip & count leading zeroes.
19722
+ var zeroes = 0;
19723
+ var length = 0;
19724
+ var pbegin = 0;
19725
+ var pend = source.length;
19726
+ while (pbegin !== pend && source[pbegin] === 0) {
19727
+ pbegin++;
19728
+ zeroes++;
19729
+ }
19730
+ // Allocate enough space in big-endian base58 representation.
19731
+ var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
19732
+ var b58 = new Uint8Array(size);
19733
+ // Process the bytes.
19734
+ while (pbegin !== pend) {
19735
+ var carry = source[pbegin];
19736
+ // Apply "b58 = b58 * 256 + ch".
19737
+ var i = 0;
19738
+ for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
19739
+ carry += (256 * b58[it1]) >>> 0;
19740
+ b58[it1] = (carry % BASE) >>> 0;
19741
+ carry = (carry / BASE) >>> 0;
19742
+ }
19743
+ if (carry !== 0) { throw new Error('Non-zero carry') }
19744
+ length = i;
19745
+ pbegin++;
19746
+ }
19747
+ // Skip leading zeroes in base58 result.
19748
+ var it2 = size - length;
19749
+ while (it2 !== size && b58[it2] === 0) {
19750
+ it2++;
19751
+ }
19752
+ // Translate the result into a string.
19753
+ var str = LEADER.repeat(zeroes);
19754
+ for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
19755
+ return str
19756
+ }
19757
+ function decodeUnsafe (source) {
19758
+ if (typeof source !== 'string') { throw new TypeError('Expected String') }
19759
+ if (source.length === 0) { return _Buffer.alloc(0) }
19760
+ var psz = 0;
19761
+ // Skip and count leading '1's.
19762
+ var zeroes = 0;
19763
+ var length = 0;
19764
+ while (source[psz] === LEADER) {
19765
+ zeroes++;
19766
+ psz++;
19767
+ }
19768
+ // Allocate enough space in big-endian base256 representation.
19769
+ var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
19770
+ var b256 = new Uint8Array(size);
19771
+ // Process the characters.
19772
+ while (psz < source.length) {
19773
+ // Find code of next character
19774
+ var charCode = source.charCodeAt(psz);
19775
+ // Base map can not be indexed using char code
19776
+ if (charCode > 255) { return }
19777
+ // Decode character
19778
+ var carry = BASE_MAP[charCode];
19779
+ // Invalid character
19780
+ if (carry === 255) { return }
19781
+ var i = 0;
19782
+ for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
19783
+ carry += (BASE * b256[it3]) >>> 0;
19784
+ b256[it3] = (carry % 256) >>> 0;
19785
+ carry = (carry / 256) >>> 0;
19786
+ }
19787
+ if (carry !== 0) { throw new Error('Non-zero carry') }
19788
+ length = i;
19789
+ psz++;
19790
+ }
19791
+ // Skip leading zeroes in b256.
19792
+ var it4 = size - length;
19793
+ while (it4 !== size && b256[it4] === 0) {
19794
+ it4++;
19795
+ }
19796
+ var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
19797
+ vch.fill(0x00, 0, zeroes);
19798
+ var j = zeroes;
19799
+ while (it4 !== size) {
19800
+ vch[j++] = b256[it4++];
19801
+ }
19802
+ return vch
19803
+ }
19804
+ function decode (string) {
19805
+ var buffer = decodeUnsafe(string);
19806
+ if (buffer) { return buffer }
19807
+ throw new Error('Non-base' + BASE + ' character')
19808
+ }
19809
+ return {
19810
+ encode: encode,
19811
+ decodeUnsafe: decodeUnsafe,
19812
+ decode: decode
19813
+ }
19814
+ }
19815
+ src = base;
19816
+ return src;
19817
+ }
19818
+
19819
+ var bs58$1;
19820
+ var hasRequiredBs58;
19821
+
19822
+ function requireBs58 () {
19823
+ if (hasRequiredBs58) return bs58$1;
19824
+ hasRequiredBs58 = 1;
19825
+ var basex = requireSrc();
19826
+ var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
19827
+
19828
+ bs58$1 = basex(ALPHABET);
19829
+ return bs58$1;
19623
19830
  }
19624
19831
 
19625
- var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
19626
- var bs58 = base(ALPHABET);
19832
+ var bs58Exports = requireBs58();
19833
+ var bs58 = /*@__PURE__*/getDefaultExportFromCjs$1(bs58Exports);
19627
19834
 
19628
- var index = /*#__PURE__*/Object.freeze({
19835
+ var index = /*#__PURE__*/_mergeNamespaces({
19629
19836
  __proto__: null,
19630
19837
  default: bs58
19631
- });
19838
+ }, [bs58Exports]);
19632
19839
 
19633
19840
  const SURFNET_RPC_URL$1 = "https://surfpool.fly.dev";
19634
19841
  let React;
@@ -19642,7 +19849,7 @@ if (typeof window !== 'undefined') {
19642
19849
  privyImports = require('@privy-io/react-auth');
19643
19850
  privySolana = require('@privy-io/react-auth/solana');
19644
19851
  }
19645
- const defaultPrivyConfig = {
19852
+ const getDefaultPrivyConfig = () => ({
19646
19853
  appId: "cm4ve714908o27dk2yurpnfhd",
19647
19854
  config: {
19648
19855
  embeddedWallets: {
@@ -19655,14 +19862,13 @@ const defaultPrivyConfig = {
19655
19862
  },
19656
19863
  externalWallets: { solana: { connectors: privySolana.toSolanaWalletConnectors() } }
19657
19864
  }
19658
- };
19865
+ });
19659
19866
  class PrivyWalletProvider {
19660
19867
  constructor(appName, appLogoUrl, privyConfig, networkUrl = null) {
19661
19868
  this.containerElement = null;
19662
19869
  this.chainId = 'solana:mainnet';
19663
19870
  this.root = null;
19664
19871
  this.privyMethods = null;
19665
- this.privyConfig = defaultPrivyConfig;
19666
19872
  this.pendingLogin = null;
19667
19873
  // This is used to store the pending transaction until the wallet is connected for workaround for the wallet not being connected after login completion
19668
19874
  this.pendingTransaction = null;
@@ -19682,7 +19888,7 @@ class PrivyWalletProvider {
19682
19888
  this.containerElement = null;
19683
19889
  this.root = null;
19684
19890
  this.privyMethods = null;
19685
- this.privyConfig = privyConfig !== null && privyConfig !== void 0 ? privyConfig : defaultPrivyConfig;
19891
+ this.privyConfig = privyConfig !== null && privyConfig !== void 0 ? privyConfig : getDefaultPrivyConfig();
19686
19892
  // Only use the appName and appLogoUrl if no privyConfig is provided
19687
19893
  if (privyConfig == null) {
19688
19894
  if (appName != null && appName != '') {
@@ -19694,7 +19900,7 @@ class PrivyWalletProvider {
19694
19900
  }
19695
19901
  // Ensure externalWallets connectors are always configured — required for
19696
19902
  // useWallets().ready to resolve even when no browser extension is present
19697
- if (!this.privyConfig.config.externalWallets) {
19903
+ if (!this.privyConfig.config.externalWallets && privySolana) {
19698
19904
  this.privyConfig.config.externalWallets = {
19699
19905
  solana: { connectors: privySolana.toSolanaWalletConnectors() }
19700
19906
  };
@@ -20543,7 +20749,7 @@ async function loadMwaProtocol() {
20543
20749
  return mwaProtocolLoadPromise;
20544
20750
  mwaProtocolLoadPromise = (async () => {
20545
20751
  try {
20546
- mwaProtocolModule = await import('./index.browser-Btm3sRKb.esm.js');
20752
+ mwaProtocolModule = await import('./index.browser-Dbq5Qf1G.esm.js');
20547
20753
  }
20548
20754
  catch (e) {
20549
20755
  console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
@@ -20565,7 +20771,7 @@ async function registerMobileWalletAdapter(config) {
20565
20771
  if (typeof window === 'undefined')
20566
20772
  return;
20567
20773
  try {
20568
- const walletStandardMobile = await import('./index.browser-Br0p4bjw.esm.js');
20774
+ const walletStandardMobile = await import('./index.browser-BE44CEaJ.esm.js');
20569
20775
  const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
20570
20776
  if (!registerMwa) {
20571
20777
  console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
@@ -21473,5 +21679,5 @@ class PrivyExpoProvider {
21473
21679
  }
21474
21680
  }
21475
21681
 
21476
- export { reconnectWithNewAuth as $, subscribe as A, useAuth as B, getIdToken as C, setPlatform as D, getPlatform as E, PrivyWalletProvider as F, DEFAULT_TEST_ADDRESS as G, isMobileWalletAvailable as H, registerMobileWalletAdapter as I, PrivyExpoProvider as J, InsufficientBalanceError as K, ServerSessionManager as L, MockAuthProvider as M, buildSetDocumentsTransaction as N, OffchainAuthProvider as O, PhantomWalletProvider as P, clearCache as Q, ReactNativeSessionManager as R, SolanaMobileWalletProvider as S, closeAllSubscriptions as T, convertRemainingAccounts as U, createSessionWithPrivy as V, WebSessionManager as W, createSessionWithSignature as X, genAuthNonce as Y, genSolanaMessage as Z, getCachedData as _, bs58 as a, refreshSession as a0, signSessionCreateMessage as a1, bufferExports as b, getCurrentUser as c, onAuthLoadingChanged as d, getAuthLoading as e, logout as f, getDefaultExportFromCjs$1 as g, getConfig as h, init as i, getAuthProvider as j, get as k, login as l, setMany as m, setFile as n, onAuthStateChanged as o, getFiles as p, runQueryMany as q, runQuery as r, set as s, runExpression as t, runExpressionMany as u, signMessage as v, signTransaction as w, signAndSubmitTransaction as x, count as y, aggregate as z };
21477
- //# sourceMappingURL=index-Dho2J3X6.esm.js.map
21682
+ export { getMany as $, useAuth as A, deserializeTransaction as B, getIdToken as C, setPlatform as D, getPlatform as E, PrivyWalletProvider as F, DEFAULT_TEST_ADDRESS as G, isMobileWalletAvailable as H, registerMobileWalletAdapter as I, PrivyExpoProvider as J, InsufficientBalanceError as K, ServerSessionManager as L, MockAuthProvider as M, buildSetDocumentsTransaction as N, OffchainAuthProvider as O, PhantomWalletProvider as P, clearCache as Q, ReactNativeSessionManager as R, SolanaMobileWalletProvider as S, closeAllSubscriptions as T, convertRemainingAccounts as U, createSessionWithPrivy as V, WebSessionManager as W, createSessionWithSignature as X, genAuthNonce as Y, genSolanaMessage as Z, getCachedData as _, getCurrentUser as a, reconnectWithNewAuth as a0, refreshSession as a1, signSessionCreateMessage as a2, bufferExports as b, onAuthLoadingChanged as c, getAuthLoading as d, logout as e, getConfig as f, getDefaultExportFromCjs$1 as g, getAuthProvider as h, init as i, get as j, setMany as k, login as l, setFile as m, getFiles as n, onAuthStateChanged as o, runQueryMany as p, runExpression as q, runQuery as r, set as s, runExpressionMany as t, signMessage as u, signTransaction as v, signAndSubmitTransaction as w, count as x, aggregate as y, subscribe as z };
21683
+ //# sourceMappingURL=index-CFh1x-M0.esm.js.map