@pooflabs/web 0.0.81 → 0.0.83-rc1
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/{index-D_DiP8XQ.js → index-2qSlZ-n6.js} +7850 -10985
- package/dist/index-2qSlZ-n6.js.map +1 -0
- package/dist/{index-DXPkkq81.js → index-BAz5F9Qr.js} +7850 -10985
- package/dist/index-BAz5F9Qr.js.map +1 -0
- package/dist/{index-CjHbp7Dq.esm.js → index-BpjqfeKL.esm.js} +7850 -10985
- package/dist/index-BpjqfeKL.esm.js.map +1 -0
- package/dist/{index-B2WGCssJ.js → index-CYhzBf0k.js} +231 -180
- package/dist/index-CYhzBf0k.js.map +1 -0
- package/dist/{index-dcJIjFrs.esm.js → index-DOfXgVkn.esm.js} +7850 -10985
- package/dist/index-DOfXgVkn.esm.js.map +1 -0
- package/dist/{index-nt_HQVrk.esm.js → index-DiSZgxvm.esm.js} +232 -179
- package/dist/index-DiSZgxvm.esm.js.map +1 -0
- package/dist/{index.browser-CT6PUv9G.js → index.browser-BgibQtKi.js} +2 -2
- package/dist/{index.browser-CT6PUv9G.js.map → index.browser-BgibQtKi.js.map} +1 -1
- package/dist/{index.browser-BNdFfyIg.esm.js → index.browser-BlQ9w7lf.esm.js} +2 -2
- package/dist/{index.browser-BNdFfyIg.esm.js.map → index.browser-BlQ9w7lf.esm.js.map} +1 -1
- package/dist/{index.browser-ZD7Tz2bn.js → index.browser-CDhaFhaH.js} +2 -2
- package/dist/{index.browser-ZD7Tz2bn.js.map → index.browser-CDhaFhaH.js.map} +1 -1
- package/dist/{index.browser-pE1s68e9.esm.js → index.browser-DVn6ApJy.esm.js} +2 -2
- package/dist/{index.browser-pE1s68e9.esm.js.map → index.browser-DVn6ApJy.esm.js.map} +1 -1
- package/dist/{index.browser-Cy21yaX0.esm.js → index.browser-I9UnPFqe.esm.js} +2 -2
- package/dist/{index.browser-Cy21yaX0.esm.js.map → index.browser-I9UnPFqe.esm.js.map} +1 -1
- package/dist/{index.browser-d0PlOXpF.js → index.browser-XpeHKCJM.js} +2 -2
- package/dist/{index.browser-d0PlOXpF.js.map → index.browser-XpeHKCJM.js.map} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-BqYr--vb.esm.js → index.native-CbNEYkFa.esm.js} +185 -180
- package/dist/index.native-CbNEYkFa.esm.js.map +1 -0
- package/dist/{index.native-CyA-RdvW.js → index.native-lubRe8nA.js} +184 -181
- package/dist/index.native-lubRe8nA.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-DWCaMkyz.js → phantom-wallet-provider-CfJti5dZ.js} +23 -4
- package/dist/phantom-wallet-provider-CfJti5dZ.js.map +1 -0
- package/dist/{phantom-wallet-provider-K2V96G-G.esm.js → phantom-wallet-provider-YH1gySq_.esm.js} +23 -4
- package/dist/phantom-wallet-provider-YH1gySq_.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-DoX8q99w.esm.js → privy-wallet-provider-Bt7Jk-TE.esm.js} +3 -3
- package/dist/{privy-wallet-provider-DoX8q99w.esm.js.map → privy-wallet-provider-Bt7Jk-TE.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-BMg_S_d0.js → privy-wallet-provider-CeH9zTfE.js} +3 -3
- package/dist/{privy-wallet-provider-BMg_S_d0.js.map → privy-wallet-provider-CeH9zTfE.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-t22Ie8lY.js → solana-mobile-wallet-provider-4PG6JNmJ.js} +33 -4
- package/dist/solana-mobile-wallet-provider-4PG6JNmJ.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-Cmphb3oB.esm.js → solana-mobile-wallet-provider-BtM0Saad.esm.js} +33 -4
- package/dist/solana-mobile-wallet-provider-BtM0Saad.esm.js.map +1 -0
- package/package.json +2 -2
- package/dist/index-B2WGCssJ.js.map +0 -1
- package/dist/index-CjHbp7Dq.esm.js.map +0 -1
- package/dist/index-DXPkkq81.js.map +0 -1
- package/dist/index-D_DiP8XQ.js.map +0 -1
- package/dist/index-dcJIjFrs.esm.js.map +0 -1
- package/dist/index-nt_HQVrk.esm.js.map +0 -1
- package/dist/index.native-BqYr--vb.esm.js.map +0 -1
- package/dist/index.native-CyA-RdvW.js.map +0 -1
- package/dist/phantom-wallet-provider-DWCaMkyz.js.map +0 -1
- package/dist/phantom-wallet-provider-K2V96G-G.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-Cmphb3oB.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-t22Ie8lY.js.map +0 -1
|
@@ -22,21 +22,6 @@ 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
|
-
|
|
40
25
|
var anchor__namespace = /*#__PURE__*/_interopNamespaceDefault(anchor);
|
|
41
26
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
42
27
|
|
|
@@ -6785,6 +6770,28 @@ class WebSessionManager {
|
|
|
6785
6770
|
static async storeSession(address, accessToken, idToken, refreshToken) {
|
|
6786
6771
|
if (typeof window === "undefined")
|
|
6787
6772
|
return;
|
|
6773
|
+
// JWT-wallet binding: refuse to store a session whose idToken is bound
|
|
6774
|
+
// to a different wallet than `address`. Prevents races that would otherwise
|
|
6775
|
+
// leave localStorage with mismatched address/token state.
|
|
6776
|
+
try {
|
|
6777
|
+
const payloadB64 = idToken.split(".")[1];
|
|
6778
|
+
if (payloadB64) {
|
|
6779
|
+
const payload = JSON.parse(this.decodeBase64Url(payloadB64));
|
|
6780
|
+
const tokenWallet = payload["custom:walletAddress"];
|
|
6781
|
+
if (tokenWallet && tokenWallet !== address) {
|
|
6782
|
+
throw new Error(`[WebSessionManager] Refusing to store session: address (${address}) does not match idToken custom:walletAddress (${tokenWallet})`);
|
|
6783
|
+
}
|
|
6784
|
+
if (!tokenWallet) {
|
|
6785
|
+
console.warn("[WebSessionManager] storeSession: idToken has no custom:walletAddress claim — writing without validation");
|
|
6786
|
+
}
|
|
6787
|
+
}
|
|
6788
|
+
}
|
|
6789
|
+
catch (err) {
|
|
6790
|
+
if (typeof (err === null || err === void 0 ? void 0 : err.message) === "string" && err.message.includes("Refusing to store session")) {
|
|
6791
|
+
throw err;
|
|
6792
|
+
}
|
|
6793
|
+
console.warn("[WebSessionManager] storeSession: failed to decode idToken for validation:", err);
|
|
6794
|
+
}
|
|
6788
6795
|
const config = await getConfig();
|
|
6789
6796
|
const currentAppId = config.appId;
|
|
6790
6797
|
localStorage.setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify({
|
|
@@ -9483,11 +9490,11 @@ function requireSrc () {
|
|
|
9483
9490
|
}
|
|
9484
9491
|
|
|
9485
9492
|
var bs58$1;
|
|
9486
|
-
var hasRequiredBs58
|
|
9493
|
+
var hasRequiredBs58;
|
|
9487
9494
|
|
|
9488
|
-
function requireBs58
|
|
9489
|
-
if (hasRequiredBs58
|
|
9490
|
-
hasRequiredBs58
|
|
9495
|
+
function requireBs58 () {
|
|
9496
|
+
if (hasRequiredBs58) return bs58$1;
|
|
9497
|
+
hasRequiredBs58 = 1;
|
|
9491
9498
|
var basex = requireSrc();
|
|
9492
9499
|
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9493
9500
|
|
|
@@ -9495,8 +9502,8 @@ function requireBs58$1 () {
|
|
|
9495
9502
|
return bs58$1;
|
|
9496
9503
|
}
|
|
9497
9504
|
|
|
9498
|
-
var bs58Exports
|
|
9499
|
-
var bs58
|
|
9505
|
+
var bs58Exports = requireBs58();
|
|
9506
|
+
var bs58 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
|
|
9500
9507
|
|
|
9501
9508
|
// ─────────────────────────────────────────────────────────────
|
|
9502
9509
|
// Local implementation of getSimulationComputeUnits
|
|
@@ -9749,7 +9756,7 @@ function loadKeypairFromEnv() {
|
|
|
9749
9756
|
try {
|
|
9750
9757
|
const secretKey = secret.trim().startsWith("[")
|
|
9751
9758
|
? Uint8Array.from(JSON.parse(secret))
|
|
9752
|
-
: bs58
|
|
9759
|
+
: bs58.decode(secret.trim());
|
|
9753
9760
|
return web3_js.Keypair.fromSecretKey(secretKey);
|
|
9754
9761
|
}
|
|
9755
9762
|
catch (err) {
|
|
@@ -11671,6 +11678,28 @@ class ReactNativeSessionManager {
|
|
|
11671
11678
|
/* STORE */
|
|
11672
11679
|
/* ------------------------------------------------------------------ */
|
|
11673
11680
|
static async storeSession(address, accessToken, idToken, refreshToken) {
|
|
11681
|
+
// JWT-wallet binding: refuse to store a session whose idToken is bound
|
|
11682
|
+
// to a different wallet than `address`. Prevents races that would otherwise
|
|
11683
|
+
// leave storage with mismatched address/token state.
|
|
11684
|
+
try {
|
|
11685
|
+
const payloadB64 = idToken.split(".")[1];
|
|
11686
|
+
if (payloadB64) {
|
|
11687
|
+
const payload = JSON.parse(this.decodeBase64Url(payloadB64));
|
|
11688
|
+
const tokenWallet = payload["custom:walletAddress"];
|
|
11689
|
+
if (tokenWallet && tokenWallet !== address) {
|
|
11690
|
+
throw new Error(`[ReactNativeSessionManager] Refusing to store session: address (${address}) does not match idToken custom:walletAddress (${tokenWallet})`);
|
|
11691
|
+
}
|
|
11692
|
+
if (!tokenWallet) {
|
|
11693
|
+
console.warn("[ReactNativeSessionManager] storeSession: idToken has no custom:walletAddress claim — writing without validation");
|
|
11694
|
+
}
|
|
11695
|
+
}
|
|
11696
|
+
}
|
|
11697
|
+
catch (err) {
|
|
11698
|
+
if (typeof (err === null || err === void 0 ? void 0 : err.message) === "string" && err.message.includes("Refusing to store session")) {
|
|
11699
|
+
throw err;
|
|
11700
|
+
}
|
|
11701
|
+
console.warn("[ReactNativeSessionManager] storeSession: failed to decode idToken for validation:", err);
|
|
11702
|
+
}
|
|
11674
11703
|
const config = await getConfig();
|
|
11675
11704
|
const currentAppId = config.appId;
|
|
11676
11705
|
this.getStorage().setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify({
|
|
@@ -12825,15 +12854,15 @@ function clearIncompatibleSession() {
|
|
|
12825
12854
|
// Lazy loaders for web-only providers.
|
|
12826
12855
|
// Using dynamic import() ensures Metro (RN) never resolves these modules.
|
|
12827
12856
|
async function loadPrivyWalletProvider() {
|
|
12828
|
-
const mod = await Promise.resolve().then(function () { return require('./privy-wallet-provider-
|
|
12857
|
+
const mod = await Promise.resolve().then(function () { return require('./privy-wallet-provider-CeH9zTfE.js'); });
|
|
12829
12858
|
return mod.PrivyWalletProvider;
|
|
12830
12859
|
}
|
|
12831
12860
|
async function loadPhantomWalletProvider() {
|
|
12832
|
-
const mod = await Promise.resolve().then(function () { return require('./phantom-wallet-provider-
|
|
12861
|
+
const mod = await Promise.resolve().then(function () { return require('./phantom-wallet-provider-CfJti5dZ.js'); });
|
|
12833
12862
|
return { PhantomWalletProvider: mod.PhantomWalletProvider };
|
|
12834
12863
|
}
|
|
12835
12864
|
async function loadSolanaMobileWalletProvider() {
|
|
12836
|
-
const mod = await Promise.resolve().then(function () { return require('./solana-mobile-wallet-provider-
|
|
12865
|
+
const mod = await Promise.resolve().then(function () { return require('./solana-mobile-wallet-provider-4PG6JNmJ.js'); });
|
|
12837
12866
|
return mod.SolanaMobileWalletProvider;
|
|
12838
12867
|
}
|
|
12839
12868
|
async function hotSwapToPrivyProvider(config) {
|
|
@@ -13251,161 +13280,137 @@ async function confirmAndCheckTransaction(connection, signature) {
|
|
|
13251
13280
|
throw new Error('Transaction confirmation timeout');
|
|
13252
13281
|
}
|
|
13253
13282
|
|
|
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
|
-
|
|
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({
|
|
13283
|
+
// base-x encoding / decoding
|
|
13284
|
+
// Copyright (c) 2018 base-x contributors
|
|
13285
|
+
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
13286
|
+
// Distributed under the MIT software license, see the accompanying
|
|
13287
|
+
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
13288
|
+
function base (ALPHABET) {
|
|
13289
|
+
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
13290
|
+
const BASE_MAP = new Uint8Array(256);
|
|
13291
|
+
for (let j = 0; j < BASE_MAP.length; j++) {
|
|
13292
|
+
BASE_MAP[j] = 255;
|
|
13293
|
+
}
|
|
13294
|
+
for (let i = 0; i < ALPHABET.length; i++) {
|
|
13295
|
+
const x = ALPHABET.charAt(i);
|
|
13296
|
+
const xc = x.charCodeAt(0);
|
|
13297
|
+
if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
|
|
13298
|
+
BASE_MAP[xc] = i;
|
|
13299
|
+
}
|
|
13300
|
+
const BASE = ALPHABET.length;
|
|
13301
|
+
const LEADER = ALPHABET.charAt(0);
|
|
13302
|
+
const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
|
|
13303
|
+
const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
|
|
13304
|
+
function encode (source) {
|
|
13305
|
+
// eslint-disable-next-line no-empty
|
|
13306
|
+
if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
|
|
13307
|
+
source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
13308
|
+
} else if (Array.isArray(source)) {
|
|
13309
|
+
source = Uint8Array.from(source);
|
|
13310
|
+
}
|
|
13311
|
+
if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
|
|
13312
|
+
if (source.length === 0) { return '' }
|
|
13313
|
+
// Skip & count leading zeroes.
|
|
13314
|
+
let zeroes = 0;
|
|
13315
|
+
let length = 0;
|
|
13316
|
+
let pbegin = 0;
|
|
13317
|
+
const pend = source.length;
|
|
13318
|
+
while (pbegin !== pend && source[pbegin] === 0) {
|
|
13319
|
+
pbegin++;
|
|
13320
|
+
zeroes++;
|
|
13321
|
+
}
|
|
13322
|
+
// Allocate enough space in big-endian base58 representation.
|
|
13323
|
+
const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
|
|
13324
|
+
const b58 = new Uint8Array(size);
|
|
13325
|
+
// Process the bytes.
|
|
13326
|
+
while (pbegin !== pend) {
|
|
13327
|
+
let carry = source[pbegin];
|
|
13328
|
+
// Apply "b58 = b58 * 256 + ch".
|
|
13329
|
+
let i = 0;
|
|
13330
|
+
for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
13331
|
+
carry += (256 * b58[it1]) >>> 0;
|
|
13332
|
+
b58[it1] = (carry % BASE) >>> 0;
|
|
13333
|
+
carry = (carry / BASE) >>> 0;
|
|
13334
|
+
}
|
|
13335
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
13336
|
+
length = i;
|
|
13337
|
+
pbegin++;
|
|
13338
|
+
}
|
|
13339
|
+
// Skip leading zeroes in base58 result.
|
|
13340
|
+
let it2 = size - length;
|
|
13341
|
+
while (it2 !== size && b58[it2] === 0) {
|
|
13342
|
+
it2++;
|
|
13343
|
+
}
|
|
13344
|
+
// Translate the result into a string.
|
|
13345
|
+
let str = LEADER.repeat(zeroes);
|
|
13346
|
+
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
13347
|
+
return str
|
|
13348
|
+
}
|
|
13349
|
+
function decodeUnsafe (source) {
|
|
13350
|
+
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
13351
|
+
if (source.length === 0) { return new Uint8Array() }
|
|
13352
|
+
let psz = 0;
|
|
13353
|
+
// Skip and count leading '1's.
|
|
13354
|
+
let zeroes = 0;
|
|
13355
|
+
let length = 0;
|
|
13356
|
+
while (source[psz] === LEADER) {
|
|
13357
|
+
zeroes++;
|
|
13358
|
+
psz++;
|
|
13359
|
+
}
|
|
13360
|
+
// Allocate enough space in big-endian base256 representation.
|
|
13361
|
+
const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
13362
|
+
const b256 = new Uint8Array(size);
|
|
13363
|
+
// Process the characters.
|
|
13364
|
+
while (psz < source.length) {
|
|
13365
|
+
// Find code of next character
|
|
13366
|
+
const charCode = source.charCodeAt(psz);
|
|
13367
|
+
// Base map can not be indexed using char code
|
|
13368
|
+
if (charCode > 255) { return }
|
|
13369
|
+
// Decode character
|
|
13370
|
+
let carry = BASE_MAP[charCode];
|
|
13371
|
+
// Invalid character
|
|
13372
|
+
if (carry === 255) { return }
|
|
13373
|
+
let i = 0;
|
|
13374
|
+
for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
13375
|
+
carry += (BASE * b256[it3]) >>> 0;
|
|
13376
|
+
b256[it3] = (carry % 256) >>> 0;
|
|
13377
|
+
carry = (carry / 256) >>> 0;
|
|
13378
|
+
}
|
|
13379
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
13380
|
+
length = i;
|
|
13381
|
+
psz++;
|
|
13382
|
+
}
|
|
13383
|
+
// Skip leading zeroes in b256.
|
|
13384
|
+
let it4 = size - length;
|
|
13385
|
+
while (it4 !== size && b256[it4] === 0) {
|
|
13386
|
+
it4++;
|
|
13387
|
+
}
|
|
13388
|
+
const vch = new Uint8Array(zeroes + (size - it4));
|
|
13389
|
+
let j = zeroes;
|
|
13390
|
+
while (it4 !== size) {
|
|
13391
|
+
vch[j++] = b256[it4++];
|
|
13392
|
+
}
|
|
13393
|
+
return vch
|
|
13394
|
+
}
|
|
13395
|
+
function decode (string) {
|
|
13396
|
+
const buffer = decodeUnsafe(string);
|
|
13397
|
+
if (buffer) { return buffer }
|
|
13398
|
+
throw new Error('Non-base' + BASE + ' character')
|
|
13399
|
+
}
|
|
13400
|
+
return {
|
|
13401
|
+
encode,
|
|
13402
|
+
decodeUnsafe,
|
|
13403
|
+
decode
|
|
13404
|
+
}
|
|
13405
|
+
}
|
|
13406
|
+
|
|
13407
|
+
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
13408
|
+
var base58 = base(ALPHABET);
|
|
13409
|
+
|
|
13410
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
13406
13411
|
__proto__: null,
|
|
13407
13412
|
default: base58
|
|
13408
|
-
}
|
|
13413
|
+
});
|
|
13409
13414
|
|
|
13410
13415
|
/**
|
|
13411
13416
|
* Privy Expo Auth Provider — React Native implementation of AuthProvider.
|
|
@@ -13762,7 +13767,6 @@ exports.base58 = base58;
|
|
|
13762
13767
|
exports.buildSetDocumentsTransaction = buildSetDocumentsTransaction;
|
|
13763
13768
|
exports.clearCache = clearCache;
|
|
13764
13769
|
exports.closeAllSubscriptions = closeAllSubscriptions;
|
|
13765
|
-
exports.commonjsRequire = commonjsRequire;
|
|
13766
13770
|
exports.confirmAndCheckTransaction = confirmAndCheckTransaction;
|
|
13767
13771
|
exports.convertRemainingAccounts = convertRemainingAccounts;
|
|
13768
13772
|
exports.count = count;
|
|
@@ -13792,7 +13796,6 @@ exports.onAuthLoadingChanged = onAuthLoadingChanged;
|
|
|
13792
13796
|
exports.onAuthStateChanged = onAuthStateChanged;
|
|
13793
13797
|
exports.reconnectWithNewAuth = reconnectWithNewAuth;
|
|
13794
13798
|
exports.refreshSession = refreshSession;
|
|
13795
|
-
exports.require$$0 = require$$0;
|
|
13796
13799
|
exports.runExpression = runExpression;
|
|
13797
13800
|
exports.runExpressionMany = runExpressionMany;
|
|
13798
13801
|
exports.runQuery = runQuery;
|
|
@@ -13809,4 +13812,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
|
|
|
13809
13812
|
exports.signTransaction = signTransaction;
|
|
13810
13813
|
exports.subscribe = subscribe;
|
|
13811
13814
|
exports.useAuth = useAuth;
|
|
13812
|
-
//# sourceMappingURL=index.native-
|
|
13815
|
+
//# sourceMappingURL=index.native-lubRe8nA.js.map
|