@pooflabs/web 0.0.80 → 0.0.81-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/auth/providers/phantom-wallet-provider.d.ts +20 -0
- package/dist/{index-BhfNMrC0.js → index-BSL3D7PC.js} +25 -883
- package/dist/index-BSL3D7PC.js.map +1 -0
- package/dist/{index-BNyxZ82q.js → index-BU6puWaY.js} +279 -275
- package/dist/index-BU6puWaY.js.map +1 -0
- package/dist/index-Bdcc5821.js +2375 -0
- package/dist/index-Bdcc5821.js.map +1 -0
- package/dist/{index-Db0NqU8R.esm.js → index-Cpw11-0x.esm.js} +279 -276
- package/dist/index-Cpw11-0x.esm.js.map +1 -0
- package/dist/index-CrOVJFX9.esm.js +2373 -0
- package/dist/index-CrOVJFX9.esm.js.map +1 -0
- package/dist/{index-COIUWugk.esm.js → index-CtwdL0-L.esm.js} +23 -881
- package/dist/index-CtwdL0-L.esm.js.map +1 -0
- package/dist/{index-BbtYb8sE.esm.js → index-DLfRKZI7.esm.js} +24 -882
- package/dist/index-DLfRKZI7.esm.js.map +1 -0
- package/dist/{index-BVi7fTm2.js → index-Fo9o33oZ.js} +24 -882
- package/dist/index-Fo9o33oZ.js.map +1 -0
- package/dist/index.browser-9JJy5Y7o.esm.js +119 -0
- package/dist/index.browser-9JJy5Y7o.esm.js.map +1 -0
- package/dist/index.browser-B4RzFwu2.js +1253 -0
- package/dist/index.browser-B4RzFwu2.js.map +1 -0
- package/dist/index.browser-C-_FEr5M.esm.js +1134 -0
- package/dist/index.browser-C-_FEr5M.esm.js.map +1 -0
- package/dist/{index.browser-8hyi2LOX.js → index.browser-CGfTdDXe.js} +1367 -1697
- package/dist/index.browser-CGfTdDXe.js.map +1 -0
- package/dist/index.browser-CQUvzkLr.js +122 -0
- package/dist/index.browser-CQUvzkLr.js.map +1 -0
- package/dist/index.browser-DjEZSiqI.js +1137 -0
- package/dist/index.browser-DjEZSiqI.js.map +1 -0
- package/dist/index.browser-Dzo4A2XB.esm.js +1250 -0
- package/dist/index.browser-Dzo4A2XB.esm.js.map +1 -0
- package/dist/{index.browser-BuHl80dp.esm.js → index.browser-HEDpODB5.esm.js} +1367 -1697
- package/dist/index.browser-HEDpODB5.esm.js.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-DUnE51Mx.js → index.native-DYI4vw0X.js} +186 -2669
- package/dist/index.native-DYI4vw0X.js.map +1 -0
- package/dist/{index.native-DuKhZcus.esm.js → index.native-UxpBL0TA.esm.js} +187 -2669
- package/dist/index.native-UxpBL0TA.esm.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-Cg-srwP4.js → phantom-wallet-provider-BPSAXPZ6.js} +127 -11
- package/dist/{phantom-wallet-provider-Cg-srwP4.js.map → phantom-wallet-provider-BPSAXPZ6.js.map} +1 -1
- package/dist/{phantom-wallet-provider--BJjVUA1.esm.js → phantom-wallet-provider-DcMJW18_.esm.js} +127 -11
- package/dist/{phantom-wallet-provider--BJjVUA1.esm.js.map → phantom-wallet-provider-DcMJW18_.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-BLcur3Ue.esm.js → privy-wallet-provider-CtIl8FgH.esm.js} +3 -3
- package/dist/privy-wallet-provider-CtIl8FgH.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-DpNVyaXa.js → privy-wallet-provider-Zu5K_vNN.js} +3 -3
- package/dist/privy-wallet-provider-Zu5K_vNN.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js → solana-mobile-wallet-provider-C31APzEp.esm.js} +4 -4
- package/dist/{solana-mobile-wallet-provider-CFaubssb.esm.js.map → solana-mobile-wallet-provider-C31APzEp.esm.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js → solana-mobile-wallet-provider-Dg9_h3QI.js} +4 -4
- package/dist/{solana-mobile-wallet-provider-zXAk2tfS.js.map → solana-mobile-wallet-provider-Dg9_h3QI.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BNyxZ82q.js.map +0 -1
- package/dist/index-BVi7fTm2.js.map +0 -1
- package/dist/index-BbtYb8sE.esm.js.map +0 -1
- package/dist/index-BhfNMrC0.js.map +0 -1
- package/dist/index-CKIoDkjJ.esm.js +0 -6
- package/dist/index-CKIoDkjJ.esm.js.map +0 -1
- package/dist/index-COIUWugk.esm.js.map +0 -1
- package/dist/index-CSraUgD6.js +0 -8
- package/dist/index-CSraUgD6.js.map +0 -1
- package/dist/index-Db0NqU8R.esm.js.map +0 -1
- package/dist/index.browser-8hyi2LOX.js.map +0 -1
- package/dist/index.browser-B4zXnffD.esm.js +0 -225
- package/dist/index.browser-B4zXnffD.esm.js.map +0 -1
- package/dist/index.browser-BJ_TdUVA.js +0 -228
- package/dist/index.browser-BJ_TdUVA.js.map +0 -1
- package/dist/index.browser-BkNaRRVe.js +0 -1222
- package/dist/index.browser-BkNaRRVe.js.map +0 -1
- package/dist/index.browser-BuHl80dp.esm.js.map +0 -1
- package/dist/index.browser-CnbxBj3-.esm.js +0 -1219
- package/dist/index.browser-CnbxBj3-.esm.js.map +0 -1
- package/dist/index.browser-OvGNsMPu.esm.js +0 -1002
- package/dist/index.browser-OvGNsMPu.esm.js.map +0 -1
- package/dist/index.browser-vuTr40so.js +0 -1008
- package/dist/index.browser-vuTr40so.js.map +0 -1
- package/dist/index.native-DUnE51Mx.js.map +0 -1
- package/dist/index.native-DuKhZcus.esm.js.map +0 -1
- package/dist/privy-wallet-provider-BLcur3Ue.esm.js.map +0 -1
- package/dist/privy-wallet-provider-DpNVyaXa.js.map +0 -1
|
@@ -4,21 +4,6 @@ import * as anchor from '@coral-xyz/anchor';
|
|
|
4
4
|
import { Program } from '@coral-xyz/anchor';
|
|
5
5
|
import * as React$2 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
|
-
|
|
22
7
|
function getDefaultExportFromCjs$1 (x) {
|
|
23
8
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
24
9
|
}
|
|
@@ -9252,15 +9237,15 @@ function requireBuffer$1 () {
|
|
|
9252
9237
|
|
|
9253
9238
|
var bufferExports$1 = requireBuffer$1();
|
|
9254
9239
|
|
|
9255
|
-
var safeBuffer
|
|
9240
|
+
var safeBuffer = {exports: {}};
|
|
9256
9241
|
|
|
9257
9242
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9258
9243
|
|
|
9259
|
-
var hasRequiredSafeBuffer
|
|
9244
|
+
var hasRequiredSafeBuffer;
|
|
9260
9245
|
|
|
9261
|
-
function requireSafeBuffer
|
|
9262
|
-
if (hasRequiredSafeBuffer
|
|
9263
|
-
hasRequiredSafeBuffer
|
|
9246
|
+
function requireSafeBuffer () {
|
|
9247
|
+
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
9248
|
+
hasRequiredSafeBuffer = 1;
|
|
9264
9249
|
(function (module, exports$1) {
|
|
9265
9250
|
/* eslint-disable node/no-deprecated-api */
|
|
9266
9251
|
var buffer = requireBuffer$1();
|
|
@@ -9326,23 +9311,23 @@ function requireSafeBuffer$1 () {
|
|
|
9326
9311
|
}
|
|
9327
9312
|
return buffer.SlowBuffer(size)
|
|
9328
9313
|
};
|
|
9329
|
-
} (safeBuffer
|
|
9330
|
-
return safeBuffer
|
|
9314
|
+
} (safeBuffer, safeBuffer.exports));
|
|
9315
|
+
return safeBuffer.exports;
|
|
9331
9316
|
}
|
|
9332
9317
|
|
|
9333
|
-
var src
|
|
9334
|
-
var hasRequiredSrc
|
|
9318
|
+
var src;
|
|
9319
|
+
var hasRequiredSrc;
|
|
9335
9320
|
|
|
9336
|
-
function requireSrc
|
|
9337
|
-
if (hasRequiredSrc
|
|
9338
|
-
hasRequiredSrc
|
|
9321
|
+
function requireSrc () {
|
|
9322
|
+
if (hasRequiredSrc) return src;
|
|
9323
|
+
hasRequiredSrc = 1;
|
|
9339
9324
|
// base-x encoding / decoding
|
|
9340
9325
|
// Copyright (c) 2018 base-x contributors
|
|
9341
9326
|
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
9342
9327
|
// Distributed under the MIT software license, see the accompanying
|
|
9343
9328
|
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
9344
9329
|
// @ts-ignore
|
|
9345
|
-
var _Buffer = requireSafeBuffer
|
|
9330
|
+
var _Buffer = requireSafeBuffer().Buffer;
|
|
9346
9331
|
function base (ALPHABET) {
|
|
9347
9332
|
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
9348
9333
|
var BASE_MAP = new Uint8Array(256);
|
|
@@ -9457,25 +9442,25 @@ function requireSrc$1 () {
|
|
|
9457
9442
|
decode: decode
|
|
9458
9443
|
}
|
|
9459
9444
|
}
|
|
9460
|
-
src
|
|
9461
|
-
return src
|
|
9445
|
+
src = base;
|
|
9446
|
+
return src;
|
|
9462
9447
|
}
|
|
9463
9448
|
|
|
9464
|
-
var bs58$1
|
|
9465
|
-
var hasRequiredBs58
|
|
9449
|
+
var bs58$1;
|
|
9450
|
+
var hasRequiredBs58;
|
|
9466
9451
|
|
|
9467
|
-
function requireBs58
|
|
9468
|
-
if (hasRequiredBs58
|
|
9469
|
-
hasRequiredBs58
|
|
9470
|
-
var basex = requireSrc
|
|
9452
|
+
function requireBs58 () {
|
|
9453
|
+
if (hasRequiredBs58) return bs58$1;
|
|
9454
|
+
hasRequiredBs58 = 1;
|
|
9455
|
+
var basex = requireSrc();
|
|
9471
9456
|
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9472
9457
|
|
|
9473
|
-
bs58$1
|
|
9474
|
-
return bs58$1
|
|
9458
|
+
bs58$1 = basex(ALPHABET);
|
|
9459
|
+
return bs58$1;
|
|
9475
9460
|
}
|
|
9476
9461
|
|
|
9477
|
-
var bs58Exports
|
|
9478
|
-
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports
|
|
9462
|
+
var bs58Exports = requireBs58();
|
|
9463
|
+
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
|
|
9479
9464
|
|
|
9480
9465
|
// ─────────────────────────────────────────────────────────────
|
|
9481
9466
|
// Local implementation of getSimulationComputeUnits
|
|
@@ -15663,7 +15648,7 @@ async function loadDependencies() {
|
|
|
15663
15648
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
15664
15649
|
import('react'),
|
|
15665
15650
|
import('react-dom/client'),
|
|
15666
|
-
import('./index-
|
|
15651
|
+
import('./index-CtwdL0-L.esm.js')
|
|
15667
15652
|
]);
|
|
15668
15653
|
// Extract default export from ESM module namespace
|
|
15669
15654
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -15706,8 +15691,13 @@ class PhantomWalletProvider {
|
|
|
15706
15691
|
async initializeAsync() {
|
|
15707
15692
|
// Lazy load dependencies only when actually instantiating
|
|
15708
15693
|
await loadDependencies();
|
|
15709
|
-
// Initialize React component
|
|
15710
|
-
|
|
15694
|
+
// Initialize React component eagerly only when there's a real reason to
|
|
15695
|
+
// (URL callback to consume, prior session to restore, in-page wallet,
|
|
15696
|
+
// or non-Android). Otherwise defer until ensureReady() is reached from
|
|
15697
|
+
// a user-gesture flow. See shouldMountEagerly() for the rationale.
|
|
15698
|
+
if (this.shouldMountEagerly()) {
|
|
15699
|
+
this.initialize();
|
|
15700
|
+
}
|
|
15711
15701
|
}
|
|
15712
15702
|
/**
|
|
15713
15703
|
* Check if social login providers are configured (non-injected providers).
|
|
@@ -15715,6 +15705,69 @@ class PhantomWalletProvider {
|
|
|
15715
15705
|
hasSocialProviders() {
|
|
15716
15706
|
return this.resolvedProviders.some(p => p !== 'injected');
|
|
15717
15707
|
}
|
|
15708
|
+
/**
|
|
15709
|
+
* Decide whether to mount the @phantom/react-sdk <PhantomProvider> tree
|
|
15710
|
+
* eagerly during init() or defer until the first user-triggered call
|
|
15711
|
+
* (login / sign / etc.) reaches ensureReady().
|
|
15712
|
+
*
|
|
15713
|
+
* Mounting the React tree synchronously constructs BrowserSDK, which runs
|
|
15714
|
+
* wallet-standard discovery in its constructor and fires sdk.autoConnect()
|
|
15715
|
+
* in a useEffect on mount. On Solana Seeker (Android Chrome PWA), both
|
|
15716
|
+
* pathways probe the Android intent surface to discover the Phantom mobile
|
|
15717
|
+
* app, which surfaces Chrome's system "wants to access other apps and
|
|
15718
|
+
* services" permission dialog *before* the PWA activity has window focus.
|
|
15719
|
+
* The dialog renders with grayed-out buttons until the user backgrounds
|
|
15720
|
+
* and resumes the app.
|
|
15721
|
+
*
|
|
15722
|
+
* Returns true when eager mount is needed (callback to handle, prior
|
|
15723
|
+
* session, in-page wallet present, or non-Android). Otherwise returns
|
|
15724
|
+
* false — the React tree is mounted lazily inside ensureReady() once a
|
|
15725
|
+
* user gesture brings us there.
|
|
15726
|
+
*/
|
|
15727
|
+
shouldMountEagerly() {
|
|
15728
|
+
if (typeof window === 'undefined')
|
|
15729
|
+
return false;
|
|
15730
|
+
// Preserve desktop behavior: always mount eagerly.
|
|
15731
|
+
if (!detectAndroid())
|
|
15732
|
+
return true;
|
|
15733
|
+
// In-page wallet present (Phantom in-app browser / desktop extension on
|
|
15734
|
+
// a desktop-mode Android UA): no Android intent probe needed, mount free.
|
|
15735
|
+
// Tighten beyond truthy `window.phantom` since arbitrary stubs can land
|
|
15736
|
+
// on that key — require a wallet-shaped surface.
|
|
15737
|
+
const ph = window.phantom;
|
|
15738
|
+
if (ph && (ph.solana || ph.ethereum || ph.app))
|
|
15739
|
+
return true;
|
|
15740
|
+
// Returning from a Phantom redirect (OAuth or deeplink hop). SDK must
|
|
15741
|
+
// be live to read these URL params via urlParamsAccessor.
|
|
15742
|
+
const callbackKeys = ['session_id', 'wallet_id', 'selected_account_index', 'error', 'error_description'];
|
|
15743
|
+
try {
|
|
15744
|
+
const params = new URLSearchParams(window.location.search);
|
|
15745
|
+
if (callbackKeys.some(k => params.has(k)))
|
|
15746
|
+
return true;
|
|
15747
|
+
}
|
|
15748
|
+
catch (_a) {
|
|
15749
|
+
return true; // conservative on URL access failure
|
|
15750
|
+
}
|
|
15751
|
+
// Returning user with a stored Phantom session. They've already
|
|
15752
|
+
// approved the Android intent permission for this origin on first
|
|
15753
|
+
// login, so the dialog is typically pre-granted by Chrome — eager
|
|
15754
|
+
// mount lets autoConnect silently restore the wallet handshake.
|
|
15755
|
+
// Require BOTH the marker AND a session storage entry so a stale
|
|
15756
|
+
// orphaned marker doesn't keep eager-mounting forever. Note
|
|
15757
|
+
// isAuthenticated() is a raw key-existence check, not a validity
|
|
15758
|
+
// check — restoreSession() above clears the marker on the next load
|
|
15759
|
+
// if the session is unusable, so the bug self-corrects after at
|
|
15760
|
+
// most one further cold start.
|
|
15761
|
+
try {
|
|
15762
|
+
const stored = getPlatform().storage.getItem('tarobase_last_auth_method');
|
|
15763
|
+
if (stored === 'phantom' && WebSessionManager.isAuthenticated())
|
|
15764
|
+
return true;
|
|
15765
|
+
}
|
|
15766
|
+
catch (_b) {
|
|
15767
|
+
return true;
|
|
15768
|
+
}
|
|
15769
|
+
return false;
|
|
15770
|
+
}
|
|
15718
15771
|
static getInstance(networkUrl, config) {
|
|
15719
15772
|
if (!PhantomWalletProvider.instance) {
|
|
15720
15773
|
new PhantomWalletProvider(networkUrl, config);
|
|
@@ -16391,6 +16444,13 @@ class PhantomWalletProvider {
|
|
|
16391
16444
|
if (this.initPromise) {
|
|
16392
16445
|
await this.initPromise;
|
|
16393
16446
|
}
|
|
16447
|
+
// Lazy-mount path: if initializeAsync deferred the React mount (e.g.
|
|
16448
|
+
// first-time visitor on Android Chrome PWA), do it now. We're being
|
|
16449
|
+
// called from a user-gesture flow like login(), so any Android intent
|
|
16450
|
+
// dialog that surfaces will appear with the activity already focused.
|
|
16451
|
+
if (!this.containerElement) {
|
|
16452
|
+
this.initialize();
|
|
16453
|
+
}
|
|
16394
16454
|
// Wait for SDK to be ready
|
|
16395
16455
|
await new Promise((resolve) => {
|
|
16396
16456
|
const check = () => {
|
|
@@ -16500,12 +16560,53 @@ class PhantomWalletProvider {
|
|
|
16500
16560
|
});
|
|
16501
16561
|
}
|
|
16502
16562
|
async restoreSession() {
|
|
16503
|
-
|
|
16504
|
-
|
|
16505
|
-
|
|
16506
|
-
|
|
16563
|
+
// Read from storage directly. Do NOT ensureReady() here — that would
|
|
16564
|
+
// mount @phantom/react-sdk's <PhantomProvider> during init(), which
|
|
16565
|
+
// synchronously constructs BrowserSDK (running wallet-standard discovery)
|
|
16566
|
+
// and fires sdk.autoConnect() — both probing the Android intent surface
|
|
16567
|
+
// before the PWA activity has window focus on Solana Seeker. The
|
|
16568
|
+
// resulting "access other apps and services" system dialog renders
|
|
16569
|
+
// with grayed-out buttons.
|
|
16570
|
+
//
|
|
16571
|
+
// Wrap getSession() in try/catch: WebSessionManager.getSession() runs
|
|
16572
|
+
// JSON.parse on the stored session *outside* its internal try/catch,
|
|
16573
|
+
// so genuinely malformed JSON in localStorage would propagate through
|
|
16574
|
+
// restoreSession() and break init() entirely. Treat any throw as
|
|
16575
|
+
// "no session" and fall through to the cleanup path so corrupted
|
|
16576
|
+
// storage is recoverable on next load.
|
|
16577
|
+
let session;
|
|
16578
|
+
try {
|
|
16579
|
+
session = await WebSessionManager.getSession();
|
|
16507
16580
|
}
|
|
16508
|
-
|
|
16581
|
+
catch (_a) {
|
|
16582
|
+
session = null;
|
|
16583
|
+
}
|
|
16584
|
+
if (!session) {
|
|
16585
|
+
// Tidy up storage so we don't leave junk behind:
|
|
16586
|
+
// (a) clearSession() removes any stale or unparseable session
|
|
16587
|
+
// storage entry. WebSessionManager.getSession() can't reach
|
|
16588
|
+
// its own clearSession() if JSON.parse threw. Idempotent —
|
|
16589
|
+
// safe to call unconditionally here.
|
|
16590
|
+
// (b) Drop the auth-method marker if it's stale.
|
|
16591
|
+
// WebSessionManager.clearSession() only removes the session
|
|
16592
|
+
// storage key, not the marker — so without this cleanup
|
|
16593
|
+
// shouldMountEagerly() would keep eager-mounting on every
|
|
16594
|
+
// future cold start.
|
|
16595
|
+
try {
|
|
16596
|
+
WebSessionManager.clearSession();
|
|
16597
|
+
}
|
|
16598
|
+
catch ( /* best-effort */_b) { /* best-effort */ }
|
|
16599
|
+
try {
|
|
16600
|
+
if (getPlatform().storage.getItem('tarobase_last_auth_method') === 'phantom') {
|
|
16601
|
+
getPlatform().storage.removeItem('tarobase_last_auth_method');
|
|
16602
|
+
}
|
|
16603
|
+
}
|
|
16604
|
+
catch (_c) {
|
|
16605
|
+
// storage unavailable — best-effort cleanup
|
|
16606
|
+
}
|
|
16607
|
+
return null;
|
|
16608
|
+
}
|
|
16609
|
+
return { provider: this, address: session.address };
|
|
16509
16610
|
}
|
|
16510
16611
|
async address() {
|
|
16511
16612
|
var _a, _b, _c, _d;
|
|
@@ -19996,235 +20097,137 @@ function createSolanaRpcSubscriptionsFromTransport(transport) {
|
|
|
19996
20097
|
});
|
|
19997
20098
|
}
|
|
19998
20099
|
|
|
19999
|
-
|
|
20000
|
-
|
|
20001
|
-
|
|
20002
|
-
|
|
20003
|
-
|
|
20004
|
-
|
|
20005
|
-
|
|
20006
|
-
|
|
20007
|
-
|
|
20008
|
-
|
|
20009
|
-
|
|
20010
|
-
|
|
20011
|
-
|
|
20012
|
-
|
|
20013
|
-
|
|
20014
|
-
|
|
20015
|
-
|
|
20016
|
-
|
|
20017
|
-
|
|
20018
|
-
|
|
20019
|
-
|
|
20020
|
-
|
|
20021
|
-
|
|
20022
|
-
|
|
20023
|
-
|
|
20024
|
-
|
|
20025
|
-
|
|
20026
|
-
|
|
20027
|
-
|
|
20028
|
-
|
|
20029
|
-
|
|
20030
|
-
|
|
20031
|
-
|
|
20032
|
-
|
|
20033
|
-
|
|
20034
|
-
|
|
20035
|
-
|
|
20036
|
-
|
|
20037
|
-
|
|
20038
|
-
|
|
20039
|
-
|
|
20040
|
-
|
|
20041
|
-
|
|
20042
|
-
|
|
20043
|
-
|
|
20044
|
-
|
|
20045
|
-
|
|
20046
|
-
|
|
20047
|
-
|
|
20048
|
-
|
|
20049
|
-
|
|
20050
|
-
|
|
20051
|
-
|
|
20052
|
-
|
|
20053
|
-
|
|
20054
|
-
|
|
20055
|
-
|
|
20056
|
-
|
|
20057
|
-
|
|
20058
|
-
|
|
20059
|
-
|
|
20060
|
-
|
|
20061
|
-
|
|
20062
|
-
|
|
20063
|
-
|
|
20064
|
-
|
|
20065
|
-
|
|
20066
|
-
|
|
20067
|
-
|
|
20068
|
-
|
|
20069
|
-
|
|
20070
|
-
|
|
20071
|
-
|
|
20072
|
-
|
|
20073
|
-
|
|
20074
|
-
|
|
20075
|
-
}
|
|
20076
|
-
|
|
20077
|
-
|
|
20078
|
-
|
|
20079
|
-
|
|
20080
|
-
|
|
20081
|
-
|
|
20082
|
-
|
|
20083
|
-
|
|
20084
|
-
|
|
20085
|
-
|
|
20086
|
-
|
|
20087
|
-
|
|
20088
|
-
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
|
|
20093
|
-
|
|
20094
|
-
|
|
20095
|
-
|
|
20096
|
-
|
|
20097
|
-
|
|
20098
|
-
|
|
20099
|
-
|
|
20100
|
-
|
|
20101
|
-
|
|
20102
|
-
|
|
20103
|
-
|
|
20104
|
-
|
|
20105
|
-
|
|
20106
|
-
|
|
20107
|
-
|
|
20108
|
-
|
|
20109
|
-
|
|
20110
|
-
|
|
20111
|
-
|
|
20112
|
-
|
|
20113
|
-
|
|
20114
|
-
|
|
20115
|
-
|
|
20116
|
-
|
|
20117
|
-
|
|
20118
|
-
|
|
20119
|
-
|
|
20120
|
-
|
|
20121
|
-
var b58 = new Uint8Array(size);
|
|
20122
|
-
// Process the bytes.
|
|
20123
|
-
while (pbegin !== pend) {
|
|
20124
|
-
var carry = source[pbegin];
|
|
20125
|
-
// Apply "b58 = b58 * 256 + ch".
|
|
20126
|
-
var i = 0;
|
|
20127
|
-
for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
20128
|
-
carry += (256 * b58[it1]) >>> 0;
|
|
20129
|
-
b58[it1] = (carry % BASE) >>> 0;
|
|
20130
|
-
carry = (carry / BASE) >>> 0;
|
|
20131
|
-
}
|
|
20132
|
-
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20133
|
-
length = i;
|
|
20134
|
-
pbegin++;
|
|
20135
|
-
}
|
|
20136
|
-
// Skip leading zeroes in base58 result.
|
|
20137
|
-
var it2 = size - length;
|
|
20138
|
-
while (it2 !== size && b58[it2] === 0) {
|
|
20139
|
-
it2++;
|
|
20140
|
-
}
|
|
20141
|
-
// Translate the result into a string.
|
|
20142
|
-
var str = LEADER.repeat(zeroes);
|
|
20143
|
-
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
20144
|
-
return str
|
|
20145
|
-
}
|
|
20146
|
-
function decodeUnsafe (source) {
|
|
20147
|
-
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
20148
|
-
if (source.length === 0) { return _Buffer.alloc(0) }
|
|
20149
|
-
var psz = 0;
|
|
20150
|
-
// Skip and count leading '1's.
|
|
20151
|
-
var zeroes = 0;
|
|
20152
|
-
var length = 0;
|
|
20153
|
-
while (source[psz] === LEADER) {
|
|
20154
|
-
zeroes++;
|
|
20155
|
-
psz++;
|
|
20156
|
-
}
|
|
20157
|
-
// Allocate enough space in big-endian base256 representation.
|
|
20158
|
-
var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
20159
|
-
var b256 = new Uint8Array(size);
|
|
20160
|
-
// Process the characters.
|
|
20161
|
-
while (psz < source.length) {
|
|
20162
|
-
// Find code of next character
|
|
20163
|
-
var charCode = source.charCodeAt(psz);
|
|
20164
|
-
// Base map can not be indexed using char code
|
|
20165
|
-
if (charCode > 255) { return }
|
|
20166
|
-
// Decode character
|
|
20167
|
-
var carry = BASE_MAP[charCode];
|
|
20168
|
-
// Invalid character
|
|
20169
|
-
if (carry === 255) { return }
|
|
20170
|
-
var i = 0;
|
|
20171
|
-
for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
20172
|
-
carry += (BASE * b256[it3]) >>> 0;
|
|
20173
|
-
b256[it3] = (carry % 256) >>> 0;
|
|
20174
|
-
carry = (carry / 256) >>> 0;
|
|
20175
|
-
}
|
|
20176
|
-
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20177
|
-
length = i;
|
|
20178
|
-
psz++;
|
|
20179
|
-
}
|
|
20180
|
-
// Skip leading zeroes in b256.
|
|
20181
|
-
var it4 = size - length;
|
|
20182
|
-
while (it4 !== size && b256[it4] === 0) {
|
|
20183
|
-
it4++;
|
|
20184
|
-
}
|
|
20185
|
-
var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
|
|
20186
|
-
vch.fill(0x00, 0, zeroes);
|
|
20187
|
-
var j = zeroes;
|
|
20188
|
-
while (it4 !== size) {
|
|
20189
|
-
vch[j++] = b256[it4++];
|
|
20190
|
-
}
|
|
20191
|
-
return vch
|
|
20192
|
-
}
|
|
20193
|
-
function decode (string) {
|
|
20194
|
-
var buffer = decodeUnsafe(string);
|
|
20195
|
-
if (buffer) { return buffer }
|
|
20196
|
-
throw new Error('Non-base' + BASE + ' character')
|
|
20197
|
-
}
|
|
20198
|
-
return {
|
|
20199
|
-
encode: encode,
|
|
20200
|
-
decodeUnsafe: decodeUnsafe,
|
|
20201
|
-
decode: decode
|
|
20202
|
-
}
|
|
20203
|
-
}
|
|
20204
|
-
src = base;
|
|
20205
|
-
return src;
|
|
20206
|
-
}
|
|
20207
|
-
|
|
20208
|
-
var bs58$1;
|
|
20209
|
-
var hasRequiredBs58;
|
|
20210
|
-
|
|
20211
|
-
function requireBs58 () {
|
|
20212
|
-
if (hasRequiredBs58) return bs58$1;
|
|
20213
|
-
hasRequiredBs58 = 1;
|
|
20214
|
-
var basex = requireSrc();
|
|
20215
|
-
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
20216
|
-
|
|
20217
|
-
bs58$1 = basex(ALPHABET);
|
|
20218
|
-
return bs58$1;
|
|
20100
|
+
// base-x encoding / decoding
|
|
20101
|
+
// Copyright (c) 2018 base-x contributors
|
|
20102
|
+
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
20103
|
+
// Distributed under the MIT software license, see the accompanying
|
|
20104
|
+
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
20105
|
+
function base (ALPHABET) {
|
|
20106
|
+
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
20107
|
+
const BASE_MAP = new Uint8Array(256);
|
|
20108
|
+
for (let j = 0; j < BASE_MAP.length; j++) {
|
|
20109
|
+
BASE_MAP[j] = 255;
|
|
20110
|
+
}
|
|
20111
|
+
for (let i = 0; i < ALPHABET.length; i++) {
|
|
20112
|
+
const x = ALPHABET.charAt(i);
|
|
20113
|
+
const xc = x.charCodeAt(0);
|
|
20114
|
+
if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
|
|
20115
|
+
BASE_MAP[xc] = i;
|
|
20116
|
+
}
|
|
20117
|
+
const BASE = ALPHABET.length;
|
|
20118
|
+
const LEADER = ALPHABET.charAt(0);
|
|
20119
|
+
const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
|
|
20120
|
+
const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
|
|
20121
|
+
function encode (source) {
|
|
20122
|
+
// eslint-disable-next-line no-empty
|
|
20123
|
+
if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
|
|
20124
|
+
source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
20125
|
+
} else if (Array.isArray(source)) {
|
|
20126
|
+
source = Uint8Array.from(source);
|
|
20127
|
+
}
|
|
20128
|
+
if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
|
|
20129
|
+
if (source.length === 0) { return '' }
|
|
20130
|
+
// Skip & count leading zeroes.
|
|
20131
|
+
let zeroes = 0;
|
|
20132
|
+
let length = 0;
|
|
20133
|
+
let pbegin = 0;
|
|
20134
|
+
const pend = source.length;
|
|
20135
|
+
while (pbegin !== pend && source[pbegin] === 0) {
|
|
20136
|
+
pbegin++;
|
|
20137
|
+
zeroes++;
|
|
20138
|
+
}
|
|
20139
|
+
// Allocate enough space in big-endian base58 representation.
|
|
20140
|
+
const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
|
|
20141
|
+
const b58 = new Uint8Array(size);
|
|
20142
|
+
// Process the bytes.
|
|
20143
|
+
while (pbegin !== pend) {
|
|
20144
|
+
let carry = source[pbegin];
|
|
20145
|
+
// Apply "b58 = b58 * 256 + ch".
|
|
20146
|
+
let i = 0;
|
|
20147
|
+
for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
20148
|
+
carry += (256 * b58[it1]) >>> 0;
|
|
20149
|
+
b58[it1] = (carry % BASE) >>> 0;
|
|
20150
|
+
carry = (carry / BASE) >>> 0;
|
|
20151
|
+
}
|
|
20152
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20153
|
+
length = i;
|
|
20154
|
+
pbegin++;
|
|
20155
|
+
}
|
|
20156
|
+
// Skip leading zeroes in base58 result.
|
|
20157
|
+
let it2 = size - length;
|
|
20158
|
+
while (it2 !== size && b58[it2] === 0) {
|
|
20159
|
+
it2++;
|
|
20160
|
+
}
|
|
20161
|
+
// Translate the result into a string.
|
|
20162
|
+
let str = LEADER.repeat(zeroes);
|
|
20163
|
+
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
20164
|
+
return str
|
|
20165
|
+
}
|
|
20166
|
+
function decodeUnsafe (source) {
|
|
20167
|
+
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
20168
|
+
if (source.length === 0) { return new Uint8Array() }
|
|
20169
|
+
let psz = 0;
|
|
20170
|
+
// Skip and count leading '1's.
|
|
20171
|
+
let zeroes = 0;
|
|
20172
|
+
let length = 0;
|
|
20173
|
+
while (source[psz] === LEADER) {
|
|
20174
|
+
zeroes++;
|
|
20175
|
+
psz++;
|
|
20176
|
+
}
|
|
20177
|
+
// Allocate enough space in big-endian base256 representation.
|
|
20178
|
+
const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
20179
|
+
const b256 = new Uint8Array(size);
|
|
20180
|
+
// Process the characters.
|
|
20181
|
+
while (psz < source.length) {
|
|
20182
|
+
// Find code of next character
|
|
20183
|
+
const charCode = source.charCodeAt(psz);
|
|
20184
|
+
// Base map can not be indexed using char code
|
|
20185
|
+
if (charCode > 255) { return }
|
|
20186
|
+
// Decode character
|
|
20187
|
+
let carry = BASE_MAP[charCode];
|
|
20188
|
+
// Invalid character
|
|
20189
|
+
if (carry === 255) { return }
|
|
20190
|
+
let i = 0;
|
|
20191
|
+
for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
20192
|
+
carry += (BASE * b256[it3]) >>> 0;
|
|
20193
|
+
b256[it3] = (carry % 256) >>> 0;
|
|
20194
|
+
carry = (carry / 256) >>> 0;
|
|
20195
|
+
}
|
|
20196
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20197
|
+
length = i;
|
|
20198
|
+
psz++;
|
|
20199
|
+
}
|
|
20200
|
+
// Skip leading zeroes in b256.
|
|
20201
|
+
let it4 = size - length;
|
|
20202
|
+
while (it4 !== size && b256[it4] === 0) {
|
|
20203
|
+
it4++;
|
|
20204
|
+
}
|
|
20205
|
+
const vch = new Uint8Array(zeroes + (size - it4));
|
|
20206
|
+
let j = zeroes;
|
|
20207
|
+
while (it4 !== size) {
|
|
20208
|
+
vch[j++] = b256[it4++];
|
|
20209
|
+
}
|
|
20210
|
+
return vch
|
|
20211
|
+
}
|
|
20212
|
+
function decode (string) {
|
|
20213
|
+
const buffer = decodeUnsafe(string);
|
|
20214
|
+
if (buffer) { return buffer }
|
|
20215
|
+
throw new Error('Non-base' + BASE + ' character')
|
|
20216
|
+
}
|
|
20217
|
+
return {
|
|
20218
|
+
encode,
|
|
20219
|
+
decodeUnsafe,
|
|
20220
|
+
decode
|
|
20221
|
+
}
|
|
20219
20222
|
}
|
|
20220
20223
|
|
|
20221
|
-
var
|
|
20222
|
-
var bs58 =
|
|
20224
|
+
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
20225
|
+
var bs58 = base(ALPHABET);
|
|
20223
20226
|
|
|
20224
|
-
var index = /*#__PURE__*/
|
|
20227
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
20225
20228
|
__proto__: null,
|
|
20226
20229
|
default: bs58
|
|
20227
|
-
}
|
|
20230
|
+
});
|
|
20228
20231
|
|
|
20229
20232
|
const SURFNET_RPC_URL$1 = "https://surfpool.fly.dev";
|
|
20230
20233
|
let React;
|
|
@@ -21138,7 +21141,7 @@ async function loadMwaProtocol() {
|
|
|
21138
21141
|
return mwaProtocolLoadPromise;
|
|
21139
21142
|
mwaProtocolLoadPromise = (async () => {
|
|
21140
21143
|
try {
|
|
21141
|
-
mwaProtocolModule = await import('./index.browser-
|
|
21144
|
+
mwaProtocolModule = await import('./index.browser-9JJy5Y7o.esm.js');
|
|
21142
21145
|
}
|
|
21143
21146
|
catch (e) {
|
|
21144
21147
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -21160,7 +21163,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
21160
21163
|
if (typeof window === 'undefined')
|
|
21161
21164
|
return;
|
|
21162
21165
|
try {
|
|
21163
|
-
const walletStandardMobile = await import('./index.browser-
|
|
21166
|
+
const walletStandardMobile = await import('./index.browser-HEDpODB5.esm.js');
|
|
21164
21167
|
const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
|
|
21165
21168
|
if (!registerMwa) {
|
|
21166
21169
|
console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
|
|
@@ -22068,5 +22071,5 @@ class PrivyExpoProvider {
|
|
|
22068
22071
|
}
|
|
22069
22072
|
}
|
|
22070
22073
|
|
|
22071
|
-
export {
|
|
22072
|
-
//# sourceMappingURL=index-
|
|
22074
|
+
export { getCachedData as $, subscribe as A, useAuth as B, deserializeTransaction as C, getIdToken as D, setPlatform as E, getPlatform as F, PrivyWalletProvider as G, DEFAULT_TEST_ADDRESS as H, isMobileWalletAvailable as I, registerMobileWalletAdapter as J, PrivyExpoProvider as K, InsufficientBalanceError as L, MockAuthProvider as M, ServerSessionManager as N, OffchainAuthProvider as O, PhantomWalletProvider as P, buildSetDocumentsTransaction as Q, ReactNativeSessionManager as R, SolanaMobileWalletProvider as S, clearCache as T, closeAllSubscriptions as U, convertRemainingAccounts as V, WebSessionManager as W, createSessionWithPrivy as X, createSessionWithSignature as Y, genAuthNonce as Z, genSolanaMessage as _, bs58 as a, getMany as a0, reconnectWithNewAuth as a1, refreshSession as a2, signSessionCreateMessage as a3, bufferExports as b, getCurrentUser as c, onAuthLoadingChanged as d, getAuthLoading as e, logout as f, getDefaultExportFromCjs$1 as g, getConfig as h, init as i, getAuthProvider as j, get as k, login as l, setMany as m, setFile as n, onAuthStateChanged as o, getFiles as p, runQueryMany as q, runQuery as r, set as s, runExpression as t, runExpressionMany as u, signMessage as v, signTransaction as w, signAndSubmitTransaction as x, count as y, aggregate as z };
|
|
22075
|
+
//# sourceMappingURL=index-Cpw11-0x.esm.js.map
|