@pooflabs/web 0.0.74 → 0.0.75

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 (54) hide show
  1. package/dist/{index-BVfqY0fJ.js → index-BHYrnHi6.js} +2 -2406
  2. package/dist/index-BHYrnHi6.js.map +1 -0
  3. package/dist/{index-QqlKSXH4.js → index-BcDe_euX.js} +2 -2406
  4. package/dist/index-BcDe_euX.js.map +1 -0
  5. package/dist/{index-ByH7PSr3.esm.js → index-BqDvUK9s.esm.js} +2 -2406
  6. package/dist/index-BqDvUK9s.esm.js.map +1 -0
  7. package/dist/{index-CVK4iKo4.js → index-CMeewi-G.js} +78 -33
  8. package/dist/index-CMeewi-G.js.map +1 -0
  9. package/dist/{index-tYJgJQDc.esm.js → index-Dho2J3X6.esm.js} +79 -32
  10. package/dist/index-Dho2J3X6.esm.js.map +1 -0
  11. package/dist/{index-ORXorrQK.esm.js → index-_vhjpl1l.esm.js} +2 -2406
  12. package/dist/index-_vhjpl1l.esm.js.map +1 -0
  13. package/dist/{index.browser-C2K1wE09.esm.js → index.browser-Br0p4bjw.esm.js} +2 -2
  14. package/dist/{index.browser-C2K1wE09.esm.js.map → index.browser-Br0p4bjw.esm.js.map} +1 -1
  15. package/dist/{index.browser-DTId19-8.esm.js → index.browser-Btm3sRKb.esm.js} +2 -2
  16. package/dist/{index.browser-DTId19-8.esm.js.map → index.browser-Btm3sRKb.esm.js.map} +1 -1
  17. package/dist/{index.browser-De6JT7NR.js → index.browser-BzHjnrpD.js} +2 -2
  18. package/dist/{index.browser-De6JT7NR.js.map → index.browser-BzHjnrpD.js.map} +1 -1
  19. package/dist/{index.browser-D63nJFKg.esm.js → index.browser-CGfjPfzM.esm.js} +2 -2
  20. package/dist/{index.browser-D63nJFKg.esm.js.map → index.browser-CGfjPfzM.esm.js.map} +1 -1
  21. package/dist/{index.browser-GM5fUBfQ.js → index.browser-Dapjfbl6.js} +2 -2
  22. package/dist/{index.browser-GM5fUBfQ.js.map → index.browser-Dapjfbl6.js.map} +1 -1
  23. package/dist/{index.browser-B8vmX-tI.js → index.browser-JX3F6oPV.js} +2 -2
  24. package/dist/{index.browser-B8vmX-tI.js.map → index.browser-JX3F6oPV.js.map} +1 -1
  25. package/dist/index.esm.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/{index.native-CzfZTw_J.esm.js → index.native-BB7er4-z.esm.js} +73 -15
  28. package/dist/index.native-BB7er4-z.esm.js.map +1 -0
  29. package/dist/{index.native-muw49g7i.js → index.native-DcKDTqvq.js} +74 -16
  30. package/dist/index.native-DcKDTqvq.js.map +1 -0
  31. package/dist/index.native.esm.js +1 -1
  32. package/dist/index.native.js +1 -1
  33. package/dist/{phantom-wallet-provider-Di3Z8vOA.esm.js → phantom-wallet-provider-DHok8ui3.esm.js} +6 -6
  34. package/dist/{phantom-wallet-provider-Di3Z8vOA.esm.js.map → phantom-wallet-provider-DHok8ui3.esm.js.map} +1 -1
  35. package/dist/{phantom-wallet-provider-CeNZvRZY.js → phantom-wallet-provider-DMxFAUC4.js} +6 -6
  36. package/dist/{phantom-wallet-provider-CeNZvRZY.js.map → phantom-wallet-provider-DMxFAUC4.js.map} +1 -1
  37. package/dist/platform.d.ts +13 -0
  38. package/dist/{privy-wallet-provider-lbg2fDVg.js → privy-wallet-provider-Bhvw0t1d.js} +4 -4
  39. package/dist/{privy-wallet-provider-lbg2fDVg.js.map → privy-wallet-provider-Bhvw0t1d.js.map} +1 -1
  40. package/dist/{privy-wallet-provider-Cfws3b3x.esm.js → privy-wallet-provider-CFuoQYuv.esm.js} +4 -4
  41. package/dist/{privy-wallet-provider-Cfws3b3x.esm.js.map → privy-wallet-provider-CFuoQYuv.esm.js.map} +1 -1
  42. package/dist/{solana-mobile-wallet-provider-BZMvp9Qy.esm.js → solana-mobile-wallet-provider-BpQghAgC.esm.js} +4 -4
  43. package/dist/{solana-mobile-wallet-provider-BZMvp9Qy.esm.js.map → solana-mobile-wallet-provider-BpQghAgC.esm.js.map} +1 -1
  44. package/dist/{solana-mobile-wallet-provider-DDqwl25J.js → solana-mobile-wallet-provider-D8b5y-By.js} +4 -4
  45. package/dist/{solana-mobile-wallet-provider-DDqwl25J.js.map → solana-mobile-wallet-provider-D8b5y-By.js.map} +1 -1
  46. package/package.json +2 -2
  47. package/dist/index-BVfqY0fJ.js.map +0 -1
  48. package/dist/index-ByH7PSr3.esm.js.map +0 -1
  49. package/dist/index-CVK4iKo4.js.map +0 -1
  50. package/dist/index-ORXorrQK.esm.js.map +0 -1
  51. package/dist/index-QqlKSXH4.js.map +0 -1
  52. package/dist/index-tYJgJQDc.esm.js.map +0 -1
  53. package/dist/index.native-CzfZTw_J.esm.js.map +0 -1
  54. package/dist/index.native-muw49g7i.js.map +0 -1
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- export { I as DEFAULT_TEST_ADDRESS, N as InsufficientBalanceError, M as MockAuthProvider, O as OffchainAuthProvider, P as PhantomWalletProvider, L as PrivyExpoProvider, H as PrivyWalletProvider, R as ReactNativeSessionManager, Q as ServerSessionManager, S as SolanaMobileWalletProvider, W as WebSessionManager, B as aggregate, T as buildSetDocumentsTransaction, U as clearCache, V as closeAllSubscriptions, X as convertRemainingAccounts, A as count, Y as createSessionWithPrivy, Z as createSessionWithSignature, _ as genAuthNonce, $ as genSolanaMessage, m as get, f as getAuthLoading, k as getAuthProvider, a0 as getCachedData, j as getConfig, d as getCurrentUser, q as getFiles, E as getIdToken, G as getPlatform, i as init, J as isMobileWalletAvailable, l as login, h as logout, e as onAuthLoadingChanged, o as onAuthStateChanged, a1 as reconnectWithNewAuth, a2 as refreshSession, K as registerMobileWalletAdapter, v as runExpression, w as runExpressionMany, t as runQuery, u as runQueryMany, s as set, p as setFile, n as setMany, F as setPlatform, z as signAndSubmitTransaction, x as signMessage, a3 as signSessionCreateMessage, y as signTransaction, C as subscribe, D as useAuth } from './index-tYJgJQDc.esm.js';
1
+ export { G as DEFAULT_TEST_ADDRESS, K as InsufficientBalanceError, M as MockAuthProvider, O as OffchainAuthProvider, P as PhantomWalletProvider, J as PrivyExpoProvider, F as PrivyWalletProvider, R as ReactNativeSessionManager, L as ServerSessionManager, S as SolanaMobileWalletProvider, W as WebSessionManager, z as aggregate, N as buildSetDocumentsTransaction, Q as clearCache, T as closeAllSubscriptions, U as convertRemainingAccounts, y as count, V as createSessionWithPrivy, X as createSessionWithSignature, Y as genAuthNonce, Z as genSolanaMessage, k as get, e as getAuthLoading, j as getAuthProvider, _ as getCachedData, h as getConfig, c as getCurrentUser, p as getFiles, C as getIdToken, E as getPlatform, i as init, H as isMobileWalletAvailable, l as login, f as logout, d as onAuthLoadingChanged, o as onAuthStateChanged, $ as reconnectWithNewAuth, a0 as refreshSession, I as registerMobileWalletAdapter, t as runExpression, u as runExpressionMany, r as runQuery, q as runQueryMany, s as set, n as setFile, m as setMany, D as setPlatform, x as signAndSubmitTransaction, v as signMessage, a1 as signSessionCreateMessage, w as signTransaction, A as subscribe, B as useAuth } from './index-Dho2J3X6.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-CVK4iKo4.js');
3
+ var index = require('./index-CMeewi-G.js');
4
4
  require('axios');
5
5
  require('@solana/web3.js');
6
6
  require('@coral-xyz/anchor');
@@ -9330,7 +9330,7 @@ function convertRemainingAccounts(remainingAccounts) {
9330
9330
  // ─────────────────────────────────────────────────────────────
9331
9331
  // Updated Transaction Builder: It now accepts a PublicKey for the payer
9332
9332
  // ─────────────────────────────────────────────────────────────
9333
- async function buildSetDocumentsTransaction(connection, idl, anchorProvider, payerPublicKey, args, remainingAccounts, lutKey, preInstructions, simulate) {
9333
+ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, payerPublicKey, args, remainingAccounts, lutKey, preInstructions, simulate, additionalLutAddresses) {
9334
9334
  const computeBudgetIx = ComputeBudgetProgram.setComputeUnitLimit({
9335
9335
  units: 1400000,
9336
9336
  });
@@ -9371,8 +9371,25 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
9371
9371
  tx.feePayer = payerPublicKey;
9372
9372
  const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash("confirmed");
9373
9373
  tx.recentBlockhash = blockhash;
9374
- if (lutKey == null) {
9375
- const isSurfnet = anchorProvider.connection.rpcEndpoint == "https://surfpool.fly.dev";
9374
+ // Resolve LUTs: additionalLutAddresses (when present) is the authoritative set.
9375
+ // Falls back to lutKey alone for backwards compatibility.
9376
+ const lookupTables = [];
9377
+ const isSurfnet = anchorProvider.connection.rpcEndpoint == "https://surfpool.fly.dev";
9378
+ if (additionalLutAddresses && additionalLutAddresses.length > 0) {
9379
+ const results = await Promise.all(additionalLutAddresses.map(addr => connection.getAddressLookupTable(new PublicKey(addr)).catch(() => null)));
9380
+ for (const result of results) {
9381
+ if (result === null || result === void 0 ? void 0 : result.value) {
9382
+ lookupTables.push(result.value);
9383
+ }
9384
+ }
9385
+ }
9386
+ else if (lutKey != null) {
9387
+ const { value: table } = await connection.getAddressLookupTable(new PublicKey(lutKey));
9388
+ if (!table)
9389
+ throw new Error('LUT not found after creation/extend');
9390
+ lookupTables.push(table);
9391
+ }
9392
+ if (lookupTables.length === 0) {
9376
9393
  const computeUnits = isSurfnet ? 1400000 : await getSimulationComputeUnits(connection, tx.instructions, payerPublicKey, []);
9377
9394
  const computeBudgetIxOptimized = ComputeBudgetProgram.setComputeUnitLimit({
9378
9395
  units: computeUnits ? computeUnits * 1.2 : 1400000,
@@ -9380,11 +9397,7 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
9380
9397
  tx.instructions[0] = computeBudgetIxOptimized;
9381
9398
  return { tx, blockhash, lastValidBlockHeight };
9382
9399
  }
9383
- const { value: table } = await connection.getAddressLookupTable(new PublicKey(lutKey));
9384
- if (!table)
9385
- throw new Error('LUT not found after creation/extend');
9386
- const isSurfnet = anchorProvider.connection.rpcEndpoint == "https://surfpool.fly.dev";
9387
- const computeUnits = isSurfnet ? 1400000 : await getSimulationComputeUnits(connection, tx.instructions, payerPublicKey, [table]);
9400
+ const computeUnits = isSurfnet ? 1400000 : await getSimulationComputeUnits(connection, tx.instructions, payerPublicKey, lookupTables);
9388
9401
  const computeBudgetIxOptimized = ComputeBudgetProgram.setComputeUnitLimit({
9389
9402
  units: computeUnits ? computeUnits * 1.2 : 1400000,
9390
9403
  }); // 20% buffer
@@ -9393,7 +9406,7 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
9393
9406
  payerKey: payerPublicKey,
9394
9407
  recentBlockhash: blockhash,
9395
9408
  instructions: tx.instructions,
9396
- }).compileToV0Message([table]);
9409
+ }).compileToV0Message(lookupTables);
9397
9410
  const vTx = new anchor.web3.VersionedTransaction(msgV0);
9398
9411
  return { tx: vTx, blockhash, lastValidBlockHeight };
9399
9412
  }
@@ -10277,6 +10290,7 @@ async function setMany(many, options) {
10277
10290
  appId: config.appId,
10278
10291
  txArgs: [solTransactionData],
10279
10292
  lutKey: (_c = tx.lutAddress) !== null && _c !== void 0 ? _c : null,
10293
+ additionalLutAddresses: tx.additionalLutAddresses,
10280
10294
  network: tx.network,
10281
10295
  preInstructions: (_e = (_d = tx.preInstructions) === null || _d === void 0 ? void 0 : _d.map((ix) => {
10282
10296
  var _a;
@@ -11435,6 +11449,50 @@ function setPlatform(adapter) {
11435
11449
  function getPlatform() {
11436
11450
  return _platform;
11437
11451
  }
11452
+ // ---------------------------------------------------------------------------
11453
+ // Mobile / Android detection helpers
11454
+ // ---------------------------------------------------------------------------
11455
+ /**
11456
+ * Detect mobile device even when Chrome "Request Desktop Site" is active.
11457
+ *
11458
+ * Desktop mode on Android strips "Android" and "Mobile" from the UA, leaving
11459
+ * something like "Linux x86_64 …". The fallback detects this by looking for
11460
+ * touch capability + small viewport + a UA that doesn't belong to a known
11461
+ * desktop OS (ChromeOS, Windows, macOS).
11462
+ */
11463
+ function detectMobile() {
11464
+ const ua = _platform.getUserAgent();
11465
+ if (/Android|iPhone|iPad|iPod/i.test(ua))
11466
+ return true;
11467
+ if (typeof navigator !== 'undefined' && typeof window !== 'undefined') {
11468
+ const hasTouch = navigator.maxTouchPoints > 0;
11469
+ // Macs don't have touch screens, so "Macintosh" + touch = iOS desktop mode
11470
+ // (also catches iPadOS 13+ which always reports as Macintosh)
11471
+ if (/Macintosh/i.test(ua) && hasTouch)
11472
+ return true;
11473
+ // Android desktop mode: Linux UA + touch + small viewport, excluding
11474
+ // known desktop OSes (ChromeOS, Windows, macOS)
11475
+ const isSmallViewport = window.innerWidth <= 1024;
11476
+ const isDesktopOS = /CrOS|Windows|Macintosh/i.test(ua);
11477
+ if (hasTouch && isSmallViewport && !isDesktopOS)
11478
+ return true;
11479
+ }
11480
+ return false;
11481
+ }
11482
+ /**
11483
+ * Detect Android, including desktop-mode Chrome and Seeker/Saga in-app browsers.
11484
+ */
11485
+ function detectAndroid() {
11486
+ const ua = _platform.getUserAgent();
11487
+ if (/Android/i.test(ua))
11488
+ return true;
11489
+ if (/SolanaWallet|SeedVault/i.test(ua))
11490
+ return true;
11491
+ // Desktop-mode fallback: detected as mobile + Linux UA + not another OS
11492
+ if (detectMobile() && /Linux/i.test(ua) && !/CrOS|Macintosh|iPhone|iPad/i.test(ua))
11493
+ return true;
11494
+ return false;
11495
+ }
11438
11496
 
11439
11497
  // Default test wallet address (Solana devnet address)
11440
11498
  const DEFAULT_TEST_ADDRESS = 'HKbZbRR7jWWR5VRN8KFjvTCHEzJQgameYxKQxh2gPoof';
@@ -12328,15 +12386,15 @@ function clearIncompatibleSession() {
12328
12386
  // Lazy loaders for web-only providers.
12329
12387
  // Using dynamic import() ensures Metro (RN) never resolves these modules.
12330
12388
  async function loadPrivyWalletProvider() {
12331
- const mod = await import('./privy-wallet-provider-Cfws3b3x.esm.js');
12389
+ const mod = await import('./privy-wallet-provider-CFuoQYuv.esm.js');
12332
12390
  return mod.PrivyWalletProvider;
12333
12391
  }
12334
12392
  async function loadPhantomWalletProvider() {
12335
- const mod = await import('./phantom-wallet-provider-Di3Z8vOA.esm.js');
12393
+ const mod = await import('./phantom-wallet-provider-DHok8ui3.esm.js');
12336
12394
  return { PhantomWalletProvider: mod.PhantomWalletProvider };
12337
12395
  }
12338
12396
  async function loadSolanaMobileWalletProvider() {
12339
- const mod = await import('./solana-mobile-wallet-provider-BZMvp9Qy.esm.js');
12397
+ const mod = await import('./solana-mobile-wallet-provider-BpQghAgC.esm.js');
12340
12398
  return mod.SolanaMobileWalletProvider;
12341
12399
  }
12342
12400
  async function hotSwapToPrivyProvider(config) {
@@ -13011,7 +13069,7 @@ class PrivyExpoProvider {
13011
13069
  documents: solTransactionData.txArgs[0].setDocumentData,
13012
13070
  delete_paths: solTransactionData.txArgs[0].deletePaths,
13013
13071
  txData: solTransactionData.txArgs[0].txData,
13014
- }, finalDeduped, solTransactionData.lutKey, solTransactionData.preInstructions, false);
13072
+ }, finalDeduped, solTransactionData.lutKey, solTransactionData.preInstructions, false, solTransactionData.additionalLutAddresses);
13015
13073
  // Set blockhash
13016
13074
  const isLegacyTx = 'recentBlockhash' in tx &&
13017
13075
  !('message' in tx && 'staticAccountKeys' in tx.message);
@@ -13207,5 +13265,5 @@ class PrivyExpoProvider {
13207
13265
  }
13208
13266
  }
13209
13267
 
13210
- export { closeAllSubscriptions as $, set as A, setMany as B, setFile as C, getFiles as D, runQuery as E, runQueryMany as F, runExpression as G, runExpressionMany as H, signMessage as I, signTransaction as J, signAndSubmitTransaction as K, count as L, aggregate as M, subscribe as N, useAuth as O, getIdToken as P, setPlatform as Q, MockAuthProvider as R, SOLANA_MAINNET_RPC_URL as S, DEFAULT_TEST_ADDRESS as T, OffchainAuthProvider as U, PrivyExpoProvider as V, WebSessionManager as W, InsufficientBalanceError as X, ReactNativeSessionManager as Y, ServerSessionManager as Z, clearCache as _, SOLANA_DEVNET_RPC_URL as a, getCachedData as a0, reconnectWithNewAuth as a1, refreshSession as a2, signSessionCreateMessage as a3, index as a4, buildSetDocumentsTransaction as b, convertRemainingAccounts as c, bs58 as d, confirmAndCheckTransaction as e, createSessionWithPrivy as f, getPlatform as g, SURFNET_RPC_URL$1 as h, setAuthLoading as i, genAuthNonce as j, genSolanaMessage as k, createSessionWithSignature as l, commonjsRequire as m, getDefaultExportFromCjs$1 as n, init as o, getCurrentUser as p, onAuthStateChanged as q, require$$0 as r, setCurrentUser as s, onAuthLoadingChanged as t, getAuthLoading as u, login as v, logout as w, getConfig as x, getAuthProvider as y, get as z };
13211
- //# sourceMappingURL=index.native-CzfZTw_J.esm.js.map
13268
+ export { closeAllSubscriptions as $, set as A, setMany as B, setFile as C, getFiles as D, runQuery as E, runQueryMany as F, runExpression as G, runExpressionMany as H, signMessage as I, signTransaction as J, signAndSubmitTransaction as K, count as L, aggregate as M, subscribe as N, useAuth as O, getIdToken as P, setPlatform as Q, MockAuthProvider as R, SOLANA_MAINNET_RPC_URL as S, DEFAULT_TEST_ADDRESS as T, OffchainAuthProvider as U, PrivyExpoProvider as V, WebSessionManager as W, InsufficientBalanceError as X, ReactNativeSessionManager as Y, ServerSessionManager as Z, clearCache as _, SOLANA_DEVNET_RPC_URL as a, getCachedData as a0, reconnectWithNewAuth as a1, refreshSession as a2, signSessionCreateMessage as a3, index as a4, buildSetDocumentsTransaction as b, convertRemainingAccounts as c, bs58 as d, confirmAndCheckTransaction as e, createSessionWithPrivy as f, getPlatform as g, SURFNET_RPC_URL$1 as h, detectMobile as i, detectAndroid as j, setAuthLoading as k, genAuthNonce as l, genSolanaMessage as m, createSessionWithSignature as n, getDefaultExportFromCjs$1 as o, init as p, getCurrentUser as q, onAuthStateChanged as r, setCurrentUser as s, onAuthLoadingChanged as t, getAuthLoading as u, login as v, logout as w, getConfig as x, getAuthProvider as y, get as z };
13269
+ //# sourceMappingURL=index.native-BB7er4-z.esm.js.map