@pooflabs/web 0.0.85-rc3 → 0.0.87
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/solana-mobile-wallet-provider.d.ts +43 -0
- package/dist/{index-B5qYY4YM.js → index-B-x9RTF7.js} +2 -2
- package/dist/index-B-x9RTF7.js.map +1 -0
- package/dist/{index-BaKs3A8s.js → index-BKN0IwAx.js} +3054 -300
- package/dist/index-BKN0IwAx.js.map +1 -0
- package/dist/{index-C4AnWFs_.esm.js → index-BTwX7FYW.esm.js} +425 -119
- package/dist/index-BTwX7FYW.esm.js.map +1 -0
- package/dist/{index-BzeiIIwF.js → index-DYBdUxnT.js} +3055 -301
- package/dist/index-DYBdUxnT.js.map +1 -0
- package/dist/{index-bEXLwE7_.js → index-Dj1tZr6X.js} +426 -118
- package/dist/index-Dj1tZr6X.js.map +1 -0
- package/dist/{index-dqqR5q7b.esm.js → index-DofM-ue2.esm.js} +3054 -301
- package/dist/index-DofM-ue2.esm.js.map +1 -0
- package/dist/index-_k6pjuwx.esm.js +6 -0
- package/dist/index-_k6pjuwx.esm.js.map +1 -0
- package/dist/{index-BE-VWSJT.esm.js → index-x7a-wH2l.esm.js} +3055 -300
- package/dist/index-x7a-wH2l.esm.js.map +1 -0
- package/dist/{index.browser-D8ttddP4.esm.js → index.browser-Cndx2raY.esm.js} +506 -1876
- package/dist/index.browser-Cndx2raY.esm.js.map +1 -0
- package/dist/{index.browser-CN6obNQM.js → index.browser-D7-FFk3q.js} +506 -1876
- package/dist/index.browser-D7-FFk3q.js.map +1 -0
- package/dist/{index.browser-CZIJCtms.js → index.browser-DlA-NKvf.js} +1223 -2565
- package/dist/index.browser-DlA-NKvf.js.map +1 -0
- package/dist/{index.browser-DQIwLToJ.esm.js → index.browser-nVGFrIHK.esm.js} +1223 -2565
- package/dist/index.browser-nVGFrIHK.esm.js.map +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.native-DLziTime.esm.js → index.native-19VsREMJ.esm.js} +43 -62
- package/dist/index.native-19VsREMJ.esm.js.map +1 -0
- package/dist/{index.native-pG1NTZ0f.js → index.native-D8vj3Lbr.js} +44 -61
- package/dist/index.native-D8vj3Lbr.js.map +1 -0
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -1
- package/dist/{phantom-wallet-provider-zBp7-uEw.js → phantom-wallet-provider-BlZZa_3s.js} +4 -4
- package/dist/{phantom-wallet-provider-zBp7-uEw.js.map → phantom-wallet-provider-BlZZa_3s.js.map} +1 -1
- package/dist/{phantom-wallet-provider-CP6NXRwG.esm.js → phantom-wallet-provider-Bz3qEFzX.esm.js} +4 -4
- package/dist/{phantom-wallet-provider-CP6NXRwG.esm.js.map → phantom-wallet-provider-Bz3qEFzX.esm.js.map} +1 -1
- package/dist/{privy-wallet-provider-CoyW5Gdg.js → privy-wallet-provider-CqCgq7uT.js} +3 -3
- package/dist/privy-wallet-provider-CqCgq7uT.js.map +1 -0
- package/dist/{privy-wallet-provider-CGYvf3-r.esm.js → privy-wallet-provider-DgNFzioA.esm.js} +3 -3
- package/dist/privy-wallet-provider-DgNFzioA.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-B8rHfsPN.esm.js → solana-mobile-wallet-provider-EeQsBTdr.esm.js} +385 -60
- package/dist/solana-mobile-wallet-provider-EeQsBTdr.esm.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-CN-D_H4l.js → solana-mobile-wallet-provider-VqIGfdMV.js} +385 -60
- package/dist/solana-mobile-wallet-provider-VqIGfdMV.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-B5qYY4YM.js.map +0 -1
- package/dist/index-BE-VWSJT.esm.js.map +0 -1
- package/dist/index-BaKs3A8s.js.map +0 -1
- package/dist/index-BzeiIIwF.js.map +0 -1
- package/dist/index-C4AnWFs_.esm.js.map +0 -1
- package/dist/index-TzHXEf3-.esm.js +0 -6
- package/dist/index-TzHXEf3-.esm.js.map +0 -1
- package/dist/index-bEXLwE7_.js.map +0 -1
- package/dist/index-dqqR5q7b.esm.js.map +0 -1
- package/dist/index.browser-CN6obNQM.js.map +0 -1
- package/dist/index.browser-CZIJCtms.js.map +0 -1
- package/dist/index.browser-D8ttddP4.esm.js.map +0 -1
- package/dist/index.browser-DQIwLToJ.esm.js.map +0 -1
- package/dist/index.native-DLziTime.esm.js.map +0 -1
- package/dist/index.native-pG1NTZ0f.js.map +0 -1
- package/dist/privy-wallet-provider-CGYvf3-r.esm.js.map +0 -1
- package/dist/privy-wallet-provider-CoyW5Gdg.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-B8rHfsPN.esm.js.map +0 -1
- package/dist/solana-mobile-wallet-provider-CN-D_H4l.js.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { J as DEFAULT_TEST_ADDRESS, Q as InsufficientBalanceError, M as MockAuthProvider, O as OffchainAuthProvider, P as PhantomWalletProvider, N as PrivyExpoProvider, I as PrivyWalletProvider, R as ReactNativeSessionManager, T as ServerSessionManager, S as SolanaMobileWalletProvider, W as WebSessionManager, B as aggregate, U as buildSetDocumentsTransaction, V as clearCache, X as closeAllSubscriptions, Y as convertRemainingAccounts, A as count, Z as createSessionWithPrivy, _ as createSessionWithSignature, E as deserializeTransaction, $ as genAuthNonce, a0 as genSolanaMessage, m as get, f as getAuthLoading, k as getAuthProvider, a1 as getCachedData, j as getConfig, d as getCurrentUser, q as getFiles, F as getIdToken, a2 as getMany, H as getPlatform, i as init, K as isMobileWalletAvailable, l as login, h as logout, e as onAuthLoadingChanged, o as onAuthStateChanged, a3 as reconnectWithNewAuth, a4 as refreshSession, L as registerMobileWalletAdapter, v as runExpression, w as runExpressionMany, t as runQuery, u as runQueryMany, s as set, p as setFile, n as setMany, G as setPlatform, z as signAndSubmitTransaction, x as signMessage, a5 as signSessionCreateMessage, y as signTransaction, C as subscribe, D as useAuth } from './index-BTwX7FYW.esm.js';
|
|
2
2
|
import 'axios';
|
|
3
3
|
import '@solana/web3.js';
|
|
4
4
|
import '@coral-xyz/anchor';
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,21 @@ import * as anchor from '@coral-xyz/anchor';
|
|
|
4
4
|
import { Program } from '@coral-xyz/anchor';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
|
|
7
|
+
function _mergeNamespaces(n, m) {
|
|
8
|
+
m.forEach(function (e) {
|
|
9
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
10
|
+
if (k !== 'default' && !(k in n)) {
|
|
11
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return e[k]; }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
|
|
7
22
|
function getDefaultExportFromCjs$1 (x) {
|
|
8
23
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
9
24
|
}
|
|
@@ -6749,28 +6764,6 @@ class WebSessionManager {
|
|
|
6749
6764
|
static async storeSession(address, accessToken, idToken, refreshToken) {
|
|
6750
6765
|
if (typeof window === "undefined")
|
|
6751
6766
|
return;
|
|
6752
|
-
// JWT-wallet binding: refuse to store a session whose idToken is bound
|
|
6753
|
-
// to a different wallet than `address`. Prevents races that would otherwise
|
|
6754
|
-
// leave localStorage with mismatched address/token state.
|
|
6755
|
-
try {
|
|
6756
|
-
const payloadB64 = idToken.split(".")[1];
|
|
6757
|
-
if (payloadB64) {
|
|
6758
|
-
const payload = JSON.parse(this.decodeBase64Url(payloadB64));
|
|
6759
|
-
const tokenWallet = payload["custom:walletAddress"];
|
|
6760
|
-
if (tokenWallet && tokenWallet !== address) {
|
|
6761
|
-
throw new Error(`[WebSessionManager] Refusing to store session: address (${address}) does not match idToken custom:walletAddress (${tokenWallet})`);
|
|
6762
|
-
}
|
|
6763
|
-
if (!tokenWallet) {
|
|
6764
|
-
console.warn("[WebSessionManager] storeSession: idToken has no custom:walletAddress claim — writing without validation");
|
|
6765
|
-
}
|
|
6766
|
-
}
|
|
6767
|
-
}
|
|
6768
|
-
catch (err) {
|
|
6769
|
-
if (typeof (err === null || err === void 0 ? void 0 : err.message) === "string" && err.message.includes("Refusing to store session")) {
|
|
6770
|
-
throw err;
|
|
6771
|
-
}
|
|
6772
|
-
console.warn("[WebSessionManager] storeSession: failed to decode idToken for validation:", err);
|
|
6773
|
-
}
|
|
6774
6767
|
const config = await getConfig();
|
|
6775
6768
|
const currentAppId = config.appId;
|
|
6776
6769
|
localStorage.setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify({
|
|
@@ -9469,11 +9462,11 @@ function requireSrc$1 () {
|
|
|
9469
9462
|
}
|
|
9470
9463
|
|
|
9471
9464
|
var bs58$1;
|
|
9472
|
-
var hasRequiredBs58;
|
|
9465
|
+
var hasRequiredBs58$1;
|
|
9473
9466
|
|
|
9474
|
-
function requireBs58 () {
|
|
9475
|
-
if (hasRequiredBs58) return bs58$1;
|
|
9476
|
-
hasRequiredBs58 = 1;
|
|
9467
|
+
function requireBs58$1 () {
|
|
9468
|
+
if (hasRequiredBs58$1) return bs58$1;
|
|
9469
|
+
hasRequiredBs58$1 = 1;
|
|
9477
9470
|
var basex = requireSrc$1();
|
|
9478
9471
|
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9479
9472
|
|
|
@@ -9481,8 +9474,8 @@ function requireBs58 () {
|
|
|
9481
9474
|
return bs58$1;
|
|
9482
9475
|
}
|
|
9483
9476
|
|
|
9484
|
-
var bs58Exports = requireBs58();
|
|
9485
|
-
var bs58 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
|
|
9477
|
+
var bs58Exports$1 = requireBs58$1();
|
|
9478
|
+
var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports$1);
|
|
9486
9479
|
|
|
9487
9480
|
// ─────────────────────────────────────────────────────────────
|
|
9488
9481
|
// Local implementation of getSimulationComputeUnits
|
|
@@ -9744,7 +9737,7 @@ function loadKeypairFromEnv() {
|
|
|
9744
9737
|
try {
|
|
9745
9738
|
const secretKey = secret.trim().startsWith("[")
|
|
9746
9739
|
? Uint8Array.from(JSON.parse(secret))
|
|
9747
|
-
: bs58.decode(secret.trim());
|
|
9740
|
+
: bs58$2.decode(secret.trim());
|
|
9748
9741
|
return Keypair.fromSecretKey(secretKey);
|
|
9749
9742
|
}
|
|
9750
9743
|
catch (err) {
|
|
@@ -11689,28 +11682,6 @@ class ReactNativeSessionManager {
|
|
|
11689
11682
|
/* STORE */
|
|
11690
11683
|
/* ------------------------------------------------------------------ */
|
|
11691
11684
|
static async storeSession(address, accessToken, idToken, refreshToken) {
|
|
11692
|
-
// JWT-wallet binding: refuse to store a session whose idToken is bound
|
|
11693
|
-
// to a different wallet than `address`. Prevents races that would otherwise
|
|
11694
|
-
// leave storage with mismatched address/token state.
|
|
11695
|
-
try {
|
|
11696
|
-
const payloadB64 = idToken.split(".")[1];
|
|
11697
|
-
if (payloadB64) {
|
|
11698
|
-
const payload = JSON.parse(this.decodeBase64Url(payloadB64));
|
|
11699
|
-
const tokenWallet = payload["custom:walletAddress"];
|
|
11700
|
-
if (tokenWallet && tokenWallet !== address) {
|
|
11701
|
-
throw new Error(`[ReactNativeSessionManager] Refusing to store session: address (${address}) does not match idToken custom:walletAddress (${tokenWallet})`);
|
|
11702
|
-
}
|
|
11703
|
-
if (!tokenWallet) {
|
|
11704
|
-
console.warn("[ReactNativeSessionManager] storeSession: idToken has no custom:walletAddress claim — writing without validation");
|
|
11705
|
-
}
|
|
11706
|
-
}
|
|
11707
|
-
}
|
|
11708
|
-
catch (err) {
|
|
11709
|
-
if (typeof (err === null || err === void 0 ? void 0 : err.message) === "string" && err.message.includes("Refusing to store session")) {
|
|
11710
|
-
throw err;
|
|
11711
|
-
}
|
|
11712
|
-
console.warn("[ReactNativeSessionManager] storeSession: failed to decode idToken for validation:", err);
|
|
11713
|
-
}
|
|
11714
11685
|
const config = await getConfig();
|
|
11715
11686
|
const currentAppId = config.appId;
|
|
11716
11687
|
this.getStorage().setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify({
|
|
@@ -12865,15 +12836,15 @@ function clearIncompatibleSession() {
|
|
|
12865
12836
|
// Lazy loaders for web-only providers.
|
|
12866
12837
|
// Using dynamic import() ensures Metro (RN) never resolves these modules.
|
|
12867
12838
|
async function loadPrivyWalletProvider() {
|
|
12868
|
-
const mod = await import('./privy-wallet-provider-
|
|
12839
|
+
const mod = await import('./privy-wallet-provider-DgNFzioA.esm.js');
|
|
12869
12840
|
return mod.PrivyWalletProvider;
|
|
12870
12841
|
}
|
|
12871
12842
|
async function loadPhantomWalletProvider() {
|
|
12872
|
-
const mod = await import('./phantom-wallet-provider-
|
|
12843
|
+
const mod = await import('./phantom-wallet-provider-Bz3qEFzX.esm.js');
|
|
12873
12844
|
return { PhantomWalletProvider: mod.PhantomWalletProvider };
|
|
12874
12845
|
}
|
|
12875
12846
|
async function loadSolanaMobileWalletProvider() {
|
|
12876
|
-
const mod = await import('./solana-mobile-wallet-provider-
|
|
12847
|
+
const mod = await import('./solana-mobile-wallet-provider-EeQsBTdr.esm.js');
|
|
12877
12848
|
return mod.SolanaMobileWalletProvider;
|
|
12878
12849
|
}
|
|
12879
12850
|
async function hotSwapToPrivyProvider(config) {
|
|
@@ -15869,16 +15840,26 @@ function requireSrc () {
|
|
|
15869
15840
|
return src;
|
|
15870
15841
|
}
|
|
15871
15842
|
|
|
15872
|
-
var
|
|
15873
|
-
var
|
|
15843
|
+
var bs58;
|
|
15844
|
+
var hasRequiredBs58;
|
|
15845
|
+
|
|
15846
|
+
function requireBs58 () {
|
|
15847
|
+
if (hasRequiredBs58) return bs58;
|
|
15848
|
+
hasRequiredBs58 = 1;
|
|
15849
|
+
var basex = requireSrc();
|
|
15850
|
+
var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
15851
|
+
|
|
15852
|
+
bs58 = basex(ALPHABET);
|
|
15853
|
+
return bs58;
|
|
15854
|
+
}
|
|
15874
15855
|
|
|
15875
|
-
var
|
|
15876
|
-
var base58 =
|
|
15856
|
+
var bs58Exports = requireBs58();
|
|
15857
|
+
var base58 = /*@__PURE__*/getDefaultExportFromCjs$1(bs58Exports);
|
|
15877
15858
|
|
|
15878
|
-
var index = /*#__PURE__*/
|
|
15859
|
+
var index = /*#__PURE__*/_mergeNamespaces({
|
|
15879
15860
|
__proto__: null,
|
|
15880
15861
|
default: base58
|
|
15881
|
-
});
|
|
15862
|
+
}, [bs58Exports]);
|
|
15882
15863
|
|
|
15883
15864
|
/**
|
|
15884
15865
|
* Privy Expo Auth Provider — React Native implementation of AuthProvider.
|
|
@@ -16219,5 +16200,5 @@ class PrivyExpoProvider {
|
|
|
16219
16200
|
}
|
|
16220
16201
|
}
|
|
16221
16202
|
|
|
16222
|
-
export {
|
|
16223
|
-
//# sourceMappingURL=index.native-
|
|
16203
|
+
export { PrivyExpoProvider as $, logout as A, getConfig as B, getAuthProvider as C, get as D, set as E, setMany as F, setFile as G, getFiles as H, runQuery as I, runQueryMany as J, runExpression as K, runExpressionMany as L, signMessage as M, signTransaction as N, signAndSubmitTransaction as O, count as P, aggregate as Q, subscribe as R, SOLANA_MAINNET_RPC_URL as S, useAuth as T, deserializeTransaction as U, getIdToken as V, WebSessionManager as W, setPlatform as X, MockAuthProvider as Y, DEFAULT_TEST_ADDRESS as Z, OffchainAuthProvider as _, SOLANA_DEVNET_RPC_URL as a, InsufficientBalanceError as a0, ReactNativeSessionManager as a1, ServerSessionManager as a2, clearCache as a3, closeAllSubscriptions as a4, getCachedData as a5, getMany as a6, reconnectWithNewAuth as a7, refreshSession as a8, signSessionCreateMessage as a9, buildSetDocumentsTransaction as b, convertRemainingAccounts as c, base58 as d, confirmAndCheckTransaction as e, createSessionWithPrivy as f, getPlatform as g, SURFNET_RPC_URL$1 as h, index as i, detectMobile as j, detectAndroid as k, setAuthLoading as l, genAuthNonce as m, genSolanaMessage as n, createSessionWithSignature as o, commonjsRequire as p, require$$0 as q, requireBuffer as r, setCurrentUser as s, getDefaultExportFromCjs$1 as t, init as u, getCurrentUser as v, onAuthStateChanged as w, onAuthLoadingChanged as x, getAuthLoading as y, login as z };
|
|
16204
|
+
//# sourceMappingURL=index.native-19VsREMJ.esm.js.map
|