@pooflabs/web 0.0.81-rc2 → 0.0.81

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 (81) hide show
  1. package/dist/auth/index.d.ts +10 -1
  2. package/dist/auth/providers/phantom-wallet-provider.d.ts +20 -21
  3. package/dist/global.d.ts +3 -1
  4. package/dist/{index-DHm4usay.js → index-B2WGCssJ.js} +347 -414
  5. package/dist/index-B2WGCssJ.js.map +1 -0
  6. package/dist/{index-CHqM9n4K.esm.js → index-CjHbp7Dq.esm.js} +3697 -562
  7. package/dist/index-CjHbp7Dq.esm.js.map +1 -0
  8. package/dist/{index-CL4JIAAR.js → index-DXPkkq81.js} +3698 -563
  9. package/dist/index-DXPkkq81.js.map +1 -0
  10. package/dist/{index-BjlCinic.js → index-D_DiP8XQ.js} +3698 -563
  11. package/dist/index-D_DiP8XQ.js.map +1 -0
  12. package/dist/{index-DCo85UGg.esm.js → index-dcJIjFrs.esm.js} +3697 -562
  13. package/dist/index-dcJIjFrs.esm.js.map +1 -0
  14. package/dist/{index-Bx_lLXRT.esm.js → index-nt_HQVrk.esm.js} +345 -414
  15. package/dist/index-nt_HQVrk.esm.js.map +1 -0
  16. package/dist/{index.browser-7dDfRU5G.esm.js → index.browser-BNdFfyIg.esm.js} +1571 -1368
  17. package/dist/index.browser-BNdFfyIg.esm.js.map +1 -0
  18. package/dist/{index.browser-CmlqbyPr.js → index.browser-CT6PUv9G.js} +1571 -1368
  19. package/dist/index.browser-CT6PUv9G.js.map +1 -0
  20. package/dist/index.browser-Cy21yaX0.esm.js +1096 -0
  21. package/dist/index.browser-Cy21yaX0.esm.js.map +1 -0
  22. package/dist/index.browser-OvGNsMPu.esm.js +1002 -0
  23. package/dist/index.browser-OvGNsMPu.esm.js.map +1 -0
  24. package/dist/index.browser-ZD7Tz2bn.js +1099 -0
  25. package/dist/index.browser-ZD7Tz2bn.js.map +1 -0
  26. package/dist/index.browser-d0PlOXpF.js +105 -0
  27. package/dist/index.browser-d0PlOXpF.js.map +1 -0
  28. package/dist/index.browser-pE1s68e9.esm.js +102 -0
  29. package/dist/index.browser-pE1s68e9.esm.js.map +1 -0
  30. package/dist/index.browser-vuTr40so.js +1008 -0
  31. package/dist/index.browser-vuTr40so.js.map +1 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.esm.js +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/{index.native-TLhfXfe6.esm.js → index.native-BqYr--vb.esm.js} +202 -178
  36. package/dist/index.native-BqYr--vb.esm.js.map +1 -0
  37. package/dist/{index.native-DJA9_K3i.js → index.native-CyA-RdvW.js} +204 -178
  38. package/dist/index.native-CyA-RdvW.js.map +1 -0
  39. package/dist/index.native.esm.js +1 -1
  40. package/dist/index.native.js +1 -1
  41. package/dist/{phantom-wallet-provider-BegJFoWW.js → phantom-wallet-provider-DWCaMkyz.js} +148 -192
  42. package/dist/phantom-wallet-provider-DWCaMkyz.js.map +1 -0
  43. package/dist/{phantom-wallet-provider-DzUAMhbm.esm.js → phantom-wallet-provider-K2V96G-G.esm.js} +148 -192
  44. package/dist/phantom-wallet-provider-K2V96G-G.esm.js.map +1 -0
  45. package/dist/{privy-wallet-provider-Du-QHaaG.js → privy-wallet-provider-BMg_S_d0.js} +4 -4
  46. package/dist/privy-wallet-provider-BMg_S_d0.js.map +1 -0
  47. package/dist/{privy-wallet-provider-BspbiyOr.esm.js → privy-wallet-provider-DoX8q99w.esm.js} +4 -4
  48. package/dist/privy-wallet-provider-DoX8q99w.esm.js.map +1 -0
  49. package/dist/{solana-mobile-wallet-provider-Bh7SBFpQ.esm.js → solana-mobile-wallet-provider-Cmphb3oB.esm.js} +3 -52
  50. package/dist/solana-mobile-wallet-provider-Cmphb3oB.esm.js.map +1 -0
  51. package/dist/{solana-mobile-wallet-provider-DPp4SYem.js → solana-mobile-wallet-provider-t22Ie8lY.js} +3 -52
  52. package/dist/solana-mobile-wallet-provider-t22Ie8lY.js.map +1 -0
  53. package/package.json +3 -3
  54. package/dist/index-BjlCinic.js.map +0 -1
  55. package/dist/index-Bx_lLXRT.esm.js.map +0 -1
  56. package/dist/index-CHqM9n4K.esm.js.map +0 -1
  57. package/dist/index-CL4JIAAR.js.map +0 -1
  58. package/dist/index-DCo85UGg.esm.js.map +0 -1
  59. package/dist/index-DHm4usay.js.map +0 -1
  60. package/dist/index.browser-7dDfRU5G.esm.js.map +0 -1
  61. package/dist/index.browser-Bg_-PAgT.esm.js +0 -1250
  62. package/dist/index.browser-Bg_-PAgT.esm.js.map +0 -1
  63. package/dist/index.browser-C-_FEr5M.esm.js +0 -1134
  64. package/dist/index.browser-C-_FEr5M.esm.js.map +0 -1
  65. package/dist/index.browser-CmlqbyPr.js.map +0 -1
  66. package/dist/index.browser-CxXQ2RhF.js +0 -122
  67. package/dist/index.browser-CxXQ2RhF.js.map +0 -1
  68. package/dist/index.browser-DjEZSiqI.js +0 -1137
  69. package/dist/index.browser-DjEZSiqI.js.map +0 -1
  70. package/dist/index.browser-DuVkpEzB.js +0 -1253
  71. package/dist/index.browser-DuVkpEzB.js.map +0 -1
  72. package/dist/index.browser-xJkO73vw.esm.js +0 -119
  73. package/dist/index.browser-xJkO73vw.esm.js.map +0 -1
  74. package/dist/index.native-DJA9_K3i.js.map +0 -1
  75. package/dist/index.native-TLhfXfe6.esm.js.map +0 -1
  76. package/dist/phantom-wallet-provider-BegJFoWW.js.map +0 -1
  77. package/dist/phantom-wallet-provider-DzUAMhbm.esm.js.map +0 -1
  78. package/dist/privy-wallet-provider-BspbiyOr.esm.js.map +0 -1
  79. package/dist/privy-wallet-provider-Du-QHaaG.js.map +0 -1
  80. package/dist/solana-mobile-wallet-provider-Bh7SBFpQ.esm.js.map +0 -1
  81. package/dist/solana-mobile-wallet-provider-DPp4SYem.js.map +0 -1
@@ -4,6 +4,21 @@ import * as anchor from '@coral-xyz/anchor';
4
4
  import { Program } from '@coral-xyz/anchor';
5
5
  import * as React 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
  }
@@ -9447,11 +9462,11 @@ function requireSrc () {
9447
9462
  }
9448
9463
 
9449
9464
  var bs58$1;
9450
- var hasRequiredBs58;
9465
+ var hasRequiredBs58$1;
9451
9466
 
9452
- function requireBs58 () {
9453
- if (hasRequiredBs58) return bs58$1;
9454
- hasRequiredBs58 = 1;
9467
+ function requireBs58$1 () {
9468
+ if (hasRequiredBs58$1) return bs58$1;
9469
+ hasRequiredBs58$1 = 1;
9455
9470
  var basex = requireSrc();
9456
9471
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9457
9472
 
@@ -9459,8 +9474,8 @@ function requireBs58 () {
9459
9474
  return bs58$1;
9460
9475
  }
9461
9476
 
9462
- var bs58Exports = requireBs58();
9463
- var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
9477
+ var bs58Exports$1 = requireBs58$1();
9478
+ var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports$1);
9464
9479
 
9465
9480
  // ─────────────────────────────────────────────────────────────
9466
9481
  // Local implementation of getSimulationComputeUnits
@@ -10106,40 +10121,17 @@ async function getConfig() {
10106
10121
  return clientConfig;
10107
10122
  }
10108
10123
 
10109
- /******************************************************************************
10110
- Copyright (c) Microsoft Corporation.
10111
-
10112
- Permission to use, copy, modify, and/or distribute this software for any
10113
- purpose with or without fee is hereby granted.
10114
-
10115
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10116
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10117
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10118
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
10119
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
10120
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
10121
- PERFORMANCE OF THIS SOFTWARE.
10122
- ***************************************************************************** */
10123
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
10124
-
10125
-
10126
- function __rest(s, e) {
10127
- var t = {};
10128
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
10129
- t[p] = s[p];
10130
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
10131
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10132
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10133
- t[p[i]] = s[p[i]];
10134
- }
10135
- return t;
10136
- }
10137
-
10138
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
10139
- var e = new Error(message);
10140
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
10124
+ var __rest = function (s, e) {
10125
+ var t = {};
10126
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
10127
+ t[p] = s[p];
10128
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
10129
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10130
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10131
+ t[p[i]] = s[p[i]];
10132
+ }
10133
+ return t;
10141
10134
  };
10142
-
10143
10135
  /**
10144
10136
  * Thrown when a user's wallet doesn't have enough SOL to cover the transaction.
10145
10137
  * Apps can catch this to trigger an onramp/funding flow.
@@ -12812,15 +12804,15 @@ function clearIncompatibleSession() {
12812
12804
  // Lazy loaders for web-only providers.
12813
12805
  // Using dynamic import() ensures Metro (RN) never resolves these modules.
12814
12806
  async function loadPrivyWalletProvider() {
12815
- const mod = await import('./privy-wallet-provider-BspbiyOr.esm.js');
12807
+ const mod = await import('./privy-wallet-provider-DoX8q99w.esm.js');
12816
12808
  return mod.PrivyWalletProvider;
12817
12809
  }
12818
12810
  async function loadPhantomWalletProvider() {
12819
- const mod = await import('./phantom-wallet-provider-DzUAMhbm.esm.js');
12811
+ const mod = await import('./phantom-wallet-provider-K2V96G-G.esm.js');
12820
12812
  return { PhantomWalletProvider: mod.PhantomWalletProvider };
12821
12813
  }
12822
12814
  async function loadSolanaMobileWalletProvider() {
12823
- const mod = await import('./solana-mobile-wallet-provider-Bh7SBFpQ.esm.js');
12815
+ const mod = await import('./solana-mobile-wallet-provider-Cmphb3oB.esm.js');
12824
12816
  return mod.SolanaMobileWalletProvider;
12825
12817
  }
12826
12818
  async function hotSwapToPrivyProvider(config) {
@@ -12960,7 +12952,7 @@ async function getAuthProvider(config) {
12960
12952
  }
12961
12953
  return currentAuthProvider;
12962
12954
  }
12963
- async function login$1() {
12955
+ async function login$1(options) {
12964
12956
  // Re-initialize provider if it was cleared by logout
12965
12957
  if (!currentAuthProvider && initConfig) {
12966
12958
  currentAuthProvider = await getAuthProvider(initConfig);
@@ -12973,6 +12965,14 @@ async function login$1() {
12973
12965
  if (!currentAuthProvider) {
12974
12966
  throw new Error("Auth provider not initialized. Please call init() first.");
12975
12967
  }
12968
+ // Forward per-call overrides to providers that support them (duck-typed to stay
12969
+ // lazy-load safe — no direct import of PhantomWalletProvider here).
12970
+ // Always call (even with null) so previous overrides are cleared when this
12971
+ // login() is invoked without options — early-return paths inside the provider
12972
+ // bypass the .finally() cleanup, so we reset here too.
12973
+ if (typeof currentAuthProvider.setLoginOverrides === 'function') {
12974
+ currentAuthProvider.setLoginOverrides(options !== null && options !== void 0 ? options : null);
12975
+ }
12976
12976
  const loginResult = await currentAuthProvider.login();
12977
12977
  if (loginResult) {
12978
12978
  // Store which auth method was used so we restore the right provider on reload
@@ -13055,11 +13055,11 @@ function setAuthLoading(loading) {
13055
13055
  function getAuthLoading() {
13056
13056
  return isAuthLoading;
13057
13057
  }
13058
- async function login() {
13058
+ async function login(options) {
13059
13059
  if (!authProviderInstance) {
13060
13060
  throw new Error('SDK not initialized. Please call init() first.');
13061
13061
  }
13062
- const loggedInUser = await login$1();
13062
+ const loggedInUser = await login$1(options);
13063
13063
  setCurrentUser(loggedInUser);
13064
13064
  return currentUser;
13065
13065
  }
@@ -13230,137 +13230,161 @@ async function confirmAndCheckTransaction(connection, signature) {
13230
13230
  throw new Error('Transaction confirmation timeout');
13231
13231
  }
13232
13232
 
13233
- // base-x encoding / decoding
13234
- // Copyright (c) 2018 base-x contributors
13235
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
13236
- // Distributed under the MIT software license, see the accompanying
13237
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
13238
- function base (ALPHABET) {
13239
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
13240
- const BASE_MAP = new Uint8Array(256);
13241
- for (let j = 0; j < BASE_MAP.length; j++) {
13242
- BASE_MAP[j] = 255;
13243
- }
13244
- for (let i = 0; i < ALPHABET.length; i++) {
13245
- const x = ALPHABET.charAt(i);
13246
- const xc = x.charCodeAt(0);
13247
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
13248
- BASE_MAP[xc] = i;
13249
- }
13250
- const BASE = ALPHABET.length;
13251
- const LEADER = ALPHABET.charAt(0);
13252
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
13253
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
13254
- function encode (source) {
13255
- // eslint-disable-next-line no-empty
13256
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
13257
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
13258
- } else if (Array.isArray(source)) {
13259
- source = Uint8Array.from(source);
13260
- }
13261
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
13262
- if (source.length === 0) { return '' }
13263
- // Skip & count leading zeroes.
13264
- let zeroes = 0;
13265
- let length = 0;
13266
- let pbegin = 0;
13267
- const pend = source.length;
13268
- while (pbegin !== pend && source[pbegin] === 0) {
13269
- pbegin++;
13270
- zeroes++;
13271
- }
13272
- // Allocate enough space in big-endian base58 representation.
13273
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
13274
- const b58 = new Uint8Array(size);
13275
- // Process the bytes.
13276
- while (pbegin !== pend) {
13277
- let carry = source[pbegin];
13278
- // Apply "b58 = b58 * 256 + ch".
13279
- let i = 0;
13280
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
13281
- carry += (256 * b58[it1]) >>> 0;
13282
- b58[it1] = (carry % BASE) >>> 0;
13283
- carry = (carry / BASE) >>> 0;
13284
- }
13285
- if (carry !== 0) { throw new Error('Non-zero carry') }
13286
- length = i;
13287
- pbegin++;
13288
- }
13289
- // Skip leading zeroes in base58 result.
13290
- let it2 = size - length;
13291
- while (it2 !== size && b58[it2] === 0) {
13292
- it2++;
13293
- }
13294
- // Translate the result into a string.
13295
- let str = LEADER.repeat(zeroes);
13296
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
13297
- return str
13298
- }
13299
- function decodeUnsafe (source) {
13300
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
13301
- if (source.length === 0) { return new Uint8Array() }
13302
- let psz = 0;
13303
- // Skip and count leading '1's.
13304
- let zeroes = 0;
13305
- let length = 0;
13306
- while (source[psz] === LEADER) {
13307
- zeroes++;
13308
- psz++;
13309
- }
13310
- // Allocate enough space in big-endian base256 representation.
13311
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
13312
- const b256 = new Uint8Array(size);
13313
- // Process the characters.
13314
- while (psz < source.length) {
13315
- // Find code of next character
13316
- const charCode = source.charCodeAt(psz);
13317
- // Base map can not be indexed using char code
13318
- if (charCode > 255) { return }
13319
- // Decode character
13320
- let carry = BASE_MAP[charCode];
13321
- // Invalid character
13322
- if (carry === 255) { return }
13323
- let i = 0;
13324
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
13325
- carry += (BASE * b256[it3]) >>> 0;
13326
- b256[it3] = (carry % 256) >>> 0;
13327
- carry = (carry / 256) >>> 0;
13328
- }
13329
- if (carry !== 0) { throw new Error('Non-zero carry') }
13330
- length = i;
13331
- psz++;
13332
- }
13333
- // Skip leading zeroes in b256.
13334
- let it4 = size - length;
13335
- while (it4 !== size && b256[it4] === 0) {
13336
- it4++;
13337
- }
13338
- const vch = new Uint8Array(zeroes + (size - it4));
13339
- let j = zeroes;
13340
- while (it4 !== size) {
13341
- vch[j++] = b256[it4++];
13342
- }
13343
- return vch
13344
- }
13345
- function decode (string) {
13346
- const buffer = decodeUnsafe(string);
13347
- if (buffer) { return buffer }
13348
- throw new Error('Non-base' + BASE + ' character')
13349
- }
13350
- return {
13351
- encode,
13352
- decodeUnsafe,
13353
- decode
13354
- }
13355
- }
13356
-
13357
- var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
13358
- var bs58 = base(ALPHABET);
13359
-
13360
- var index = /*#__PURE__*/Object.freeze({
13233
+ var cjs = {};
13234
+
13235
+ var hasRequiredCjs;
13236
+
13237
+ function requireCjs () {
13238
+ if (hasRequiredCjs) return cjs;
13239
+ hasRequiredCjs = 1;
13240
+ // base-x encoding / decoding
13241
+ // Copyright (c) 2018 base-x contributors
13242
+ // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
13243
+ // Distributed under the MIT software license, see the accompanying
13244
+ // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
13245
+ Object.defineProperty(cjs, '__esModule', { value: true });
13246
+ function base (ALPHABET) {
13247
+ if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
13248
+ const BASE_MAP = new Uint8Array(256);
13249
+ for (let j = 0; j < BASE_MAP.length; j++) {
13250
+ BASE_MAP[j] = 255;
13251
+ }
13252
+ for (let i = 0; i < ALPHABET.length; i++) {
13253
+ const x = ALPHABET.charAt(i);
13254
+ const xc = x.charCodeAt(0);
13255
+ if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
13256
+ BASE_MAP[xc] = i;
13257
+ }
13258
+ const BASE = ALPHABET.length;
13259
+ const LEADER = ALPHABET.charAt(0);
13260
+ const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
13261
+ const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
13262
+ function encode (source) {
13263
+ // eslint-disable-next-line no-empty
13264
+ if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
13265
+ source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
13266
+ } else if (Array.isArray(source)) {
13267
+ source = Uint8Array.from(source);
13268
+ }
13269
+ if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
13270
+ if (source.length === 0) { return '' }
13271
+ // Skip & count leading zeroes.
13272
+ let zeroes = 0;
13273
+ let length = 0;
13274
+ let pbegin = 0;
13275
+ const pend = source.length;
13276
+ while (pbegin !== pend && source[pbegin] === 0) {
13277
+ pbegin++;
13278
+ zeroes++;
13279
+ }
13280
+ // Allocate enough space in big-endian base58 representation.
13281
+ const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
13282
+ const b58 = new Uint8Array(size);
13283
+ // Process the bytes.
13284
+ while (pbegin !== pend) {
13285
+ let carry = source[pbegin];
13286
+ // Apply "b58 = b58 * 256 + ch".
13287
+ let i = 0;
13288
+ for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
13289
+ carry += (256 * b58[it1]) >>> 0;
13290
+ b58[it1] = (carry % BASE) >>> 0;
13291
+ carry = (carry / BASE) >>> 0;
13292
+ }
13293
+ if (carry !== 0) { throw new Error('Non-zero carry') }
13294
+ length = i;
13295
+ pbegin++;
13296
+ }
13297
+ // Skip leading zeroes in base58 result.
13298
+ let it2 = size - length;
13299
+ while (it2 !== size && b58[it2] === 0) {
13300
+ it2++;
13301
+ }
13302
+ // Translate the result into a string.
13303
+ let str = LEADER.repeat(zeroes);
13304
+ for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
13305
+ return str
13306
+ }
13307
+ function decodeUnsafe (source) {
13308
+ if (typeof source !== 'string') { throw new TypeError('Expected String') }
13309
+ if (source.length === 0) { return new Uint8Array() }
13310
+ let psz = 0;
13311
+ // Skip and count leading '1's.
13312
+ let zeroes = 0;
13313
+ let length = 0;
13314
+ while (source[psz] === LEADER) {
13315
+ zeroes++;
13316
+ psz++;
13317
+ }
13318
+ // Allocate enough space in big-endian base256 representation.
13319
+ const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
13320
+ const b256 = new Uint8Array(size);
13321
+ // Process the characters.
13322
+ while (psz < source.length) {
13323
+ // Find code of next character
13324
+ const charCode = source.charCodeAt(psz);
13325
+ // Base map can not be indexed using char code
13326
+ if (charCode > 255) { return }
13327
+ // Decode character
13328
+ let carry = BASE_MAP[charCode];
13329
+ // Invalid character
13330
+ if (carry === 255) { return }
13331
+ let i = 0;
13332
+ for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
13333
+ carry += (BASE * b256[it3]) >>> 0;
13334
+ b256[it3] = (carry % 256) >>> 0;
13335
+ carry = (carry / 256) >>> 0;
13336
+ }
13337
+ if (carry !== 0) { throw new Error('Non-zero carry') }
13338
+ length = i;
13339
+ psz++;
13340
+ }
13341
+ // Skip leading zeroes in b256.
13342
+ let it4 = size - length;
13343
+ while (it4 !== size && b256[it4] === 0) {
13344
+ it4++;
13345
+ }
13346
+ const vch = new Uint8Array(zeroes + (size - it4));
13347
+ let j = zeroes;
13348
+ while (it4 !== size) {
13349
+ vch[j++] = b256[it4++];
13350
+ }
13351
+ return vch
13352
+ }
13353
+ function decode (string) {
13354
+ const buffer = decodeUnsafe(string);
13355
+ if (buffer) { return buffer }
13356
+ throw new Error('Non-base' + BASE + ' character')
13357
+ }
13358
+ return {
13359
+ encode,
13360
+ decodeUnsafe,
13361
+ decode
13362
+ }
13363
+ }
13364
+ cjs.default = base;
13365
+ return cjs;
13366
+ }
13367
+
13368
+ var bs58;
13369
+ var hasRequiredBs58;
13370
+
13371
+ function requireBs58 () {
13372
+ if (hasRequiredBs58) return bs58;
13373
+ hasRequiredBs58 = 1;
13374
+ var basex = requireCjs();
13375
+ var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
13376
+
13377
+ bs58 = basex(ALPHABET);
13378
+ return bs58;
13379
+ }
13380
+
13381
+ var bs58Exports = requireBs58();
13382
+ var base58 = /*@__PURE__*/getDefaultExportFromCjs$1(bs58Exports);
13383
+
13384
+ var index = /*#__PURE__*/_mergeNamespaces({
13361
13385
  __proto__: null,
13362
- default: bs58
13363
- });
13386
+ default: base58
13387
+ }, [bs58Exports]);
13364
13388
 
13365
13389
  /**
13366
13390
  * Privy Expo Auth Provider — React Native implementation of AuthProvider.
@@ -13546,7 +13570,7 @@ class PrivyExpoProvider {
13546
13570
  const wallet = await this.getWalletOrThrow();
13547
13571
  const messageBytes = getPlatform().textEncode(message);
13548
13572
  const result = await wallet.signMessage(messageBytes);
13549
- return bs58.encode(result.signature);
13573
+ return base58.encode(result.signature);
13550
13574
  }
13551
13575
  async signTransaction(transaction) {
13552
13576
  await this.ensureReady();
@@ -13701,5 +13725,5 @@ class PrivyExpoProvider {
13701
13725
  }
13702
13726
  }
13703
13727
 
13704
- export { clearCache as $, set as A, setMany as B, setFile as C, getFiles as D, runQuery as E, runQueryMany as F, runExpression as G, runExpressionMany as H, signMessage as I, signTransaction as J, signAndSubmitTransaction as K, count as L, aggregate as M, subscribe as N, useAuth as O, deserializeTransaction as P, getIdToken as Q, setPlatform as R, SOLANA_MAINNET_RPC_URL as S, MockAuthProvider as T, DEFAULT_TEST_ADDRESS as U, OffchainAuthProvider as V, WebSessionManager as W, PrivyExpoProvider as X, InsufficientBalanceError as Y, ReactNativeSessionManager as Z, ServerSessionManager as _, SOLANA_DEVNET_RPC_URL as a, closeAllSubscriptions as a0, getCachedData as a1, getMany as a2, reconnectWithNewAuth as a3, refreshSession as a4, signSessionCreateMessage as a5, index as a6, buildSetDocumentsTransaction as b, convertRemainingAccounts as c, bs58 as d, confirmAndCheckTransaction as e, createSessionWithPrivy as f, getPlatform as g, detectAndroid as h, SURFNET_RPC_URL$1 as i, detectMobile as j, setAuthLoading as k, genAuthNonce as l, genSolanaMessage as m, createSessionWithSignature as n, getDefaultExportFromCjs$1 as o, init as p, getCurrentUser as q, onAuthStateChanged as r, setCurrentUser as s, onAuthLoadingChanged as t, getAuthLoading as u, login as v, logout as w, getConfig as x, getAuthProvider as y, get as z };
13705
- //# sourceMappingURL=index.native-TLhfXfe6.esm.js.map
13728
+ export { InsufficientBalanceError as $, getConfig as A, getAuthProvider as B, get as C, set as D, setMany as E, setFile as F, getFiles as G, runQuery as H, runQueryMany as I, runExpression as J, runExpressionMany as K, signMessage as L, signTransaction as M, signAndSubmitTransaction as N, count as O, aggregate as P, subscribe as Q, useAuth as R, SOLANA_MAINNET_RPC_URL as S, deserializeTransaction as T, getIdToken as U, setPlatform as V, WebSessionManager as W, MockAuthProvider as X, DEFAULT_TEST_ADDRESS as Y, OffchainAuthProvider as Z, PrivyExpoProvider as _, SOLANA_DEVNET_RPC_URL as a, ReactNativeSessionManager as a0, ServerSessionManager as a1, clearCache as a2, closeAllSubscriptions as a3, getCachedData as a4, getMany as a5, reconnectWithNewAuth as a6, refreshSession as a7, signSessionCreateMessage as a8, buildSetDocumentsTransaction as b, convertRemainingAccounts as c, base58 as d, confirmAndCheckTransaction as e, createSessionWithPrivy as f, getPlatform as g, SURFNET_RPC_URL$1 as h, index as i, detectMobile as j, detectAndroid as k, setAuthLoading as l, genAuthNonce as m, genSolanaMessage as n, createSessionWithSignature as o, commonjsRequire as p, getDefaultExportFromCjs$1 as q, require$$0 as r, setCurrentUser as s, init as t, getCurrentUser as u, onAuthStateChanged as v, onAuthLoadingChanged as w, getAuthLoading as x, login as y, logout as z };
13729
+ //# sourceMappingURL=index.native-BqYr--vb.esm.js.map