@pooflabs/web 0.0.81-rc5 → 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-Fjyk5jYL.js → index-B2WGCssJ.js} +346 -490
  5. package/dist/index-B2WGCssJ.js.map +1 -0
  6. package/dist/{index-DB9nDInp.esm.js → index-CjHbp7Dq.esm.js} +3697 -562
  7. package/dist/index-CjHbp7Dq.esm.js.map +1 -0
  8. package/dist/{index-D_ta2S2c.js → index-DXPkkq81.js} +3698 -563
  9. package/dist/index-DXPkkq81.js.map +1 -0
  10. package/dist/{index-Bg_ApFIo.js → index-D_DiP8XQ.js} +3698 -563
  11. package/dist/index-D_DiP8XQ.js.map +1 -0
  12. package/dist/{index-CZhJBWap.esm.js → index-dcJIjFrs.esm.js} +3697 -562
  13. package/dist/index-dcJIjFrs.esm.js.map +1 -0
  14. package/dist/{index-Bkr4BRoP.esm.js → index-nt_HQVrk.esm.js} +344 -490
  15. package/dist/index-nt_HQVrk.esm.js.map +1 -0
  16. package/dist/{index.browser-iqs5DlRU.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-DHi7UhqF.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-DYgJWWY4.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-DJWuqJTZ.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-fofd8BMo.js → phantom-wallet-provider-DWCaMkyz.js} +147 -238
  42. package/dist/phantom-wallet-provider-DWCaMkyz.js.map +1 -0
  43. package/dist/{phantom-wallet-provider-DSFGWSOJ.esm.js → phantom-wallet-provider-K2V96G-G.esm.js} +147 -238
  44. package/dist/phantom-wallet-provider-K2V96G-G.esm.js.map +1 -0
  45. package/dist/{privy-wallet-provider-Csv34Kcc.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-TRToDe4Q.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-L7nRuxhv.esm.js → solana-mobile-wallet-provider-Cmphb3oB.esm.js} +3 -82
  50. package/dist/solana-mobile-wallet-provider-Cmphb3oB.esm.js.map +1 -0
  51. package/dist/{solana-mobile-wallet-provider-Cp65LfNb.js → solana-mobile-wallet-provider-t22Ie8lY.js} +3 -82
  52. package/dist/solana-mobile-wallet-provider-t22Ie8lY.js.map +1 -0
  53. package/package.json +3 -3
  54. package/dist/index-Bg_ApFIo.js.map +0 -1
  55. package/dist/index-Bkr4BRoP.esm.js.map +0 -1
  56. package/dist/index-CZhJBWap.esm.js.map +0 -1
  57. package/dist/index-DB9nDInp.esm.js.map +0 -1
  58. package/dist/index-D_ta2S2c.js.map +0 -1
  59. package/dist/index-Fjyk5jYL.js.map +0 -1
  60. package/dist/index.browser-BTlliHCf.esm.js +0 -119
  61. package/dist/index.browser-BTlliHCf.esm.js.map +0 -1
  62. package/dist/index.browser-C-_FEr5M.esm.js +0 -1134
  63. package/dist/index.browser-C-_FEr5M.esm.js.map +0 -1
  64. package/dist/index.browser-DHi7UhqF.js.map +0 -1
  65. package/dist/index.browser-DRTQuf0J.js +0 -1253
  66. package/dist/index.browser-DRTQuf0J.js.map +0 -1
  67. package/dist/index.browser-Disp7Kcb.esm.js +0 -1250
  68. package/dist/index.browser-Disp7Kcb.esm.js.map +0 -1
  69. package/dist/index.browser-DjEZSiqI.js +0 -1137
  70. package/dist/index.browser-DjEZSiqI.js.map +0 -1
  71. package/dist/index.browser-DvTeEO2r.js +0 -122
  72. package/dist/index.browser-DvTeEO2r.js.map +0 -1
  73. package/dist/index.browser-iqs5DlRU.esm.js.map +0 -1
  74. package/dist/index.native-DJWuqJTZ.js.map +0 -1
  75. package/dist/index.native-DYgJWWY4.esm.js.map +0 -1
  76. package/dist/phantom-wallet-provider-DSFGWSOJ.esm.js.map +0 -1
  77. package/dist/phantom-wallet-provider-fofd8BMo.js.map +0 -1
  78. package/dist/privy-wallet-provider-Csv34Kcc.js.map +0 -1
  79. package/dist/privy-wallet-provider-TRToDe4Q.esm.js.map +0 -1
  80. package/dist/solana-mobile-wallet-provider-Cp65LfNb.js.map +0 -1
  81. package/dist/solana-mobile-wallet-provider-L7nRuxhv.esm.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);
27
42
 
@@ -9468,11 +9483,11 @@ function requireSrc () {
9468
9483
  }
9469
9484
 
9470
9485
  var bs58$1;
9471
- var hasRequiredBs58;
9486
+ var hasRequiredBs58$1;
9472
9487
 
9473
- function requireBs58 () {
9474
- if (hasRequiredBs58) return bs58$1;
9475
- hasRequiredBs58 = 1;
9488
+ function requireBs58$1 () {
9489
+ if (hasRequiredBs58$1) return bs58$1;
9490
+ hasRequiredBs58$1 = 1;
9476
9491
  var basex = requireSrc();
9477
9492
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9478
9493
 
@@ -9480,8 +9495,8 @@ function requireBs58 () {
9480
9495
  return bs58$1;
9481
9496
  }
9482
9497
 
9483
- var bs58Exports = requireBs58();
9484
- var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
9498
+ var bs58Exports$1 = requireBs58$1();
9499
+ var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports$1);
9485
9500
 
9486
9501
  // ─────────────────────────────────────────────────────────────
9487
9502
  // Local implementation of getSimulationComputeUnits
@@ -10127,40 +10142,17 @@ async function getConfig() {
10127
10142
  return clientConfig;
10128
10143
  }
10129
10144
 
10130
- /******************************************************************************
10131
- Copyright (c) Microsoft Corporation.
10132
-
10133
- Permission to use, copy, modify, and/or distribute this software for any
10134
- purpose with or without fee is hereby granted.
10135
-
10136
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10137
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10138
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10139
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
10140
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
10141
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
10142
- PERFORMANCE OF THIS SOFTWARE.
10143
- ***************************************************************************** */
10144
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
10145
-
10146
-
10147
- function __rest(s, e) {
10148
- var t = {};
10149
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
10150
- t[p] = s[p];
10151
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
10152
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10153
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10154
- t[p[i]] = s[p[i]];
10155
- }
10156
- return t;
10157
- }
10158
-
10159
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
10160
- var e = new Error(message);
10161
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
10145
+ var __rest = function (s, e) {
10146
+ var t = {};
10147
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
10148
+ t[p] = s[p];
10149
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
10150
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10151
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10152
+ t[p[i]] = s[p[i]];
10153
+ }
10154
+ return t;
10162
10155
  };
10163
-
10164
10156
  /**
10165
10157
  * Thrown when a user's wallet doesn't have enough SOL to cover the transaction.
10166
10158
  * Apps can catch this to trigger an onramp/funding flow.
@@ -12833,15 +12825,15 @@ function clearIncompatibleSession() {
12833
12825
  // Lazy loaders for web-only providers.
12834
12826
  // Using dynamic import() ensures Metro (RN) never resolves these modules.
12835
12827
  async function loadPrivyWalletProvider() {
12836
- const mod = await Promise.resolve().then(function () { return require('./privy-wallet-provider-Csv34Kcc.js'); });
12828
+ const mod = await Promise.resolve().then(function () { return require('./privy-wallet-provider-BMg_S_d0.js'); });
12837
12829
  return mod.PrivyWalletProvider;
12838
12830
  }
12839
12831
  async function loadPhantomWalletProvider() {
12840
- const mod = await Promise.resolve().then(function () { return require('./phantom-wallet-provider-fofd8BMo.js'); });
12832
+ const mod = await Promise.resolve().then(function () { return require('./phantom-wallet-provider-DWCaMkyz.js'); });
12841
12833
  return { PhantomWalletProvider: mod.PhantomWalletProvider };
12842
12834
  }
12843
12835
  async function loadSolanaMobileWalletProvider() {
12844
- const mod = await Promise.resolve().then(function () { return require('./solana-mobile-wallet-provider-Cp65LfNb.js'); });
12836
+ const mod = await Promise.resolve().then(function () { return require('./solana-mobile-wallet-provider-t22Ie8lY.js'); });
12845
12837
  return mod.SolanaMobileWalletProvider;
12846
12838
  }
12847
12839
  async function hotSwapToPrivyProvider(config) {
@@ -12981,7 +12973,7 @@ async function getAuthProvider(config) {
12981
12973
  }
12982
12974
  return currentAuthProvider;
12983
12975
  }
12984
- async function login$1() {
12976
+ async function login$1(options) {
12985
12977
  // Re-initialize provider if it was cleared by logout
12986
12978
  if (!currentAuthProvider && initConfig) {
12987
12979
  currentAuthProvider = await getAuthProvider(initConfig);
@@ -12994,6 +12986,14 @@ async function login$1() {
12994
12986
  if (!currentAuthProvider) {
12995
12987
  throw new Error("Auth provider not initialized. Please call init() first.");
12996
12988
  }
12989
+ // Forward per-call overrides to providers that support them (duck-typed to stay
12990
+ // lazy-load safe — no direct import of PhantomWalletProvider here).
12991
+ // Always call (even with null) so previous overrides are cleared when this
12992
+ // login() is invoked without options — early-return paths inside the provider
12993
+ // bypass the .finally() cleanup, so we reset here too.
12994
+ if (typeof currentAuthProvider.setLoginOverrides === 'function') {
12995
+ currentAuthProvider.setLoginOverrides(options !== null && options !== void 0 ? options : null);
12996
+ }
12997
12997
  const loginResult = await currentAuthProvider.login();
12998
12998
  if (loginResult) {
12999
12999
  // Store which auth method was used so we restore the right provider on reload
@@ -13076,11 +13076,11 @@ function setAuthLoading(loading) {
13076
13076
  function getAuthLoading() {
13077
13077
  return isAuthLoading;
13078
13078
  }
13079
- async function login() {
13079
+ async function login(options) {
13080
13080
  if (!authProviderInstance) {
13081
13081
  throw new Error('SDK not initialized. Please call init() first.');
13082
13082
  }
13083
- const loggedInUser = await login$1();
13083
+ const loggedInUser = await login$1(options);
13084
13084
  setCurrentUser(loggedInUser);
13085
13085
  return currentUser;
13086
13086
  }
@@ -13251,137 +13251,161 @@ async function confirmAndCheckTransaction(connection, signature) {
13251
13251
  throw new Error('Transaction confirmation timeout');
13252
13252
  }
13253
13253
 
13254
- // base-x encoding / decoding
13255
- // Copyright (c) 2018 base-x contributors
13256
- // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
13257
- // Distributed under the MIT software license, see the accompanying
13258
- // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
13259
- function base (ALPHABET) {
13260
- if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
13261
- const BASE_MAP = new Uint8Array(256);
13262
- for (let j = 0; j < BASE_MAP.length; j++) {
13263
- BASE_MAP[j] = 255;
13264
- }
13265
- for (let i = 0; i < ALPHABET.length; i++) {
13266
- const x = ALPHABET.charAt(i);
13267
- const xc = x.charCodeAt(0);
13268
- if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
13269
- BASE_MAP[xc] = i;
13270
- }
13271
- const BASE = ALPHABET.length;
13272
- const LEADER = ALPHABET.charAt(0);
13273
- const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
13274
- const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
13275
- function encode (source) {
13276
- // eslint-disable-next-line no-empty
13277
- if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
13278
- source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
13279
- } else if (Array.isArray(source)) {
13280
- source = Uint8Array.from(source);
13281
- }
13282
- if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
13283
- if (source.length === 0) { return '' }
13284
- // Skip & count leading zeroes.
13285
- let zeroes = 0;
13286
- let length = 0;
13287
- let pbegin = 0;
13288
- const pend = source.length;
13289
- while (pbegin !== pend && source[pbegin] === 0) {
13290
- pbegin++;
13291
- zeroes++;
13292
- }
13293
- // Allocate enough space in big-endian base58 representation.
13294
- const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
13295
- const b58 = new Uint8Array(size);
13296
- // Process the bytes.
13297
- while (pbegin !== pend) {
13298
- let carry = source[pbegin];
13299
- // Apply "b58 = b58 * 256 + ch".
13300
- let i = 0;
13301
- for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
13302
- carry += (256 * b58[it1]) >>> 0;
13303
- b58[it1] = (carry % BASE) >>> 0;
13304
- carry = (carry / BASE) >>> 0;
13305
- }
13306
- if (carry !== 0) { throw new Error('Non-zero carry') }
13307
- length = i;
13308
- pbegin++;
13309
- }
13310
- // Skip leading zeroes in base58 result.
13311
- let it2 = size - length;
13312
- while (it2 !== size && b58[it2] === 0) {
13313
- it2++;
13314
- }
13315
- // Translate the result into a string.
13316
- let str = LEADER.repeat(zeroes);
13317
- for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
13318
- return str
13319
- }
13320
- function decodeUnsafe (source) {
13321
- if (typeof source !== 'string') { throw new TypeError('Expected String') }
13322
- if (source.length === 0) { return new Uint8Array() }
13323
- let psz = 0;
13324
- // Skip and count leading '1's.
13325
- let zeroes = 0;
13326
- let length = 0;
13327
- while (source[psz] === LEADER) {
13328
- zeroes++;
13329
- psz++;
13330
- }
13331
- // Allocate enough space in big-endian base256 representation.
13332
- const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
13333
- const b256 = new Uint8Array(size);
13334
- // Process the characters.
13335
- while (psz < source.length) {
13336
- // Find code of next character
13337
- const charCode = source.charCodeAt(psz);
13338
- // Base map can not be indexed using char code
13339
- if (charCode > 255) { return }
13340
- // Decode character
13341
- let carry = BASE_MAP[charCode];
13342
- // Invalid character
13343
- if (carry === 255) { return }
13344
- let i = 0;
13345
- for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
13346
- carry += (BASE * b256[it3]) >>> 0;
13347
- b256[it3] = (carry % 256) >>> 0;
13348
- carry = (carry / 256) >>> 0;
13349
- }
13350
- if (carry !== 0) { throw new Error('Non-zero carry') }
13351
- length = i;
13352
- psz++;
13353
- }
13354
- // Skip leading zeroes in b256.
13355
- let it4 = size - length;
13356
- while (it4 !== size && b256[it4] === 0) {
13357
- it4++;
13358
- }
13359
- const vch = new Uint8Array(zeroes + (size - it4));
13360
- let j = zeroes;
13361
- while (it4 !== size) {
13362
- vch[j++] = b256[it4++];
13363
- }
13364
- return vch
13365
- }
13366
- function decode (string) {
13367
- const buffer = decodeUnsafe(string);
13368
- if (buffer) { return buffer }
13369
- throw new Error('Non-base' + BASE + ' character')
13370
- }
13371
- return {
13372
- encode,
13373
- decodeUnsafe,
13374
- decode
13375
- }
13376
- }
13377
-
13378
- var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
13379
- var bs58 = base(ALPHABET);
13380
-
13381
- var index = /*#__PURE__*/Object.freeze({
13254
+ var cjs = {};
13255
+
13256
+ var hasRequiredCjs;
13257
+
13258
+ function requireCjs () {
13259
+ if (hasRequiredCjs) return cjs;
13260
+ hasRequiredCjs = 1;
13261
+ // base-x encoding / decoding
13262
+ // Copyright (c) 2018 base-x contributors
13263
+ // Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
13264
+ // Distributed under the MIT software license, see the accompanying
13265
+ // file LICENSE or http://www.opensource.org/licenses/mit-license.php.
13266
+ Object.defineProperty(cjs, '__esModule', { value: true });
13267
+ function base (ALPHABET) {
13268
+ if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
13269
+ const BASE_MAP = new Uint8Array(256);
13270
+ for (let j = 0; j < BASE_MAP.length; j++) {
13271
+ BASE_MAP[j] = 255;
13272
+ }
13273
+ for (let i = 0; i < ALPHABET.length; i++) {
13274
+ const x = ALPHABET.charAt(i);
13275
+ const xc = x.charCodeAt(0);
13276
+ if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
13277
+ BASE_MAP[xc] = i;
13278
+ }
13279
+ const BASE = ALPHABET.length;
13280
+ const LEADER = ALPHABET.charAt(0);
13281
+ const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
13282
+ const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
13283
+ function encode (source) {
13284
+ // eslint-disable-next-line no-empty
13285
+ if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
13286
+ source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
13287
+ } else if (Array.isArray(source)) {
13288
+ source = Uint8Array.from(source);
13289
+ }
13290
+ if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
13291
+ if (source.length === 0) { return '' }
13292
+ // Skip & count leading zeroes.
13293
+ let zeroes = 0;
13294
+ let length = 0;
13295
+ let pbegin = 0;
13296
+ const pend = source.length;
13297
+ while (pbegin !== pend && source[pbegin] === 0) {
13298
+ pbegin++;
13299
+ zeroes++;
13300
+ }
13301
+ // Allocate enough space in big-endian base58 representation.
13302
+ const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
13303
+ const b58 = new Uint8Array(size);
13304
+ // Process the bytes.
13305
+ while (pbegin !== pend) {
13306
+ let carry = source[pbegin];
13307
+ // Apply "b58 = b58 * 256 + ch".
13308
+ let i = 0;
13309
+ for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
13310
+ carry += (256 * b58[it1]) >>> 0;
13311
+ b58[it1] = (carry % BASE) >>> 0;
13312
+ carry = (carry / BASE) >>> 0;
13313
+ }
13314
+ if (carry !== 0) { throw new Error('Non-zero carry') }
13315
+ length = i;
13316
+ pbegin++;
13317
+ }
13318
+ // Skip leading zeroes in base58 result.
13319
+ let it2 = size - length;
13320
+ while (it2 !== size && b58[it2] === 0) {
13321
+ it2++;
13322
+ }
13323
+ // Translate the result into a string.
13324
+ let str = LEADER.repeat(zeroes);
13325
+ for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
13326
+ return str
13327
+ }
13328
+ function decodeUnsafe (source) {
13329
+ if (typeof source !== 'string') { throw new TypeError('Expected String') }
13330
+ if (source.length === 0) { return new Uint8Array() }
13331
+ let psz = 0;
13332
+ // Skip and count leading '1's.
13333
+ let zeroes = 0;
13334
+ let length = 0;
13335
+ while (source[psz] === LEADER) {
13336
+ zeroes++;
13337
+ psz++;
13338
+ }
13339
+ // Allocate enough space in big-endian base256 representation.
13340
+ const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
13341
+ const b256 = new Uint8Array(size);
13342
+ // Process the characters.
13343
+ while (psz < source.length) {
13344
+ // Find code of next character
13345
+ const charCode = source.charCodeAt(psz);
13346
+ // Base map can not be indexed using char code
13347
+ if (charCode > 255) { return }
13348
+ // Decode character
13349
+ let carry = BASE_MAP[charCode];
13350
+ // Invalid character
13351
+ if (carry === 255) { return }
13352
+ let i = 0;
13353
+ for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
13354
+ carry += (BASE * b256[it3]) >>> 0;
13355
+ b256[it3] = (carry % 256) >>> 0;
13356
+ carry = (carry / 256) >>> 0;
13357
+ }
13358
+ if (carry !== 0) { throw new Error('Non-zero carry') }
13359
+ length = i;
13360
+ psz++;
13361
+ }
13362
+ // Skip leading zeroes in b256.
13363
+ let it4 = size - length;
13364
+ while (it4 !== size && b256[it4] === 0) {
13365
+ it4++;
13366
+ }
13367
+ const vch = new Uint8Array(zeroes + (size - it4));
13368
+ let j = zeroes;
13369
+ while (it4 !== size) {
13370
+ vch[j++] = b256[it4++];
13371
+ }
13372
+ return vch
13373
+ }
13374
+ function decode (string) {
13375
+ const buffer = decodeUnsafe(string);
13376
+ if (buffer) { return buffer }
13377
+ throw new Error('Non-base' + BASE + ' character')
13378
+ }
13379
+ return {
13380
+ encode,
13381
+ decodeUnsafe,
13382
+ decode
13383
+ }
13384
+ }
13385
+ cjs.default = base;
13386
+ return cjs;
13387
+ }
13388
+
13389
+ var bs58;
13390
+ var hasRequiredBs58;
13391
+
13392
+ function requireBs58 () {
13393
+ if (hasRequiredBs58) return bs58;
13394
+ hasRequiredBs58 = 1;
13395
+ var basex = requireCjs();
13396
+ var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
13397
+
13398
+ bs58 = basex(ALPHABET);
13399
+ return bs58;
13400
+ }
13401
+
13402
+ var bs58Exports = requireBs58();
13403
+ var base58 = /*@__PURE__*/getDefaultExportFromCjs$1(bs58Exports);
13404
+
13405
+ var index = /*#__PURE__*/_mergeNamespaces({
13382
13406
  __proto__: null,
13383
- default: bs58
13384
- });
13407
+ default: base58
13408
+ }, [bs58Exports]);
13385
13409
 
13386
13410
  /**
13387
13411
  * Privy Expo Auth Provider — React Native implementation of AuthProvider.
@@ -13567,7 +13591,7 @@ class PrivyExpoProvider {
13567
13591
  const wallet = await this.getWalletOrThrow();
13568
13592
  const messageBytes = getPlatform().textEncode(message);
13569
13593
  const result = await wallet.signMessage(messageBytes);
13570
- return bs58.encode(result.signature);
13594
+ return base58.encode(result.signature);
13571
13595
  }
13572
13596
  async signTransaction(transaction) {
13573
13597
  await this.ensureReady();
@@ -13734,10 +13758,11 @@ exports.SURFNET_RPC_URL = SURFNET_RPC_URL$1;
13734
13758
  exports.ServerSessionManager = ServerSessionManager;
13735
13759
  exports.WebSessionManager = WebSessionManager;
13736
13760
  exports.aggregate = aggregate;
13737
- exports.bs58 = bs58;
13761
+ exports.base58 = base58;
13738
13762
  exports.buildSetDocumentsTransaction = buildSetDocumentsTransaction;
13739
13763
  exports.clearCache = clearCache;
13740
13764
  exports.closeAllSubscriptions = closeAllSubscriptions;
13765
+ exports.commonjsRequire = commonjsRequire;
13741
13766
  exports.confirmAndCheckTransaction = confirmAndCheckTransaction;
13742
13767
  exports.convertRemainingAccounts = convertRemainingAccounts;
13743
13768
  exports.count = count;
@@ -13767,6 +13792,7 @@ exports.onAuthLoadingChanged = onAuthLoadingChanged;
13767
13792
  exports.onAuthStateChanged = onAuthStateChanged;
13768
13793
  exports.reconnectWithNewAuth = reconnectWithNewAuth;
13769
13794
  exports.refreshSession = refreshSession;
13795
+ exports.require$$0 = require$$0;
13770
13796
  exports.runExpression = runExpression;
13771
13797
  exports.runExpressionMany = runExpressionMany;
13772
13798
  exports.runQuery = runQuery;
@@ -13783,4 +13809,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
13783
13809
  exports.signTransaction = signTransaction;
13784
13810
  exports.subscribe = subscribe;
13785
13811
  exports.useAuth = useAuth;
13786
- //# sourceMappingURL=index.native-DJWuqJTZ.js.map
13812
+ //# sourceMappingURL=index.native-CyA-RdvW.js.map