@pooflabs/web 0.0.84 → 0.0.85-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.
Files changed (67) hide show
  1. package/dist/auth/providers/solana-mobile-wallet-provider.d.ts +42 -20
  2. package/dist/{index-ep10Sw82.esm.js → index-4TKz3Mn_.esm.js} +3 -3
  3. package/dist/{index-ep10Sw82.esm.js.map → index-4TKz3Mn_.esm.js.map} +1 -1
  4. package/dist/{index-BM6hgCdH.js → index-BoWQVxMI.js} +2 -2
  5. package/dist/{index-BM6hgCdH.js.map → index-BoWQVxMI.js.map} +1 -1
  6. package/dist/{index-CH2G5Y9i.esm.js → index-Buu8v-Oe.esm.js} +2 -2
  7. package/dist/{index-CH2G5Y9i.esm.js.map → index-Buu8v-Oe.esm.js.map} +1 -1
  8. package/dist/{index-CSeN3jbG.js → index-C2p1Cldz.js} +3 -3
  9. package/dist/{index-CSeN3jbG.js.map → index-C2p1Cldz.js.map} +1 -1
  10. package/dist/index-COF6zNCs.esm.js +6 -0
  11. package/dist/index-COF6zNCs.esm.js.map +1 -0
  12. package/dist/{index-Bp4b5LXs.js → index-DlyeWzMk.js} +2 -2
  13. package/dist/index-DlyeWzMk.js.map +1 -0
  14. package/dist/{index-BPlF6-PQ.js → index-R7cvXys2.js} +394 -286
  15. package/dist/{index-BPlF6-PQ.js.map → index-R7cvXys2.js.map} +1 -1
  16. package/dist/{index-XHbmzFFO.esm.js → index-ZKzq5QT_.esm.js} +395 -287
  17. package/dist/{index-XHbmzFFO.esm.js.map → index-ZKzq5QT_.esm.js.map} +1 -1
  18. package/dist/{index.browser-C1QL04xM.js → index.browser-BQSN-6X2.js} +846 -815
  19. package/dist/index.browser-BQSN-6X2.js.map +1 -0
  20. package/dist/index.browser-DZCNegue.js +6070 -0
  21. package/dist/index.browser-DZCNegue.js.map +1 -0
  22. package/dist/{index.browser-Cgj7Hs6n.esm.js → index.browser-tPepE5fo.esm.js} +836 -802
  23. package/dist/index.browser-tPepE5fo.esm.js.map +1 -0
  24. package/dist/index.browser-zfGYm0ST.esm.js +6060 -0
  25. package/dist/index.browser-zfGYm0ST.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-BmtuyGXs.js → index.native-BGaUOX9f.js} +4 -4
  29. package/dist/{index.native-BmtuyGXs.js.map → index.native-BGaUOX9f.js.map} +1 -1
  30. package/dist/{index.native-X01vlukI.esm.js → index.native-BPQqeP6_.esm.js} +4 -4
  31. package/dist/{index.native-X01vlukI.esm.js.map → index.native-BPQqeP6_.esm.js.map} +1 -1
  32. package/dist/index.native.esm.js +1 -1
  33. package/dist/index.native.js +1 -1
  34. package/dist/{phantom-wallet-provider-DRvhBbbR.esm.js → phantom-wallet-provider-DheGhOp4.esm.js} +4 -4
  35. package/dist/{phantom-wallet-provider-DRvhBbbR.esm.js.map → phantom-wallet-provider-DheGhOp4.esm.js.map} +1 -1
  36. package/dist/{phantom-wallet-provider-C_LPU6Ns.js → phantom-wallet-provider-MFcwrRpJ.js} +4 -4
  37. package/dist/{phantom-wallet-provider-C_LPU6Ns.js.map → phantom-wallet-provider-MFcwrRpJ.js.map} +1 -1
  38. package/dist/{privy-wallet-provider-DQM8xO38.js → privy-wallet-provider-CFw6o7O5.js} +3 -3
  39. package/dist/{privy-wallet-provider-DQM8xO38.js.map → privy-wallet-provider-CFw6o7O5.js.map} +1 -1
  40. package/dist/{privy-wallet-provider-ZGu8q5T5.esm.js → privy-wallet-provider-D15Au3j8.esm.js} +3 -3
  41. package/dist/{privy-wallet-provider-ZGu8q5T5.esm.js.map → privy-wallet-provider-D15Au3j8.esm.js.map} +1 -1
  42. package/dist/solana-mobile-wallet-provider-BM9wdF0m.js +719 -0
  43. package/dist/solana-mobile-wallet-provider-BM9wdF0m.js.map +1 -0
  44. package/dist/solana-mobile-wallet-provider-ChHh-U_p.esm.js +698 -0
  45. package/dist/solana-mobile-wallet-provider-ChHh-U_p.esm.js.map +1 -0
  46. package/package.json +2 -1
  47. package/dist/index-Bp4b5LXs.js.map +0 -1
  48. package/dist/index-C80kRxWk.esm.js +0 -6
  49. package/dist/index-C80kRxWk.esm.js.map +0 -1
  50. package/dist/index.browser-BvNsUWjt.js +0 -105
  51. package/dist/index.browser-BvNsUWjt.js.map +0 -1
  52. package/dist/index.browser-BwIqqM4U.js +0 -1099
  53. package/dist/index.browser-BwIqqM4U.js.map +0 -1
  54. package/dist/index.browser-C1QL04xM.js.map +0 -1
  55. package/dist/index.browser-Cgj7Hs6n.esm.js.map +0 -1
  56. package/dist/index.browser-CifFI7Ju.esm.js +0 -1096
  57. package/dist/index.browser-CifFI7Ju.esm.js.map +0 -1
  58. package/dist/index.browser-D8VWPXTZ.esm.js +0 -102
  59. package/dist/index.browser-D8VWPXTZ.esm.js.map +0 -1
  60. package/dist/index.browser-OvGNsMPu.esm.js +0 -1002
  61. package/dist/index.browser-OvGNsMPu.esm.js.map +0 -1
  62. package/dist/index.browser-vuTr40so.js +0 -1008
  63. package/dist/index.browser-vuTr40so.js.map +0 -1
  64. package/dist/solana-mobile-wallet-provider-6gNw2_bX.js +0 -608
  65. package/dist/solana-mobile-wallet-provider-6gNw2_bX.js.map +0 -1
  66. package/dist/solana-mobile-wallet-provider-B65A7abd.esm.js +0 -587
  67. package/dist/solana-mobile-wallet-provider-B65A7abd.esm.js.map +0 -1
@@ -38,36 +38,58 @@ export declare function registerMobileWalletAdapter(config?: {
38
38
  remoteHostAuthority?: string;
39
39
  }): Promise<void>;
40
40
  /**
41
- * SolanaMobileWalletProvider implements the AuthProvider interface using the
42
- * Solana Mobile Wallet Adapter (MWA) protocol's low-level `transact` API.
41
+ * SolanaMobileWalletProvider implements the AuthProvider interface using
42
+ * Solana Mobile's wallet-standard wrapper (`LocalSolanaMobileWalletAdapterWallet`).
43
43
  *
44
- * This enables TaroBase dApps to work with any MWA-compliant wallet on Solana
45
- * mobile devices (Seeker, Saga) — including the native Seed Vault Wallet,
46
- * Phantom, Solflare, and any other wallet that implements the MWA protocol.
44
+ * Why wallet-standard and not the raw MWA protocol: as of
45
+ * `@solana-mobile/wallet-standard-mobile@0.5.0+`, the wallet's internal
46
+ * `#transact` calls `checkLocalNetworkAccessPermission()` before opening the
47
+ * localhost WebSocket. That helper renders a three-stage UX flow Solana
48
+ * Mobile designed specifically to defuse Chrome's Local Network Access
49
+ * permission dialog (which renders with disabled buttons on Android Chrome,
50
+ * the source of the long-running Seeker MWA bug):
47
51
  *
48
- * By using `transact()` directly (instead of the wallet-adapter wrapper),
49
- * login combines authorize + signMessage into a single wallet session —
50
- * meaning one popup/approval instead of two.
52
+ * 1. "Allow connections to your wallet" informational modal.
53
+ * 2. Chrome's permission prompt (interactive because it's spawned as a
54
+ * fresh user gesture from step 1).
55
+ * 3. "Ready to connect!" success modal.
56
+ *
57
+ * `checkLocalNetworkAccessPermission` is internal to the library — it's not
58
+ * exported. The only way to invoke it is to go through the wallet's
59
+ * `standard:connect` / `solana:sign*` features, which is what this provider
60
+ * does.
61
+ *
62
+ * Notes on UX: login uses two wallet popups in succession — `standard:connect`
63
+ * (authorize) and `solana:signMessage` (sign the Tarobase nonce). The
64
+ * previous implementation combined both inside a single `transact` callback;
65
+ * splitting them is the cost of going through wallet-standard, and is
66
+ * acceptable given the alternative was broken on Seeker.
51
67
  */
52
68
  export declare class SolanaMobileWalletProvider implements AuthProvider {
53
69
  private static instance;
54
70
  private networkUrl;
55
71
  private config;
56
- private authToken;
57
- private walletUriBase;
58
- private base64Address;
59
- private authorizedPublicKey;
60
- private publicKeyObj;
61
72
  private appIdentity;
62
- private chain;
73
+ /** Raw cluster name (e.g. 'mainnet-beta'); mapped via mapChainToWalletStandard. */
74
+ private cluster;
75
+ /** LocalSolanaMobileWalletAdapterWallet, lazy-constructed in ensureWallet(). */
76
+ private wallet;
63
77
  constructor(networkUrl?: string | null, config?: SolanaMobileWalletConfig);
64
78
  static getInstance(networkUrl: string | null, config: SolanaMobileWalletConfig): SolanaMobileWalletProvider;
65
- /** Config for transact() routes to the same wallet if we've already authorized */
66
- private getAssociationConfig;
67
- /** Reauthorize within a transact callback using a stored auth_token */
68
- private reauthorizeWallet;
69
- /** Persist auth result from an authorize/reauthorize call */
70
- private storeAuthResult;
79
+ /** Lazy-construct LocalSolanaMobileWalletAdapterWallet on first need. */
80
+ private ensureWallet;
81
+ /**
82
+ * Ensure the wallet has an active authorization. After a Tarobase session
83
+ * is restored from storage on cold-start, `wallet.accounts` is empty until
84
+ * we silently reconnect from the AuthorizationCache. If the cache is also
85
+ * empty, fall back to interactive `login()` (which surfaces the three-stage
86
+ * Solana Mobile LNA flow + wallet popups).
87
+ *
88
+ * Returns the wallet-standard `WalletAccount` to use for sign operations.
89
+ */
90
+ private ensureAuthorized;
91
+ /** Returns the active wallet-standard chain identifier (e.g. 'solana:mainnet'). */
92
+ private getChain;
71
93
  login(): Promise<User | null>;
72
94
  restoreSession(): Promise<User | null>;
73
95
  logout(): Promise<void>;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { useContext, createContext, useState, useMemo, useRef, useEffect, useCallback } from 'react';
3
3
  import globalAxios, { isAxiosError } from 'axios';
4
- import { b as bufferExports } from './index-C80kRxWk.esm.js';
5
- import { o as getDefaultExportFromCjs, d as base58 } from './index.native-X01vlukI.esm.js';
4
+ import { b as bufferExports } from './index-COF6zNCs.esm.js';
5
+ import { o as getDefaultExportFromCjs, d as base58 } from './index.native-BPQqeP6_.esm.js';
6
6
  import { Transaction as Transaction$1, VersionedTransaction } from '@solana/web3.js';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import '@coral-xyz/anchor';
@@ -15737,4 +15737,4 @@ function ConnectBox({ maxWidth = "350px", transparent = false, appIcon, appName
15737
15737
  }
15738
15738
 
15739
15739
  export { DerivationInfoAddressFormatEnum as AddressType, ConnectBox, ConnectButton, DebugLevel, NetworkId, PhantomProvider, darkTheme, debug, isMobileDevice, lightTheme, mergeTheme, useAccounts, useAutoConfirm, useConnect, useDisconnect, useDiscoveredWallets, useEthereum, useIsExtensionInstalled, useIsPhantomLoginAvailable, useModal, usePhantom, useSolana, useTheme };
15740
- //# sourceMappingURL=index-ep10Sw82.esm.js.map
15740
+ //# sourceMappingURL=index-4TKz3Mn_.esm.js.map