@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.
- 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-Fjyk5jYL.js → index-B2WGCssJ.js} +346 -490
- package/dist/index-B2WGCssJ.js.map +1 -0
- package/dist/{index-DB9nDInp.esm.js → index-CjHbp7Dq.esm.js} +3697 -562
- package/dist/index-CjHbp7Dq.esm.js.map +1 -0
- package/dist/{index-D_ta2S2c.js → index-DXPkkq81.js} +3698 -563
- package/dist/index-DXPkkq81.js.map +1 -0
- package/dist/{index-Bg_ApFIo.js → index-D_DiP8XQ.js} +3698 -563
- package/dist/index-D_DiP8XQ.js.map +1 -0
- package/dist/{index-CZhJBWap.esm.js → index-dcJIjFrs.esm.js} +3697 -562
- package/dist/index-dcJIjFrs.esm.js.map +1 -0
- package/dist/{index-Bkr4BRoP.esm.js → index-nt_HQVrk.esm.js} +344 -490
- package/dist/index-nt_HQVrk.esm.js.map +1 -0
- package/dist/{index.browser-iqs5DlRU.esm.js → index.browser-BNdFfyIg.esm.js} +1571 -1368
- package/dist/index.browser-BNdFfyIg.esm.js.map +1 -0
- package/dist/{index.browser-DHi7UhqF.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-DYgJWWY4.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-DJWuqJTZ.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-fofd8BMo.js → phantom-wallet-provider-DWCaMkyz.js} +147 -238
- package/dist/phantom-wallet-provider-DWCaMkyz.js.map +1 -0
- package/dist/{phantom-wallet-provider-DSFGWSOJ.esm.js → phantom-wallet-provider-K2V96G-G.esm.js} +147 -238
- package/dist/phantom-wallet-provider-K2V96G-G.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-Csv34Kcc.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-TRToDe4Q.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-L7nRuxhv.esm.js → solana-mobile-wallet-provider-Cmphb3oB.esm.js} +3 -82
- package/dist/solana-mobile-wallet-provider-Cmphb3oB.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-Cp65LfNb.js → solana-mobile-wallet-provider-t22Ie8lY.js} +3 -82
- package/dist/solana-mobile-wallet-provider-t22Ie8lY.js.map +1 -0
- package/package.json +3 -3
- package/dist/index-Bg_ApFIo.js.map +0 -1
- package/dist/index-Bkr4BRoP.esm.js.map +0 -1
- package/dist/index-CZhJBWap.esm.js.map +0 -1
- package/dist/index-DB9nDInp.esm.js.map +0 -1
- package/dist/index-D_ta2S2c.js.map +0 -1
- package/dist/index-Fjyk5jYL.js.map +0 -1
- package/dist/index.browser-BTlliHCf.esm.js +0 -119
- package/dist/index.browser-BTlliHCf.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-DHi7UhqF.js.map +0 -1
- package/dist/index.browser-DRTQuf0J.js +0 -1253
- package/dist/index.browser-DRTQuf0J.js.map +0 -1
- package/dist/index.browser-Disp7Kcb.esm.js +0 -1250
- package/dist/index.browser-Disp7Kcb.esm.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-DvTeEO2r.js +0 -122
- package/dist/index.browser-DvTeEO2r.js.map +0 -1
- package/dist/index.browser-iqs5DlRU.esm.js.map +0 -1
- package/dist/index.native-DJWuqJTZ.js.map +0 -1
- package/dist/index.native-DYgJWWY4.esm.js.map +0 -1
- package/dist/phantom-wallet-provider-DSFGWSOJ.esm.js.map +0 -1
- package/dist/phantom-wallet-provider-fofd8BMo.js.map +0 -1
- package/dist/privy-wallet-provider-Csv34Kcc.js.map +0 -1
- package/dist/privy-wallet-provider-TRToDe4Q.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-Cp65LfNb.js.map +0 -1
- 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
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
13361
|
-
|
|
13362
|
-
|
|
13363
|
-
|
|
13364
|
-
|
|
13365
|
-
|
|
13366
|
-
|
|
13367
|
-
|
|
13368
|
-
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
13376
|
-
}
|
|
13377
|
-
|
|
13378
|
-
|
|
13379
|
-
|
|
13380
|
-
|
|
13381
|
-
|
|
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:
|
|
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
|
|
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.
|
|
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-
|
|
13812
|
+
//# sourceMappingURL=index.native-CyA-RdvW.js.map
|