@pooflabs/web 0.0.86 → 0.0.88

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.
Files changed (65) hide show
  1. package/dist/auth/providers/solana-mobile-wallet-provider.d.ts +43 -0
  2. package/dist/{index-DK28JaJm.esm.js → index-BfsQaxom.esm.js} +3054 -301
  3. package/dist/index-BfsQaxom.esm.js.map +1 -0
  4. package/dist/{index-BQUfNEiY.esm.js → index-CJRFnq6O.esm.js} +476 -103
  5. package/dist/index-CJRFnq6O.esm.js.map +1 -0
  6. package/dist/{index-BHkED2YI.js → index-CTtGbOzo.js} +3054 -300
  7. package/dist/index-CTtGbOzo.js.map +1 -0
  8. package/dist/{index-D-Wbwevj.js → index-CvNX4W0l.js} +2 -2
  9. package/dist/index-CvNX4W0l.js.map +1 -0
  10. package/dist/{index-DUn32Hkh.js → index-DBYgqO9f.js} +3055 -301
  11. package/dist/index-DBYgqO9f.js.map +1 -0
  12. package/dist/index-DpiO7Cpe.esm.js +6 -0
  13. package/dist/index-DpiO7Cpe.esm.js.map +1 -0
  14. package/dist/{index-hEc5_KoM.js → index-Lm0k5Hwv.js} +477 -102
  15. package/dist/index-Lm0k5Hwv.js.map +1 -0
  16. package/dist/{index-Cfp30Jm_.esm.js → index-MF_M5V0O.esm.js} +3055 -300
  17. package/dist/index-MF_M5V0O.esm.js.map +1 -0
  18. package/dist/{index.browser-CbawPvh6.js → index.browser-BCr9Sc8V.js} +506 -1876
  19. package/dist/index.browser-BCr9Sc8V.js.map +1 -0
  20. package/dist/{index.browser-DD8pg_L2.js → index.browser-BxKN5pIs.js} +1223 -2565
  21. package/dist/index.browser-BxKN5pIs.js.map +1 -0
  22. package/dist/{index.browser-DQqKPfDA.esm.js → index.browser-CGZvkfTO.esm.js} +506 -1876
  23. package/dist/index.browser-CGZvkfTO.esm.js.map +1 -0
  24. package/dist/{index.browser-C9gHoUen.esm.js → index.browser-CMijwVwX.esm.js} +1223 -2565
  25. package/dist/index.browser-CMijwVwX.esm.js.map +1 -0
  26. package/dist/index.esm.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/{index.native-7hiNiSyC.js → index.native-FMbSnE7i.js} +44 -61
  29. package/dist/index.native-FMbSnE7i.js.map +1 -0
  30. package/dist/{index.native-BItnSD47.esm.js → index.native-GyqT8Dn5.esm.js} +43 -62
  31. package/dist/index.native-GyqT8Dn5.esm.js.map +1 -0
  32. package/dist/index.native.esm.js +1 -1
  33. package/dist/index.native.js +1 -1
  34. package/dist/{phantom-wallet-provider-CjvLq_2_.js → phantom-wallet-provider-4_DBhDbx.js} +4 -4
  35. package/dist/{phantom-wallet-provider-CjvLq_2_.js.map → phantom-wallet-provider-4_DBhDbx.js.map} +1 -1
  36. package/dist/{phantom-wallet-provider-DE3vit2Z.esm.js → phantom-wallet-provider-BFSfBW0w.esm.js} +4 -4
  37. package/dist/{phantom-wallet-provider-DE3vit2Z.esm.js.map → phantom-wallet-provider-BFSfBW0w.esm.js.map} +1 -1
  38. package/dist/{privy-wallet-provider-DFZaQPss.js → privy-wallet-provider-DRss_Hua.js} +3 -3
  39. package/dist/privy-wallet-provider-DRss_Hua.js.map +1 -0
  40. package/dist/{privy-wallet-provider-ip2pqo_U.esm.js → privy-wallet-provider-Dl0feuCb.esm.js} +3 -3
  41. package/dist/privy-wallet-provider-Dl0feuCb.esm.js.map +1 -0
  42. package/dist/{solana-mobile-wallet-provider-D7BbSpez.esm.js → solana-mobile-wallet-provider-C5mN8Dxh.esm.js} +437 -45
  43. package/dist/solana-mobile-wallet-provider-C5mN8Dxh.esm.js.map +1 -0
  44. package/dist/{solana-mobile-wallet-provider-DwER68Rz.js → solana-mobile-wallet-provider-CAZs-TkL.js} +437 -45
  45. package/dist/solana-mobile-wallet-provider-CAZs-TkL.js.map +1 -0
  46. package/package.json +1 -1
  47. package/dist/index-BHkED2YI.js.map +0 -1
  48. package/dist/index-BQUfNEiY.esm.js.map +0 -1
  49. package/dist/index-Cfp30Jm_.esm.js.map +0 -1
  50. package/dist/index-D-Wbwevj.js.map +0 -1
  51. package/dist/index-DK28JaJm.esm.js.map +0 -1
  52. package/dist/index-DKyWaxCB.esm.js +0 -6
  53. package/dist/index-DKyWaxCB.esm.js.map +0 -1
  54. package/dist/index-DUn32Hkh.js.map +0 -1
  55. package/dist/index-hEc5_KoM.js.map +0 -1
  56. package/dist/index.browser-C9gHoUen.esm.js.map +0 -1
  57. package/dist/index.browser-CbawPvh6.js.map +0 -1
  58. package/dist/index.browser-DD8pg_L2.js.map +0 -1
  59. package/dist/index.browser-DQqKPfDA.esm.js.map +0 -1
  60. package/dist/index.native-7hiNiSyC.js.map +0 -1
  61. package/dist/index.native-BItnSD47.esm.js.map +0 -1
  62. package/dist/privy-wallet-provider-DFZaQPss.js.map +0 -1
  63. package/dist/privy-wallet-provider-ip2pqo_U.esm.js.map +0 -1
  64. package/dist/solana-mobile-wallet-provider-D7BbSpez.esm.js.map +0 -1
  65. package/dist/solana-mobile-wallet-provider-DwER68Rz.js.map +0 -1
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- export { H as DEFAULT_TEST_ADDRESS, L as InsufficientBalanceError, M as MockAuthProvider, O as OffchainAuthProvider, P as PhantomWalletProvider, K as PrivyExpoProvider, G as PrivyWalletProvider, R as ReactNativeSessionManager, N as ServerSessionManager, S as SolanaMobileWalletProvider, W as WebSessionManager, z as aggregate, Q as buildSetDocumentsTransaction, T as clearCache, U as closeAllSubscriptions, V as convertRemainingAccounts, y as count, X as createSessionWithPrivy, Y as createSessionWithSignature, C as deserializeTransaction, Z as genAuthNonce, _ as genSolanaMessage, k as get, e as getAuthLoading, j as getAuthProvider, $ as getCachedData, h as getConfig, c as getCurrentUser, p as getFiles, D as getIdToken, a0 as getMany, F as getPlatform, i as init, I as isMobileWalletAvailable, l as login, f as logout, d as onAuthLoadingChanged, o as onAuthStateChanged, a1 as reconnectWithNewAuth, a2 as refreshSession, J as registerMobileWalletAdapter, t as runExpression, u as runExpressionMany, r as runQuery, q as runQueryMany, s as set, n as setFile, m as setMany, E as setPlatform, x as signAndSubmitTransaction, v as signMessage, a3 as signSessionCreateMessage, w as signTransaction, A as subscribe, B as useAuth } from './index-BQUfNEiY.esm.js';
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-CJRFnq6O.esm.js';
2
2
  import 'axios';
3
3
  import '@solana/web3.js';
4
4
  import '@coral-xyz/anchor';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-hEc5_KoM.js');
3
+ var index = require('./index-Lm0k5Hwv.js');
4
4
  require('axios');
5
5
  require('@solana/web3.js');
6
6
  require('@coral-xyz/anchor');
@@ -22,6 +22,21 @@ function _interopNamespaceDefault(e) {
22
22
  return Object.freeze(n);
23
23
  }
24
24
 
25
+ function _mergeNamespaces(n, m) {
26
+ m.forEach(function (e) {
27
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
28
+ if (k !== 'default' && !(k in n)) {
29
+ var d = Object.getOwnPropertyDescriptor(e, k);
30
+ Object.defineProperty(n, k, d.get ? d : {
31
+ enumerable: true,
32
+ get: function () { return e[k]; }
33
+ });
34
+ }
35
+ });
36
+ });
37
+ return Object.freeze(n);
38
+ }
39
+
25
40
  var anchor__namespace = /*#__PURE__*/_interopNamespaceDefault(anchor);
26
41
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
27
42
 
@@ -6770,28 +6785,6 @@ class WebSessionManager {
6770
6785
  static async storeSession(address, accessToken, idToken, refreshToken) {
6771
6786
  if (typeof window === "undefined")
6772
6787
  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
- }
6795
6788
  const config = await getConfig();
6796
6789
  const currentAppId = config.appId;
6797
6790
  localStorage.setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify({
@@ -9490,11 +9483,11 @@ function requireSrc$1 () {
9490
9483
  }
9491
9484
 
9492
9485
  var bs58$1;
9493
- var hasRequiredBs58;
9486
+ var hasRequiredBs58$1;
9494
9487
 
9495
- function requireBs58 () {
9496
- if (hasRequiredBs58) return bs58$1;
9497
- hasRequiredBs58 = 1;
9488
+ function requireBs58$1 () {
9489
+ if (hasRequiredBs58$1) return bs58$1;
9490
+ hasRequiredBs58$1 = 1;
9498
9491
  var basex = requireSrc$1();
9499
9492
  var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9500
9493
 
@@ -9502,8 +9495,8 @@ function requireBs58 () {
9502
9495
  return bs58$1;
9503
9496
  }
9504
9497
 
9505
- var bs58Exports = requireBs58();
9506
- var bs58 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports);
9498
+ var bs58Exports$1 = requireBs58$1();
9499
+ var bs58$2 = /*@__PURE__*/getDefaultExportFromCjs(bs58Exports$1);
9507
9500
 
9508
9501
  // ─────────────────────────────────────────────────────────────
9509
9502
  // Local implementation of getSimulationComputeUnits
@@ -9765,7 +9758,7 @@ function loadKeypairFromEnv() {
9765
9758
  try {
9766
9759
  const secretKey = secret.trim().startsWith("[")
9767
9760
  ? Uint8Array.from(JSON.parse(secret))
9768
- : bs58.decode(secret.trim());
9761
+ : bs58$2.decode(secret.trim());
9769
9762
  return web3_js.Keypair.fromSecretKey(secretKey);
9770
9763
  }
9771
9764
  catch (err) {
@@ -11710,28 +11703,6 @@ class ReactNativeSessionManager {
11710
11703
  /* STORE */
11711
11704
  /* ------------------------------------------------------------------ */
11712
11705
  static async storeSession(address, accessToken, idToken, refreshToken) {
11713
- // JWT-wallet binding: refuse to store a session whose idToken is bound
11714
- // to a different wallet than `address`. Prevents races that would otherwise
11715
- // leave storage with mismatched address/token state.
11716
- try {
11717
- const payloadB64 = idToken.split(".")[1];
11718
- if (payloadB64) {
11719
- const payload = JSON.parse(this.decodeBase64Url(payloadB64));
11720
- const tokenWallet = payload["custom:walletAddress"];
11721
- if (tokenWallet && tokenWallet !== address) {
11722
- throw new Error(`[ReactNativeSessionManager] Refusing to store session: address (${address}) does not match idToken custom:walletAddress (${tokenWallet})`);
11723
- }
11724
- if (!tokenWallet) {
11725
- console.warn("[ReactNativeSessionManager] storeSession: idToken has no custom:walletAddress claim — writing without validation");
11726
- }
11727
- }
11728
- }
11729
- catch (err) {
11730
- if (typeof (err === null || err === void 0 ? void 0 : err.message) === "string" && err.message.includes("Refusing to store session")) {
11731
- throw err;
11732
- }
11733
- console.warn("[ReactNativeSessionManager] storeSession: failed to decode idToken for validation:", err);
11734
- }
11735
11706
  const config = await getConfig();
11736
11707
  const currentAppId = config.appId;
11737
11708
  this.getStorage().setItem(this.TAROBASE_SESSION_STORAGE_KEY, JSON.stringify({
@@ -12886,15 +12857,15 @@ function clearIncompatibleSession() {
12886
12857
  // Lazy loaders for web-only providers.
12887
12858
  // Using dynamic import() ensures Metro (RN) never resolves these modules.
12888
12859
  async function loadPrivyWalletProvider() {
12889
- const mod = await Promise.resolve().then(function () { return require('./privy-wallet-provider-DFZaQPss.js'); });
12860
+ const mod = await Promise.resolve().then(function () { return require('./privy-wallet-provider-DRss_Hua.js'); });
12890
12861
  return mod.PrivyWalletProvider;
12891
12862
  }
12892
12863
  async function loadPhantomWalletProvider() {
12893
- const mod = await Promise.resolve().then(function () { return require('./phantom-wallet-provider-CjvLq_2_.js'); });
12864
+ const mod = await Promise.resolve().then(function () { return require('./phantom-wallet-provider-4_DBhDbx.js'); });
12894
12865
  return { PhantomWalletProvider: mod.PhantomWalletProvider };
12895
12866
  }
12896
12867
  async function loadSolanaMobileWalletProvider() {
12897
- const mod = await Promise.resolve().then(function () { return require('./solana-mobile-wallet-provider-DwER68Rz.js'); });
12868
+ const mod = await Promise.resolve().then(function () { return require('./solana-mobile-wallet-provider-CAZs-TkL.js'); });
12898
12869
  return mod.SolanaMobileWalletProvider;
12899
12870
  }
12900
12871
  async function hotSwapToPrivyProvider(config) {
@@ -15890,16 +15861,26 @@ function requireSrc () {
15890
15861
  return src;
15891
15862
  }
15892
15863
 
15893
- var srcExports = requireSrc();
15894
- var basex = /*@__PURE__*/getDefaultExportFromCjs$1(srcExports);
15864
+ var bs58;
15865
+ var hasRequiredBs58;
15895
15866
 
15896
- var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
15897
- var base58 = basex(ALPHABET);
15867
+ function requireBs58 () {
15868
+ if (hasRequiredBs58) return bs58;
15869
+ hasRequiredBs58 = 1;
15870
+ var basex = requireSrc();
15871
+ var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
15898
15872
 
15899
- var index = /*#__PURE__*/Object.freeze({
15873
+ bs58 = basex(ALPHABET);
15874
+ return bs58;
15875
+ }
15876
+
15877
+ var bs58Exports = requireBs58();
15878
+ var base58 = /*@__PURE__*/getDefaultExportFromCjs$1(bs58Exports);
15879
+
15880
+ var index = /*#__PURE__*/_mergeNamespaces({
15900
15881
  __proto__: null,
15901
15882
  default: base58
15902
- });
15883
+ }, [bs58Exports]);
15903
15884
 
15904
15885
  /**
15905
15886
  * Privy Expo Auth Provider — React Native implementation of AuthProvider.
@@ -16256,6 +16237,7 @@ exports.base58 = base58;
16256
16237
  exports.buildSetDocumentsTransaction = buildSetDocumentsTransaction;
16257
16238
  exports.clearCache = clearCache;
16258
16239
  exports.closeAllSubscriptions = closeAllSubscriptions;
16240
+ exports.commonjsRequire = commonjsRequire;
16259
16241
  exports.confirmAndCheckTransaction = confirmAndCheckTransaction;
16260
16242
  exports.convertRemainingAccounts = convertRemainingAccounts;
16261
16243
  exports.count = count;
@@ -16285,6 +16267,7 @@ exports.onAuthLoadingChanged = onAuthLoadingChanged;
16285
16267
  exports.onAuthStateChanged = onAuthStateChanged;
16286
16268
  exports.reconnectWithNewAuth = reconnectWithNewAuth;
16287
16269
  exports.refreshSession = refreshSession;
16270
+ exports.require$$0 = require$$0;
16288
16271
  exports.requireBuffer = requireBuffer;
16289
16272
  exports.runExpression = runExpression;
16290
16273
  exports.runExpressionMany = runExpressionMany;
@@ -16302,4 +16285,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
16302
16285
  exports.signTransaction = signTransaction;
16303
16286
  exports.subscribe = subscribe;
16304
16287
  exports.useAuth = useAuth;
16305
- //# sourceMappingURL=index.native-7hiNiSyC.js.map
16288
+ //# sourceMappingURL=index.native-FMbSnE7i.js.map