@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.
- package/dist/auth/index.d.ts +10 -1
- package/dist/auth/providers/phantom-wallet-provider.d.ts +20 -21
- package/dist/global.d.ts +3 -1
- package/dist/{index-DHm4usay.js → index-B2WGCssJ.js} +347 -414
- package/dist/index-B2WGCssJ.js.map +1 -0
- package/dist/{index-CHqM9n4K.esm.js → index-CjHbp7Dq.esm.js} +3697 -562
- package/dist/index-CjHbp7Dq.esm.js.map +1 -0
- package/dist/{index-CL4JIAAR.js → index-DXPkkq81.js} +3698 -563
- package/dist/index-DXPkkq81.js.map +1 -0
- package/dist/{index-BjlCinic.js → index-D_DiP8XQ.js} +3698 -563
- package/dist/index-D_DiP8XQ.js.map +1 -0
- package/dist/{index-DCo85UGg.esm.js → index-dcJIjFrs.esm.js} +3697 -562
- package/dist/index-dcJIjFrs.esm.js.map +1 -0
- package/dist/{index-Bx_lLXRT.esm.js → index-nt_HQVrk.esm.js} +345 -414
- package/dist/index-nt_HQVrk.esm.js.map +1 -0
- package/dist/{index.browser-7dDfRU5G.esm.js → index.browser-BNdFfyIg.esm.js} +1571 -1368
- package/dist/index.browser-BNdFfyIg.esm.js.map +1 -0
- package/dist/{index.browser-CmlqbyPr.js → index.browser-CT6PUv9G.js} +1571 -1368
- package/dist/index.browser-CT6PUv9G.js.map +1 -0
- package/dist/index.browser-Cy21yaX0.esm.js +1096 -0
- package/dist/index.browser-Cy21yaX0.esm.js.map +1 -0
- package/dist/index.browser-OvGNsMPu.esm.js +1002 -0
- package/dist/index.browser-OvGNsMPu.esm.js.map +1 -0
- package/dist/index.browser-ZD7Tz2bn.js +1099 -0
- package/dist/index.browser-ZD7Tz2bn.js.map +1 -0
- package/dist/index.browser-d0PlOXpF.js +105 -0
- package/dist/index.browser-d0PlOXpF.js.map +1 -0
- package/dist/index.browser-pE1s68e9.esm.js +102 -0
- package/dist/index.browser-pE1s68e9.esm.js.map +1 -0
- package/dist/index.browser-vuTr40so.js +1008 -0
- package/dist/index.browser-vuTr40so.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-TLhfXfe6.esm.js → index.native-BqYr--vb.esm.js} +202 -178
- package/dist/index.native-BqYr--vb.esm.js.map +1 -0
- package/dist/{index.native-DJA9_K3i.js → index.native-CyA-RdvW.js} +204 -178
- package/dist/index.native-CyA-RdvW.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-BegJFoWW.js → phantom-wallet-provider-DWCaMkyz.js} +148 -192
- package/dist/phantom-wallet-provider-DWCaMkyz.js.map +1 -0
- package/dist/{phantom-wallet-provider-DzUAMhbm.esm.js → phantom-wallet-provider-K2V96G-G.esm.js} +148 -192
- package/dist/phantom-wallet-provider-K2V96G-G.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-Du-QHaaG.js → privy-wallet-provider-BMg_S_d0.js} +4 -4
- package/dist/privy-wallet-provider-BMg_S_d0.js.map +1 -0
- package/dist/{privy-wallet-provider-BspbiyOr.esm.js → privy-wallet-provider-DoX8q99w.esm.js} +4 -4
- package/dist/privy-wallet-provider-DoX8q99w.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-Bh7SBFpQ.esm.js → solana-mobile-wallet-provider-Cmphb3oB.esm.js} +3 -52
- package/dist/solana-mobile-wallet-provider-Cmphb3oB.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-DPp4SYem.js → solana-mobile-wallet-provider-t22Ie8lY.js} +3 -52
- package/dist/solana-mobile-wallet-provider-t22Ie8lY.js.map +1 -0
- package/package.json +3 -3
- package/dist/index-BjlCinic.js.map +0 -1
- package/dist/index-Bx_lLXRT.esm.js.map +0 -1
- package/dist/index-CHqM9n4K.esm.js.map +0 -1
- package/dist/index-CL4JIAAR.js.map +0 -1
- package/dist/index-DCo85UGg.esm.js.map +0 -1
- package/dist/index-DHm4usay.js.map +0 -1
- package/dist/index.browser-7dDfRU5G.esm.js.map +0 -1
- package/dist/index.browser-Bg_-PAgT.esm.js +0 -1250
- package/dist/index.browser-Bg_-PAgT.esm.js.map +0 -1
- package/dist/index.browser-C-_FEr5M.esm.js +0 -1134
- package/dist/index.browser-C-_FEr5M.esm.js.map +0 -1
- package/dist/index.browser-CmlqbyPr.js.map +0 -1
- package/dist/index.browser-CxXQ2RhF.js +0 -122
- package/dist/index.browser-CxXQ2RhF.js.map +0 -1
- package/dist/index.browser-DjEZSiqI.js +0 -1137
- package/dist/index.browser-DjEZSiqI.js.map +0 -1
- package/dist/index.browser-DuVkpEzB.js +0 -1253
- package/dist/index.browser-DuVkpEzB.js.map +0 -1
- package/dist/index.browser-xJkO73vw.esm.js +0 -119
- package/dist/index.browser-xJkO73vw.esm.js.map +0 -1
- package/dist/index.native-DJA9_K3i.js.map +0 -1
- package/dist/index.native-TLhfXfe6.esm.js.map +0 -1
- package/dist/phantom-wallet-provider-BegJFoWW.js.map +0 -1
- package/dist/phantom-wallet-provider-DzUAMhbm.esm.js.map +0 -1
- package/dist/privy-wallet-provider-BspbiyOr.esm.js.map +0 -1
- package/dist/privy-wallet-provider-Du-QHaaG.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-Bh7SBFpQ.esm.js.map +0 -1
- 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
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10114
|
-
|
|
10115
|
-
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
|
|
13313
|
-
|
|
13314
|
-
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13327
|
-
|
|
13328
|
-
|
|
13329
|
-
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
}
|
|
13356
|
-
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
|
|
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:
|
|
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
|
|
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 {
|
|
13705
|
-
//# sourceMappingURL=index.native-
|
|
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
|