@multiplatform.one/web3 7.16.0 → 7.18.0

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 (176) hide show
  1. package/dist/cjs/connectkit/components/Common/ConnectorList/index.cjs +33 -5
  2. package/dist/cjs/connectkit/components/Common/ConnectorList/index.native.js +38 -5
  3. package/dist/cjs/connectkit/components/Common/ConnectorList/index.native.js.map +1 -1
  4. package/dist/cjs/connectkit/components/ConnectButton/index.cjs +5 -0
  5. package/dist/cjs/connectkit/components/ConnectButton/index.native.js +5 -0
  6. package/dist/cjs/connectkit/components/ConnectButton/index.native.js.map +1 -1
  7. package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.cjs +9 -4
  8. package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +12 -7
  9. package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
  10. package/dist/cjs/connectkit/index.cjs +5 -0
  11. package/dist/cjs/connectkit/index.native.js +5 -0
  12. package/dist/cjs/connectkit/index.native.js.map +1 -1
  13. package/dist/cjs/connectkit/openConnector/context.cjs +146 -0
  14. package/dist/cjs/connectkit/openConnector/context.native.js +188 -0
  15. package/dist/cjs/connectkit/openConnector/context.native.js.map +1 -0
  16. package/dist/cjs/connectkit/openConnector/device.cjs +42 -0
  17. package/dist/cjs/connectkit/openConnector/device.native.js +51 -0
  18. package/dist/cjs/connectkit/openConnector/device.native.js.map +1 -0
  19. package/dist/cjs/connectkit/openConnector/index.cjs +35 -0
  20. package/dist/cjs/connectkit/openConnector/index.native.js +38 -0
  21. package/dist/cjs/connectkit/openConnector/index.native.js.map +1 -0
  22. package/dist/cjs/connectkit/openConnector/launcher.cjs +133 -0
  23. package/dist/cjs/connectkit/openConnector/launcher.native.js +158 -0
  24. package/dist/cjs/connectkit/openConnector/launcher.native.js.map +1 -0
  25. package/dist/cjs/connectkit/screens.cjs +1 -10
  26. package/dist/cjs/connectkit/screens.native.js +1 -12
  27. package/dist/cjs/connectkit/screens.native.js.map +1 -1
  28. package/dist/cjs/connectkit/siwe/connectIntent.cjs +9 -5
  29. package/dist/cjs/connectkit/siwe/connectIntent.native.js +10 -3
  30. package/dist/cjs/connectkit/siwe/connectIntent.native.js.map +1 -1
  31. package/dist/cjs/connectkit/useWeb3Modal.cjs +21 -0
  32. package/dist/cjs/connectkit/useWeb3Modal.native.js +22 -0
  33. package/dist/cjs/connectkit/useWeb3Modal.native.js.map +1 -1
  34. package/dist/cjs/connectkit/web3Bridge.cjs +4 -1
  35. package/dist/cjs/connectkit/web3Bridge.native.js +4 -1
  36. package/dist/cjs/connectkit/web3Bridge.native.js.map +1 -1
  37. package/dist/cjs/connectkit/web3Provider.native.js.map +1 -1
  38. package/dist/esm/connectkit/components/Common/ConnectorList/index.mjs +34 -6
  39. package/dist/esm/connectkit/components/Common/ConnectorList/index.mjs.map +1 -1
  40. package/dist/esm/connectkit/components/Common/ConnectorList/index.native.js +39 -6
  41. package/dist/esm/connectkit/components/Common/ConnectorList/index.native.js.map +1 -1
  42. package/dist/esm/connectkit/components/ConnectButton/index.mjs +5 -0
  43. package/dist/esm/connectkit/components/ConnectButton/index.mjs.map +1 -1
  44. package/dist/esm/connectkit/components/ConnectButton/index.native.js +5 -0
  45. package/dist/esm/connectkit/components/ConnectButton/index.native.js.map +1 -1
  46. package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs +9 -4
  47. package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs.map +1 -1
  48. package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +12 -7
  49. package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
  50. package/dist/esm/connectkit/index.mjs +3 -1
  51. package/dist/esm/connectkit/index.mjs.map +1 -1
  52. package/dist/esm/connectkit/index.native.js +3 -1
  53. package/dist/esm/connectkit/index.native.js.map +1 -1
  54. package/dist/esm/connectkit/openConnector/context.mjs +118 -0
  55. package/dist/esm/connectkit/openConnector/context.mjs.map +1 -0
  56. package/dist/esm/connectkit/openConnector/context.native.js +146 -0
  57. package/dist/esm/connectkit/openConnector/context.native.js.map +1 -0
  58. package/dist/esm/connectkit/openConnector/device.mjs +16 -0
  59. package/dist/esm/connectkit/openConnector/device.mjs.map +1 -0
  60. package/dist/esm/connectkit/openConnector/device.native.js +22 -0
  61. package/dist/esm/connectkit/openConnector/device.native.js.map +1 -0
  62. package/dist/esm/connectkit/openConnector/index.mjs +4 -0
  63. package/dist/esm/connectkit/openConnector/index.mjs.map +1 -0
  64. package/dist/esm/connectkit/openConnector/index.native.js +4 -0
  65. package/dist/esm/connectkit/openConnector/index.native.js.map +1 -0
  66. package/dist/esm/connectkit/openConnector/launcher.mjs +106 -0
  67. package/dist/esm/connectkit/openConnector/launcher.mjs.map +1 -0
  68. package/dist/esm/connectkit/openConnector/launcher.native.js +128 -0
  69. package/dist/esm/connectkit/openConnector/launcher.native.js.map +1 -0
  70. package/dist/esm/connectkit/screens.mjs +2 -11
  71. package/dist/esm/connectkit/screens.mjs.map +1 -1
  72. package/dist/esm/connectkit/screens.native.js +2 -13
  73. package/dist/esm/connectkit/screens.native.js.map +1 -1
  74. package/dist/esm/connectkit/siwe/connectIntent.mjs +9 -6
  75. package/dist/esm/connectkit/siwe/connectIntent.mjs.map +1 -1
  76. package/dist/esm/connectkit/siwe/connectIntent.native.js +10 -4
  77. package/dist/esm/connectkit/siwe/connectIntent.native.js.map +1 -1
  78. package/dist/esm/connectkit/useWeb3Modal.mjs +22 -1
  79. package/dist/esm/connectkit/useWeb3Modal.mjs.map +1 -1
  80. package/dist/esm/connectkit/useWeb3Modal.native.js +23 -1
  81. package/dist/esm/connectkit/useWeb3Modal.native.js.map +1 -1
  82. package/dist/esm/connectkit/web3Bridge.mjs +4 -1
  83. package/dist/esm/connectkit/web3Bridge.mjs.map +1 -1
  84. package/dist/esm/connectkit/web3Bridge.native.js +4 -1
  85. package/dist/esm/connectkit/web3Bridge.native.js.map +1 -1
  86. package/dist/esm/connectkit/web3Provider.mjs.map +1 -1
  87. package/dist/esm/connectkit/web3Provider.native.js.map +1 -1
  88. package/dist/jsx/connectkit/components/Common/ConnectorList/index.mjs +34 -6
  89. package/dist/jsx/connectkit/components/Common/ConnectorList/index.mjs.map +1 -1
  90. package/dist/jsx/connectkit/components/Common/ConnectorList/index.native.js +38 -5
  91. package/dist/jsx/connectkit/components/Common/ConnectorList/index.native.js.map +1 -1
  92. package/dist/jsx/connectkit/components/ConnectButton/index.mjs +5 -0
  93. package/dist/jsx/connectkit/components/ConnectButton/index.mjs.map +1 -1
  94. package/dist/jsx/connectkit/components/ConnectButton/index.native.js +5 -0
  95. package/dist/jsx/connectkit/components/ConnectButton/index.native.js.map +1 -1
  96. package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs +9 -4
  97. package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs.map +1 -1
  98. package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +12 -7
  99. package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
  100. package/dist/jsx/connectkit/index.mjs +3 -1
  101. package/dist/jsx/connectkit/index.mjs.map +1 -1
  102. package/dist/jsx/connectkit/index.native.js +5 -0
  103. package/dist/jsx/connectkit/index.native.js.map +1 -1
  104. package/dist/jsx/connectkit/openConnector/context.mjs +118 -0
  105. package/dist/jsx/connectkit/openConnector/context.mjs.map +1 -0
  106. package/dist/jsx/connectkit/openConnector/context.native.js +188 -0
  107. package/dist/jsx/connectkit/openConnector/context.native.js.map +1 -0
  108. package/dist/jsx/connectkit/openConnector/device.mjs +16 -0
  109. package/dist/jsx/connectkit/openConnector/device.mjs.map +1 -0
  110. package/dist/jsx/connectkit/openConnector/device.native.js +51 -0
  111. package/dist/jsx/connectkit/openConnector/device.native.js.map +1 -0
  112. package/dist/jsx/connectkit/openConnector/index.mjs +4 -0
  113. package/dist/jsx/connectkit/openConnector/index.mjs.map +1 -0
  114. package/dist/jsx/connectkit/openConnector/index.native.js +38 -0
  115. package/dist/jsx/connectkit/openConnector/index.native.js.map +1 -0
  116. package/dist/jsx/connectkit/openConnector/launcher.mjs +106 -0
  117. package/dist/jsx/connectkit/openConnector/launcher.mjs.map +1 -0
  118. package/dist/jsx/connectkit/openConnector/launcher.native.js +158 -0
  119. package/dist/jsx/connectkit/openConnector/launcher.native.js.map +1 -0
  120. package/dist/jsx/connectkit/screens.mjs +2 -11
  121. package/dist/jsx/connectkit/screens.mjs.map +1 -1
  122. package/dist/jsx/connectkit/screens.native.js +1 -12
  123. package/dist/jsx/connectkit/screens.native.js.map +1 -1
  124. package/dist/jsx/connectkit/siwe/connectIntent.mjs +9 -6
  125. package/dist/jsx/connectkit/siwe/connectIntent.mjs.map +1 -1
  126. package/dist/jsx/connectkit/siwe/connectIntent.native.js +10 -3
  127. package/dist/jsx/connectkit/siwe/connectIntent.native.js.map +1 -1
  128. package/dist/jsx/connectkit/useWeb3Modal.mjs +22 -1
  129. package/dist/jsx/connectkit/useWeb3Modal.mjs.map +1 -1
  130. package/dist/jsx/connectkit/useWeb3Modal.native.js +22 -0
  131. package/dist/jsx/connectkit/useWeb3Modal.native.js.map +1 -1
  132. package/dist/jsx/connectkit/web3Bridge.mjs +4 -1
  133. package/dist/jsx/connectkit/web3Bridge.mjs.map +1 -1
  134. package/dist/jsx/connectkit/web3Bridge.native.js +4 -1
  135. package/dist/jsx/connectkit/web3Bridge.native.js.map +1 -1
  136. package/dist/jsx/connectkit/web3Provider.mjs.map +1 -1
  137. package/dist/jsx/connectkit/web3Provider.native.js.map +1 -1
  138. package/package.json +7 -6
  139. package/src/connectkit/components/Common/ConnectorList/index.tsx +30 -2
  140. package/src/connectkit/components/ConnectButton/index.tsx +5 -0
  141. package/src/connectkit/components/ConnectModal/ConnectWithInjector/index.tsx +13 -8
  142. package/src/connectkit/index.ts +8 -0
  143. package/src/connectkit/openConnector/context.tsx +176 -0
  144. package/src/connectkit/openConnector/device.spec.ts +86 -0
  145. package/src/connectkit/openConnector/device.ts +37 -0
  146. package/src/connectkit/openConnector/index.ts +18 -0
  147. package/src/connectkit/openConnector/launcher.spec.ts +325 -0
  148. package/src/connectkit/openConnector/launcher.ts +203 -0
  149. package/src/connectkit/openConnector/modal.spec.tsx +330 -0
  150. package/src/connectkit/screens.tsx +2 -11
  151. package/src/connectkit/siwe/connectIntent.spec.ts +90 -0
  152. package/src/connectkit/siwe/connectIntent.ts +19 -6
  153. package/src/connectkit/useWeb3Modal.ts +25 -1
  154. package/src/connectkit/web3Bridge.tsx +4 -1
  155. package/src/connectkit/web3Provider.tsx +4 -1
  156. package/types/connectkit/components/Common/ConnectorList/index.d.ts.map +1 -1
  157. package/types/connectkit/components/ConnectButton/index.d.ts.map +1 -1
  158. package/types/connectkit/components/ConnectModal/ConnectWithInjector/index.d.ts.map +1 -1
  159. package/types/connectkit/index.d.ts +2 -0
  160. package/types/connectkit/index.d.ts.map +1 -1
  161. package/types/connectkit/openConnector/context.d.ts +48 -0
  162. package/types/connectkit/openConnector/context.d.ts.map +1 -0
  163. package/types/connectkit/openConnector/device.d.ts +18 -0
  164. package/types/connectkit/openConnector/device.d.ts.map +1 -0
  165. package/types/connectkit/openConnector/index.d.ts +3 -0
  166. package/types/connectkit/openConnector/index.d.ts.map +1 -0
  167. package/types/connectkit/openConnector/launcher.d.ts +64 -0
  168. package/types/connectkit/openConnector/launcher.d.ts.map +1 -0
  169. package/types/connectkit/screens.d.ts.map +1 -1
  170. package/types/connectkit/siwe/connectIntent.d.ts +8 -3
  171. package/types/connectkit/siwe/connectIntent.d.ts.map +1 -1
  172. package/types/connectkit/useWeb3Modal.d.ts +16 -0
  173. package/types/connectkit/useWeb3Modal.d.ts.map +1 -1
  174. package/types/connectkit/web3Bridge.d.ts.map +1 -1
  175. package/types/connectkit/web3Provider.d.ts +4 -1
  176. package/types/connectkit/web3Provider.d.ts.map +1 -1
@@ -0,0 +1,18 @@
1
+ type DeviceNavigator = {
2
+ userAgent?: string;
3
+ maxTouchPoints?: number;
4
+ };
5
+ type MatchMedia = (query: string) => {
6
+ matches: boolean;
7
+ };
8
+ /**
9
+ * A touch device whose browser sends a desktop user agent, which connectkit's
10
+ * `isMobile()` reads as desktop: iPadOS Safari sends a Mac one, and Android's
11
+ * "Desktop site" a Linux one. A Mac reports no touch points, and a laptop's touch
12
+ * screen is not its primary pointer, so neither counts.
13
+ */
14
+ export declare function isTouchDevice(nav?: DeviceNavigator | null, matchMedia?: MatchMedia | null): boolean;
15
+ /** The `fallbackMs` an `openConnector` call without one gets on this device. */
16
+ export declare function defaultOpenConnectorFallbackMs(): number;
17
+ export {};
18
+ //# sourceMappingURL=device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../src/connectkit/openConnector/device.ts"],"names":[],"mappings":"AAOA,KAAK,eAAe,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvE,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,GAAG,GAAE,eAAe,GAAG,IAA0D,EACjF,UAAU,GAAE,UAAU,GAAG,IAEc,GACtC,OAAO,CAQT;AAED,gFAAgF;AAChF,wBAAgB,8BAA8B,IAAI,MAAM,CAIvD"}
@@ -0,0 +1,3 @@
1
+ export { createConnectorLauncher, DEFAULT_DESKTOP_OPEN_CONNECTOR_FALLBACK_MS, DEFAULT_OPEN_CONNECTOR_FALLBACK_MS, type ConnectorLauncher, type LauncherDeps, type OpenConnectorOptions, type PendingConnect, } from "./launcher";
2
+ export { ConnectorLauncherProvider, getMobileOptions, resolveWallet, useConnectorLauncher, type ConnectorLauncherValue, type MobileConnectOptions, type Web3ConnectKitOptions, } from "./context";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connectkit/openConnector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,0CAA0C,EAC1C,kCAAkC,EAClC,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,MAAM,WAAW,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { Connector } from "wagmi";
2
+ /** A page still in front this long after the tap never reached the wallet app. */
3
+ export declare const DEFAULT_OPEN_CONNECTOR_FALLBACK_MS = 6000;
4
+ /**
5
+ * The desktop default. An extension's popup window blurs the page, but a wallet that
6
+ * answers in the page (a QR code to scan) does not, so desktop waits longer.
7
+ */
8
+ export declare const DEFAULT_DESKTOP_OPEN_CONNECTOR_FALLBACK_MS = 30000;
9
+ export type OpenConnectorOptions = {
10
+ /**
11
+ * How long the page may stay in front with the connect unanswered before the
12
+ * wallet list shows: after the tap, and again each time the page comes back from
13
+ * the wallet app. Defaults to 6000 ms on a phone or tablet and to 30000 ms on
14
+ * desktop. `0` turns it off, and the connecting screen then waits for the connect
15
+ * to settle however long that takes.
16
+ */
17
+ fallbackMs?: number;
18
+ };
19
+ export type PendingConnect = {
20
+ /** The wallet-list id the connect was opened for. */
21
+ walletId: string;
22
+ connector: Connector;
23
+ /** The wallet deeplink, once the connector announces one (`display_uri`). */
24
+ deeplink?: string;
25
+ };
26
+ type Listener = (event: Event) => void;
27
+ export type LauncherDeps = {
28
+ connect: (connector: Connector) => Promise<unknown>;
29
+ /** Show the connecting state for this wallet. */
30
+ showConnecting: (walletId: string) => void;
31
+ /** Show the wallet list. */
32
+ showList: () => void;
33
+ /** A connect settled with an error; runs before the list shows. */
34
+ onFailed?: (error: unknown) => void;
35
+ win?: {
36
+ addEventListener: (type: string, listener: Listener) => void;
37
+ removeEventListener: (type: string, listener: Listener) => void;
38
+ };
39
+ doc?: {
40
+ addEventListener: (type: string, listener: Listener) => void;
41
+ removeEventListener: (type: string, listener: Listener) => void;
42
+ visibilityState?: string;
43
+ };
44
+ };
45
+ export type ConnectorLauncher = {
46
+ /**
47
+ * Connect `connector` now, inside the caller's gesture. A second call for the
48
+ * connector already connecting re-issues the request inside the new tap (MetaMask
49
+ * Connect answers it by re-opening the pending request) and keeps the one
50
+ * session: no second timer, no reset of the connecting state.
51
+ */
52
+ open: (walletId: string, connector: Connector, options?: OpenConnectorOptions) => void;
53
+ pending: () => PendingConnect | null;
54
+ subscribe: (listener: () => void) => () => void;
55
+ /**
56
+ * End the pending session without falling back: the user left the connecting
57
+ * screen, a wallet connected, or the provider unmounted. The wagmi connect itself
58
+ * carries on.
59
+ */
60
+ cancel: () => void;
61
+ };
62
+ export declare function createConnectorLauncher(getDeps: () => LauncherDeps): ConnectorLauncher;
63
+ export {};
64
+ //# sourceMappingURL=launcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../../../src/connectkit/openConnector/launcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBvC,kFAAkF;AAClF,eAAO,MAAM,kCAAkC,OAAQ,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,0CAA0C,QAAS,CAAC;AAEjE,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAEvC,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,iDAAiD;IACjD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,GAAG,CAAC,EAAE;QACJ,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;QAC7D,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;KACjE,CAAC;IACF,GAAG,CAAC,EAAE;QACJ,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;QAC7D,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;QAChE,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH,CAAC;AAOF,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;OAKG;IACH,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACvF,OAAO,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAChD;;;;OAIG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,YAAY,GAAG,iBAAiB,CAkHtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../src/connectkit/screens.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EAGV,MAAM,+BAA+B,CAAC;AAwBvC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EA+F3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAGvC,CAAC;AAEF,YAAY,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../src/connectkit/screens.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EAGV,MAAM,+BAA+B,CAAC;AAwBvC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAsF3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAGvC,CAAC;AAEF,YAAY,EAAE,SAAS,EAAE,CAAC"}
@@ -1,5 +1,10 @@
1
- export declare function setConnectIntent(): void;
2
- /** Reads and clears the flag; true only for a connect the user just initiated. */
3
- export declare function consumeConnectIntent(): boolean;
1
+ /** How long a connect intent stays good. Long enough for a wallet app round trip. */
2
+ export declare const CONNECT_INTENT_TTL_MS = 90000;
3
+ export declare function setConnectIntent(ttlMs?: number, now?: number): void;
4
+ /**
5
+ * Reads and clears the flag; true only for a connect the user initiated within the
6
+ * TTL. A second call returns false.
7
+ */
8
+ export declare function consumeConnectIntent(now?: number): boolean;
4
9
  export declare function clearConnectIntent(): void;
5
10
  //# sourceMappingURL=connectIntent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connectIntent.d.ts","sourceRoot":"","sources":["../../../src/connectkit/siwe/connectIntent.ts"],"names":[],"mappings":"AAoBA,wBAAgB,gBAAgB,SAO/B;AAED,kFAAkF;AAClF,wBAAgB,oBAAoB,IAAI,OAAO,CAS9C;AAED,wBAAgB,kBAAkB,SAOjC"}
1
+ {"version":3,"file":"connectIntent.d.ts","sourceRoot":"","sources":["../../../src/connectkit/siwe/connectIntent.ts"],"names":[],"mappings":"AAyBA,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAE5C,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,MAA8B,EAAE,GAAG,GAAE,MAAmB,QAO/F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,MAAmB,GAAG,OAAO,CAWtE;AAED,wBAAgB,kBAAkB,SAOjC"}
@@ -1,6 +1,22 @@
1
1
  import { useConnectCallbackProps } from "./hooks/useConnectCallback";
2
+ import { type OpenConnectorOptions } from "./openConnector";
2
3
  type UseModalProps = {} & useConnectCallbackProps;
3
4
  export declare const useWeb3Modal: ({ onConnect, onDisconnect }?: UseModalProps) => {
5
+ /**
6
+ * Connect one wallet straight from the caller's click, skipping the list.
7
+ * Call it synchronously inside the click handler. It starts wagmi's connect
8
+ * before it returns and before any UI change, and wagmi reaches the connector
9
+ * a few promise ticks later, still inside the click's task, so a phone's wallet
10
+ * deeplink keeps the tap's user activation. Shows the connecting screen, and
11
+ * the wallet list if the page stays in front for `fallbackMs` with the connect
12
+ * unanswered (no wallet app, or no answer after coming back from it) or the
13
+ * connect fails. Closing the modal or leaving the connecting screen stops that
14
+ * fallback. Calling it again while that connect is pending re-opens the
15
+ * pending request.
16
+ */
17
+ openConnector: (id: string, options?: OpenConnectorOptions) => void;
18
+ /** Wallet id `openConnector` is connecting, or null. */
19
+ pendingConnector: string | null;
4
20
  openAbout: () => void;
5
21
  openOnboarding: () => void;
6
22
  openProfile: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useWeb3Modal.d.ts","sourceRoot":"","sources":["../../src/connectkit/useWeb3Modal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAEzF,KAAK,aAAa,GAAG,EAAE,GAAG,uBAAuB,CAAC;AAKlD,eAAO,MAAM,YAAY,GAAI,8BAA6B,aAAkB;;;;;6BAc/C,OAAO;;;;;CAOnC,CAAC"}
1
+ {"version":3,"file":"useWeb3Modal.d.ts","sourceRoot":"","sources":["../../src/connectkit/useWeb3Modal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAElF,KAAK,aAAa,GAAG,EAAE,GAAG,uBAAuB,CAAC;AAKlD,eAAO,MAAM,YAAY,GAAI,8BAA6B,aAAkB;IAUxE;;;;;;;;;;;OAWG;wBACiB,MAAM,YAAY,oBAAoB;IAI1D,wDAAwD;;;;;;6BAQ/B,OAAO;;;;;CAUnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"web3Bridge.d.ts","sourceRoot":"","sources":["../../src/connectkit/web3Bridge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAcjF,OAAO,EAAsB,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAoBzF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,uBAAuB,CAAC;AAE5B,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyG1D,CAAC"}
1
+ {"version":3,"file":"web3Bridge.d.ts","sourceRoot":"","sources":["../../src/connectkit/web3Bridge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAcjF,OAAO,EAAsB,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAqBzF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,uBAAuB,CAAC;AAE5B,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2G1D,CAAC"}
@@ -1,6 +1,9 @@
1
1
  import React from "react";
2
2
  import { ConnectKitProvider as BaseProvider } from "@multiplatform.one/connectkit";
3
- type Props = React.ComponentProps<typeof BaseProvider>;
3
+ import type { Web3ConnectKitOptions } from "./openConnector";
4
+ type Props = Omit<React.ComponentProps<typeof BaseProvider>, "options"> & {
5
+ options?: Web3ConnectKitOptions;
6
+ };
4
7
  export declare const ConnectKitProvider: React.FC<Props>;
5
8
  export {};
6
9
  //# sourceMappingURL=web3Provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"web3Provider.d.ts","sourceRoot":"","sources":["../../src/connectkit/web3Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGnF,KAAK,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC;AAMvD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAE9C,CAAC"}
1
+ {"version":3,"file":"web3Provider.d.ts","sourceRoot":"","sources":["../../src/connectkit/web3Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAEnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,KAAK,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,EAAE,SAAS,CAAC,GAAG;IACxE,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACjC,CAAC;AAMF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAE9C,CAAC"}