@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
|
@@ -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$2);
|
|
42
27
|
|
|
@@ -9273,15 +9258,15 @@ function requireBuffer$1 () {
|
|
|
9273
9258
|
|
|
9274
9259
|
var bufferExports$1 = requireBuffer$1();
|
|
9275
9260
|
|
|
9276
|
-
var safeBuffer
|
|
9261
|
+
var safeBuffer = {exports: {}};
|
|
9277
9262
|
|
|
9278
9263
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9279
9264
|
|
|
9280
|
-
var hasRequiredSafeBuffer
|
|
9265
|
+
var hasRequiredSafeBuffer;
|
|
9281
9266
|
|
|
9282
|
-
function requireSafeBuffer
|
|
9283
|
-
if (hasRequiredSafeBuffer
|
|
9284
|
-
hasRequiredSafeBuffer
|
|
9267
|
+
function requireSafeBuffer () {
|
|
9268
|
+
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
9269
|
+
hasRequiredSafeBuffer = 1;
|
|
9285
9270
|
(function (module, exports$1) {
|
|
9286
9271
|
/* eslint-disable node/no-deprecated-api */
|
|
9287
9272
|
var buffer = requireBuffer$1();
|
|
@@ -9347,23 +9332,23 @@ function requireSafeBuffer$1 () {
|
|
|
9347
9332
|
}
|
|
9348
9333
|
return buffer.SlowBuffer(size)
|
|
9349
9334
|
};
|
|
9350
|
-
} (safeBuffer
|
|
9351
|
-
return safeBuffer
|
|
9335
|
+
} (safeBuffer, safeBuffer.exports));
|
|
9336
|
+
return safeBuffer.exports;
|
|
9352
9337
|
}
|
|
9353
9338
|
|
|
9354
|
-
var src
|
|
9355
|
-
var hasRequiredSrc
|
|
9339
|
+
var src;
|
|
9340
|
+
var hasRequiredSrc;
|
|
9356
9341
|
|
|
9357
|
-
function requireSrc
|
|
9358
|
-
if (hasRequiredSrc
|
|
9359
|
-
hasRequiredSrc
|
|
9342
|
+
function requireSrc () {
|
|
9343
|
+
if (hasRequiredSrc) return src;
|
|
9344
|
+
hasRequiredSrc = 1;
|
|
9360
9345
|
// base-x encoding / decoding
|
|
9361
9346
|
// Copyright (c) 2018 base-x contributors
|
|
9362
9347
|
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
9363
9348
|
// Distributed under the MIT software license, see the accompanying
|
|
9364
9349
|
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
9365
9350
|
// @ts-ignore
|
|
9366
|
-
var _Buffer = requireSafeBuffer
|
|
9351
|
+
var _Buffer = requireSafeBuffer().Buffer;
|
|
9367
9352
|
function base (ALPHABET) {
|
|
9368
9353
|
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
9369
9354
|
var BASE_MAP = new Uint8Array(256);
|
|
@@ -9478,25 +9463,25 @@ function requireSrc$1 () {
|
|
|
9478
9463
|
decode: decode
|
|
9479
9464
|
}
|
|
9480
9465
|
}
|
|
9481
|
-
src
|
|
9482
|
-
return src
|
|
9466
|
+
src = base;
|
|
9467
|
+
return src;
|
|
9483
9468
|
}
|
|
9484
9469
|
|
|
9485
|
-
var bs58$1
|
|
9486
|
-
var hasRequiredBs58
|
|
9470
|
+
var bs58$1;
|
|
9471
|
+
var hasRequiredBs58;
|
|
9487
9472
|
|
|
9488
|
-
function requireBs58
|
|
9489
|
-
if (hasRequiredBs58
|
|
9490
|
-
hasRequiredBs58
|
|
9491
|
-
var basex = requireSrc
|
|
9473
|
+
function requireBs58 () {
|
|
9474
|
+
if (hasRequiredBs58) return bs58$1;
|
|
9475
|
+
hasRequiredBs58 = 1;
|
|
9476
|
+
var basex = requireSrc();
|
|
9492
9477
|
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9493
9478
|
|
|
9494
|
-
bs58$1
|
|
9495
|
-
return bs58$1
|
|
9479
|
+
bs58$1 = basex(ALPHABET);
|
|
9480
|
+
return bs58$1;
|
|
9496
9481
|
}
|
|
9497
9482
|
|
|
9498
|
-
var bs58Exports
|
|
9499
|
-
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports
|
|
9483
|
+
var bs58Exports = requireBs58();
|
|
9484
|
+
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
|
|
9500
9485
|
|
|
9501
9486
|
// ─────────────────────────────────────────────────────────────
|
|
9502
9487
|
// Local implementation of getSimulationComputeUnits
|
|
@@ -15684,7 +15669,7 @@ async function loadDependencies() {
|
|
|
15684
15669
|
const [reactModule, reactDomModule, phantomModule] = await Promise.all([
|
|
15685
15670
|
import('react'),
|
|
15686
15671
|
import('react-dom/client'),
|
|
15687
|
-
Promise.resolve().then(function () { return require('./index-
|
|
15672
|
+
Promise.resolve().then(function () { return require('./index-Fo9o33oZ.js'); })
|
|
15688
15673
|
]);
|
|
15689
15674
|
// Extract default export from ESM module namespace
|
|
15690
15675
|
// Dynamic import() returns { default: Module, ...exports }, not the module directly
|
|
@@ -15727,8 +15712,13 @@ class PhantomWalletProvider {
|
|
|
15727
15712
|
async initializeAsync() {
|
|
15728
15713
|
// Lazy load dependencies only when actually instantiating
|
|
15729
15714
|
await loadDependencies();
|
|
15730
|
-
// Initialize React component
|
|
15731
|
-
|
|
15715
|
+
// Initialize React component eagerly only when there's a real reason to
|
|
15716
|
+
// (URL callback to consume, prior session to restore, in-page wallet,
|
|
15717
|
+
// or non-Android). Otherwise defer until ensureReady() is reached from
|
|
15718
|
+
// a user-gesture flow. See shouldMountEagerly() for the rationale.
|
|
15719
|
+
if (this.shouldMountEagerly()) {
|
|
15720
|
+
this.initialize();
|
|
15721
|
+
}
|
|
15732
15722
|
}
|
|
15733
15723
|
/**
|
|
15734
15724
|
* Check if social login providers are configured (non-injected providers).
|
|
@@ -15736,6 +15726,69 @@ class PhantomWalletProvider {
|
|
|
15736
15726
|
hasSocialProviders() {
|
|
15737
15727
|
return this.resolvedProviders.some(p => p !== 'injected');
|
|
15738
15728
|
}
|
|
15729
|
+
/**
|
|
15730
|
+
* Decide whether to mount the @phantom/react-sdk <PhantomProvider> tree
|
|
15731
|
+
* eagerly during init() or defer until the first user-triggered call
|
|
15732
|
+
* (login / sign / etc.) reaches ensureReady().
|
|
15733
|
+
*
|
|
15734
|
+
* Mounting the React tree synchronously constructs BrowserSDK, which runs
|
|
15735
|
+
* wallet-standard discovery in its constructor and fires sdk.autoConnect()
|
|
15736
|
+
* in a useEffect on mount. On Solana Seeker (Android Chrome PWA), both
|
|
15737
|
+
* pathways probe the Android intent surface to discover the Phantom mobile
|
|
15738
|
+
* app, which surfaces Chrome's system "wants to access other apps and
|
|
15739
|
+
* services" permission dialog *before* the PWA activity has window focus.
|
|
15740
|
+
* The dialog renders with grayed-out buttons until the user backgrounds
|
|
15741
|
+
* and resumes the app.
|
|
15742
|
+
*
|
|
15743
|
+
* Returns true when eager mount is needed (callback to handle, prior
|
|
15744
|
+
* session, in-page wallet present, or non-Android). Otherwise returns
|
|
15745
|
+
* false — the React tree is mounted lazily inside ensureReady() once a
|
|
15746
|
+
* user gesture brings us there.
|
|
15747
|
+
*/
|
|
15748
|
+
shouldMountEagerly() {
|
|
15749
|
+
if (typeof window === 'undefined')
|
|
15750
|
+
return false;
|
|
15751
|
+
// Preserve desktop behavior: always mount eagerly.
|
|
15752
|
+
if (!detectAndroid())
|
|
15753
|
+
return true;
|
|
15754
|
+
// In-page wallet present (Phantom in-app browser / desktop extension on
|
|
15755
|
+
// a desktop-mode Android UA): no Android intent probe needed, mount free.
|
|
15756
|
+
// Tighten beyond truthy `window.phantom` since arbitrary stubs can land
|
|
15757
|
+
// on that key — require a wallet-shaped surface.
|
|
15758
|
+
const ph = window.phantom;
|
|
15759
|
+
if (ph && (ph.solana || ph.ethereum || ph.app))
|
|
15760
|
+
return true;
|
|
15761
|
+
// Returning from a Phantom redirect (OAuth or deeplink hop). SDK must
|
|
15762
|
+
// be live to read these URL params via urlParamsAccessor.
|
|
15763
|
+
const callbackKeys = ['session_id', 'wallet_id', 'selected_account_index', 'error', 'error_description'];
|
|
15764
|
+
try {
|
|
15765
|
+
const params = new URLSearchParams(window.location.search);
|
|
15766
|
+
if (callbackKeys.some(k => params.has(k)))
|
|
15767
|
+
return true;
|
|
15768
|
+
}
|
|
15769
|
+
catch (_a) {
|
|
15770
|
+
return true; // conservative on URL access failure
|
|
15771
|
+
}
|
|
15772
|
+
// Returning user with a stored Phantom session. They've already
|
|
15773
|
+
// approved the Android intent permission for this origin on first
|
|
15774
|
+
// login, so the dialog is typically pre-granted by Chrome — eager
|
|
15775
|
+
// mount lets autoConnect silently restore the wallet handshake.
|
|
15776
|
+
// Require BOTH the marker AND a session storage entry so a stale
|
|
15777
|
+
// orphaned marker doesn't keep eager-mounting forever. Note
|
|
15778
|
+
// isAuthenticated() is a raw key-existence check, not a validity
|
|
15779
|
+
// check — restoreSession() above clears the marker on the next load
|
|
15780
|
+
// if the session is unusable, so the bug self-corrects after at
|
|
15781
|
+
// most one further cold start.
|
|
15782
|
+
try {
|
|
15783
|
+
const stored = getPlatform().storage.getItem('tarobase_last_auth_method');
|
|
15784
|
+
if (stored === 'phantom' && WebSessionManager.isAuthenticated())
|
|
15785
|
+
return true;
|
|
15786
|
+
}
|
|
15787
|
+
catch (_b) {
|
|
15788
|
+
return true;
|
|
15789
|
+
}
|
|
15790
|
+
return false;
|
|
15791
|
+
}
|
|
15739
15792
|
static getInstance(networkUrl, config) {
|
|
15740
15793
|
if (!PhantomWalletProvider.instance) {
|
|
15741
15794
|
new PhantomWalletProvider(networkUrl, config);
|
|
@@ -16412,6 +16465,13 @@ class PhantomWalletProvider {
|
|
|
16412
16465
|
if (this.initPromise) {
|
|
16413
16466
|
await this.initPromise;
|
|
16414
16467
|
}
|
|
16468
|
+
// Lazy-mount path: if initializeAsync deferred the React mount (e.g.
|
|
16469
|
+
// first-time visitor on Android Chrome PWA), do it now. We're being
|
|
16470
|
+
// called from a user-gesture flow like login(), so any Android intent
|
|
16471
|
+
// dialog that surfaces will appear with the activity already focused.
|
|
16472
|
+
if (!this.containerElement) {
|
|
16473
|
+
this.initialize();
|
|
16474
|
+
}
|
|
16415
16475
|
// Wait for SDK to be ready
|
|
16416
16476
|
await new Promise((resolve) => {
|
|
16417
16477
|
const check = () => {
|
|
@@ -16521,12 +16581,53 @@ class PhantomWalletProvider {
|
|
|
16521
16581
|
});
|
|
16522
16582
|
}
|
|
16523
16583
|
async restoreSession() {
|
|
16524
|
-
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
|
|
16584
|
+
// Read from storage directly. Do NOT ensureReady() here — that would
|
|
16585
|
+
// mount @phantom/react-sdk's <PhantomProvider> during init(), which
|
|
16586
|
+
// synchronously constructs BrowserSDK (running wallet-standard discovery)
|
|
16587
|
+
// and fires sdk.autoConnect() — both probing the Android intent surface
|
|
16588
|
+
// before the PWA activity has window focus on Solana Seeker. The
|
|
16589
|
+
// resulting "access other apps and services" system dialog renders
|
|
16590
|
+
// with grayed-out buttons.
|
|
16591
|
+
//
|
|
16592
|
+
// Wrap getSession() in try/catch: WebSessionManager.getSession() runs
|
|
16593
|
+
// JSON.parse on the stored session *outside* its internal try/catch,
|
|
16594
|
+
// so genuinely malformed JSON in localStorage would propagate through
|
|
16595
|
+
// restoreSession() and break init() entirely. Treat any throw as
|
|
16596
|
+
// "no session" and fall through to the cleanup path so corrupted
|
|
16597
|
+
// storage is recoverable on next load.
|
|
16598
|
+
let session;
|
|
16599
|
+
try {
|
|
16600
|
+
session = await WebSessionManager.getSession();
|
|
16528
16601
|
}
|
|
16529
|
-
|
|
16602
|
+
catch (_a) {
|
|
16603
|
+
session = null;
|
|
16604
|
+
}
|
|
16605
|
+
if (!session) {
|
|
16606
|
+
// Tidy up storage so we don't leave junk behind:
|
|
16607
|
+
// (a) clearSession() removes any stale or unparseable session
|
|
16608
|
+
// storage entry. WebSessionManager.getSession() can't reach
|
|
16609
|
+
// its own clearSession() if JSON.parse threw. Idempotent —
|
|
16610
|
+
// safe to call unconditionally here.
|
|
16611
|
+
// (b) Drop the auth-method marker if it's stale.
|
|
16612
|
+
// WebSessionManager.clearSession() only removes the session
|
|
16613
|
+
// storage key, not the marker — so without this cleanup
|
|
16614
|
+
// shouldMountEagerly() would keep eager-mounting on every
|
|
16615
|
+
// future cold start.
|
|
16616
|
+
try {
|
|
16617
|
+
WebSessionManager.clearSession();
|
|
16618
|
+
}
|
|
16619
|
+
catch ( /* best-effort */_b) { /* best-effort */ }
|
|
16620
|
+
try {
|
|
16621
|
+
if (getPlatform().storage.getItem('tarobase_last_auth_method') === 'phantom') {
|
|
16622
|
+
getPlatform().storage.removeItem('tarobase_last_auth_method');
|
|
16623
|
+
}
|
|
16624
|
+
}
|
|
16625
|
+
catch (_c) {
|
|
16626
|
+
// storage unavailable — best-effort cleanup
|
|
16627
|
+
}
|
|
16628
|
+
return null;
|
|
16629
|
+
}
|
|
16630
|
+
return { provider: this, address: session.address };
|
|
16530
16631
|
}
|
|
16531
16632
|
async address() {
|
|
16532
16633
|
var _a, _b, _c, _d;
|
|
@@ -20017,235 +20118,137 @@ function createSolanaRpcSubscriptionsFromTransport(transport) {
|
|
|
20017
20118
|
});
|
|
20018
20119
|
}
|
|
20019
20120
|
|
|
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
|
-
|
|
20122
|
-
|
|
20123
|
-
|
|
20124
|
-
|
|
20125
|
-
|
|
20126
|
-
|
|
20127
|
-
|
|
20128
|
-
|
|
20129
|
-
|
|
20130
|
-
|
|
20131
|
-
|
|
20132
|
-
|
|
20133
|
-
|
|
20134
|
-
|
|
20135
|
-
|
|
20136
|
-
|
|
20137
|
-
|
|
20138
|
-
|
|
20139
|
-
|
|
20140
|
-
|
|
20141
|
-
|
|
20142
|
-
var b58 = new Uint8Array(size);
|
|
20143
|
-
// Process the bytes.
|
|
20144
|
-
while (pbegin !== pend) {
|
|
20145
|
-
var carry = source[pbegin];
|
|
20146
|
-
// Apply "b58 = b58 * 256 + ch".
|
|
20147
|
-
var i = 0;
|
|
20148
|
-
for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
20149
|
-
carry += (256 * b58[it1]) >>> 0;
|
|
20150
|
-
b58[it1] = (carry % BASE) >>> 0;
|
|
20151
|
-
carry = (carry / BASE) >>> 0;
|
|
20152
|
-
}
|
|
20153
|
-
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20154
|
-
length = i;
|
|
20155
|
-
pbegin++;
|
|
20156
|
-
}
|
|
20157
|
-
// Skip leading zeroes in base58 result.
|
|
20158
|
-
var it2 = size - length;
|
|
20159
|
-
while (it2 !== size && b58[it2] === 0) {
|
|
20160
|
-
it2++;
|
|
20161
|
-
}
|
|
20162
|
-
// Translate the result into a string.
|
|
20163
|
-
var str = LEADER.repeat(zeroes);
|
|
20164
|
-
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
20165
|
-
return str
|
|
20166
|
-
}
|
|
20167
|
-
function decodeUnsafe (source) {
|
|
20168
|
-
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
20169
|
-
if (source.length === 0) { return _Buffer.alloc(0) }
|
|
20170
|
-
var psz = 0;
|
|
20171
|
-
// Skip and count leading '1's.
|
|
20172
|
-
var zeroes = 0;
|
|
20173
|
-
var length = 0;
|
|
20174
|
-
while (source[psz] === LEADER) {
|
|
20175
|
-
zeroes++;
|
|
20176
|
-
psz++;
|
|
20177
|
-
}
|
|
20178
|
-
// Allocate enough space in big-endian base256 representation.
|
|
20179
|
-
var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
20180
|
-
var b256 = new Uint8Array(size);
|
|
20181
|
-
// Process the characters.
|
|
20182
|
-
while (psz < source.length) {
|
|
20183
|
-
// Find code of next character
|
|
20184
|
-
var charCode = source.charCodeAt(psz);
|
|
20185
|
-
// Base map can not be indexed using char code
|
|
20186
|
-
if (charCode > 255) { return }
|
|
20187
|
-
// Decode character
|
|
20188
|
-
var carry = BASE_MAP[charCode];
|
|
20189
|
-
// Invalid character
|
|
20190
|
-
if (carry === 255) { return }
|
|
20191
|
-
var i = 0;
|
|
20192
|
-
for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
20193
|
-
carry += (BASE * b256[it3]) >>> 0;
|
|
20194
|
-
b256[it3] = (carry % 256) >>> 0;
|
|
20195
|
-
carry = (carry / 256) >>> 0;
|
|
20196
|
-
}
|
|
20197
|
-
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20198
|
-
length = i;
|
|
20199
|
-
psz++;
|
|
20200
|
-
}
|
|
20201
|
-
// Skip leading zeroes in b256.
|
|
20202
|
-
var it4 = size - length;
|
|
20203
|
-
while (it4 !== size && b256[it4] === 0) {
|
|
20204
|
-
it4++;
|
|
20205
|
-
}
|
|
20206
|
-
var vch = _Buffer.allocUnsafe(zeroes + (size - it4));
|
|
20207
|
-
vch.fill(0x00, 0, zeroes);
|
|
20208
|
-
var j = zeroes;
|
|
20209
|
-
while (it4 !== size) {
|
|
20210
|
-
vch[j++] = b256[it4++];
|
|
20211
|
-
}
|
|
20212
|
-
return vch
|
|
20213
|
-
}
|
|
20214
|
-
function decode (string) {
|
|
20215
|
-
var buffer = decodeUnsafe(string);
|
|
20216
|
-
if (buffer) { return buffer }
|
|
20217
|
-
throw new Error('Non-base' + BASE + ' character')
|
|
20218
|
-
}
|
|
20219
|
-
return {
|
|
20220
|
-
encode: encode,
|
|
20221
|
-
decodeUnsafe: decodeUnsafe,
|
|
20222
|
-
decode: decode
|
|
20223
|
-
}
|
|
20224
|
-
}
|
|
20225
|
-
src = base;
|
|
20226
|
-
return src;
|
|
20227
|
-
}
|
|
20228
|
-
|
|
20229
|
-
var bs58$1;
|
|
20230
|
-
var hasRequiredBs58;
|
|
20231
|
-
|
|
20232
|
-
function requireBs58 () {
|
|
20233
|
-
if (hasRequiredBs58) return bs58$1;
|
|
20234
|
-
hasRequiredBs58 = 1;
|
|
20235
|
-
var basex = requireSrc();
|
|
20236
|
-
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
20237
|
-
|
|
20238
|
-
bs58$1 = basex(ALPHABET);
|
|
20239
|
-
return bs58$1;
|
|
20121
|
+
// base-x encoding / decoding
|
|
20122
|
+
// Copyright (c) 2018 base-x contributors
|
|
20123
|
+
// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
|
|
20124
|
+
// Distributed under the MIT software license, see the accompanying
|
|
20125
|
+
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
|
20126
|
+
function base (ALPHABET) {
|
|
20127
|
+
if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
|
|
20128
|
+
const BASE_MAP = new Uint8Array(256);
|
|
20129
|
+
for (let j = 0; j < BASE_MAP.length; j++) {
|
|
20130
|
+
BASE_MAP[j] = 255;
|
|
20131
|
+
}
|
|
20132
|
+
for (let i = 0; i < ALPHABET.length; i++) {
|
|
20133
|
+
const x = ALPHABET.charAt(i);
|
|
20134
|
+
const xc = x.charCodeAt(0);
|
|
20135
|
+
if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
|
|
20136
|
+
BASE_MAP[xc] = i;
|
|
20137
|
+
}
|
|
20138
|
+
const BASE = ALPHABET.length;
|
|
20139
|
+
const LEADER = ALPHABET.charAt(0);
|
|
20140
|
+
const FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
|
|
20141
|
+
const iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
|
|
20142
|
+
function encode (source) {
|
|
20143
|
+
// eslint-disable-next-line no-empty
|
|
20144
|
+
if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
|
|
20145
|
+
source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
|
|
20146
|
+
} else if (Array.isArray(source)) {
|
|
20147
|
+
source = Uint8Array.from(source);
|
|
20148
|
+
}
|
|
20149
|
+
if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
|
|
20150
|
+
if (source.length === 0) { return '' }
|
|
20151
|
+
// Skip & count leading zeroes.
|
|
20152
|
+
let zeroes = 0;
|
|
20153
|
+
let length = 0;
|
|
20154
|
+
let pbegin = 0;
|
|
20155
|
+
const pend = source.length;
|
|
20156
|
+
while (pbegin !== pend && source[pbegin] === 0) {
|
|
20157
|
+
pbegin++;
|
|
20158
|
+
zeroes++;
|
|
20159
|
+
}
|
|
20160
|
+
// Allocate enough space in big-endian base58 representation.
|
|
20161
|
+
const size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
|
|
20162
|
+
const b58 = new Uint8Array(size);
|
|
20163
|
+
// Process the bytes.
|
|
20164
|
+
while (pbegin !== pend) {
|
|
20165
|
+
let carry = source[pbegin];
|
|
20166
|
+
// Apply "b58 = b58 * 256 + ch".
|
|
20167
|
+
let i = 0;
|
|
20168
|
+
for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
|
|
20169
|
+
carry += (256 * b58[it1]) >>> 0;
|
|
20170
|
+
b58[it1] = (carry % BASE) >>> 0;
|
|
20171
|
+
carry = (carry / BASE) >>> 0;
|
|
20172
|
+
}
|
|
20173
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20174
|
+
length = i;
|
|
20175
|
+
pbegin++;
|
|
20176
|
+
}
|
|
20177
|
+
// Skip leading zeroes in base58 result.
|
|
20178
|
+
let it2 = size - length;
|
|
20179
|
+
while (it2 !== size && b58[it2] === 0) {
|
|
20180
|
+
it2++;
|
|
20181
|
+
}
|
|
20182
|
+
// Translate the result into a string.
|
|
20183
|
+
let str = LEADER.repeat(zeroes);
|
|
20184
|
+
for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
|
|
20185
|
+
return str
|
|
20186
|
+
}
|
|
20187
|
+
function decodeUnsafe (source) {
|
|
20188
|
+
if (typeof source !== 'string') { throw new TypeError('Expected String') }
|
|
20189
|
+
if (source.length === 0) { return new Uint8Array() }
|
|
20190
|
+
let psz = 0;
|
|
20191
|
+
// Skip and count leading '1's.
|
|
20192
|
+
let zeroes = 0;
|
|
20193
|
+
let length = 0;
|
|
20194
|
+
while (source[psz] === LEADER) {
|
|
20195
|
+
zeroes++;
|
|
20196
|
+
psz++;
|
|
20197
|
+
}
|
|
20198
|
+
// Allocate enough space in big-endian base256 representation.
|
|
20199
|
+
const size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
|
|
20200
|
+
const b256 = new Uint8Array(size);
|
|
20201
|
+
// Process the characters.
|
|
20202
|
+
while (psz < source.length) {
|
|
20203
|
+
// Find code of next character
|
|
20204
|
+
const charCode = source.charCodeAt(psz);
|
|
20205
|
+
// Base map can not be indexed using char code
|
|
20206
|
+
if (charCode > 255) { return }
|
|
20207
|
+
// Decode character
|
|
20208
|
+
let carry = BASE_MAP[charCode];
|
|
20209
|
+
// Invalid character
|
|
20210
|
+
if (carry === 255) { return }
|
|
20211
|
+
let i = 0;
|
|
20212
|
+
for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
|
|
20213
|
+
carry += (BASE * b256[it3]) >>> 0;
|
|
20214
|
+
b256[it3] = (carry % 256) >>> 0;
|
|
20215
|
+
carry = (carry / 256) >>> 0;
|
|
20216
|
+
}
|
|
20217
|
+
if (carry !== 0) { throw new Error('Non-zero carry') }
|
|
20218
|
+
length = i;
|
|
20219
|
+
psz++;
|
|
20220
|
+
}
|
|
20221
|
+
// Skip leading zeroes in b256.
|
|
20222
|
+
let it4 = size - length;
|
|
20223
|
+
while (it4 !== size && b256[it4] === 0) {
|
|
20224
|
+
it4++;
|
|
20225
|
+
}
|
|
20226
|
+
const vch = new Uint8Array(zeroes + (size - it4));
|
|
20227
|
+
let j = zeroes;
|
|
20228
|
+
while (it4 !== size) {
|
|
20229
|
+
vch[j++] = b256[it4++];
|
|
20230
|
+
}
|
|
20231
|
+
return vch
|
|
20232
|
+
}
|
|
20233
|
+
function decode (string) {
|
|
20234
|
+
const buffer = decodeUnsafe(string);
|
|
20235
|
+
if (buffer) { return buffer }
|
|
20236
|
+
throw new Error('Non-base' + BASE + ' character')
|
|
20237
|
+
}
|
|
20238
|
+
return {
|
|
20239
|
+
encode,
|
|
20240
|
+
decodeUnsafe,
|
|
20241
|
+
decode
|
|
20242
|
+
}
|
|
20240
20243
|
}
|
|
20241
20244
|
|
|
20242
|
-
var
|
|
20243
|
-
var bs58 =
|
|
20245
|
+
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
20246
|
+
var bs58 = base(ALPHABET);
|
|
20244
20247
|
|
|
20245
|
-
var index = /*#__PURE__*/
|
|
20248
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
20246
20249
|
__proto__: null,
|
|
20247
20250
|
default: bs58
|
|
20248
|
-
}
|
|
20251
|
+
});
|
|
20249
20252
|
|
|
20250
20253
|
const SURFNET_RPC_URL$1 = "https://surfpool.fly.dev";
|
|
20251
20254
|
let React;
|
|
@@ -21159,7 +21162,7 @@ async function loadMwaProtocol() {
|
|
|
21159
21162
|
return mwaProtocolLoadPromise;
|
|
21160
21163
|
mwaProtocolLoadPromise = (async () => {
|
|
21161
21164
|
try {
|
|
21162
|
-
mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-
|
|
21165
|
+
mwaProtocolModule = await Promise.resolve().then(function () { return require('./index.browser-CQUvzkLr.js'); });
|
|
21163
21166
|
}
|
|
21164
21167
|
catch (e) {
|
|
21165
21168
|
console.warn('[SolanaMobileWallet] @solana-mobile/mobile-wallet-adapter-protocol-web3js not installed. Install it to enable Seeker wallet support.');
|
|
@@ -21181,7 +21184,7 @@ async function registerMobileWalletAdapter(config) {
|
|
|
21181
21184
|
if (typeof window === 'undefined')
|
|
21182
21185
|
return;
|
|
21183
21186
|
try {
|
|
21184
|
-
const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-
|
|
21187
|
+
const walletStandardMobile = await Promise.resolve().then(function () { return require('./index.browser-CGfTdDXe.js'); });
|
|
21185
21188
|
const registerMwa = walletStandardMobile.registerMwa || ((_a = walletStandardMobile.default) === null || _a === void 0 ? void 0 : _a.registerMwa);
|
|
21186
21189
|
if (!registerMwa) {
|
|
21187
21190
|
console.warn('[SolanaMobileWallet] registerMwa not found in @solana-mobile/wallet-standard-mobile');
|
|
@@ -22101,6 +22104,7 @@ exports.ServerSessionManager = ServerSessionManager;
|
|
|
22101
22104
|
exports.SolanaMobileWalletProvider = SolanaMobileWalletProvider;
|
|
22102
22105
|
exports.WebSessionManager = WebSessionManager;
|
|
22103
22106
|
exports.aggregate = aggregate;
|
|
22107
|
+
exports.bs58 = bs58;
|
|
22104
22108
|
exports.bufferExports = bufferExports;
|
|
22105
22109
|
exports.buildSetDocumentsTransaction = buildSetDocumentsTransaction;
|
|
22106
22110
|
exports.clearCache = clearCache;
|
|
@@ -22146,4 +22150,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
|
|
|
22146
22150
|
exports.signTransaction = signTransaction;
|
|
22147
22151
|
exports.subscribe = subscribe;
|
|
22148
22152
|
exports.useAuth = useAuth;
|
|
22149
|
-
//# sourceMappingURL=index-
|
|
22153
|
+
//# sourceMappingURL=index-BU6puWaY.js.map
|