@pooflabs/web 0.0.83-rc2 → 0.0.84

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 (61) hide show
  1. package/dist/{index-BycoUXcq.js → index-BM6hgCdH.js} +2 -149
  2. package/dist/index-BM6hgCdH.js.map +1 -0
  3. package/dist/{index-HSa4FZ9y.js → index-BPlF6-PQ.js} +279 -159
  4. package/dist/index-BPlF6-PQ.js.map +1 -0
  5. package/dist/index-Bp4b5LXs.js +8 -0
  6. package/dist/index-Bp4b5LXs.js.map +1 -0
  7. package/dist/index-C80kRxWk.esm.js +6 -0
  8. package/dist/index-C80kRxWk.esm.js.map +1 -0
  9. package/dist/{index-dyXVIGCy.esm.js → index-CH2G5Y9i.esm.js} +2 -149
  10. package/dist/index-CH2G5Y9i.esm.js.map +1 -0
  11. package/dist/{index-DQLduP63.js → index-CSeN3jbG.js} +3 -150
  12. package/dist/index-CSeN3jbG.js.map +1 -0
  13. package/dist/{index-p1LvAs78.esm.js → index-XHbmzFFO.esm.js} +279 -159
  14. package/dist/index-XHbmzFFO.esm.js.map +1 -0
  15. package/dist/{index-DEwS-N9F.esm.js → index-ep10Sw82.esm.js} +3 -150
  16. package/dist/index-ep10Sw82.esm.js.map +1 -0
  17. package/dist/{index.browser-DEfS865o.js → index.browser-BvNsUWjt.js} +2 -2
  18. package/dist/{index.browser-DEfS865o.js.map → index.browser-BvNsUWjt.js.map} +1 -1
  19. package/dist/{index.browser-jwJFPtjK.js → index.browser-BwIqqM4U.js} +2 -2
  20. package/dist/{index.browser-jwJFPtjK.js.map → index.browser-BwIqqM4U.js.map} +1 -1
  21. package/dist/{index.browser-DQvFxLjk.js → index.browser-C1QL04xM.js} +2 -2
  22. package/dist/{index.browser-DQvFxLjk.js.map → index.browser-C1QL04xM.js.map} +1 -1
  23. package/dist/{index.browser-Dekybe_E.esm.js → index.browser-Cgj7Hs6n.esm.js} +2 -2
  24. package/dist/{index.browser-Dekybe_E.esm.js.map → index.browser-Cgj7Hs6n.esm.js.map} +1 -1
  25. package/dist/{index.browser-zXADedzh.esm.js → index.browser-CifFI7Ju.esm.js} +2 -2
  26. package/dist/{index.browser-zXADedzh.esm.js.map → index.browser-CifFI7Ju.esm.js.map} +1 -1
  27. package/dist/{index.browser-CbVXUCv0.esm.js → index.browser-D8VWPXTZ.esm.js} +2 -2
  28. package/dist/{index.browser-CbVXUCv0.esm.js.map → index.browser-D8VWPXTZ.esm.js.map} +1 -1
  29. package/dist/index.esm.js +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/{index.native-CawD5H6H.js → index.native-BmtuyGXs.js} +2677 -187
  32. package/dist/index.native-BmtuyGXs.js.map +1 -0
  33. package/dist/{index.native-Brt4NkkH.esm.js → index.native-X01vlukI.esm.js} +2677 -188
  34. package/dist/index.native-X01vlukI.esm.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-CjI_IIr9.js → phantom-wallet-provider-C_LPU6Ns.js} +4 -4
  38. package/dist/{phantom-wallet-provider-CjI_IIr9.js.map → phantom-wallet-provider-C_LPU6Ns.js.map} +1 -1
  39. package/dist/{phantom-wallet-provider-BR5R3OAI.esm.js → phantom-wallet-provider-DRvhBbbR.esm.js} +4 -4
  40. package/dist/{phantom-wallet-provider-BR5R3OAI.esm.js.map → phantom-wallet-provider-DRvhBbbR.esm.js.map} +1 -1
  41. package/dist/{privy-wallet-provider-wN23XtR8.js → privy-wallet-provider-DQM8xO38.js} +3 -3
  42. package/dist/{privy-wallet-provider-wN23XtR8.js.map → privy-wallet-provider-DQM8xO38.js.map} +1 -1
  43. package/dist/{privy-wallet-provider-ZQ4fLg4f.esm.js → privy-wallet-provider-ZGu8q5T5.esm.js} +3 -3
  44. package/dist/{privy-wallet-provider-ZQ4fLg4f.esm.js.map → privy-wallet-provider-ZGu8q5T5.esm.js.map} +1 -1
  45. package/dist/{solana-mobile-wallet-provider-Dt8K5Ils.js → solana-mobile-wallet-provider-6gNw2_bX.js} +4 -4
  46. package/dist/{solana-mobile-wallet-provider-Dt8K5Ils.js.map → solana-mobile-wallet-provider-6gNw2_bX.js.map} +1 -1
  47. package/dist/{solana-mobile-wallet-provider-DhtoJcqW.esm.js → solana-mobile-wallet-provider-B65A7abd.esm.js} +4 -4
  48. package/dist/{solana-mobile-wallet-provider-DhtoJcqW.esm.js.map → solana-mobile-wallet-provider-B65A7abd.esm.js.map} +1 -1
  49. package/package.json +2 -2
  50. package/dist/index-Bdcc5821.js +0 -2375
  51. package/dist/index-Bdcc5821.js.map +0 -1
  52. package/dist/index-BycoUXcq.js.map +0 -1
  53. package/dist/index-CrOVJFX9.esm.js +0 -2373
  54. package/dist/index-CrOVJFX9.esm.js.map +0 -1
  55. package/dist/index-DEwS-N9F.esm.js.map +0 -1
  56. package/dist/index-DQLduP63.js.map +0 -1
  57. package/dist/index-HSa4FZ9y.js.map +0 -1
  58. package/dist/index-dyXVIGCy.esm.js.map +0 -1
  59. package/dist/index-p1LvAs78.esm.js.map +0 -1
  60. package/dist/index.native-Brt4NkkH.esm.js.map +0 -1
  61. package/dist/index.native-CawD5H6H.js.map +0 -1
@@ -9280,15 +9280,15 @@ function requireBuffer$1 () {
9280
9280
 
9281
9281
  var bufferExports$1 = requireBuffer$1();
9282
9282
 
9283
- var safeBuffer = {exports: {}};
9283
+ var safeBuffer$1 = {exports: {}};
9284
9284
 
9285
9285
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
9286
9286
 
9287
- var hasRequiredSafeBuffer;
9287
+ var hasRequiredSafeBuffer$1;
9288
9288
 
9289
- function requireSafeBuffer () {
9290
- if (hasRequiredSafeBuffer) return safeBuffer.exports;
9291
- hasRequiredSafeBuffer = 1;
9289
+ function requireSafeBuffer$1 () {
9290
+ if (hasRequiredSafeBuffer$1) return safeBuffer$1.exports;
9291
+ hasRequiredSafeBuffer$1 = 1;
9292
9292
  (function (module, exports$1) {
9293
9293
  /* eslint-disable node/no-deprecated-api */
9294
9294
  var buffer = requireBuffer$1();
@@ -9354,23 +9354,23 @@ function requireSafeBuffer () {
9354
9354
  }
9355
9355
  return buffer.SlowBuffer(size)
9356
9356
  };
9357
- } (safeBuffer, safeBuffer.exports));
9358
- return safeBuffer.exports;
9357
+ } (safeBuffer$1, safeBuffer$1.exports));
9358
+ return safeBuffer$1.exports;
9359
9359
  }
9360
9360
 
9361
- var src;
9362
- var hasRequiredSrc;
9361
+ var src$1;
9362
+ var hasRequiredSrc$1;
9363
9363
 
9364
- function requireSrc () {
9365
- if (hasRequiredSrc) return src;
9366
- hasRequiredSrc = 1;
9364
+ function requireSrc$1 () {
9365
+ if (hasRequiredSrc$1) return src$1;
9366
+ hasRequiredSrc$1 = 1;
9367
9367
  // base-x encoding / decoding
9368
9368
  // Copyright (c) 2018 base-x contributors
9369
9369
  // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
9370
9370
  // Distributed under the MIT software license, see the accompanying
9371
9371
  // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
9372
9372
  // @ts-ignore
9373
- var _Buffer = requireSafeBuffer().Buffer;
9373
+ var _Buffer = requireSafeBuffer$1().Buffer;
9374
9374
  function base (ALPHABET) {
9375
9375
  if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
9376
9376
  var BASE_MAP = new Uint8Array(256);
@@ -9485,8 +9485,8 @@ function requireSrc () {
9485
9485
  decode: decode
9486
9486
  }
9487
9487
  }
9488
- src = base;
9489
- return src;
9488
+ src$1 = base;
9489
+ return src$1;
9490
9490
  }
9491
9491
 
9492
9492
  var bs58$1;
@@ -9495,7 +9495,7 @@ var hasRequiredBs58;
9495
9495
  function requireBs58 () {
9496
9496
  if (hasRequiredBs58) return bs58$1;
9497
9497
  hasRequiredBs58 = 1;
9498
- var basex = requireSrc();
9498
+ var basex = requireSrc$1();
9499
9499
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9500
9500
 
9501
9501
  bs58$1 = basex(ALPHABET);
@@ -9582,6 +9582,12 @@ async function genSolanaMessage(address, nonce) {
9582
9582
  // Serialization Helpers
9583
9583
  // ─────────────────────────────────────────────────────────────
9584
9584
  function isHexString(value) {
9585
+ // Only strings can be hex-encoded. Numbers, BNs, and other shapes coming back
9586
+ // from the API for u64Val/i64Val should fall through to `new BN(value)` which
9587
+ // accepts those shapes natively. Without this guard, calling .startsWith on a
9588
+ // non-string blows up with TypeError.
9589
+ if (typeof value !== "string")
9590
+ return false;
9585
9591
  // Matches strings containing only 0-9, a-f, or A-F (optionally prefixed with 0x)
9586
9592
  let testValue = value;
9587
9593
  // Handle negative values
@@ -9677,8 +9683,11 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
9677
9683
  }
9678
9684
  else if (idl.address === "poof4b5pk1L9tmThvBmaABjcyjfhFGbMbQP5BXk2QZp") {
9679
9685
  const program = new anchor.Program(idl, anchorProvider);
9686
+ // Targets `set_documents_v2` (Vec<u8> ra_indices). The on-chain program
9687
+ // also exposes the legacy `set_documents` (Vec<u64>) so SDKs already on npm
9688
+ // continue to work — but new releases of this SDK speak v2 only.
9680
9689
  tx = await program.methods
9681
- .setDocuments(args.app_id, prepareAnchorArgs(args.documents), args.delete_paths, args.txData, simulate)
9690
+ .setDocumentsV2(args.app_id, prepareAnchorArgs(args.documents), args.delete_paths, args.txData, simulate)
9682
9691
  .preInstructions(instructions)
9683
9692
  .accounts({
9684
9693
  payer: payerPublicKey
@@ -10033,11 +10042,17 @@ async function makeApiRequest(method, urlPath, data, _overrides) {
10033
10042
  if (_overrides === null || _overrides === void 0 ? void 0 : _overrides.headers) {
10034
10043
  Object.assign(headers, _overrides.headers);
10035
10044
  }
10045
+ // Writes (PUT/POST/DELETE) can take significantly longer than reads —
10046
+ // server-side they may trigger ad-hoc LUT creation (create + extend +
10047
+ // wait-for-finalization, ~15-30s on mainnet). Use a larger default for
10048
+ // non-GET so the SDK doesn't time out before client-api responds.
10049
+ const isRead = method.toUpperCase() === "GET";
10050
+ const defaultTimeout = isRead ? 30000 : 90000;
10036
10051
  const requestConfig = {
10037
10052
  method,
10038
10053
  url: `${config.apiUrl}${urlPath.startsWith("/") ? urlPath : `/${urlPath}`}`,
10039
10054
  headers,
10040
- timeout: (_a = _overrides === null || _overrides === void 0 ? void 0 : _overrides.timeout) !== null && _a !== void 0 ? _a : 30000,
10055
+ timeout: (_a = _overrides === null || _overrides === void 0 ? void 0 : _overrides.timeout) !== null && _a !== void 0 ? _a : defaultTimeout,
10041
10056
  };
10042
10057
  if (method !== "GET" && method !== "get") {
10043
10058
  requestConfig.data = data ? JSON.stringify(data) : {};
@@ -10682,21 +10697,38 @@ async function setMany(many, options) {
10682
10697
  setDocumentData: tx.transactionArgs.setDocumentData,
10683
10698
  deletePaths: tx.transactionArgs.deletePaths,
10684
10699
  idl: tx.idl,
10685
- txData: (_b = (_a = tx.txData) === null || _a === void 0 ? void 0 : _a.map((txData) => {
10686
- var _a;
10687
- return ({
10688
- pluginFunctionKey: txData.pluginFunctionKey,
10689
- txData: bufferExports$1.Buffer.from(txData.txData),
10690
- raIndices: (_a = txData.raIndices) === null || _a === void 0 ? void 0 : _a.map((raIndex) => {
10691
- if (isHexString(raIndex)) {
10692
- return new BN(raIndex, "hex");
10693
- }
10694
- else {
10695
- return new BN(raIndex);
10700
+ txData: (_b = (_a = tx.txData) === null || _a === void 0 ? void 0 : _a.map((txData) => ({
10701
+ pluginFunctionKey: txData.pluginFunctionKey,
10702
+ txData: bufferExports$1.Buffer.from(txData.txData),
10703
+ // raIndices is Vec<u8> on-chain (serialized as Buffer/bytes). The server may send
10704
+ // it as a Buffer, a number[], a Uint8Array, or — over JSON — as Node's serialized
10705
+ // Buffer shape {type: "Buffer", data: number[]} (the default `JSON.stringify(buf)`
10706
+ // output). Normalise all of those to Buffer here. Each value must fit in u8 (matches
10707
+ // Solana's instruction-level account indexing); throw clearly if anything is out of range.
10708
+ raIndices: (() => {
10709
+ const raw = txData.raIndices;
10710
+ if (raw == null)
10711
+ return bufferExports$1.Buffer.alloc(0);
10712
+ if (bufferExports$1.Buffer.isBuffer(raw))
10713
+ return raw;
10714
+ if (raw instanceof Uint8Array)
10715
+ return bufferExports$1.Buffer.from(raw);
10716
+ // Node's JSON-serialised Buffer: {type: "Buffer", data: number[]}
10717
+ const arrayLike = Array.isArray(raw)
10718
+ ? raw
10719
+ : (raw && typeof raw === 'object' && Array.isArray(raw.data))
10720
+ ? raw.data
10721
+ : (() => { throw new Error(`raIndices has unexpected shape: ${typeof raw}`); })();
10722
+ const bytes = arrayLike.map((raIndex) => {
10723
+ const n = isHexString(raIndex) ? parseInt(raIndex, 16) : Number(raIndex);
10724
+ if (!Number.isInteger(n) || n < 0 || n > 255) {
10725
+ throw new Error(`raIndex ${raIndex} is not a valid u8 (must be integer in 0..255)`);
10696
10726
  }
10697
- }),
10698
- });
10699
- })) !== null && _b !== void 0 ? _b : [],
10727
+ return n;
10728
+ });
10729
+ return bufferExports$1.Buffer.from(bytes);
10730
+ })(),
10731
+ }))) !== null && _b !== void 0 ? _b : [],
10700
10732
  };
10701
10733
  const config = await getConfig();
10702
10734
  const solTransaction = {
@@ -15698,7 +15730,7 @@ async function loadDependencies() {
15698
15730
  const [reactModule, reactDomModule, phantomModule] = await Promise.all([
15699
15731
  import('react'),
15700
15732
  import('react-dom/client'),
15701
- Promise.resolve().then(function () { return require('./index-BycoUXcq.js'); })
15733
+ Promise.resolve().then(function () { return require('./index-BM6hgCdH.js'); })
15702
15734
  ]);
15703
15735
  // Extract default export from ESM module namespace
15704
15736
  // Dynamic import() returns { default: Module, ...exports }, not the module directly
@@ -20147,132 +20179,220 @@ function createSolanaRpcSubscriptionsFromTransport(transport) {
20147
20179
  });
20148
20180
  }
20149
20181
 
20150
- // base-x encoding / decoding
20151
- // Copyright (c) 2018 base-x contributors
20152
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
20153
- // Distributed under the MIT software license, see the accompanying
20154
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
20155
- function base (ALPHABET) {
20156
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
20157
- const BASE_MAP = new Uint8Array(256);
20158
- for (let j = 0; j < BASE_MAP.length; j++) {
20159
- BASE_MAP[j] = 255;
20160
- }
20161
- for (let i = 0; i < ALPHABET.length; i++) {
20162
- const x = ALPHABET.charAt(i);
20163
- const xc = x.charCodeAt(0);
20164
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
20165
- BASE_MAP[xc] = i;
20166
- }
20167
- const BASE = ALPHABET.length;
20168
- const LEADER = ALPHABET.charAt(0);
20169
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
20170
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
20171
- function encode (source) {
20172
- // eslint-disable-next-line no-empty
20173
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
20174
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
20175
- } else if (Array.isArray(source)) {
20176
- source = Uint8Array.from(source);
20177
- }
20178
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
20179
- if (source.length === 0) { return '' }
20180
- // Skip & count leading zeroes.
20181
- let zeroes = 0;
20182
- let length = 0;
20183
- let pbegin = 0;
20184
- const pend = source.length;
20185
- while (pbegin !== pend && source[pbegin] === 0) {
20186
- pbegin++;
20187
- zeroes++;
20188
- }
20189
- // Allocate enough space in big-endian base58 representation.
20190
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
20191
- const b58 = new Uint8Array(size);
20192
- // Process the bytes.
20193
- while (pbegin !== pend) {
20194
- let carry = source[pbegin];
20195
- // Apply "b58 = b58 * 256 + ch".
20196
- let i = 0;
20197
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
20198
- carry += (256 * b58[it1]) >>> 0;
20199
- b58[it1] = (carry % BASE) >>> 0;
20200
- carry = (carry / BASE) >>> 0;
20201
- }
20202
- if (carry !== 0) { throw new Error('Non-zero carry') }
20203
- length = i;
20204
- pbegin++;
20205
- }
20206
- // Skip leading zeroes in base58 result.
20207
- let it2 = size - length;
20208
- while (it2 !== size && b58[it2] === 0) {
20209
- it2++;
20210
- }
20211
- // Translate the result into a string.
20212
- let str = LEADER.repeat(zeroes);
20213
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
20214
- return str
20215
- }
20216
- function decodeUnsafe (source) {
20217
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
20218
- if (source.length === 0) { return new Uint8Array() }
20219
- let psz = 0;
20220
- // Skip and count leading '1's.
20221
- let zeroes = 0;
20222
- let length = 0;
20223
- while (source[psz] === LEADER) {
20224
- zeroes++;
20225
- psz++;
20226
- }
20227
- // Allocate enough space in big-endian base256 representation.
20228
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
20229
- const b256 = new Uint8Array(size);
20230
- // Process the characters.
20231
- while (psz < source.length) {
20232
- // Find code of next character
20233
- const charCode = source.charCodeAt(psz);
20234
- // Base map can not be indexed using char code
20235
- if (charCode > 255) { return }
20236
- // Decode character
20237
- let carry = BASE_MAP[charCode];
20238
- // Invalid character
20239
- if (carry === 255) { return }
20240
- let i = 0;
20241
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
20242
- carry += (BASE * b256[it3]) >>> 0;
20243
- b256[it3] = (carry % 256) >>> 0;
20244
- carry = (carry / 256) >>> 0;
20245
- }
20246
- if (carry !== 0) { throw new Error('Non-zero carry') }
20247
- length = i;
20248
- psz++;
20249
- }
20250
- // Skip leading zeroes in b256.
20251
- let it4 = size - length;
20252
- while (it4 !== size && b256[it4] === 0) {
20253
- it4++;
20254
- }
20255
- const vch = new Uint8Array(zeroes + (size - it4));
20256
- let j = zeroes;
20257
- while (it4 !== size) {
20258
- vch[j++] = b256[it4++];
20259
- }
20260
- return vch
20261
- }
20262
- function decode (string) {
20263
- const buffer = decodeUnsafe(string);
20264
- if (buffer) { return buffer }
20265
- throw new Error('Non-base' + BASE + ' character')
20266
- }
20267
- return {
20268
- encode,
20269
- decodeUnsafe,
20270
- decode
20271
- }
20182
+ var safeBuffer = {exports: {}};
20183
+
20184
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
20185
+
20186
+ var hasRequiredSafeBuffer;
20187
+
20188
+ function requireSafeBuffer () {
20189
+ if (hasRequiredSafeBuffer) return safeBuffer.exports;
20190
+ hasRequiredSafeBuffer = 1;
20191
+ (function (module, exports$1) {
20192
+ /* eslint-disable node/no-deprecated-api */
20193
+ var buffer = requireBuffer();
20194
+ var Buffer = buffer.Buffer;
20195
+
20196
+ // alternative to using Object.keys for old browsers
20197
+ function copyProps (src, dst) {
20198
+ for (var key in src) {
20199
+ dst[key] = src[key];
20200
+ }
20201
+ }
20202
+ if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
20203
+ module.exports = buffer;
20204
+ } else {
20205
+ // Copy properties from require('buffer')
20206
+ copyProps(buffer, exports$1);
20207
+ exports$1.Buffer = SafeBuffer;
20208
+ }
20209
+
20210
+ function SafeBuffer (arg, encodingOrOffset, length) {
20211
+ return Buffer(arg, encodingOrOffset, length)
20212
+ }
20213
+
20214
+ SafeBuffer.prototype = Object.create(Buffer.prototype);
20215
+
20216
+ // Copy static methods from Buffer
20217
+ copyProps(Buffer, SafeBuffer);
20218
+
20219
+ SafeBuffer.from = function (arg, encodingOrOffset, length) {
20220
+ if (typeof arg === 'number') {
20221
+ throw new TypeError('Argument must not be a number')
20222
+ }
20223
+ return Buffer(arg, encodingOrOffset, length)
20224
+ };
20225
+
20226
+ SafeBuffer.alloc = function (size, fill, encoding) {
20227
+ if (typeof size !== 'number') {
20228
+ throw new TypeError('Argument must be a number')
20229
+ }
20230
+ var buf = Buffer(size);
20231
+ if (fill !== undefined) {
20232
+ if (typeof encoding === 'string') {
20233
+ buf.fill(fill, encoding);
20234
+ } else {
20235
+ buf.fill(fill);
20236
+ }
20237
+ } else {
20238
+ buf.fill(0);
20239
+ }
20240
+ return buf
20241
+ };
20242
+
20243
+ SafeBuffer.allocUnsafe = function (size) {
20244
+ if (typeof size !== 'number') {
20245
+ throw new TypeError('Argument must be a number')
20246
+ }
20247
+ return Buffer(size)
20248
+ };
20249
+
20250
+ SafeBuffer.allocUnsafeSlow = function (size) {
20251
+ if (typeof size !== 'number') {
20252
+ throw new TypeError('Argument must be a number')
20253
+ }
20254
+ return buffer.SlowBuffer(size)
20255
+ };
20256
+ } (safeBuffer, safeBuffer.exports));
20257
+ return safeBuffer.exports;
20258
+ }
20259
+
20260
+ var src;
20261
+ var hasRequiredSrc;
20262
+
20263
+ function requireSrc () {
20264
+ if (hasRequiredSrc) return src;
20265
+ hasRequiredSrc = 1;
20266
+ // base-x encoding / decoding
20267
+ // Copyright (c) 2018 base-x contributors
20268
+ // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
20269
+ // Distributed under the MIT software license, see the accompanying
20270
+ // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
20271
+ // @ts-ignore
20272
+ var _Buffer = requireSafeBuffer().Buffer;
20273
+ function base (ALPHABET) {
20274
+ if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
20275
+ var BASE_MAP = new Uint8Array(256);
20276
+ for (var j = 0; j < BASE_MAP.length; j++) {
20277
+ BASE_MAP[j] = 255;
20278
+ }
20279
+ for (var i = 0; i < ALPHABET.length; i++) {
20280
+ var x = ALPHABET.charAt(i);
20281
+ var xc = x.charCodeAt(0);
20282
+ if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
20283
+ BASE_MAP[xc] = i;
20284
+ }
20285
+ var BASE = ALPHABET.length;
20286
+ var LEADER = ALPHABET.charAt(0);
20287
+ var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
20288
+ var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
20289
+ function encode (source) {
20290
+ if (Array.isArray(source) || source instanceof Uint8Array) { source = _Buffer.from(source); }
20291
+ if (!_Buffer.isBuffer(source)) { throw new TypeError('Expected Buffer') }
20292
+ if (source.length === 0) { return '' }
20293
+ // Skip & count leading zeroes.
20294
+ var zeroes = 0;
20295
+ var length = 0;
20296
+ var pbegin = 0;
20297
+ var pend = source.length;
20298
+ while (pbegin !== pend && source[pbegin] === 0) {
20299
+ pbegin++;
20300
+ zeroes++;
20301
+ }
20302
+ // Allocate enough space in big-endian base58 representation.
20303
+ var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
20304
+ var b58 = new Uint8Array(size);
20305
+ // Process the bytes.
20306
+ while (pbegin !== pend) {
20307
+ var carry = source[pbegin];
20308
+ // Apply "b58 = b58 * 256 + ch".
20309
+ var i = 0;
20310
+ for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
20311
+ carry += (256 * b58[it1]) >>> 0;
20312
+ b58[it1] = (carry % BASE) >>> 0;
20313
+ carry = (carry / BASE) >>> 0;
20314
+ }
20315
+ if (carry !== 0) { throw new Error('Non-zero carry') }
20316
+ length = i;
20317
+ pbegin++;
20318
+ }
20319
+ // Skip leading zeroes in base58 result.
20320
+ var it2 = size - length;
20321
+ while (it2 !== size && b58[it2] === 0) {
20322
+ it2++;
20323
+ }
20324
+ // Translate the result into a string.
20325
+ var str = LEADER.repeat(zeroes);
20326
+ for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
20327
+ return str
20328
+ }
20329
+ function decodeUnsafe (source) {
20330
+ if (typeof source !== 'string') { throw new TypeError('Expected String') }
20331
+ if (source.length === 0) { return _Buffer.alloc(0) }
20332
+ var psz = 0;
20333
+ // Skip and count leading '1's.
20334
+ var zeroes = 0;
20335
+ var length = 0;
20336
+ while (source[psz] === LEADER) {
20337
+ zeroes++;
20338
+ psz++;
20339
+ }
20340
+ // Allocate enough space in big-endian base256 representation.
20341
+ var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
20342
+ var b256 = new Uint8Array(size);
20343
+ // Process the characters.
20344
+ while (psz < source.length) {
20345
+ // Find code of next character
20346
+ var charCode = source.charCodeAt(psz);
20347
+ // Base map can not be indexed using char code
20348
+ if (charCode > 255) { return }
20349
+ // Decode character
20350
+ var carry = BASE_MAP[charCode];
20351
+ // Invalid character
20352
+ if (carry === 255) { return }
20353
+ var i = 0;
20354
+ for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
20355
+ carry += (BASE * b256[it3]) >>> 0;
20356
+ b256[it3] = (carry % 256) >>> 0;
20357
+ carry = (carry / 256) >>> 0;
20358
+ }
20359
+ if (carry !== 0) { throw new Error('Non-zero carry') }
20360
+ length = i;
20361
+ psz++;
20362
+ }
20363
+ // Skip leading zeroes in b256.
20364
+ var it4 = size - length;
20365
+ while (it4 !== size && b256[it4] === 0) {
20366
+ it4++;
20367
+ }
20368
+ var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
20369
+ vch.fill(0x00, 0, zeroes);
20370
+ var j = zeroes;
20371
+ while (it4 !== size) {
20372
+ vch[j++] = b256[it4++];
20373
+ }
20374
+ return vch
20375
+ }
20376
+ function decode (string) {
20377
+ var buffer = decodeUnsafe(string);
20378
+ if (buffer) { return buffer }
20379
+ throw new Error('Non-base' + BASE + ' character')
20380
+ }
20381
+ return {
20382
+ encode: encode,
20383
+ decodeUnsafe: decodeUnsafe,
20384
+ decode: decode
20385
+ }
20386
+ }
20387
+ src = base;
20388
+ return src;
20272
20389
  }
20273
20390
 
20391
+ var srcExports = requireSrc();
20392
+ var basex = /*@__PURE__*/getDefaultExportFromCjs$1(srcExports);
20393
+
20274
20394
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
20275
- var base58 = base(ALPHABET);
20395
+ var base58 = basex(ALPHABET);
20276
20396
 
20277
20397
  var index = /*#__PURE__*/Object.freeze({
20278
20398
  __proto__: null,
@@ -21191,7 +21311,7 @@ async function loadMwaProtocol() {
21191
21311
  return mwaProtocolLoadPromise;
21192
21312
  mwaProtocolLoadPromise = (async () => {
21193
21313
  try {
21194
- mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-DEfS865o.js'); });
21314
+ mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-BvNsUWjt.js'); });
21195
21315
  }
21196
21316
  catch (e) {
21197
21317
  console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
@@ -21213,7 +21333,7 @@ async function registerMobileWalletAdapter(config) {
21213
21333
  if (typeof window === 'undefined')
21214
21334
  return;
21215
21335
  try {
21216
- const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-DQvFxLjk.js'); });
21336
+ const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-C1QL04xM.js'); });
21217
21337
  const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
21218
21338
  if (!registerMwa) {
21219
21339
  console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
@@ -22208,4 +22328,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
22208
22328
  exports.signTransaction = signTransaction;
22209
22329
  exports.subscribe = subscribe;
22210
22330
  exports.useAuth = useAuth;
22211
- //# sourceMappingURL=index-HSa4FZ9y.js.map
22331
+ //# sourceMappingURL=index-BPlF6-PQ.js.map