@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
@@ -9351,7 +9351,7 @@ function convertRemainingAccounts(remainingAccounts) {
9351
9351
  // ─────────────────────────────────────────────────────────────
9352
9352
  // Updated Transaction Builder: It now accepts a PublicKey for the payer
9353
9353
  // ─────────────────────────────────────────────────────────────
9354
- async function buildSetDocumentsTransaction(connection, idl, anchorProvider, payerPublicKey, args, remainingAccounts, lutKey, preInstructions, simulate) {
9354
+ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, payerPublicKey, args, remainingAccounts, lutKey, preInstructions, simulate, additionalLutAddresses) {
9355
9355
  const computeBudgetIx = web3_js.ComputeBudgetProgram.setComputeUnitLimit({
9356
9356
  units: 1400000,
9357
9357
  });
@@ -9392,8 +9392,25 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
9392
9392
  tx.feePayer = payerPublicKey;
9393
9393
  const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash("confirmed");
9394
9394
  tx.recentBlockhash = blockhash;
9395
- if (lutKey == null) {
9396
- const isSurfnet = anchorProvider.connection.rpcEndpoint == "https://surfpool.fly.dev";
9395
+ // Resolve LUTs: additionalLutAddresses (when present) is the authoritative set.
9396
+ // Falls back to lutKey alone for backwards compatibility.
9397
+ const lookupTables = [];
9398
+ const isSurfnet = anchorProvider.connection.rpcEndpoint == "https://surfpool.fly.dev";
9399
+ if (additionalLutAddresses && additionalLutAddresses.length > 0) {
9400
+ const results = await Promise.all(additionalLutAddresses.map(addr => connection.getAddressLookupTable(new web3_js.PublicKey(addr)).catch(() => null)));
9401
+ for (const result of results) {
9402
+ if (result === null || result === void 0 ? void 0 : result.value) {
9403
+ lookupTables.push(result.value);
9404
+ }
9405
+ }
9406
+ }
9407
+ else if (lutKey != null) {
9408
+ const { value: table } = await connection.getAddressLookupTable(new web3_js.PublicKey(lutKey));
9409
+ if (!table)
9410
+ throw new Error('LUT not found after creation/extend');
9411
+ lookupTables.push(table);
9412
+ }
9413
+ if (lookupTables.length === 0) {
9397
9414
  const computeUnits = isSurfnet ? 1400000 : await getSimulationComputeUnits(connection, tx.instructions, payerPublicKey, []);
9398
9415
  const computeBudgetIxOptimized = web3_js.ComputeBudgetProgram.setComputeUnitLimit({
9399
9416
  units: computeUnits ? computeUnits * 1.2 : 1400000,
@@ -9401,11 +9418,7 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
9401
9418
  tx.instructions[0] = computeBudgetIxOptimized;
9402
9419
  return { tx, blockhash, lastValidBlockHeight };
9403
9420
  }
9404
- const { value: table } = await connection.getAddressLookupTable(new web3_js.PublicKey(lutKey));
9405
- if (!table)
9406
- throw new Error('LUT not found after creation/extend');
9407
- const isSurfnet = anchorProvider.connection.rpcEndpoint == "https://surfpool.fly.dev";
9408
- const computeUnits = isSurfnet ? 1400000 : await getSimulationComputeUnits(connection, tx.instructions, payerPublicKey, [table]);
9421
+ const computeUnits = isSurfnet ? 1400000 : await getSimulationComputeUnits(connection, tx.instructions, payerPublicKey, lookupTables);
9409
9422
  const computeBudgetIxOptimized = web3_js.ComputeBudgetProgram.setComputeUnitLimit({
9410
9423
  units: computeUnits ? computeUnits * 1.2 : 1400000,
9411
9424
  }); // 20% buffer
@@ -9414,7 +9427,7 @@ async function buildSetDocumentsTransaction(connection, idl, anchorProvider, pay
9414
9427
  payerKey: payerPublicKey,
9415
9428
  recentBlockhash: blockhash,
9416
9429
  instructions: tx.instructions,
9417
- }).compileToV0Message([table]);
9430
+ }).compileToV0Message(lookupTables);
9418
9431
  const vTx = new anchor__namespace.web3.VersionedTransaction(msgV0);
9419
9432
  return { tx: vTx, blockhash, lastValidBlockHeight };
9420
9433
  }
@@ -10298,6 +10311,7 @@ async function setMany(many, options) {
10298
10311
  appId: config.appId,
10299
10312
  txArgs: [solTransactionData],
10300
10313
  lutKey: (_c = tx.lutAddress) !== null && _c !== void 0 ? _c : null,
10314
+ additionalLutAddresses: tx.additionalLutAddresses,
10301
10315
  network: tx.network,
10302
10316
  preInstructions: (_e = (_d = tx.preInstructions) === null || _d === void 0 ? void 0 : _d.map((ix) => {
10303
10317
  var _a;
@@ -11456,6 +11470,50 @@ function setPlatform(adapter) {
11456
11470
  function getPlatform() {
11457
11471
  return _platform;
11458
11472
  }
11473
+ // ---------------------------------------------------------------------------
11474
+ // Mobile / Android detection helpers
11475
+ // ---------------------------------------------------------------------------
11476
+ /**
11477
+ * Detect mobile device even when Chrome "Request Desktop Site" is active.
11478
+ *
11479
+ * Desktop mode on Android strips "Android" and "Mobile" from the UA, leaving
11480
+ * something like "Linux x86_64 …". The fallback detects this by looking for
11481
+ * touch capability + small viewport + a UA that doesn't belong to a known
11482
+ * desktop OS (ChromeOS, Windows, macOS).
11483
+ */
11484
+ function detectMobile() {
11485
+ const ua = _platform.getUserAgent();
11486
+ if (/Android|iPhone|iPad|iPod/i.test(ua))
11487
+ return true;
11488
+ if (typeof navigator !== 'undefined' && typeof window !== 'undefined') {
11489
+ const hasTouch = navigator.maxTouchPoints > 0;
11490
+ // Macs don't have touch screens, so "Macintosh" + touch = iOS desktop mode
11491
+ // (also catches iPadOS 13+ which always reports as Macintosh)
11492
+ if (/Macintosh/i.test(ua) && hasTouch)
11493
+ return true;
11494
+ // Android desktop mode: Linux UA + touch + small viewport, excluding
11495
+ // known desktop OSes (ChromeOS, Windows, macOS)
11496
+ const isSmallViewport = window.innerWidth <= 1024;
11497
+ const isDesktopOS = /CrOS|Windows|Macintosh/i.test(ua);
11498
+ if (hasTouch && isSmallViewport && !isDesktopOS)
11499
+ return true;
11500
+ }
11501
+ return false;
11502
+ }
11503
+ /**
11504
+ * Detect Android, including desktop-mode Chrome and Seeker/Saga in-app browsers.
11505
+ */
11506
+ function detectAndroid() {
11507
+ const ua = _platform.getUserAgent();
11508
+ if (/Android/i.test(ua))
11509
+ return true;
11510
+ if (/SolanaWallet|SeedVault/i.test(ua))
11511
+ return true;
11512
+ // Desktop-mode fallback: detected as mobile + Linux UA + not another OS
11513
+ if (detectMobile() && /Linux/i.test(ua) && !/CrOS|Macintosh|iPhone|iPad/i.test(ua))
11514
+ return true;
11515
+ return false;
11516
+ }
11459
11517
 
11460
11518
  // Default test wallet address (Solana devnet address)
11461
11519
  const DEFAULT_TEST_ADDRESS = 'HKbZbRR7jWWR5VRN8KFjvTCHEzJQgameYxKQxh2gPoof';
@@ -12349,15 +12407,15 @@ function clearIncompatibleSession() {
12349
12407
  // Lazy loaders for web-only providers.
12350
12408
  // Using dynamic import() ensures Metro (RN) never resolves these modules.
12351
12409
  async function loadPrivyWalletProvider() {
12352
- const mod = await Promise.resolve().then(function () { return require('./privy-wallet-provider-lbg2fDVg.js'); });
12410
+ const mod = await Promise.resolve().then(function () { return require('./privy-wallet-provider-Bhvw0t1d.js'); });
12353
12411
  return mod.PrivyWalletProvider;
12354
12412
  }
12355
12413
  async function loadPhantomWalletProvider() {
12356
- const mod = await Promise.resolve().then(function () { return require('./phantom-wallet-provider-CeNZvRZY.js'); });
12414
+ const mod = await Promise.resolve().then(function () { return require('./phantom-wallet-provider-DMxFAUC4.js'); });
12357
12415
  return { PhantomWalletProvider: mod.PhantomWalletProvider };
12358
12416
  }
12359
12417
  async function loadSolanaMobileWalletProvider() {
12360
- const mod = await Promise.resolve().then(function () { return require('./solana-mobile-wallet-provider-DDqwl25J.js'); });
12418
+ const mod = await Promise.resolve().then(function () { return require('./solana-mobile-wallet-provider-D8b5y-By.js'); });
12361
12419
  return mod.SolanaMobileWalletProvider;
12362
12420
  }
12363
12421
  async function hotSwapToPrivyProvider(config) {
@@ -13032,7 +13090,7 @@ class PrivyExpoProvider {
13032
13090
  documents: solTransactionData.txArgs[0].setDocumentData,
13033
13091
  delete_paths: solTransactionData.txArgs[0].deletePaths,
13034
13092
  txData: solTransactionData.txArgs[0].txData,
13035
- }, finalDeduped, solTransactionData.lutKey, solTransactionData.preInstructions, false);
13093
+ }, finalDeduped, solTransactionData.lutKey, solTransactionData.preInstructions, false, solTransactionData.additionalLutAddresses);
13036
13094
  // Set blockhash
13037
13095
  const isLegacyTx = 'recentBlockhash' in tx &&
13038
13096
  !('message' in tx && 'staticAccountKeys' in tx.message);
@@ -13244,12 +13302,13 @@ exports.bs58 = bs58;
13244
13302
  exports.buildSetDocumentsTransaction = buildSetDocumentsTransaction;
13245
13303
  exports.clearCache = clearCache;
13246
13304
  exports.closeAllSubscriptions = closeAllSubscriptions;
13247
- exports.commonjsRequire = commonjsRequire;
13248
13305
  exports.confirmAndCheckTransaction = confirmAndCheckTransaction;
13249
13306
  exports.convertRemainingAccounts = convertRemainingAccounts;
13250
13307
  exports.count = count;
13251
13308
  exports.createSessionWithPrivy = createSessionWithPrivy;
13252
13309
  exports.createSessionWithSignature = createSessionWithSignature;
13310
+ exports.detectAndroid = detectAndroid;
13311
+ exports.detectMobile = detectMobile;
13253
13312
  exports.genAuthNonce = genAuthNonce;
13254
13313
  exports.genSolanaMessage = genSolanaMessage;
13255
13314
  exports.get = get;
@@ -13270,7 +13329,6 @@ exports.onAuthLoadingChanged = onAuthLoadingChanged;
13270
13329
  exports.onAuthStateChanged = onAuthStateChanged;
13271
13330
  exports.reconnectWithNewAuth = reconnectWithNewAuth;
13272
13331
  exports.refreshSession = refreshSession;
13273
- exports.require$$0 = require$$0;
13274
13332
  exports.runExpression = runExpression;
13275
13333
  exports.runExpressionMany = runExpressionMany;
13276
13334
  exports.runQuery = runQuery;
@@ -13287,4 +13345,4 @@ exports.signSessionCreateMessage = signSessionCreateMessage;
13287
13345
  exports.signTransaction = signTransaction;
13288
13346
  exports.subscribe = subscribe;
13289
13347
  exports.useAuth = useAuth;
13290
- //# sourceMappingURL=index.native-muw49g7i.js.map
13348
+ //# sourceMappingURL=index.native-DcKDTqvq.js.map