@privy-io/react-auth 1.95.2 → 1.96.0-beta-20241130215302

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 (50) hide show
  1. package/dist/cjs/abstract-smart-wallets.js +1 -1
  2. package/dist/cjs/context-BU97RwUq.js +1 -0
  3. package/dist/cjs/getEmbeddedConnectedWallet-Do_DpAq9.js +1 -0
  4. package/dist/cjs/index-Cl3PbylU.js +1 -0
  5. package/dist/cjs/index.js +307 -335
  6. package/dist/cjs/smart-wallets-Dn0aGvs-.js +1 -0
  7. package/dist/cjs/smart-wallets.js +1 -1
  8. package/dist/cjs/solana.js +1 -1
  9. package/dist/cjs/ui.js +133 -24
  10. package/dist/cjs/useFundWallet-Dn2humAL.js +189 -0
  11. package/dist/cjs/useSolanaWallets-DmQe3G2-.js +1 -0
  12. package/dist/cjs/useWallets-BygaNfXg.js +1 -0
  13. package/dist/dts/index.d.mts +15 -5
  14. package/dist/dts/index.d.ts +15 -5
  15. package/dist/dts/{solana-D5xAHDt7.d.ts → solana-1XQ5a7lr.d.mts} +5 -1
  16. package/dist/dts/{solana-D5xAHDt7.d.mts → solana-1XQ5a7lr.d.ts} +5 -1
  17. package/dist/dts/solana.d.mts +2 -2
  18. package/dist/dts/solana.d.ts +2 -2
  19. package/dist/dts/{types-BwcPm4mZ.d.mts → types-Ft1QTGGG.d.mts} +9 -2
  20. package/dist/dts/{types-BwcPm4mZ.d.ts → types-Ft1QTGGG.d.ts} +9 -2
  21. package/dist/dts/ui.d.mts +10 -2
  22. package/dist/dts/ui.d.ts +10 -2
  23. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  24. package/dist/esm/context-Bar8esUr.mjs +1 -0
  25. package/dist/esm/getEmbeddedConnectedWallet-B62b9FRk.mjs +1 -0
  26. package/dist/esm/{useSolanaWallets-DhN1MwR8.mjs → index-Drr2v6jY.mjs} +1 -1
  27. package/dist/esm/index.mjs +310 -338
  28. package/dist/esm/smart-wallets-LnLbNAar.mjs +1 -0
  29. package/dist/esm/smart-wallets.mjs +1 -1
  30. package/dist/esm/solana.mjs +1 -1
  31. package/dist/esm/ui.mjs +133 -24
  32. package/dist/esm/useFundWallet-Cc0ZZx2y.mjs +189 -0
  33. package/dist/esm/useSolanaWallets-FPvrUqTH.mjs +1 -0
  34. package/dist/esm/useWallets-Bh1lfXkK.mjs +1 -0
  35. package/package.json +1 -1
  36. package/dist/cjs/events-context-D4csIP2K.js +0 -1
  37. package/dist/cjs/getEmbeddedConnectedWallet-DGmyS1bb.js +0 -1
  38. package/dist/cjs/privy-context-BOQWqAyX.js +0 -1
  39. package/dist/cjs/smart-wallets-D1j3W4UB.js +0 -1
  40. package/dist/cjs/useFundWallet-BHF-4PZu.js +0 -161
  41. package/dist/cjs/useSolanaWallets-DvYv01E-.js +0 -1
  42. package/dist/cjs/useWallets-7cJEdKfK.js +0 -1
  43. package/dist/cjs/user-BXtysx2D.js +0 -1
  44. package/dist/esm/events-context-2ZF4RQWB.mjs +0 -1
  45. package/dist/esm/getEmbeddedConnectedWallet-CqgZB8tC.mjs +0 -1
  46. package/dist/esm/privy-context-DffpuNH1.mjs +0 -1
  47. package/dist/esm/smart-wallets-BoKTDMNm.mjs +0 -1
  48. package/dist/esm/useFundWallet-BmJ1B36W.mjs +0 -161
  49. package/dist/esm/useWallets-BxVlmjSu.mjs +0 -1
  50. package/dist/esm/user-EiUNCG17.mjs +0 -1
@@ -0,0 +1,189 @@
1
+ "use strict";var e=require("react"),r=require("react/jsx-runtime"),t=require("styled-components"),o=require("./context-BU97RwUq.js"),a=require("./useSolanaWallets-DmQe3G2-.js"),i=require("./useWallets-BygaNfXg.js"),n=require("@heroicons/react/24/outline/Square2StackIcon"),s=require("@ethersproject/bignumber"),c=require("@ethersproject/units"),l=require("viem");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(n);let u=e=>s.BigNumber.from(e);class h{get(e){let r=localStorage.getItem(e);return null===r?void 0:JSON.parse(r)}put(e,r){void 0!==r?localStorage.setItem(e,JSON.stringify(r)):this.del(e)}del(e){localStorage.removeItem(e)}getKeys(){return Object.entries(localStorage).map((([e])=>e))}}var v="undefined"!=typeof window&&window.localStorage?new h:new class{get(e){return this._cache[e]}put(e,r){void 0!==r?this._cache[e]=r:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};const g=t.styled.span`
2
+ && {
3
+ width: 82px;
4
+ height: 82px;
5
+ border-width: 4px;
6
+ border-style: solid;
7
+ border-color: ${e=>e.color??"var(--privy-color-accent)"};
8
+ border-bottom-color: transparent;
9
+ border-radius: 50%;
10
+ display: inline-block;
11
+ box-sizing: border-box;
12
+ animation: rotation 1.2s linear infinite;
13
+ transition: border-color 800ms;
14
+ }
15
+
16
+ @keyframes rotation {
17
+ 0% {
18
+ transform: rotate(0deg);
19
+ }
20
+ 100% {
21
+ transform: rotate(360deg);
22
+ }
23
+ }
24
+
25
+ &&&.success {
26
+ border-color: var(--privy-color-success);
27
+ border-bottom-color: var(--privy-color-success);
28
+ }
29
+
30
+ &&&.fail {
31
+ border-color: var(--privy-color-error);
32
+ border-bottom-color: var(--privy-color-error);
33
+ }
34
+ `,m=t.styled(g)`
35
+ && {
36
+ border-bottom-color: ${e=>e.color??"var(--privy-color-accent)"};
37
+ animation: none;
38
+ opacity: 0.5;
39
+ }
40
+ `;let y=t.styled(g)`
41
+ && {
42
+ height: 1rem;
43
+ width: 1rem;
44
+ margin: 2px 0;
45
+ border-width: 1.5px;
46
+
47
+ /* Override default Loader to match button transitions */
48
+ transition: border-color 200ms ease;
49
+ }
50
+ `;function x(e){return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...e,children:r.jsx("g",{fill:e.color||"var(--privy-color-foreground)",children:r.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let f=t.styled.div`
51
+ margin-top: 16px;
52
+ font-size: 13px;
53
+ text-align: center;
54
+ color: var(--privy-color-foreground-3);
55
+
56
+ && > a {
57
+ color: var(--privy-color-accent);
58
+ }
59
+ `;const b=t.styled.div`
60
+ display: flex;
61
+ align-items: center;
62
+ justify-content: center;
63
+ padding-top: 8px;
64
+ padding-bottom: 12px;
65
+ gap: 8px;
66
+
67
+ font-size: 13px;
68
+
69
+ && a {
70
+ padding: 0.5rem 0;
71
+
72
+ &:hover {
73
+ text-decoration: none;
74
+ }
75
+ }
76
+
77
+ @media all and (display-mode: standalone) {
78
+ padding-bottom: 30px;
79
+ }
80
+ `,w=({address:e,showCopyIcon:t,url:a,className:i})=>a?r.jsx("a",{title:e,className:i,href:`${a}/address/${e}`,target:"_blank",children:o.formatWalletAddress(e)}):r.jsxs("button",{title:e,className:i,onClick:()=>navigator.clipboard.writeText(e).catch(console.error),children:[o.formatWalletAddress(e),t&&r.jsx(C,{})]});let C=t.styled(p.default)`
81
+ && {
82
+ display: inline;
83
+ }
84
+ stroke-width: 2;
85
+ height: 0.875rem;
86
+ width: 0.875rem;
87
+ margin-left: 0.125rem;
88
+ color: var(--privy-color-foreground-3);
89
+ `,j=t.keyframes`
90
+ from, to {
91
+ background: var(--privy-color-foreground-4);
92
+ color: var(--privy-color-foreground-4);
93
+ }
94
+
95
+ 50% {
96
+ background: var(--privy-color-foreground-accent);
97
+ color: var(--privy-color-foreground-accent);
98
+ }
99
+ `;const $=t.css`
100
+ ${e=>e.$isLoading?t.css`
101
+ width: 35%;
102
+ animation: ${j} 2s linear infinite;
103
+ border-radius: var(--privy-border-radius-sm);
104
+ `:""}
105
+ `,P=({children:e,color:t,isLoading:o,isPulsing:a,...i})=>r.jsx(k,{$color:t,$isLoading:o,$isPulsing:a,...i,children:e});let k=t.styled.span`
106
+ padding: 0.125rem 0.5rem;
107
+ font-size: 0.75rem;
108
+ font-weight: 500;
109
+ line-height: 1.125rem; /* 150% */
110
+ border-radius: var(--privy-border-radius-sm);
111
+
112
+ ${e=>{let r,o;"green"===e.$color&&(r="var(--privy-color-success-dark)",o="var(--privy-color-success-light)"),"red"===e.$color&&(r="var(--privy-color-error)",o="var(--privy-color-error-light)"),"gray"===e.$color&&(r="var(--privy-color-foreground-2)",o="var(--privy-color-background-2)");let a=t.keyframes`
113
+ from, to {
114
+ background-color: ${o};
115
+ }
116
+
117
+ 50% {
118
+ background-color: rgba(${o}, 0.8);
119
+ }
120
+ `;return t.css`
121
+ color: ${r};
122
+ background-color: ${o};
123
+ ${e.$isPulsing&&t.css`
124
+ animation: ${a} 3s linear infinite;
125
+ `};
126
+ `}}
127
+
128
+ ${$}
129
+ `,S=e.createContext({});let M=e=>`privy:${e}:recent-login-method`,I=e=>`privy:${e}:recent-login-wallet-client`,W=e=>`privy:${e}:recent-login-chain-type`;const F=t.styled.div`
130
+ display: flex;
131
+ flex-direction: column;
132
+ `,L=t.styled.span`
133
+ text-align: left;
134
+ font-size: 0.75rem;
135
+ font-weight: 500;
136
+ line-height: 1.125rem; /* 150% */
137
+
138
+ color: var(--privy-color-error);
139
+ `,A=t.styled.span`
140
+ color: var(--privy-color-foreground-3);
141
+ font-size: 0.75rem;
142
+ font-weight: 500;
143
+ line-height: 1.125rem; /* 150% */
144
+ `,E=t.css`
145
+ && {
146
+ border-width: 1px;
147
+ padding: 0.5rem 1rem;
148
+ }
149
+
150
+ width: 100%;
151
+ text-align: left;
152
+ border: solid 1px var(--privy-color-foreground-4);
153
+ border-radius: var(--privy-border-radius-md);
154
+ display: flex;
155
+ justify-content: space-between;
156
+ align-items: center;
157
+
158
+ ${e=>"error"===e.$state?"border-color: var(--privy-color-error);":""}
159
+ `,T=t.styled.div`
160
+ ${E}
161
+ `,V=t.styled.span`
162
+ margin-top: 4px;
163
+ color: var(--privy-color-foreground);
164
+ text-align: center;
165
+
166
+ font-size: 0.875rem;
167
+ font-weight: 400;
168
+ line-height: 1.375rem; /* 157.143% */
169
+
170
+ && a {
171
+ color: var(--privy-color-accent);
172
+ }
173
+ `,Z=t.styled.span`
174
+ color: var(--privy-color-foreground);
175
+ font-size: 1.125rem;
176
+ font-weight: 600;
177
+ line-height: 1.875rem; /* 166.667% */
178
+ text-align: center;
179
+ `,N=t.styled.span`
180
+ display: flex;
181
+ flex-direction: column;
182
+ gap: 0.35rem;
183
+ width: 100%;
184
+ `,_=t.styled.span`
185
+ display: flex;
186
+ width: 100%;
187
+ justify-content: space-between;
188
+ gap: 0.5rem;
189
+ `;let B=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),H=e=>B.format(e);let q=2n**256n-1n;let z=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];let R=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];let O=e.createContext({activeWallet:void 0,setActiveWallet:i.notImplemented}),U=e=>`privy:${e}:active-wallet-connection`;exports.ActiveWalletProvider=({children:t})=>{let n=o.useAppConfig(),{ready:s,wallets:c}=i.useWallets(),{ready:l,wallets:d}=a.useSolanaWallets(),[p,u]=e.useState();return e.useEffect((()=>{if(!n.id||!s||!l)return;let e=v.get(U(n.id));e&&p?.address!==e&&(c.some((r=>r.address===e))?u(c.find((r=>r.address===e))):d.some((r=>r.address===e))?u(d.find((r=>r.address===e))):v.del(U(n.id)))}),[n.id,s,l,c,d]),r.jsx(O.Provider,{value:{activeWallet:p,setActiveWallet:e=>{u(e),n.id&&v.put(U(n.id),e.address)}},children:t})},exports.Address=w,exports.BlobbyFooter=()=>r.jsx(b,{children:r.jsx("a",{href:"https://www.privy.io/",target:"_blank",children:r.jsx(x,{height:13,width:150})})}),exports.Box=T,exports.BoxStyles=E,exports.ButtonLoader=e=>r.jsx(y,{color:e.color||"var(--privy-color-foreground-3)"}),exports.Chip=P,exports.Column=F,exports.ConnectionLoader=({success:e,fail:t})=>r.jsxs(r.Fragment,{children:[r.jsx(g,{className:e?"success":t?"fail":""}),r.jsx(m,{className:e?"success":t?"fail":""})]}),exports.Copy=({color:e,...t})=>r.jsx("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...t,children:r.jsx("g",{children:r.jsx("path",{fill:e||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"})})}),exports.ErrorMessage=L,exports.Loader=g,exports.LoaderFaint=m,exports.LoadingSkeleton=$,exports.ModalFooter=b,exports.RecentlyUsedAccountProvider=({children:t})=>{let i=o.useAppConfig(),[n,s]=e.useState({});return a.usePrivyEventSubscription("login",{onComplete:(e,r,t,o,a)=>{a&&"passkey"!==a.type&&"cross_app"!==a.type&&("wallet"!==a.type||"privy"!==a.walletClientType)&&(v.put(M(i.id),a.type),"wallet"===a.type?(v.put(I(i.id),a.walletClientType),v.put(W(i.id),a.chainType),s({accountType:a.type,walletClientType:a.walletClientType,chainType:a.chainType})):(v.del(I(i.id)),v.del(W(i.id)),s({accountType:a.type})))}}),e.useEffect((()=>{if(!i.id)return;let e=v.get(M(i.id)),r=v.get(I(i.id)),t=v.get(W(i.id));e&&s("wallet"===e?{accountType:e,walletClientType:r,chainType:t}:{accountType:e})}),[i.id]),r.jsx(S.Provider,{value:n,children:t})},exports.Row=_,exports.Rows=N,exports.Subtitle=V,exports.TermsAndConditions=function(e){let{legal:{privacyPolicyUrl:t,termsAndConditionsUrl:o,requireUsersAcceptTerms:a}}=e.app;if(a&&!e.alwaysShowImplicitConsent||!o&&!t)return r.jsx(f,{});let i=!(!t||!o);return r.jsxs(f,{children:["By logging in I agree to the"," ",o&&r.jsx("a",{href:o,target:"_blank",children:i?"Terms":"Terms of Service"}),i&&" & ",t&&r.jsx("a",{href:t,target:"_blank",children:"Privacy Policy"})]})},exports.Title=Z,exports.WalletCards=({...e})=>r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[r.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),r.jsx("path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2"}),r.jsx("path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21"})]}),exports.WalletInfoCard=({errMsg:e,balance:t,address:o,isLoading:a,className:i,title:n,isPulsing:s,showIcon:c,statusColor:l="green"})=>{let d;return d=l||(e?"red":"green"),r.jsxs(r.Fragment,{children:[r.jsxs(T,{className:i,$state:e?"error":void 0,children:[r.jsxs(F,{children:[r.jsx(A,{children:n||"Pay with"}),r.jsx(w,{address:o,showCopyIcon:c||!!e})]}),void 0!==t&&r.jsx(P,{isLoading:a,isPulsing:s,color:d,children:t})]}),e&&r.jsx(L,{style:{marginTop:"0.25rem"},children:e})]})},exports.e=function(){try{let e="privy:__session_storage__test",r=new h;return r.put(e,"blobby"),r.del(e),!0}catch(e){return!1}},exports.extractChainIdFromCAIP2=function(e){let r=new RegExp(RegExp("^eip155:(?<chainId>\\d+)$","gm")),t=r.exec(e)?.groups?.chainId;if(t)return parseInt(t);throw Error("Chain ID not compatible with CAIP-2 format.")},exports.formatErc20TokenAmount=({amount:e,decimals:r})=>e===q?"Maximum":Intl.NumberFormat(void 0,{maximumFractionDigits:r}).format(Number(e)/10**r),exports.getBlockExplorerUrlForAddress=(e,r)=>{let{chains:t}=i.usePrivyInternal(),a=`https://etherscan.io/address/${r}`,n=`${o.getBlockExplorer(e,t)}/address/${r}`;if(!n)return a;try{new URL(n)}catch{return a}return n},exports.getDollarsFromStringFloat=(e,r)=>{let t=H(r*parseFloat(e));return"$0.00"!==t?t:"<$0.01"},exports.getDollarsFromWei=(e,r)=>{let t=H(r*parseFloat(c.formatEther(e)));return"$0.00"===t?"<$0.01":t},exports.getErc20Balance=async({chain:e,address:r,appId:t,rpcConfig:a,erc20Address:i})=>{let n=l.createPublicClient({chain:e,transport:l.http(o.getJsonRpcEndpointFromChain(e,a,t))});return{balance:await n.readContract({address:i,abi:z,functionName:"balanceOf",args:[r]}).catch((()=>0n)),chain:e}},exports.getErc20TokenInfo=async({address:e,chain:r,rpcConfig:t,privyAppId:a})=>{try{let i=l.createPublicClient({chain:r,transport:l.http(o.getJsonRpcEndpointFromChain(r,t,a))}),[n,s]=await Promise.all([i.readContract({abi:R,address:e,functionName:"symbol"}),i.readContract({abi:R,address:e,functionName:"decimals"})]);return{decimals:s,symbol:n}}catch(e){return console.log(e),null}},exports.getNativeCurrencyFromWei=(e,r,t=6,o=!1)=>{let a=parseFloat(c.formatEther(e)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return o?`${a} ${r}`:`${"0"===a?"<0.001":a} ${r}`},exports.i=u,exports.r=function(e){let r={};return void 0!==e.to&&(r.to=e.to),void 0!==e.data&&(r.data=e.data),void 0!==e.chainId&&(r.chainId=e.chainId),void 0!==e.type&&(r.type=e.type),void 0!==e.accessList&&(r.accessList=e.accessList),void 0!==e.nonce&&(r.nonce=u(e.nonce).toNumber()),void 0!==e.gasLimit&&(r.gasLimit=u(e.gasLimit)),void 0!==e.gasPrice&&(r.gasPrice=u(e.gasPrice)),void 0!==e.value&&(r.value=u(e.value)),void 0!==e.maxFeePerGas&&(r.maxFeePerGas=u(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=u(e.maxPriorityFeePerGas)),r},exports.sumWeiQuantitiesToHexString=e=>e.map(u).reduce(((e,r)=>e.add(r)),s.BigNumber.from(0)).toHexString(),exports.t=function(e){if("number"==typeof e||"bigint"==typeof e||"string"==typeof e)return e;if("function"==typeof e.toHexString)return e.toHexString();throw Error(`Expected numeric value but received ${e}`)},exports.te=v,exports.useActiveWallet=function(){let{activeWallet:r,setActiveWallet:t}=e.useContext(O);return{wallet:r,network:r?"ethereum"===r.type?r.chainId:"solana":void 0,setActiveWallet:t}},exports.useConnectWallet=function(r){let{connectWallet:t}=e.useContext(i.PrivyContext);return a.usePrivyEventSubscription("connectWallet",r),{connectWallet:t}},exports.useElementHeight=r=>{let[t,o]=e.useState("auto");return e.useEffect((()=>{let e=new ResizeObserver((e=>{o(e[0]?.contentRect.height??"auto")}));return r.current&&e.observe(r.current),()=>{r.current&&e.unobserve(r.current)}}),[r.current]),t},exports.useFundWallet=e=>{a.usePrivyEventSubscription("fundWallet",e);let{fundWallet:r}=i.usePrivyInternal();return{fundWallet:r}},exports.useLogin=function(r){let{login:t}=e.useContext(i.PrivyContext);return a.usePrivyEventSubscription("login",r),{login:t}},exports.useLogout=function(r){let{logout:t}=e.useContext(i.PrivyContext);return a.usePrivyEventSubscription("logout",r),{logout:t}},exports.useRecentlyUsedLogin=()=>e.useContext(S),exports.useWalletBalance=function({rpcConfig:r,appId:t,address:a,chain:n}){let{chains:s}=i.usePrivyInternal(),[c,d]=e.useState(0n),[p,u]=e.useState(!1),h=e.useMemo((()=>{let e=n||s[0];if(e)return l.createPublicClient({chain:n,transport:l.http(o.getJsonRpcEndpointFromChain(e,r,t))})}),[n,r,t]),v=e.useCallback((async()=>{if(!a||!h)return;u(!0);let e=await h.getBalance({address:a}).catch(console.error);return e?(d(e),u(!1),e):void 0}),[h,a,d]);return e.useEffect((()=>{v().catch(console.error)}),[]),{balance:c,isLoading:p,reloadBalance:v}};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),t=require("./useWallets-BygaNfXg.js");const n=e.createContext(void 0);let o=()=>e.useContext(n);function r(e,t,n,...o){for(let r of e.current[t][n])r(...o)}exports.PrivyEventsContext=n,exports.emitPrivyEvent=r,exports.privyEventsDefault={login:{onComplete:[],onError:[],onOAuthLoginComplete:[]},logout:{onSuccess:[]},connectWallet:{onSuccess:[],onError:[]},createWallet:{onSuccess:[],onError:[]},linkAccount:{onSuccess:[],onError:[]},update:{onSuccess:[],onError:[]},configureMfa:{onMfaRequired:[]},setWalletPassword:{onSuccess:[],onError:[]},setWalletRecovery:{onSuccess:[],onError:[]},signMessage:{onSuccess:[],onError:[]},signTypedData:{onSuccess:[],onError:[]},sendTransaction:{onSuccess:[],onError:[]},sendSolanaTransaction:{onSuccess:[],onError:[]},accessToken:{onAccessTokenGranted:[],onAccessTokenRemoved:[]},oAuthAuthorization:{onOAuthTokenGrant:[]},fundWallet:{onUserExited:[]},fundSolanaWallet:{onUserExited:[]},customAuth:{onAuthenticated:[],onUnauthenticated:[]}},exports.useEmitPrivyEvent=function(){let e=o();return(t,n,...o)=>r(e,t,n,...o)},exports.usePrivyEventSubscription=function(t,n){if(!n)return;let r=o().current[t];return e.useEffect((()=>{for(let[e,o]of Object.entries(n))r.hasOwnProperty(e)||console.warn(`Invalid event type "${e}" for action "${t}"`),r[e]?.push(o);return()=>{for(let[e,o]of Object.entries(n))r.hasOwnProperty(e)||console.warn(`Invalid event type "${e}" for action "${t}"`),r[e]=r[e]?.filter((e=>e!==o))}}),[n])},exports.useSolanaWallets=()=>{let{embeddedSolanaWallet:e,exportSolanaWallet:n,createEmbeddedSolanaWallet:o,solanaWallets:r,delegateWallet:a}=t.usePrivyInternal(),{ready:s}=t.useWallets(),{user:l}=t.usePrivyContext();return{ready:s,createWallet:o,exportWallet:n,delegateWalletAction:async()=>{let e=t.getPrivySolanaWallet(l);if(!e)throw new t.PrivyClientError("User must have a solana wallet in order to delegate actions");return await a({address:e.address,chainType:"solana"})},wallets:r.concat(e?[e]:[])}};
@@ -0,0 +1 @@
1
+ "use strict";var e,t=require("ofetch"),i=require("@ethersproject/address"),r=require("react");class a extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,i){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=i}}class s extends a{constructor(e,t,i,r,a,s){super(i,r,a),this.type=e,this.status=t,this.data=s}}class l extends a{constructor(e,t,i){super(e,t,i),this.type="client_error"}}const n=e=>e instanceof a?e:e instanceof Error?new l(e.message,e):new l(`Internal error: ${e}`);exports.PrivyErrorCode=void 0,(e=exports.PrivyErrorCode||(exports.PrivyErrorCode={})).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",e.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",e.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",e.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",e.INVALID_DATA="invalid_data",e.INVALID_CAPTCHA="invalid_captcha",e.LINKED_TO_ANOTHER_USER="linked_to_another_user",e.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",e.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",e.FAILED_TO_UPDATE_ACCOUNT="failed_to_update_account",e.USER_EXITED_UPDATE_FLOW="exited_update_flow",e.ALLOWLIST_REJECTED="allowlist_rejected",e.OAUTH_USER_DENIED="oauth_user_denied",e.OAUTH_UNEXPECTED="oauth_unexpected",e.UNKNOWN_AUTH_ERROR="unknown_auth_error",e.USER_EXITED_AUTH_FLOW="exited_auth_flow",e.USER_EXITED_LINK_FLOW="exited_link_flow",e.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",e.MUST_BE_AUTHENTICATED="must_be_authenticated",e.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",e.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",e.CLIENT_REQUEST_TIMEOUT="client_request_timeout",e.INVALID_CREDENTIALS="invalid_credentials",e.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",e.UNKNOWN_MFA_ERROR="unknown_mfa_error",e.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",e.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",e.EMBEDDED_WALLET_CREATE_ERROR="embedded_wallet_create_error",e.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",e.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",e.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",e.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",e.TRANSACTION_FAILURE="transaction_failure",e.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",e.NOT_SUPPORTED="not_supported",e.CAPTCHA_TIMEOUT="captcha_timeout",e.INVALID_MESSAGE="invalid_message",e.UNABLE_TO_SIGN="unable_to_sign",e.CAPTCHA_FAILURE="captcha_failure",e.CAPTCHA_DISABLED="captcha_disabled",e.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",e.TOO_MANY_REQUESTS="too_many_requests",e.USER_LIMIT_REACHED="max_accounts_reached",e.DISALLOWED_LOGIN_METHOD="disallowed_login_method",e.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",e.PASSKEY_NOT_ALLOWED="passkey_not_allowed",e.USER_DOES_NOT_EXIST="user_does_not_exist",e.INSUFFICIENT_BALANCE="insufficient_balance",e.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required";const o=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};function d(e){return e?new Date(1e3*e):null}function _(e,t){return e.slice().sort(((e,t)=>(t.firstVerifiedAt??t.verifiedAt).getTime()-(e.firstVerifiedAt??e.verifiedAt).getTime())).find((e=>e.type===t))}const u=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType&&0===e.walletIndex))||null,c=e=>e?.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType)),p=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType&&0===e.walletIndex))||null,m=e=>u(e)??p(e),f=e=>{if("ethereum"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier"};if("solana"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")};const h=r.createContext({isNewUserThisSession:!1,walletConnectionStatus:null,connectors:[],solanaWallets:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,appId:"notAdded",customAuthStatus:{status:"not-enabled"},noPromptOnSignature:{current:!1},nativeTokenSymbolForChainId:o,initializeWalletProxy:o,getAuthMeta:o,getAuthFlow:o,closePrivyModal:o,openPrivyModal:o,connectWallet:o,initLoginWithWallet:o,loginWithWallet:o,initLoginWithFarcaster:o,loginWithFarcaster:o,loginWithCode:o,initLoginWithEmail:o,initLoginWithSms:o,initUpdateEmail:o,initUpdatePhone:o,resendEmailCode:o,resendSmsCode:o,initLoginWithHeadlessOAuth:o,loginWithHeadlessOAuth:o,crossAppAuthFlow:o,initLoginWithOAuth:o,recoveryOAuthFlow:o,loginWithOAuth:o,passkeyAuthState:{status:"initial"},setPasskeyAuthState:o,initLoginWithPasskey:o,loginWithPasskey:o,initLinkWithPasskey:o,linkWithPasskey:o,refreshUser:o,loginWithGuestAccountFlow:o,walletProxy:null,createAnalyticsEvent:o,acceptTerms:o,getUsdTokenPrice:o,getUsdPriceForSol:o,recoverPrimaryWallet:o,updateWallets:o,fundWallet:o,fundSolanaWallet:o,setReadyToTrue:o,requestFarcasterSignerStatus:o,initLoginWithTelegram:o,loginWithTelegram:o,generateSiweMessage:o,generateSiweMessageForSmartWallet:o,linkWithSiwe:o,linkSmartWallet:o,delegateWallet:o,revokeDelegatedWallets:o,embeddedSolanaWallet:null,createEmbeddedSolanaWallet:o,exportSolanaWallet:o,solanaSignMessage:o,connectCoinbaseSmartWallet:o,initiateAccountTransfer:o,emailOtpState:{status:"initial"},setEmailOtpState:o,smsOtpState:{status:"initial"},setSmsOtpState:o,siweState:{status:"initial"},setSiweState:o,oAuthState:{status:"initial"},setOAuthState:o,isHeadlessOAuthLoading:!1}),y=r.createContext({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:o,login:o,connectOrCreateWallet:o,linkEmail:o,linkPhone:o,linkFarcaster:o,linkWallet:o,startCrossAppAuthFlow:o,linkGoogle:o,linkTwitter:o,linkDiscord:o,linkGithub:o,linkSpotify:o,linkInstagram:o,linkTelegram:o,linkTiktok:o,linkLinkedIn:o,linkApple:o,linkPasskey:o,updateEmail:o,updatePhone:o,logout:o,getAccessToken:o,getEthereumProvider:o,getEthersProvider:o,getWeb3jsProvider:o,unlinkEmail:o,unlinkPhone:o,unlinkWallet:o,unlinkGoogle:o,unlinkTwitter:o,unlinkDiscord:o,unlinkGithub:o,unlinkSpotify:o,unlinkInstagram:o,unlinkTiktok:o,unlinkLinkedIn:o,unlinkApple:o,unlinkCrossAppAccount:o,unlinkFarcaster:o,unlinkTelegram:o,unlinkPasskey:o,setActiveWallet:o,forkSession:o,createWallet:o,signMessage:o,signTypedData:o,enrollInMfa:o,initEnrollmentWithSms:o,initEnrollmentWithTotp:o,initEnrollmentWithPasskey:o,promptMfa:o,init:o,submitEnrollmentWithSms:o,submitEnrollmentWithTotp:o,submitEnrollmentWithPasskey:o,unenroll:o,submit:o,cancel:o,sendTransaction:o,sendSolanaTransaction:o,exportWallet:o,setWalletPassword:o,setWalletRecovery:o,requestFarcasterSignerFromWarpcast:o,getFarcasterSignerPublicKey:o,signFarcasterMessage:o,createGuestAccount:o,signMessageWithCrossAppWallet:o,signTypedDataWithCrossAppWallet:o,sendTransactionWithCrossAppWallet:o,isModalOpen:!1,mfaMethods:[]}),A=r.createContext(null);exports.InternalPrivyContext=h,exports.PrivyApiError=s,exports.PrivyClientError=l,exports.PrivyConnectorError=class extends a{constructor(e,t,i){super(e,t,i),this.type="connector_error"}},exports.PrivyContext=y,exports.PrivyEmbeddedWalletError=class extends l{constructor(e="Embedded wallet error",t){super(e,t,"unknown_embedded_wallet_error")}},exports.PrivyError=a,exports.PrivyNotReadyError=class extends l{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}},exports.PrivyTimeoutError=class extends l{constructor(){super("Request timed out",void 0,"client_request_timeout")}},exports.PrivyUnauthenticatedError=class extends l{constructor(e="User must be authenticated"){super(e,void 0,"must_be_authenticated")}},exports.PrivyUserLimitReachedError=class extends l{constructor(e){super("This application is in development mode and must be upgraded to production to log in new users.",e,"max_accounts_reached")}},exports.UseWalletsContext=A,exports.convertUserResponseToUser=function(e){if(!e)return null;let t=function(e){let t=[];for(let i of e){let e=i.type;switch(i.type){case"wallet":let r={address:i.address,type:i.type,imported:i.imported,delegated:i.delegated,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at),chainType:i.chain_type,chainId:i.chain_id,walletClient:"privy"===i.wallet_client_type?"privy":"unknown",walletClientType:i.wallet_client_type,connectorType:i.connector_type,recoveryMethod:i.recovery_method,walletIndex:i.wallet_index};t.push(r);break;case"smart_wallet":let a={address:i.address,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at),smartWalletType:i.smart_wallet_type};t.push(a);break;case"cross_app":let s={type:i.type,subject:i.subject,embeddedWallets:i.embedded_wallets,smartWallets:i.smart_wallets,providerApp:{id:i.provider_app_id},verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(s);break;case"email":let l={address:i.address,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(l);break;case"phone":let n={number:i.phoneNumber,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(n);break;case"google_oauth":let o={subject:i.subject,email:i.email,name:i.name,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(o);break;case"spotify_oauth":let _={subject:i.subject,email:i.email,name:i.name,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(_);break;case"instagram_oauth":let u={subject:i.subject,username:i.username,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(u);break;case"twitter_oauth":let c={subject:i.subject,username:i.username,name:i.name,type:i.type,profilePictureUrl:i.profile_picture_url,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(c);break;case"discord_oauth":let p={subject:i.subject,username:i.username,email:i.email,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(p);break;case"github_oauth":let m={subject:i.subject,username:i.username,name:i.name,email:i.email,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(m);break;case"tiktok_oauth":let f={subject:i.subject,username:i.username,name:i.name,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(f);break;case"linkedin_oauth":let h={subject:i.subject,name:i.name,email:i.email,vanityName:i.vanity_name,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(h);break;case"apple_oauth":let y={subject:i.subject,email:i.email,type:i.type,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(y);break;case"custom_auth":t.push({type:i.type,customUserId:i.custom_user_id,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)});break;case"farcaster":let A={type:i.type,fid:i.fid,ownerAddress:i.owner_address,displayName:i.display_name,username:i.username,bio:i.bio,pfp:i.profile_picture_url,url:i.homepage_url,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at),signerPublicKey:i.signer_public_key};t.push(A);break;case"passkey":let E={type:i.type,enrolledInMfa:i.enrolled_in_mfa,credentialId:i.credential_id,authenticatorName:i.authenticator_name,createdWithDevice:i.created_with_device,createdWithOs:i.created_with_os,createdWithBrowser:i.created_with_browser,verifiedAt:d(i.verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(E);break;case"telegram":let v={type:i.type,telegramUserId:i.telegram_user_id,firstName:i.first_name,lastName:i.last_name,username:i.username,photoUrl:i.photo_url,verifiedAt:d(i.first_verified_at),firstVerifiedAt:d(i.first_verified_at),latestVerifiedAt:d(i.latest_verified_at)};t.push(v);break;default:console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),i=_(t,"wallet"),r=_(t,"smart_wallet"),a=_(t,"email"),s=_(t,"phone"),l=_(t,"google_oauth"),n=_(t,"twitter_oauth"),o=_(t,"discord_oauth"),u=_(t,"github_oauth"),c=_(t,"spotify_oauth"),p=_(t,"instagram_oauth"),m=_(t,"tiktok_oauth"),f=_(t,"linkedin_oauth"),h=_(t,"apple_oauth"),y=_(t,"farcaster"),A=_(t,"telegram"),E=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:d(t)})));return{id:e.id,createdAt:d(e.created_at),linkedAccounts:t,email:a&&{address:a?.address},phone:s&&{number:s?.number},wallet:i&&{address:i.address,chainType:i.chainType,chainId:i.chainId,walletClient:i.walletClient,walletClientType:i.walletClientType,connectorType:i.connectorType,recoveryMethod:i.recoveryMethod,imported:i.imported,delegated:i.delegated,walletIndex:i.walletIndex},smartWallet:r&&{address:r.address,smartWalletType:r.smartWalletType},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:n&&{subject:n.subject,username:n.username,name:n.name,profilePictureUrl:n.profilePictureUrl},discord:o&&{subject:o.subject,username:o.username,email:o.email},github:u&&{subject:u.subject,username:u.username,name:u.name,email:u.email},spotify:c&&{subject:c.subject,email:c.email,name:c.name},instagram:p&&{subject:p.subject,username:p.username},tiktok:m&&{subject:m.subject,username:m.username,name:m.name},linkedin:f&&{subject:f.subject,name:f.name,email:f.email,vanityName:f.vanityName},apple:h&&{subject:h.subject,email:h.email},farcaster:y&&{fid:y.fid,ownerAddress:y.ownerAddress,displayName:y.displayName,username:y.username,bio:y.bio,pfp:y.pfp,url:y.url,signerPublicKey:y.signerPublicKey},telegram:A&&{telegramUserId:A.telegramUserId,firstName:A.firstName,lastName:A.lastName,username:A.username,photoUrl:A.photoUrl},delegatedWallets:[],mfaMethods:E.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}},exports.formatApiError=e=>{if(e instanceof a)return e;if(!(e instanceof t.FetchError))return n(e);if(!e.response)return new s("api_error",null,e.message,e);let{type:i,message:r,error:l,code:o}=e.data;return new s(i||"ApiError",e.response.status,r||l,e,o,e.data)},exports.formatPrivyError=n,exports.getEntropyDetailsFromAccount=f,exports.getEntropyDetailsFromUser=e=>{let t=m(e);if(!t)throw Error("Failed to find primary wallet");return f(t)},exports.getEthereumSigningAndRootWallet=(e,t)=>{let r=(a=e,a?.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&"ethereum"===e.chainType))).find((e=>i.getAddress(e.address)===i.getAddress(t)));var a;return{signingWallet:r,rootWallet:r?r.imported?r:u(e):void 0}},exports.getImportedPrivyEthereumWallet=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType))||null,exports.getLatestPrivyEthereumWallet=e=>c(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e))||null,exports.getPrivyEthereumHDWallets=c,exports.getPrivyEthereumWallet=u,exports.getPrivyPrimaryWallet=m,exports.getPrivySolanaWallet=p,exports.getPrivyWalletWithAddress=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.address===t))||null,exports.getSolanaSigningAndRootWallet=(e,t)=>{let i=(e=>e?.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType)))(e).find((e=>e.address.toLowerCase()===t.toLowerCase()));return{signingWallet:i,rootWallet:0===i?.walletIndex?i:p(e)}},exports.notImplemented=o,exports.notImplementedWithMessage=e=>()=>{throw Error(e.trim())},exports.shouldProceedtoEmbeddedWalletCreationFlow=(e,t)=>!(u(e)||p(e)||"all-users"!==t&&("users-without-wallets"!==t||(e=>e.linkedAccounts.filter((e=>"wallet"===e.type)))(e)?.length)),exports.usePrivyContext=()=>r.useContext(y),exports.usePrivyInternal=()=>r.useContext(h),exports.useWallets=function(){let e=r.useContext(A);return null===e?(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1}):e};
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as User, d as PrivyClientConfig, e as EIP1193Provider, W as WalletTimeoutError, f as RpcConfig, g as EntropyIdVerifier$1, h as RequestArguments, i as WalletConnector, B as BaseConnectedEthereumWallet, j as WalletClientType, k as ConnectedWalletMetadata, l as ConnectorType, m as WalletListEntry, n as ExternalWalletsConfig, o as BaseConnectedWallet, p as SolanaWalletConnector, q as ConnectWalletModalOptions, L as LoginModalOptions, r as CreateWalletOptions, s as Wallet, t as SetWalletRecoveryOptions, u as SignMessageModalUIOptions, v as SignTypedDataParams, w as MfaMethod, x as UnsignedTransactionRequest, y as SendTransactionModalUIOptions, F as FundWalletConfig, T as TransactionReceipt, z as SupportedSolanaTransaction, A as SolanaTransactionReceipt, D as ConnectedWallet, O as OAuthTokens, G as CrossAppProviderDetails, H as OAuthProviderType, I as MoonpaySignRequest, J as MoonpaySignResponse, K as SmartWalletConfig, N as PrivyServerConfig, Q as LoginMethod, V as SiweWalletMetadata, X as TelegramAuthResult, Y as OAuthUserInfo, Z as OAuthFlowState, _ as LoginWithCode, $ as OtpFlowState, a0 as PasskeyFlowState, a1 as SiweFlowState, a2 as UnsignedTransactionRequestWithChainId, a3 as CustomAuthFlowState } from './types-BwcPm4mZ.js';
4
- export { am as Apple, aw as AppleOAuthWithMetadata, aL as ConnectedSolanaWallet, aE as ContractUIOptions, ap as CrossAppAccount, az as CrossAppAccountWithMetadata, aj as Discord, as as DiscordOAuthWithMetadata, aB as Email, ae as EmailWithMetadata, aI as Farcaster, ax as FarcasterWithMetadata, ak as Github, at as GithubOAuthWithMetadata, ah as Google, aq as GoogleOAuthWithMetadata, al as LinkedIn, av as LinkedInOAuthWithMetadata, aK as LoginMethodOrderOption, a5 as MessageTypes, a7 as MoonpayConfig, a8 as MoonpayCurrencyCode, aG as MoonpayFundingConfig, a9 as MoonpayPaymentMethod, aF as NativeFundingConfig, ad as NonEmptyArray, aJ as Passkey, aA as PasskeyWithMetadata, aC as Phone, af as PhoneWithMetadata, aH as PriceDisplayOptions, aa as Quantity, ac as SolanaCluster, a6 as SolanaFundingConfig, ao as Telegram, ay as TelegramWithMetadata, an as Tiktok, au as TiktokOAuthWithMetadata, ab as TransactionLog, aD as TransactionUIOptions, ai as Twitter, ar as TwitterOAuthWithMetadata, a4 as TypedMessage, ag as WalletWithMetadata } from './types-BwcPm4mZ.js';
3
+ import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as User, d as PrivyClientConfig, e as EIP1193Provider, W as WalletTimeoutError, f as RpcConfig, g as EntropyIdVerifier$1, h as RequestArguments, i as WalletConnector, B as BaseConnectedEthereumWallet, j as WalletClientType, k as ConnectedWalletMetadata, l as ConnectorType, m as WalletListEntry, n as ExternalWalletsConfig, o as BaseConnectedWallet, p as SolanaWalletConnector, q as ConnectWalletModalOptions, L as LoginModalOptions, r as CreateWalletOptions, s as Wallet, t as SetWalletRecoveryOptions, u as SignMessageModalUIOptions, v as SignTypedDataParams, w as MfaMethod, x as UnsignedTransactionRequest, y as SendTransactionModalUIOptions, F as FundWalletConfig, T as TransactionReceipt, z as SupportedSolanaTransaction, A as SolanaTransactionReceipt, D as ConnectedWallet, O as OAuthTokens, G as CrossAppProviderDetails, H as OAuthProviderType, I as MoonpaySignRequest, J as MoonpaySignResponse, K as SmartWalletConfig, N as PrivyServerConfig, Q as LoginMethod, V as SiweWalletMetadata, X as TelegramAuthResult, Y as OAuthUserInfo, Z as OAuthFlowState, _ as LoginWithCode, $ as OtpFlowState, a0 as PasskeyFlowState, a1 as SiweFlowState, a2 as UnsignedTransactionRequestWithChainId, a3 as BaseConnectedWalletType, a4 as CustomAuthFlowState } from './types-Ft1QTGGG.js';
4
+ export { an as Apple, ax as AppleOAuthWithMetadata, aM as ConnectedSolanaWallet, aF as ContractUIOptions, aq as CrossAppAccount, aA as CrossAppAccountWithMetadata, ak as Discord, at as DiscordOAuthWithMetadata, aC as Email, af as EmailWithMetadata, aJ as Farcaster, ay as FarcasterWithMetadata, al as Github, au as GithubOAuthWithMetadata, ai as Google, ar as GoogleOAuthWithMetadata, am as LinkedIn, aw as LinkedInOAuthWithMetadata, aL as LoginMethodOrderOption, a6 as MessageTypes, a8 as MoonpayConfig, a9 as MoonpayCurrencyCode, aH as MoonpayFundingConfig, aa as MoonpayPaymentMethod, aG as NativeFundingConfig, ae as NonEmptyArray, aK as Passkey, aB as PasskeyWithMetadata, aD as Phone, ag as PhoneWithMetadata, aI as PriceDisplayOptions, ab as Quantity, ad as SolanaCluster, a7 as SolanaFundingConfig, ap as Telegram, az as TelegramWithMetadata, ao as Tiktok, av as TiktokOAuthWithMetadata, ac as TransactionLog, aE as TransactionUIOptions, aj as Twitter, as as TwitterOAuthWithMetadata, a5 as TypedMessage, ah as WalletWithMetadata } from './types-Ft1QTGGG.js';
5
5
  import { ExternalProvider, StaticJsonRpcProvider, Web3Provider } from '@ethersproject/providers';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { TurnstileProps } from '@marsidev/react-turnstile';
@@ -16,8 +16,8 @@ import * as _solana_web3_js from '@solana/web3.js';
16
16
  import { Connection } from '@solana/web3.js';
17
17
  import { AbstractProvider } from 'web3-core';
18
18
  import { FetchOptions } from 'ofetch';
19
- import { P as PrivyEvents } from './solana-D5xAHDt7.js';
20
- export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-D5xAHDt7.js';
19
+ import { P as PrivyEvents } from './solana-1XQ5a7lr.js';
20
+ export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-1XQ5a7lr.js';
21
21
  import 'viem';
22
22
  import '@privy-io/js-sdk-core';
23
23
  import '@metamask/eth-sig-util';
@@ -1266,6 +1266,9 @@ interface UseWalletsInterface {
1266
1266
  * The user's connected wallets.
1267
1267
  */
1268
1268
  wallets: ConnectedWallet[];
1269
+ /**
1270
+ * Whether the wallets are ready to be used.
1271
+ */
1269
1272
  ready: boolean;
1270
1273
  }
1271
1274
  declare function useWallets(): UseWalletsInterface;
@@ -2626,6 +2629,13 @@ declare function useToken(callbacks?: PrivyEvents['accessToken']): {
2626
2629
  getAccessToken: () => Promise<string | null>;
2627
2630
  };
2628
2631
 
2632
+ type UseActiveWallet = {
2633
+ wallet?: BaseConnectedWalletType;
2634
+ network?: string;
2635
+ setActiveWallet: (wallet: BaseConnectedWalletType) => void;
2636
+ };
2637
+ declare function useActiveWallet(): UseActiveWallet;
2638
+
2629
2639
  type UseOAuthTokens = {
2630
2640
  /**
2631
2641
  * For users who are authenticated, prompts the user to reauthorize an OAuth account of the specified type.
@@ -2820,4 +2830,4 @@ declare const LoginModal: ({ open }: {
2820
2830
  open: boolean;
2821
2831
  }) => react_jsx_runtime.JSX.Element;
2822
2832
 
2823
- export { AsExternalProvider, Captcha, ConnectWalletModalOptions, ConnectedWallet, ConnectorManager, CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, PrivyProxyProvider, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, SolanaTransactionReceipt, SupportedSolanaTransaction, TransactionReceipt, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWallet, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseOAuthTokens, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, addPrivyRpcToChain, addRpcUrlOverrideToChain, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useConnectCoinbaseSmartWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useExperimentalFarcasterSigner, useFarcasterSigner, useFundWallet, useGuestAccounts, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSms, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRegisterMfaListener, useSendSolanaTransaction, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignMessage, useSignTypedData, useToken, useUpdateAccount, useWallets };
2833
+ export { AsExternalProvider, Captcha, ConnectWalletModalOptions, ConnectedWallet, ConnectorManager, CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, PrivyProxyProvider, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, SolanaTransactionReceipt, SupportedSolanaTransaction, TransactionReceipt, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWallet, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseOAuthTokens, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, addPrivyRpcToChain, addRpcUrlOverrideToChain, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useExperimentalFarcasterSigner, useFarcasterSigner, useFundWallet, useGuestAccounts, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSms, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRegisterMfaListener, useSendSolanaTransaction, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignMessage, useSignTypedData, useToken, useUpdateAccount, useWallets };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { MouseEvent } from 'react';
3
- import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as User, d as PrivyClientConfig, e as EIP1193Provider, W as WalletTimeoutError, f as RpcConfig, g as EntropyIdVerifier$1, h as RequestArguments, i as WalletConnector, B as BaseConnectedEthereumWallet, j as WalletClientType, k as ConnectedWalletMetadata, l as ConnectorType, m as WalletListEntry, n as ExternalWalletsConfig, o as BaseConnectedWallet, p as SolanaWalletConnector, q as ConnectWalletModalOptions, L as LoginModalOptions, r as CreateWalletOptions, s as Wallet, t as SetWalletRecoveryOptions, u as SignMessageModalUIOptions, v as SignTypedDataParams, w as MfaMethod, x as UnsignedTransactionRequest, y as SendTransactionModalUIOptions, F as FundWalletConfig, T as TransactionReceipt, z as SupportedSolanaTransaction, A as SolanaTransactionReceipt, D as ConnectedWallet, O as OAuthTokens, G as CrossAppProviderDetails, H as OAuthProviderType, I as MoonpaySignRequest, J as MoonpaySignResponse, K as SmartWalletConfig, N as PrivyServerConfig, Q as LoginMethod, V as SiweWalletMetadata, X as TelegramAuthResult, Y as OAuthUserInfo, Z as OAuthFlowState, _ as LoginWithCode, $ as OtpFlowState, a0 as PasskeyFlowState, a1 as SiweFlowState, a2 as UnsignedTransactionRequestWithChainId, a3 as CustomAuthFlowState } from './types-BwcPm4mZ.js';
4
- export { am as Apple, aw as AppleOAuthWithMetadata, aL as ConnectedSolanaWallet, aE as ContractUIOptions, ap as CrossAppAccount, az as CrossAppAccountWithMetadata, aj as Discord, as as DiscordOAuthWithMetadata, aB as Email, ae as EmailWithMetadata, aI as Farcaster, ax as FarcasterWithMetadata, ak as Github, at as GithubOAuthWithMetadata, ah as Google, aq as GoogleOAuthWithMetadata, al as LinkedIn, av as LinkedInOAuthWithMetadata, aK as LoginMethodOrderOption, a5 as MessageTypes, a7 as MoonpayConfig, a8 as MoonpayCurrencyCode, aG as MoonpayFundingConfig, a9 as MoonpayPaymentMethod, aF as NativeFundingConfig, ad as NonEmptyArray, aJ as Passkey, aA as PasskeyWithMetadata, aC as Phone, af as PhoneWithMetadata, aH as PriceDisplayOptions, aa as Quantity, ac as SolanaCluster, a6 as SolanaFundingConfig, ao as Telegram, ay as TelegramWithMetadata, an as Tiktok, au as TiktokOAuthWithMetadata, ab as TransactionLog, aD as TransactionUIOptions, ai as Twitter, ar as TwitterOAuthWithMetadata, a4 as TypedMessage, ag as WalletWithMetadata } from './types-BwcPm4mZ.js';
3
+ import { C as Chain, U as UserRecoveryMethod, P as PrivyFarcasterSignerInitResponse, M as MfaSubmitArgs, E as EthereumRpcRequestType, S as SolanaRpcRequestType, a as EthereumRpcResponseType, b as SolanaRpcResponseType, c as User, d as PrivyClientConfig, e as EIP1193Provider, W as WalletTimeoutError, f as RpcConfig, g as EntropyIdVerifier$1, h as RequestArguments, i as WalletConnector, B as BaseConnectedEthereumWallet, j as WalletClientType, k as ConnectedWalletMetadata, l as ConnectorType, m as WalletListEntry, n as ExternalWalletsConfig, o as BaseConnectedWallet, p as SolanaWalletConnector, q as ConnectWalletModalOptions, L as LoginModalOptions, r as CreateWalletOptions, s as Wallet, t as SetWalletRecoveryOptions, u as SignMessageModalUIOptions, v as SignTypedDataParams, w as MfaMethod, x as UnsignedTransactionRequest, y as SendTransactionModalUIOptions, F as FundWalletConfig, T as TransactionReceipt, z as SupportedSolanaTransaction, A as SolanaTransactionReceipt, D as ConnectedWallet, O as OAuthTokens, G as CrossAppProviderDetails, H as OAuthProviderType, I as MoonpaySignRequest, J as MoonpaySignResponse, K as SmartWalletConfig, N as PrivyServerConfig, Q as LoginMethod, V as SiweWalletMetadata, X as TelegramAuthResult, Y as OAuthUserInfo, Z as OAuthFlowState, _ as LoginWithCode, $ as OtpFlowState, a0 as PasskeyFlowState, a1 as SiweFlowState, a2 as UnsignedTransactionRequestWithChainId, a3 as BaseConnectedWalletType, a4 as CustomAuthFlowState } from './types-Ft1QTGGG.js';
4
+ export { an as Apple, ax as AppleOAuthWithMetadata, aM as ConnectedSolanaWallet, aF as ContractUIOptions, aq as CrossAppAccount, aA as CrossAppAccountWithMetadata, ak as Discord, at as DiscordOAuthWithMetadata, aC as Email, af as EmailWithMetadata, aJ as Farcaster, ay as FarcasterWithMetadata, al as Github, au as GithubOAuthWithMetadata, ai as Google, ar as GoogleOAuthWithMetadata, am as LinkedIn, aw as LinkedInOAuthWithMetadata, aL as LoginMethodOrderOption, a6 as MessageTypes, a8 as MoonpayConfig, a9 as MoonpayCurrencyCode, aH as MoonpayFundingConfig, aa as MoonpayPaymentMethod, aG as NativeFundingConfig, ae as NonEmptyArray, aK as Passkey, aB as PasskeyWithMetadata, aD as Phone, ag as PhoneWithMetadata, aI as PriceDisplayOptions, ab as Quantity, ad as SolanaCluster, a7 as SolanaFundingConfig, ap as Telegram, az as TelegramWithMetadata, ao as Tiktok, av as TiktokOAuthWithMetadata, ac as TransactionLog, aE as TransactionUIOptions, aj as Twitter, as as TwitterOAuthWithMetadata, a5 as TypedMessage, ah as WalletWithMetadata } from './types-Ft1QTGGG.js';
5
5
  import { ExternalProvider, StaticJsonRpcProvider, Web3Provider } from '@ethersproject/providers';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import { TurnstileProps } from '@marsidev/react-turnstile';
@@ -16,8 +16,8 @@ import * as _solana_web3_js from '@solana/web3.js';
16
16
  import { Connection } from '@solana/web3.js';
17
17
  import { AbstractProvider } from 'web3-core';
18
18
  import { FetchOptions } from 'ofetch';
19
- import { P as PrivyEvents } from './solana-D5xAHDt7.js';
20
- export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-D5xAHDt7.js';
19
+ import { P as PrivyEvents } from './solana-1XQ5a7lr.js';
20
+ export { C as CallbackError, a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './solana-1XQ5a7lr.js';
21
21
  import 'viem';
22
22
  import '@privy-io/js-sdk-core';
23
23
  import '@metamask/eth-sig-util';
@@ -1266,6 +1266,9 @@ interface UseWalletsInterface {
1266
1266
  * The user's connected wallets.
1267
1267
  */
1268
1268
  wallets: ConnectedWallet[];
1269
+ /**
1270
+ * Whether the wallets are ready to be used.
1271
+ */
1269
1272
  ready: boolean;
1270
1273
  }
1271
1274
  declare function useWallets(): UseWalletsInterface;
@@ -2626,6 +2629,13 @@ declare function useToken(callbacks?: PrivyEvents['accessToken']): {
2626
2629
  getAccessToken: () => Promise<string | null>;
2627
2630
  };
2628
2631
 
2632
+ type UseActiveWallet = {
2633
+ wallet?: BaseConnectedWalletType;
2634
+ network?: string;
2635
+ setActiveWallet: (wallet: BaseConnectedWalletType) => void;
2636
+ };
2637
+ declare function useActiveWallet(): UseActiveWallet;
2638
+
2629
2639
  type UseOAuthTokens = {
2630
2640
  /**
2631
2641
  * For users who are authenticated, prompts the user to reauthorize an OAuth account of the specified type.
@@ -2820,4 +2830,4 @@ declare const LoginModal: ({ open }: {
2820
2830
  open: boolean;
2821
2831
  }) => react_jsx_runtime.JSX.Element;
2822
2832
 
2823
- export { AsExternalProvider, Captcha, ConnectWalletModalOptions, ConnectedWallet, ConnectorManager, CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, PrivyProxyProvider, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, SolanaTransactionReceipt, SupportedSolanaTransaction, TransactionReceipt, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWallet, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseOAuthTokens, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, addPrivyRpcToChain, addRpcUrlOverrideToChain, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useConnectCoinbaseSmartWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useExperimentalFarcasterSigner, useFarcasterSigner, useFundWallet, useGuestAccounts, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSms, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRegisterMfaListener, useSendSolanaTransaction, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignMessage, useSignTypedData, useToken, useUpdateAccount, useWallets };
2833
+ export { AsExternalProvider, Captcha, ConnectWalletModalOptions, ConnectedWallet, ConnectorManager, CustomAuthFlowState, EIP1193Provider, EthereumWalletConnector, FundWalletConfig, LoginModal, LoginModalOptions, LoginWithCode, MfaMethod, OAuthFlowState, OAuthProviderType, OAuthTokens, OtpFlowState, PasskeyFlowState, PrivyClient, PrivyClientConfig, PrivyEvents, type PrivyInterface, PrivyProvider, type PrivyProviderProps, PrivyProxyProvider, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, type SendCodeToEmail, type SendCodeToSms, SendTransactionModalUIOptions, SignMessageModalUIOptions, SignTypedDataParams, SiweFlowState, SolanaTransactionReceipt, SupportedSolanaTransaction, TransactionReceipt, UnsignedTransactionRequest, type UseConnectCoinbaseSmartWalletInterface, type UseCustomAuth, type UseDelegatedActionsInterface, type UseFundWalletInterface, type UseImportWallet, type UseLinkWithPasskey, type UseLoginWithEmail, type UseLoginWithPasskey, type UseLoginWithSms, type UseOAuthTokens, type UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletListEntry, addPrivyRpcToChain, addRpcUrlOverrideToChain, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getCustomerAccessToken as getAccessToken, getEmbeddedConnectedWallet, useActiveWallet, useConnectCoinbaseSmartWallet, useConnectWallet, useCreateWallet, useCrossAppAccounts, useCustomAuth, useDelegatedActions, useExperimentalFarcasterSigner, useFarcasterSigner, useFundWallet, useGuestAccounts, useImportWallet, useLinkAccount, useLinkWithPasskey, useLinkWithSiwe, useLogin, useLoginWithEmail, useLoginWithOAuth, useLoginWithPasskey, useLoginWithSms, useLogout, useMfa, useMfaEnrollment, useModalStatus, useOAuthTokens, usePrivy, useRegisterMfaListener, useSendSolanaTransaction, useSendTransaction, useSetWalletPassword, useSetWalletRecovery, useSignMessage, useSignTypedData, useToken, useUpdateAccount, useWallets };
@@ -1,4 +1,4 @@
1
- import { aM as PrivyErrorCode, c as User, Q as LoginMethod, aN as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aO as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aP as FundingMethod, ac as SolanaCluster, aL as ConnectedSolanaWallet, a6 as SolanaFundingConfig } from './types-BwcPm4mZ.js';
1
+ import { aN as PrivyErrorCode, c as User, Q as LoginMethod, aO as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aP as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aQ as FundingMethod, ad as SolanaCluster, aM as ConnectedSolanaWallet, a7 as SolanaFundingConfig } from './types-Ft1QTGGG.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
 
4
4
  /**
@@ -293,6 +293,10 @@ interface PrivyEvents {
293
293
  * @returns createWallet {() => Promise<Wallet>} an method to create an embedded Solana wallet.
294
294
  */
295
295
  interface UseSolanaWalletsInterface {
296
+ /**
297
+ * Whether the wallets are ready to be used.
298
+ */
299
+ ready: boolean;
296
300
  /**
297
301
  * An array of the connected Solana wallets for the user. Currently, this will only contain the embedded
298
302
  * Solana wallet if the user has created one.
@@ -1,4 +1,4 @@
1
- import { aM as PrivyErrorCode, c as User, Q as LoginMethod, aN as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aO as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aP as FundingMethod, ac as SolanaCluster, aL as ConnectedSolanaWallet, a6 as SolanaFundingConfig } from './types-BwcPm4mZ.js';
1
+ import { aN as PrivyErrorCode, c as User, Q as LoginMethod, aO as LinkedAccountWithMetadata, O as OAuthTokens, B as BaseConnectedEthereumWallet, aP as BaseConnectedSolanaWallet, s as Wallet, w as MfaMethod, U as UserRecoveryMethod, A as SolanaTransactionReceipt, C as Chain, aQ as FundingMethod, ad as SolanaCluster, aM as ConnectedSolanaWallet, a7 as SolanaFundingConfig } from './types-Ft1QTGGG.js';
2
2
  import { TransactionResponse } from '@ethersproject/providers';
3
3
 
4
4
  /**
@@ -293,6 +293,10 @@ interface PrivyEvents {
293
293
  * @returns createWallet {() => Promise<Wallet>} an method to create an embedded Solana wallet.
294
294
  */
295
295
  interface UseSolanaWalletsInterface {
296
+ /**
297
+ * Whether the wallets are ready to be used.
298
+ */
299
+ ready: boolean;
296
300
  /**
297
301
  * An array of the connected Solana wallets for the user. Currently, this will only contain the embedded
298
302
  * Solana wallet if the user has created one.
@@ -1,5 +1,5 @@
1
- export { aL as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aQ as toSolanaWalletConnectors } from './types-BwcPm4mZ.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-D5xAHDt7.js';
1
+ export { aM as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aR as toSolanaWalletConnectors } from './types-Ft1QTGGG.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-1XQ5a7lr.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
- export { aL as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aQ as toSolanaWalletConnectors } from './types-BwcPm4mZ.js';
2
- export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-D5xAHDt7.js';
1
+ export { aM as ConnectedSolanaWallet, p as SolanaAdapterConnector, A as SolanaTransactionReceipt, z as SupportedSolanaTransaction, aR as toSolanaWalletConnectors } from './types-Ft1QTGGG.js';
2
+ export { a as UseFundSolanaWalletInterface, U as UseSolanaWalletsInterface, b as useFundWallet, u as useSolanaWallets } from './solana-1XQ5a7lr.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -636,6 +636,10 @@ interface Wallet {
636
636
  /** HD index for the wallet. Only applies to embedded wallets (`walletClientType === 'privy'`). */
637
637
  walletIndex: number | null;
638
638
  }
639
+ /**
640
+ * Union type of all possible base connected wallets.
641
+ */
642
+ type BaseConnectedWalletType = BaseConnectedEthereumWallet | BaseConnectedSolanaWallet;
639
643
  /**
640
644
  * Object representation of metadata reported by a connected wallet from a wallet connector
641
645
  */
@@ -651,6 +655,7 @@ interface ConnectedWalletMetadata {
651
655
  * Object representation of a base connected wallet from a wallet connector.
652
656
  */
653
657
  interface BaseConnectedWallet {
658
+ type: 'ethereum' | 'solana';
654
659
  /** The wallet address. */
655
660
  address: string;
656
661
  /** The first time this wallet was connected without break. */
@@ -686,6 +691,7 @@ interface BaseConnectedWallet {
686
691
  * Object representation of a base connected Solana wallet from a wallet connector.
687
692
  */
688
693
  interface BaseConnectedSolanaWallet extends BaseConnectedWallet {
694
+ type: 'solana';
689
695
  /**
690
696
  * Returns a light provider for interfacing with this wallet. Support message signing
691
697
  * on embedded and external wallets using an internal interface.
@@ -699,6 +705,7 @@ interface BaseConnectedSolanaWallet extends BaseConnectedWallet {
699
705
  * Object representation of a base connected Ethereum wallet from a wallet connector.
700
706
  */
701
707
  interface BaseConnectedEthereumWallet extends BaseConnectedWallet {
708
+ type: 'ethereum';
702
709
  /** The current chain ID with CAIP-2 formatting. */
703
710
  chainId: string;
704
711
  /**
@@ -739,7 +746,7 @@ interface PrivyConnectedWallet {
739
746
  walletIndex?: number;
740
747
  }
741
748
  /**
742
- * Object representation of a connected wallet.
749
+ * Object representation of a connected wallet, with additional Privy flows
743
750
  */
744
751
  interface ConnectedWallet extends BaseConnectedEthereumWallet, PrivyConnectedWallet {
745
752
  /**
@@ -2091,4 +2098,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
2091
2098
  type SolanaRpcRequestType = solana_signMessage;
2092
2099
  type SolanaRpcResponseType = solana_signMessageResponse;
2093
2100
 
2094
- export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type CustomAuthFlowState as a3, type TypedMessage as a4, type MessageTypes as a5, type SolanaFundingConfig as a6, type MoonpayConfig as a7, type MoonpayCurrencyCode as a8, type MoonpayPaymentMethod as a9, type PasskeyWithMetadata as aA, type Email as aB, type Phone as aC, type TransactionUIOptions as aD, type ContractUIOptions as aE, type NativeFundingConfig as aF, type MoonpayFundingConfig as aG, type PriceDisplayOptions as aH, type Farcaster as aI, type Passkey as aJ, type LoginMethodOrderOption as aK, type ConnectedSolanaWallet as aL, PrivyErrorCode as aM, type LinkedAccountWithMetadata as aN, type BaseConnectedSolanaWallet as aO, type FundingMethod as aP, toSolanaWalletConnectors as aQ, type Quantity as aa, type TransactionLog as ab, type SolanaCluster as ac, type NonEmptyArray as ad, type EmailWithMetadata as ae, type PhoneWithMetadata as af, type WalletWithMetadata as ag, type Google as ah, type Twitter as ai, type Discord as aj, type Github as ak, type LinkedIn as al, type Apple as am, type Tiktok as an, type Telegram as ao, type CrossAppAccount as ap, type GoogleOAuthWithMetadata as aq, type TwitterOAuthWithMetadata as ar, type DiscordOAuthWithMetadata as as, type GithubOAuthWithMetadata as at, type TiktokOAuthWithMetadata as au, type LinkedInOAuthWithMetadata as av, type AppleOAuthWithMetadata as aw, type FarcasterWithMetadata as ax, type TelegramWithMetadata as ay, type CrossAppAccountWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
2101
+ export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type BaseConnectedWalletType as a3, type CustomAuthFlowState as a4, type TypedMessage as a5, type MessageTypes as a6, type SolanaFundingConfig as a7, type MoonpayConfig as a8, type MoonpayCurrencyCode as a9, type CrossAppAccountWithMetadata as aA, type PasskeyWithMetadata as aB, type Email as aC, type Phone as aD, type TransactionUIOptions as aE, type ContractUIOptions as aF, type NativeFundingConfig as aG, type MoonpayFundingConfig as aH, type PriceDisplayOptions as aI, type Farcaster as aJ, type Passkey as aK, type LoginMethodOrderOption as aL, type ConnectedSolanaWallet as aM, PrivyErrorCode as aN, type LinkedAccountWithMetadata as aO, type BaseConnectedSolanaWallet as aP, type FundingMethod as aQ, toSolanaWalletConnectors as aR, type MoonpayPaymentMethod as aa, type Quantity as ab, type TransactionLog as ac, type SolanaCluster as ad, type NonEmptyArray as ae, type EmailWithMetadata as af, type PhoneWithMetadata as ag, type WalletWithMetadata as ah, type Google as ai, type Twitter as aj, type Discord as ak, type Github as al, type LinkedIn as am, type Apple as an, type Tiktok as ao, type Telegram as ap, type CrossAppAccount as aq, type GoogleOAuthWithMetadata as ar, type TwitterOAuthWithMetadata as as, type DiscordOAuthWithMetadata as at, type GithubOAuthWithMetadata as au, type TiktokOAuthWithMetadata as av, type LinkedInOAuthWithMetadata as aw, type AppleOAuthWithMetadata as ax, type FarcasterWithMetadata as ay, type TelegramWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
@@ -636,6 +636,10 @@ interface Wallet {
636
636
  /** HD index for the wallet. Only applies to embedded wallets (`walletClientType === 'privy'`). */
637
637
  walletIndex: number | null;
638
638
  }
639
+ /**
640
+ * Union type of all possible base connected wallets.
641
+ */
642
+ type BaseConnectedWalletType = BaseConnectedEthereumWallet | BaseConnectedSolanaWallet;
639
643
  /**
640
644
  * Object representation of metadata reported by a connected wallet from a wallet connector
641
645
  */
@@ -651,6 +655,7 @@ interface ConnectedWalletMetadata {
651
655
  * Object representation of a base connected wallet from a wallet connector.
652
656
  */
653
657
  interface BaseConnectedWallet {
658
+ type: 'ethereum' | 'solana';
654
659
  /** The wallet address. */
655
660
  address: string;
656
661
  /** The first time this wallet was connected without break. */
@@ -686,6 +691,7 @@ interface BaseConnectedWallet {
686
691
  * Object representation of a base connected Solana wallet from a wallet connector.
687
692
  */
688
693
  interface BaseConnectedSolanaWallet extends BaseConnectedWallet {
694
+ type: 'solana';
689
695
  /**
690
696
  * Returns a light provider for interfacing with this wallet. Support message signing
691
697
  * on embedded and external wallets using an internal interface.
@@ -699,6 +705,7 @@ interface BaseConnectedSolanaWallet extends BaseConnectedWallet {
699
705
  * Object representation of a base connected Ethereum wallet from a wallet connector.
700
706
  */
701
707
  interface BaseConnectedEthereumWallet extends BaseConnectedWallet {
708
+ type: 'ethereum';
702
709
  /** The current chain ID with CAIP-2 formatting. */
703
710
  chainId: string;
704
711
  /**
@@ -739,7 +746,7 @@ interface PrivyConnectedWallet {
739
746
  walletIndex?: number;
740
747
  }
741
748
  /**
742
- * Object representation of a connected wallet.
749
+ * Object representation of a connected wallet, with additional Privy flows
743
750
  */
744
751
  interface ConnectedWallet extends BaseConnectedEthereumWallet, PrivyConnectedWallet {
745
752
  /**
@@ -2091,4 +2098,4 @@ type EthereumRpcResponseType = eth_signTransactionResponse | eth_populateTransac
2091
2098
  type SolanaRpcRequestType = solana_signMessage;
2092
2099
  type SolanaRpcResponseType = solana_signMessageResponse;
2093
2100
 
2094
- export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type CustomAuthFlowState as a3, type TypedMessage as a4, type MessageTypes as a5, type SolanaFundingConfig as a6, type MoonpayConfig as a7, type MoonpayCurrencyCode as a8, type MoonpayPaymentMethod as a9, type PasskeyWithMetadata as aA, type Email as aB, type Phone as aC, type TransactionUIOptions as aD, type ContractUIOptions as aE, type NativeFundingConfig as aF, type MoonpayFundingConfig as aG, type PriceDisplayOptions as aH, type Farcaster as aI, type Passkey as aJ, type LoginMethodOrderOption as aK, type ConnectedSolanaWallet as aL, PrivyErrorCode as aM, type LinkedAccountWithMetadata as aN, type BaseConnectedSolanaWallet as aO, type FundingMethod as aP, toSolanaWalletConnectors as aQ, type Quantity as aa, type TransactionLog as ab, type SolanaCluster as ac, type NonEmptyArray as ad, type EmailWithMetadata as ae, type PhoneWithMetadata as af, type WalletWithMetadata as ag, type Google as ah, type Twitter as ai, type Discord as aj, type Github as ak, type LinkedIn as al, type Apple as am, type Tiktok as an, type Telegram as ao, type CrossAppAccount as ap, type GoogleOAuthWithMetadata as aq, type TwitterOAuthWithMetadata as ar, type DiscordOAuthWithMetadata as as, type GithubOAuthWithMetadata as at, type TiktokOAuthWithMetadata as au, type LinkedInOAuthWithMetadata as av, type AppleOAuthWithMetadata as aw, type FarcasterWithMetadata as ax, type TelegramWithMetadata as ay, type CrossAppAccountWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
2101
+ export { type OtpFlowState as $, type SolanaTransactionReceipt as A, type BaseConnectedEthereumWallet as B, type Chain as C, type ConnectedWallet as D, type EthereumRpcRequestType as E, type FundWalletConfig as F, type CrossAppProviderDetails as G, type OAuthProviderType as H, type MoonpaySignRequest as I, type MoonpaySignResponse as J, type SmartWalletConfig as K, type LoginModalOptions as L, type MfaSubmitArgs as M, type PrivyServerConfig as N, type OAuthTokens as O, type PrivyFarcasterSignerInitResponse as P, type LoginMethod as Q, type RuntimeLoginOverridableOptions as R, type SolanaRpcRequestType as S, type TransactionReceipt as T, type UserRecoveryMethod as U, type SiweWalletMetadata as V, WalletTimeoutError as W, type TelegramAuthResult as X, type OAuthUserInfo as Y, type OAuthFlowState as Z, type LoginWithCode as _, type EthereumRpcResponseType as a, type PasskeyFlowState as a0, type SiweFlowState as a1, type UnsignedTransactionRequestWithChainId as a2, type BaseConnectedWalletType as a3, type CustomAuthFlowState as a4, type TypedMessage as a5, type MessageTypes as a6, type SolanaFundingConfig as a7, type MoonpayConfig as a8, type MoonpayCurrencyCode as a9, type CrossAppAccountWithMetadata as aA, type PasskeyWithMetadata as aB, type Email as aC, type Phone as aD, type TransactionUIOptions as aE, type ContractUIOptions as aF, type NativeFundingConfig as aG, type MoonpayFundingConfig as aH, type PriceDisplayOptions as aI, type Farcaster as aJ, type Passkey as aK, type LoginMethodOrderOption as aL, type ConnectedSolanaWallet as aM, PrivyErrorCode as aN, type LinkedAccountWithMetadata as aO, type BaseConnectedSolanaWallet as aP, type FundingMethod as aQ, toSolanaWalletConnectors as aR, type MoonpayPaymentMethod as aa, type Quantity as ab, type TransactionLog as ac, type SolanaCluster as ad, type NonEmptyArray as ae, type EmailWithMetadata as af, type PhoneWithMetadata as ag, type WalletWithMetadata as ah, type Google as ai, type Twitter as aj, type Discord as ak, type Github as al, type LinkedIn as am, type Apple as an, type Tiktok as ao, type Telegram as ap, type CrossAppAccount as aq, type GoogleOAuthWithMetadata as ar, type TwitterOAuthWithMetadata as as, type DiscordOAuthWithMetadata as at, type GithubOAuthWithMetadata as au, type TiktokOAuthWithMetadata as av, type LinkedInOAuthWithMetadata as aw, type AppleOAuthWithMetadata as ax, type FarcasterWithMetadata as ay, type TelegramWithMetadata as az, type SolanaRpcResponseType as b, type User as c, type PrivyClientConfig as d, type EIP1193Provider as e, type RpcConfig as f, type EntropyIdVerifier as g, type RequestArguments as h, WalletConnector as i, type WalletClientType as j, type ConnectedWalletMetadata as k, type ConnectorType as l, type WalletListEntry as m, type ExternalWalletsConfig as n, type BaseConnectedWallet as o, SolanaWalletConnector as p, type ConnectWalletModalOptions as q, type CreateWalletOptions as r, type Wallet as s, type SetWalletRecoveryOptions as t, type SignMessageModalUIOptions as u, type SignTypedDataParams as v, type MfaMethod as w, type UnsignedTransactionRequest as x, type SendTransactionModalUIOptions as y, type SupportedSolanaTransaction as z };
package/dist/dts/ui.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions } from './types-BwcPm4mZ.js';
2
+ import { R as RuntimeLoginOverridableOptions } from './types-Ft1QTGGG.js';
3
3
  import '@ethersproject/providers';
4
4
  import '@solana/wallet-adapter-base';
5
5
  import 'react';
@@ -31,4 +31,12 @@ type UserPillProps = {
31
31
  };
32
32
  declare const UserPill: ({ expanded, action, label, size, ui: { minimal, background }, }: UserPillProps) => react_jsx_runtime.JSX.Element;
33
33
 
34
- export { UserPill };
34
+ type WalletsPillProps = {
35
+ size?: number;
36
+ ui?: {
37
+ background?: 'accent' | 'secondary';
38
+ };
39
+ };
40
+ declare const WalletsPill: ({ size, ui: { background }, }: WalletsPillProps) => react_jsx_runtime.JSX.Element;
41
+
42
+ export { UserPill, WalletsPill };