@hot-labs/kit 1.1.2 → 1.2.0-alpha.1

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 (322) hide show
  1. package/README.md +9 -2
  2. package/package.json +4 -8
  3. package/src/HotConnector.ts +31 -21
  4. package/src/OmniConnector.ts +9 -10
  5. package/src/OmniWallet.ts +25 -24
  6. package/src/core/Intents.ts +151 -222
  7. package/src/core/api.ts +4 -37
  8. package/src/core/bridge.ts +2 -3
  9. package/src/core/index.ts +1 -1
  10. package/src/{near/rpc.ts → core/nearRpc.ts} +11 -4
  11. package/src/core/types.ts +0 -21
  12. package/src/core/utils.ts +1 -17
  13. package/src/cosmos/connector.ts +26 -22
  14. package/src/cosmos/wallet.ts +8 -3
  15. package/src/evm/connector.ts +0 -5
  16. package/src/evm/wallet.ts +6 -9
  17. package/src/exchange.ts +30 -24
  18. package/src/hot-wallet/google.ts +5 -12
  19. package/src/index.ts +0 -2
  20. package/src/near/connector.ts +2 -2
  21. package/src/near/wallet.ts +9 -4
  22. package/src/solana/connector.ts +8 -9
  23. package/src/solana/injected/solana-wallet.ts +6 -6
  24. package/src/solana/{WalletStandard.ts → protocol.ts} +4 -2
  25. package/src/solana/wallet.ts +20 -11
  26. package/src/stellar/connector.ts +6 -1
  27. package/src/stellar/wallet.ts +17 -17
  28. package/src/ton/connector.ts +5 -1
  29. package/src/ton/wallet.ts +3 -3
  30. package/src/ui/Popup.tsx +4 -12
  31. package/src/ui/connect/AuthPopup.tsx +1 -2
  32. package/src/ui/connect/ConnectWallet.tsx +6 -12
  33. package/src/ui/icons/arrow-right.tsx +2 -2
  34. package/src/ui/icons/close.tsx +1 -1
  35. package/src/ui/icons/exchange.tsx +4 -4
  36. package/src/ui/icons/logout.tsx +6 -6
  37. package/src/ui/icons/pending.tsx +4 -2
  38. package/src/ui/icons/qr.tsx +2 -1
  39. package/src/ui/icons/search.tsx +4 -4
  40. package/src/ui/icons/switch.tsx +4 -4
  41. package/src/ui/icons/wallet.tsx +4 -2
  42. package/src/ui/payment/Bridge.tsx +6 -25
  43. package/src/ui/payment/Payment.tsx +46 -241
  44. package/src/ui/payment/Profile.tsx +8 -10
  45. package/src/ui/payment/SelectToken.tsx +1 -1
  46. package/src/ui/payment/TokenCard.tsx +18 -22
  47. package/src/ui/router.tsx +16 -56
  48. package/src/ui/styles.ts +0 -2
  49. package/build/HotConnector.d.ts +0 -103
  50. package/build/HotConnector.js +0 -300
  51. package/build/HotConnector.js.map +0 -1
  52. package/build/OmniConnector.d.ts +0 -90
  53. package/build/OmniConnector.js +0 -121
  54. package/build/OmniConnector.js.map +0 -1
  55. package/build/OmniWallet.d.ts +0 -35
  56. package/build/OmniWallet.js +0 -56
  57. package/build/OmniWallet.js.map +0 -1
  58. package/build/activity.d.ts +0 -18
  59. package/build/activity.js +0 -87
  60. package/build/activity.js.map +0 -1
  61. package/build/core/Intents.d.ts +0 -100
  62. package/build/core/Intents.js +0 -472
  63. package/build/core/Intents.js.map +0 -1
  64. package/build/core/api.d.ts +0 -48
  65. package/build/core/api.js +0 -93
  66. package/build/core/api.js.map +0 -1
  67. package/build/core/bridge.d.ts +0 -3
  68. package/build/core/bridge.js +0 -36
  69. package/build/core/bridge.js.map +0 -1
  70. package/build/core/chains.d.ts +0 -115
  71. package/build/core/chains.js +0 -381
  72. package/build/core/chains.js.map +0 -1
  73. package/build/core/defaultTokens.d.ts +0 -17
  74. package/build/core/defaultTokens.js +0 -1079
  75. package/build/core/defaultTokens.js.map +0 -1
  76. package/build/core/events.d.ts +0 -42
  77. package/build/core/events.js +0 -64
  78. package/build/core/events.js.map +0 -1
  79. package/build/core/index.d.ts +0 -10
  80. package/build/core/index.js +0 -11
  81. package/build/core/index.js.map +0 -1
  82. package/build/core/recipient.d.ts +0 -10
  83. package/build/core/recipient.js +0 -40
  84. package/build/core/recipient.js.map +0 -1
  85. package/build/core/token.d.ts +0 -36
  86. package/build/core/token.js +0 -103
  87. package/build/core/token.js.map +0 -1
  88. package/build/core/tokens.d.ts +0 -14
  89. package/build/core/tokens.js +0 -59
  90. package/build/core/tokens.js.map +0 -1
  91. package/build/core/types.d.ts +0 -60
  92. package/build/core/types.js +0 -2
  93. package/build/core/types.js.map +0 -1
  94. package/build/core/utils.d.ts +0 -25
  95. package/build/core/utils.js +0 -170
  96. package/build/core/utils.js.map +0 -1
  97. package/build/cosmos/connector.d.ts +0 -36
  98. package/build/cosmos/connector.js +0 -211
  99. package/build/cosmos/connector.js.map +0 -1
  100. package/build/cosmos/helpers.d.ts +0 -2
  101. package/build/cosmos/helpers.js +0 -29
  102. package/build/cosmos/helpers.js.map +0 -1
  103. package/build/cosmos/index.d.ts +0 -6
  104. package/build/cosmos/index.js +0 -5
  105. package/build/cosmos/index.js.map +0 -1
  106. package/build/cosmos/wallet.d.ts +0 -26
  107. package/build/cosmos/wallet.js +0 -51
  108. package/build/cosmos/wallet.js.map +0 -1
  109. package/build/defaults.d.ts +0 -1
  110. package/build/defaults.js +0 -7
  111. package/build/defaults.js.map +0 -1
  112. package/build/evm/abi.d.ts +0 -17
  113. package/build/evm/abi.js +0 -38
  114. package/build/evm/abi.js.map +0 -1
  115. package/build/evm/connector.d.ts +0 -29
  116. package/build/evm/connector.js +0 -118
  117. package/build/evm/connector.js.map +0 -1
  118. package/build/evm/index.d.ts +0 -6
  119. package/build/evm/index.js +0 -5
  120. package/build/evm/index.js.map +0 -1
  121. package/build/evm/injected.d.ts +0 -1
  122. package/build/evm/injected.js +0 -33
  123. package/build/evm/injected.js.map +0 -1
  124. package/build/evm/wallet.d.ts +0 -42
  125. package/build/evm/wallet.js +0 -130
  126. package/build/evm/wallet.js.map +0 -1
  127. package/build/exchange.d.ts +0 -68
  128. package/build/exchange.js +0 -384
  129. package/build/exchange.js.map +0 -1
  130. package/build/hot-wallet/google.d.ts +0 -25
  131. package/build/hot-wallet/google.js +0 -117
  132. package/build/hot-wallet/google.js.map +0 -1
  133. package/build/hot-wallet/iframe.d.ts +0 -36
  134. package/build/hot-wallet/iframe.js +0 -140
  135. package/build/hot-wallet/iframe.js.map +0 -1
  136. package/build/hot-wallet/index.d.ts +0 -5
  137. package/build/hot-wallet/index.js +0 -4
  138. package/build/hot-wallet/index.js.map +0 -1
  139. package/build/hot-wallet/proxy.d.ts +0 -8
  140. package/build/hot-wallet/proxy.js +0 -45
  141. package/build/hot-wallet/proxy.js.map +0 -1
  142. package/build/index.d.ts +0 -6
  143. package/build/index.js +0 -7
  144. package/build/index.js.map +0 -1
  145. package/build/near/connector.d.ts +0 -18
  146. package/build/near/connector.js +0 -58
  147. package/build/near/connector.js.map +0 -1
  148. package/build/near/index.d.ts +0 -7
  149. package/build/near/index.js +0 -5
  150. package/build/near/index.js.map +0 -1
  151. package/build/near/rpc.d.ts +0 -23
  152. package/build/near/rpc.js +0 -161
  153. package/build/near/rpc.js.map +0 -1
  154. package/build/near/wallet.d.ts +0 -53
  155. package/build/near/wallet.js +0 -190
  156. package/build/near/wallet.js.map +0 -1
  157. package/build/solana/WalletStandard.d.ts +0 -25
  158. package/build/solana/WalletStandard.js +0 -56
  159. package/build/solana/WalletStandard.js.map +0 -1
  160. package/build/solana/connector.d.ts +0 -30
  161. package/build/solana/connector.js +0 -139
  162. package/build/solana/connector.js.map +0 -1
  163. package/build/solana/index.d.ts +0 -6
  164. package/build/solana/index.js +0 -5
  165. package/build/solana/index.js.map +0 -1
  166. package/build/solana/injected/account.d.ts +0 -11
  167. package/build/solana/injected/account.js +0 -41
  168. package/build/solana/injected/account.js.map +0 -1
  169. package/build/solana/injected/index.d.ts +0 -1
  170. package/build/solana/injected/index.js +0 -82
  171. package/build/solana/injected/index.js.map +0 -1
  172. package/build/solana/injected/register.d.ts +0 -2
  173. package/build/solana/injected/register.js +0 -41
  174. package/build/solana/injected/register.js.map +0 -1
  175. package/build/solana/injected/solana-wallet.d.ts +0 -34
  176. package/build/solana/injected/solana-wallet.js +0 -223
  177. package/build/solana/injected/solana-wallet.js.map +0 -1
  178. package/build/solana/injected/utils.d.ts +0 -32
  179. package/build/solana/injected/utils.js +0 -36
  180. package/build/solana/injected/utils.js.map +0 -1
  181. package/build/solana/wallet.d.ts +0 -40
  182. package/build/solana/wallet.js +0 -181
  183. package/build/solana/wallet.js.map +0 -1
  184. package/build/solana/walletStandartList.d.ts +0 -102
  185. package/build/solana/walletStandartList.js +0 -150
  186. package/build/solana/walletStandartList.js.map +0 -1
  187. package/build/stellar/connector.d.ts +0 -29
  188. package/build/stellar/connector.js +0 -64
  189. package/build/stellar/connector.js.map +0 -1
  190. package/build/stellar/freigher.d.ts +0 -46
  191. package/build/stellar/freigher.js +0 -110
  192. package/build/stellar/freigher.js.map +0 -1
  193. package/build/stellar/hotWallet.d.ts +0 -33
  194. package/build/stellar/hotWallet.js +0 -28
  195. package/build/stellar/hotWallet.js.map +0 -1
  196. package/build/stellar/index.d.ts +0 -6
  197. package/build/stellar/index.js +0 -5
  198. package/build/stellar/index.js.map +0 -1
  199. package/build/stellar/wallet.d.ts +0 -67
  200. package/build/stellar/wallet.js +0 -212
  201. package/build/stellar/wallet.js.map +0 -1
  202. package/build/storage.d.ts +0 -10
  203. package/build/storage.js +0 -12
  204. package/build/storage.js.map +0 -1
  205. package/build/ton/connector.d.ts +0 -24
  206. package/build/ton/connector.js +0 -111
  207. package/build/ton/connector.js.map +0 -1
  208. package/build/ton/index.d.ts +0 -7
  209. package/build/ton/index.js +0 -5
  210. package/build/ton/index.js.map +0 -1
  211. package/build/ton/injected.d.ts +0 -1
  212. package/build/ton/injected.js +0 -49
  213. package/build/ton/injected.js.map +0 -1
  214. package/build/ton/utils.d.ts +0 -45
  215. package/build/ton/utils.js +0 -63
  216. package/build/ton/utils.js.map +0 -1
  217. package/build/ton/wallet.d.ts +0 -54
  218. package/build/ton/wallet.js +0 -138
  219. package/build/ton/wallet.js.map +0 -1
  220. package/build/tron/connector.d.ts +0 -51
  221. package/build/tron/connector.js +0 -65
  222. package/build/tron/connector.js.map +0 -1
  223. package/build/tron/index.d.ts +0 -6
  224. package/build/tron/index.js +0 -5
  225. package/build/tron/index.js.map +0 -1
  226. package/build/tron/wallet.d.ts +0 -52
  227. package/build/tron/wallet.js +0 -122
  228. package/build/tron/wallet.js.map +0 -1
  229. package/build/ui/Popup.d.ts +0 -12
  230. package/build/ui/Popup.js +0 -43
  231. package/build/ui/Popup.js.map +0 -1
  232. package/build/ui/Toast.d.ts +0 -4
  233. package/build/ui/Toast.js +0 -33
  234. package/build/ui/Toast.js.map +0 -1
  235. package/build/ui/connect/AuthPopup.d.ts +0 -2
  236. package/build/ui/connect/AuthPopup.js +0 -48
  237. package/build/ui/connect/AuthPopup.js.map +0 -1
  238. package/build/ui/connect/ConnectWallet.d.ts +0 -14
  239. package/build/ui/connect/ConnectWallet.js +0 -22
  240. package/build/ui/connect/ConnectWallet.js.map +0 -1
  241. package/build/ui/connect/LogoutPopup.d.ts +0 -10
  242. package/build/ui/connect/LogoutPopup.js +0 -8
  243. package/build/ui/connect/LogoutPopup.js.map +0 -1
  244. package/build/ui/connect/PrimaryWallet.d.ts +0 -6
  245. package/build/ui/connect/PrimaryWallet.js +0 -18
  246. package/build/ui/connect/PrimaryWallet.js.map +0 -1
  247. package/build/ui/connect/WCPopup.d.ts +0 -13
  248. package/build/ui/connect/WCPopup.js +0 -81
  249. package/build/ui/connect/WCPopup.js.map +0 -1
  250. package/build/ui/connect/WCRequest.d.ts +0 -9
  251. package/build/ui/connect/WCRequest.js +0 -13
  252. package/build/ui/connect/WCRequest.js.map +0 -1
  253. package/build/ui/connect/WalletPicker.d.ts +0 -11
  254. package/build/ui/connect/WalletPicker.js +0 -48
  255. package/build/ui/connect/WalletPicker.js.map +0 -1
  256. package/build/ui/icons/arrow-right.d.ts +0 -1
  257. package/build/ui/icons/arrow-right.js +0 -5
  258. package/build/ui/icons/arrow-right.js.map +0 -1
  259. package/build/ui/icons/close.d.ts +0 -1
  260. package/build/ui/icons/close.js +0 -5
  261. package/build/ui/icons/close.js.map +0 -1
  262. package/build/ui/icons/exchange.d.ts +0 -6
  263. package/build/ui/icons/exchange.js +0 -6
  264. package/build/ui/icons/exchange.js.map +0 -1
  265. package/build/ui/icons/logout.d.ts +0 -1
  266. package/build/ui/icons/logout.js +0 -3
  267. package/build/ui/icons/logout.js.map +0 -1
  268. package/build/ui/icons/pending.d.ts +0 -1
  269. package/build/ui/icons/pending.js +0 -5
  270. package/build/ui/icons/pending.js.map +0 -1
  271. package/build/ui/icons/qr.d.ts +0 -1
  272. package/build/ui/icons/qr.js +0 -5
  273. package/build/ui/icons/qr.js.map +0 -1
  274. package/build/ui/icons/search.d.ts +0 -1
  275. package/build/ui/icons/search.js +0 -5
  276. package/build/ui/icons/search.js.map +0 -1
  277. package/build/ui/icons/switch.d.ts +0 -1
  278. package/build/ui/icons/switch.js +0 -5
  279. package/build/ui/icons/switch.js.map +0 -1
  280. package/build/ui/icons/wallet.d.ts +0 -1
  281. package/build/ui/icons/wallet.js +0 -5
  282. package/build/ui/icons/wallet.js.map +0 -1
  283. package/build/ui/payment/Bridge.d.ts +0 -29
  284. package/build/ui/payment/Bridge.js +0 -373
  285. package/build/ui/payment/Bridge.js.map +0 -1
  286. package/build/ui/payment/DepositQR.d.ts +0 -9
  287. package/build/ui/payment/DepositQR.js +0 -56
  288. package/build/ui/payment/DepositQR.js.map +0 -1
  289. package/build/ui/payment/Payment.d.ts +0 -23
  290. package/build/ui/payment/Payment.js +0 -136
  291. package/build/ui/payment/Payment.js.map +0 -1
  292. package/build/ui/payment/Profile.d.ts +0 -8
  293. package/build/ui/payment/Profile.js +0 -110
  294. package/build/ui/payment/Profile.js.map +0 -1
  295. package/build/ui/payment/SelectRecipient.d.ts +0 -14
  296. package/build/ui/payment/SelectRecipient.js +0 -68
  297. package/build/ui/payment/SelectRecipient.js.map +0 -1
  298. package/build/ui/payment/SelectSender.d.ts +0 -13
  299. package/build/ui/payment/SelectSender.js +0 -23
  300. package/build/ui/payment/SelectSender.js.map +0 -1
  301. package/build/ui/payment/SelectToken.d.ts +0 -13
  302. package/build/ui/payment/SelectToken.js +0 -92
  303. package/build/ui/payment/SelectToken.js.map +0 -1
  304. package/build/ui/payment/Stepper.d.ts +0 -13
  305. package/build/ui/payment/Stepper.js +0 -22
  306. package/build/ui/payment/Stepper.js.map +0 -1
  307. package/build/ui/payment/TokenCard.d.ts +0 -25
  308. package/build/ui/payment/TokenCard.js +0 -63
  309. package/build/ui/payment/TokenCard.js.map +0 -1
  310. package/build/ui/router.d.ts +0 -51
  311. package/build/ui/router.js +0 -68
  312. package/build/ui/router.js.map +0 -1
  313. package/build/ui/styles.d.ts +0 -13
  314. package/build/ui/styles.js +0 -290
  315. package/build/ui/styles.js.map +0 -1
  316. package/src/tron/connector.ts +0 -89
  317. package/src/tron/index.ts +0 -7
  318. package/src/tron/wallet.ts +0 -146
  319. package/src/ui/Toast.tsx +0 -45
  320. package/src/ui/connect/PrimaryWallet.tsx +0 -65
  321. package/src/ui/payment/Stepper.tsx +0 -50
  322. /package/src/solana/{walletStandartList.ts → wallets.ts} +0 -0
@@ -1,274 +1,79 @@
1
1
  import { observer } from "mobx-react-lite";
2
- import { useEffect, useState } from "react";
2
+ import { useEffect } from "react";
3
3
 
4
- import { WalletIcon } from "../icons/wallet";
5
- import { PopupButton, PopupOption, PopupOptionInfo } from "../styles";
6
- import { Commitment, Intents } from "../../core";
4
+ import { HotConnector } from "../../HotConnector";
5
+ import { openBridge, openConnector } from "../router";
7
6
  import { Recipient } from "../../core/recipient";
8
- import { Token } from "../../core/token";
9
-
10
7
  import { BridgeReview } from "../../exchange";
11
- import { openConnector } from "../router";
12
-
13
8
  import { OmniWallet } from "../../OmniWallet";
14
- import { HotConnector } from "../../HotConnector";
9
+ import { Network } from "../../core/chains";
10
+ import { Token } from "../../core/token";
15
11
  import Popup from "../Popup";
16
12
 
17
13
  import { TokenCard } from "./TokenCard";
18
- import { HorizontalStepper } from "./Stepper";
19
- import { Loader } from "./Profile";
14
+ import { PopupOption, PopupOptionInfo } from "../styles";
15
+ import { WalletIcon } from "../icons/wallet";
20
16
 
21
17
  interface PaymentProps {
22
- intents: Intents;
23
- title?: string;
24
- allowedTokens?: string[];
25
- prepaidAmount: bigint;
26
- payableToken: Token;
27
- needAmount: bigint;
28
18
  connector: HotConnector;
29
- onReject: (message: string) => void;
30
- onConfirm: (args: { depositQoute?: BridgeReview; processing?: () => Promise<BridgeReview> }) => Promise<void>;
31
- close: () => void;
19
+ token: Token;
20
+ amount: bigint;
21
+ recipient?: Recipient;
22
+ onClose: () => void;
23
+ onProcess: (task: Promise<BridgeReview>) => void;
32
24
  }
33
25
 
34
- const animations = {
35
- success: "https://hex.exchange/success.json",
36
- failed: "https://hex.exchange/error.json",
37
- loading: "https://hex.exchange/loading.json",
38
- };
39
-
40
- const PAY_SLIPPAGE = 0.002;
41
-
42
- const serializeError = (error: any) => {
43
- try {
44
- if (error instanceof Error) return error.message;
45
- if (typeof error === "object" && Object.keys(error).length > 0) return JSON.stringify(error);
46
- if (typeof error === "string" || typeof error === "number") return error.toString();
47
- return "";
48
- } catch (error) {
49
- return "Unknown error";
50
- }
51
- };
52
-
53
- export const Payment = observer(({ connector, intents, title = "Payment", allowedTokens, prepaidAmount, payableToken, needAmount, onReject, onConfirm, close }: PaymentProps) => {
54
- useState(() => {
55
- fetch(animations.loading);
56
- fetch(animations.success);
57
- fetch(animations.failed);
58
- });
59
-
60
- useEffect(() => {
61
- if (connector.wallets.length !== 0) return;
62
- openConnector(connector);
63
- }, [connector.wallets.length]);
64
-
65
- const [flow, setFlow] = useState<{
66
- token?: Token;
67
- wallet?: OmniWallet;
68
- commitment?: Commitment;
69
- review?: BridgeReview;
70
- success?: { depositQoute?: BridgeReview; processing?: () => Promise<BridgeReview> };
71
- step?: "selectToken" | "sign" | "transfer" | "success" | "error" | "loading";
72
- loading?: boolean;
73
- error?: any;
74
- } | null>(needAmount === 0n ? { step: "transfer" } : null);
75
-
76
- const paymentTitle = title || `Pay ${payableToken.readable(needAmount)} ${payableToken.symbol}`;
77
-
26
+ export const Payment = observer(({ connector, recipient, token: need, amount: needAmount, onProcess, onClose }: PaymentProps) => {
27
+ const title = `Need ${need.readable(needAmount)} ${need.symbol}`;
78
28
  const selectToken = async (from: Token, wallet?: OmniWallet) => {
79
- if (!wallet) return;
80
-
81
- try {
82
- setFlow({ token: from, wallet, review: undefined, step: "sign" });
83
- const review = await connector.exchange.reviewSwap({
84
- recipient: Recipient.fromWallet(intents.signer)!,
85
- amount: needAmount + (needAmount * BigInt(Math.floor(PAY_SLIPPAGE * 1000))) / BigInt(1000),
86
- slippage: PAY_SLIPPAGE,
29
+ onProcess(
30
+ openBridge(connector, {
87
31
  sender: wallet,
88
- refund: wallet,
32
+ autoClose: true,
89
33
  type: "exactOut",
90
- to: payableToken,
91
- from,
92
- });
93
-
94
- setFlow({ token: from, wallet, review, step: "sign" });
95
- } catch {
96
- setFlow({ token: from, wallet, error: true, step: "sign" });
97
- }
98
- };
99
-
100
- const signStep = async () => {
101
- try {
102
- setFlow((t) => (t ? { ...t, step: "sign", loading: true } : null));
103
- await intents.sign();
104
- setFlow((t) => (t ? { ...t, step: "transfer", loading: false } : null));
105
- } catch (error) {
106
- console.error(error);
107
- setFlow((t) => (t ? { ...t, step: "error", loading: false, error } : null));
108
- throw error;
109
- }
110
- };
111
-
112
- const confirmPaymentStep = async () => {
113
- try {
114
- setFlow((t) => (t ? { ...t, step: "loading" } : null));
115
-
116
- if (flow?.review == null) {
117
- await intents.sign();
118
- return setFlow({ step: "success", loading: false });
119
- }
120
-
121
- const result = await connector.exchange.makeSwap(flow.review, { log: () => {} });
122
- await onConfirm({ depositQoute: result.review, processing: result.processing });
123
- setFlow({ loading: false, step: "success" });
124
- setTimeout(() => close(), 2000);
125
- } catch (error) {
126
- console.error(error);
127
- setFlow((t) => (t ? { ...t, step: "error", loading: false, error } : null));
128
- throw error;
129
- }
130
- };
131
-
132
- if (flow?.step === "success") {
133
- return (
134
- <Popup header={<p>{paymentTitle}</p>}>
135
- <div style={{ width: "100%", height: 400, display: "flex", justifyContent: "center", alignItems: "center", flexDirection: "column" }}>
136
- {/* @ts-expect-error: dotlottie-wc is not typed */}
137
- <dotlottie-wc key="success" src={animations.success} speed="1" style={{ width: 300, height: 300 }} mode="forward" loop autoplay></dotlottie-wc>
138
- <p style={{ fontSize: 24, marginTop: -32, fontWeight: "bold" }}>Transaction successful</p>
139
- </div>
140
- <PopupButton style={{ marginTop: "auto" }} onClick={() => close()}>
141
- Continue
142
- </PopupButton>
143
- </Popup>
34
+ recipient: recipient || Recipient.fromWallet(connector.priorityWallet!),
35
+ readonlyTo: recipient ? true : false,
36
+ amount: need.float(needAmount),
37
+ readonlyAmount: true,
38
+ title: title,
39
+ from: from,
40
+ to: need,
41
+ })
144
42
  );
145
- }
146
-
147
- if (flow?.step === "loading") {
148
- return (
149
- <Popup header={<p>{paymentTitle}</p>}>
150
- <div style={{ width: "100%", height: 400, display: "flex", justifyContent: "center", alignItems: "center", flexDirection: "column" }}>
151
- {/* @ts-expect-error: dotlottie-wc is not typed */}
152
- <dotlottie-wc key="loading" src={animations.loading} speed="1" style={{ marginTop: -64, width: 300, height: 300 }} mode="forward" loop autoplay></dotlottie-wc>
153
- <p style={{ fontSize: 24, marginTop: -16, fontWeight: "bold" }}>Transaction processing</p>
154
- </div>
155
- </Popup>
156
- );
157
- }
158
-
159
- if (flow?.step === "error") {
160
- return (
161
- <Popup header={<p>{paymentTitle}</p>}>
162
- <div style={{ width: "100%", height: 400, gap: 8, display: "flex", justifyContent: "center", alignItems: "center", flexDirection: "column" }}>
163
- {/* @ts-expect-error: dotlottie-wc is not typed */}
164
- <dotlottie-wc key="error" src={animations.failed} speed="1" style={{ width: 300, height: 300 }} mode="forward" loop autoplay></dotlottie-wc>
165
- <p style={{ fontSize: 24, marginTop: -32, fontWeight: "bold" }}>Transaction failed</p>
166
- <p style={{ fontSize: 14, width: "80%", textAlign: "center", overflowY: "auto", lineBreak: "anywhere" }}>{serializeError(flow.error)}</p>
167
- </div>
168
- <PopupButton onClick={() => onReject(serializeError(flow.error))}>Close</PopupButton>
169
- </Popup>
170
- );
171
- }
172
-
173
- if (flow?.step === "transfer") {
174
- return (
175
- <Popup onClose={() => onReject("closed")} header={<p>{paymentTitle}</p>}>
176
- <HorizontalStepper steps={[{ label: "Select" }, { label: "Review" }, { label: "Confirm" }]} currentStep={2} />
177
-
178
- {prepaidAmount > 0n && <TokenCard token={payableToken} hot={connector} wallet={intents.signer} amount={prepaidAmount} />}
179
-
180
- {flow.token != null && (
181
- <TokenCard //
182
- hot={connector}
183
- token={flow.token}
184
- wallet={flow.wallet}
185
- amount={flow.review == null ? needAmount : flow.review?.amountIn ?? 0n}
186
- />
187
- )}
188
-
189
- <PopupButton style={{ marginTop: 24 }} onClick={confirmPaymentStep}>
190
- {flow?.loading ? "Confirming..." : "Confirm transaction"}
191
- </PopupButton>
192
- </Popup>
193
- );
194
- }
195
-
196
- if (flow?.step === "sign") {
197
- const rightControl = <div style={{ paddingRight: 4, marginLeft: "auto", alignItems: "flex-end" }}>{flow.error ? <ErrorIcon /> : <Loader />}</div>;
198
-
199
- return (
200
- <Popup onClose={() => onReject("closed")} header={<p>{title}</p>}>
201
- <HorizontalStepper steps={[{ label: "Select" }, { label: "Review" }, { label: "Confirm" }]} currentStep={1} />
202
-
203
- {prepaidAmount > 0n && <TokenCard token={payableToken} hot={connector} wallet={intents.signer} amount={prepaidAmount} />}
204
-
205
- {flow.token != null && (
206
- <TokenCard //
207
- hot={connector}
208
- token={flow.token}
209
- wallet={flow.wallet}
210
- rightControl={flow.review ? undefined : rightControl}
211
- amount={flow.review == null ? needAmount : flow.review?.amountIn ?? 0n}
212
- />
213
- )}
214
-
215
- {flow.error ? (
216
- <PopupButton style={{ marginTop: 24 }} onClick={() => setFlow(null)}>
217
- Select another token
218
- </PopupButton>
219
- ) : (
220
- <PopupButton style={{ marginTop: 24 }} disabled={!flow?.review} onClick={signStep}>
221
- {flow?.loading ? "Signing..." : flow?.review ? "Sign review" : "Quoting..."}
222
- </PopupButton>
223
- )}
224
- </Popup>
225
- );
226
- }
227
-
228
- const recommendedTokens = connector.walletsTokens.filter((t) => t.token.symbol === "USDT" || t.token.symbol === "USDC");
229
- const otherTokens = connector.walletsTokens.filter((t) => t.token.symbol !== "USDT" && t.token.symbol !== "USDC");
230
-
231
- const renderToken = (token: Token, wallet: OmniWallet, balance: bigint) => {
232
- if (token.id === payableToken.id) return null;
233
- const availableBalance = token.float(balance) - token.reserve;
43
+ };
234
44
 
235
- // Allow only tokens in the allowedTokens list
236
- if (allowedTokens != null && !allowedTokens?.includes(token.omniAddress)) return null;
45
+ useEffect(() => {
46
+ if (connector.wallets.length !== 0) return;
47
+ openConnector(connector);
48
+ }, [connector.wallets.length, connector]);
237
49
 
238
- // same token as need and enough balance is direct deposit
239
- if (token.originalChain === payableToken.originalChain && token.originalAddress === payableToken.originalAddress && availableBalance >= payableToken.float(needAmount)) {
240
- return <TokenCard key={token.id} token={token} onSelect={selectToken} hot={connector} wallet={wallet} />;
241
- }
50
+ return (
51
+ <Popup onClose={onClose} header={<p>{title}</p>}>
52
+ {connector.walletsTokens.map(({ token, wallet, balance }) => {
53
+ if (token.id === need.id) return null;
54
+ const availableBalance = token.float(balance) - token.reserve;
242
55
 
243
- if (availableBalance * token.usd <= payableToken.usd * payableToken.float(needAmount) * (1 + PAY_SLIPPAGE)) return null;
244
- return <TokenCard key={token.id} token={token} onSelect={selectToken} hot={connector} wallet={wallet} />;
245
- };
56
+ if (need.originalChain === Network.Gonka || need.originalChain === Network.Juno) {
57
+ if (token.id === need.id) return null;
58
+ if (token.originalAddress !== need.originalAddress) return null;
246
59
 
247
- return (
248
- <Popup onClose={() => onReject("closed")} header={<p>{title}</p>}>
249
- <HorizontalStepper steps={[{ label: "Select" }, { label: "Review" }, { label: "Confirm" }]} currentStep={0} />
60
+ if (availableBalance < need.float(needAmount)) return null;
61
+ return <TokenCard key={token.id} token={token} onSelect={selectToken} hot={connector} wallet={wallet} />;
62
+ }
250
63
 
251
- {recommendedTokens.map(({ token, wallet, balance }) => renderToken(token, wallet, balance))}
252
- {otherTokens.map(({ token, wallet, balance }) => renderToken(token, wallet, balance))}
64
+ if (availableBalance * token.usd <= need.usd * need.float(needAmount)) return null;
65
+ return <TokenCard key={token.id} token={token} onSelect={selectToken} hot={connector} wallet={wallet} />;
66
+ })}
253
67
 
254
68
  <PopupOption onClick={() => openConnector(connector)}>
255
69
  <div style={{ width: 44, height: 44, borderRadius: 16, background: "#000", display: "flex", alignItems: "center", justifyContent: "center" }}>
256
70
  <WalletIcon />
257
71
  </div>
258
72
  <PopupOptionInfo>
259
- <p>Don't find the right token?</p>
260
- <span className="wallet-address">Connect another wallet</span>
73
+ <p>Connect wallet</p>
74
+ <span className="wallet-address">To more pay options</span>
261
75
  </PopupOptionInfo>
262
76
  </PopupOption>
263
77
  </Popup>
264
78
  );
265
79
  });
266
-
267
- const ErrorIcon = () => {
268
- return (
269
- <svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg" aria-label="Failed" style={{ display: "block", margin: "0 auto" }}>
270
- <circle cx="14" cy="14" r="13" stroke="#E74C3C" strokeWidth="2" />
271
- <path d="M9 9l10 10M19 9l-10 10" stroke="#E74C3C" strokeWidth="2.5" strokeLinecap="round" />
272
- </svg>
273
- );
274
- };
@@ -1,6 +1,6 @@
1
1
  import { observer } from "mobx-react-lite";
2
2
  import styled from "styled-components";
3
- import { useEffect } from "react";
3
+ import { useEffect, useState } from "react";
4
4
 
5
5
  import { LogoutIcon } from "../icons/logout";
6
6
  import { openBridge, openConnector } from "../router";
@@ -72,15 +72,13 @@ export const Profile = observer(({ hot, onClose }: { hot: HotConnector; onClose:
72
72
  return (
73
73
  <Popup onClose={onClose}>
74
74
  <div style={{ display: "flex", flexWrap: "wrap", width: "100%", gap: 8 }}>
75
- {hot.connectors.map((connector) =>
76
- connector.wallets.map((wallet) => (
77
- <WalletCard onClick={() => connector.disconnect()}>
78
- <ImageView src={wallet.icon} alt={connector.name} size={20} />
79
- <div>{formatter.truncateAddress(wallet.address, 8)}</div>
80
- <LogoutIcon width={20} height={20} />
81
- </WalletCard>
82
- ))
83
- )}
75
+ {hot.wallets.map((wallet) => (
76
+ <WalletCard onClick={() => wallet.disconnect()}>
77
+ <ImageView src={wallet.icon} alt={wallet.connector.name} size={20} />
78
+ <div>{formatter.truncateAddress(wallet.address, 8)}</div>
79
+ <LogoutIcon width={20} height={20} />
80
+ </WalletCard>
81
+ ))}
84
82
 
85
83
  {hot.wallets.length < 6 && (
86
84
  <WalletCard style={{ paddingLeft: 12, paddingRight: 12 }} onClick={() => openConnector(hot)}>
@@ -7,11 +7,11 @@ import { Token } from "../../core/token";
7
7
  import { HotConnector } from "../../HotConnector";
8
8
  import { OmniWallet } from "../../OmniWallet";
9
9
  import { Network, OmniToken } from "../../core/chains";
10
- import { tokens } from "../../core/tokens";
11
10
  import { PopupOption } from "../styles";
12
11
  import Popup from "../Popup";
13
12
 
14
13
  import { TokenCard, ImageView } from "./TokenCard";
14
+ import { tokens } from "../../core/tokens";
15
15
 
16
16
  interface SelectTokenPopupProps {
17
17
  hot: HotConnector;
@@ -58,35 +58,31 @@ export const TokenIcon = observer(({ token, wallet }: { token: Token; wallet?: O
58
58
  <div style={{ position: "relative", width: 40, height: 40 }}>
59
59
  <ImageView src={token.icon} alt={token.symbol} size={40} />
60
60
  <ImageView src={token.chainIcon} alt={token.symbol} size={14} style={{ position: "absolute", bottom: 0, right: 0 }} />
61
- {token.chain === -4 && wallet?.type && <ImageView src={wallet.icon} alt={chains.getByType(wallet.type)?.[0]?.name || ""} size={14} style={{ position: "absolute", bottom: 0, left: 0 }} />}
61
+ {token.chain === -4 && wallet?.type && <ImageView src={wallet.icon} alt={chains.get(wallet.type)?.name || ""} size={14} style={{ position: "absolute", bottom: 0, left: 0 }} />}
62
62
  </div>
63
63
  );
64
64
  });
65
65
 
66
- export const TokenCard = observer(
67
- ({ token, onSelect, amount, hot, wallet, rightControl }: { rightControl?: React.ReactNode; token: Token; onSelect?: (token: Token, wallet?: OmniWallet) => void; amount?: bigint; hot: HotConnector; wallet?: OmniWallet }) => {
68
- const balance = amount || hot.balance(wallet, token);
69
- const symbol = token.chain === -4 && !token.isMainOmni ? `${token.symbol} (${token.originalChainSymbol})` : token.symbol;
66
+ export const TokenCard = observer(({ token, onSelect, hot, wallet }: { token: Token; onSelect: (token: Token, wallet?: OmniWallet) => void; hot: HotConnector; wallet?: OmniWallet }) => {
67
+ const balance = hot.balance(wallet, token);
68
+ const symbol = token.chain === -4 && !token.isMainOmni ? `${token.originalChainSymbol}_${token.symbol}` : token.symbol;
70
69
 
71
- return (
72
- <PopupOption key={token.id} onClick={() => onSelect?.(token, wallet)}>
73
- <TokenIcon token={token} wallet={wallet} />
70
+ return (
71
+ <PopupOption key={token.id} onClick={() => onSelect(token, wallet)}>
72
+ <TokenIcon token={token} wallet={wallet} />
74
73
 
75
- <TokenWrap style={{ marginTop: -2, textAlign: "left" }}>
76
- <p style={{ textAlign: "left", fontSize: 20, fontWeight: "bold" }}>{symbol}</p>
77
- <p style={{ textAlign: "left", fontSize: 14, color: "#c6c6c6" }}>${formatter.amount(token.usd)}</p>
78
- </TokenWrap>
74
+ <TokenWrap style={{ marginTop: -2, textAlign: "left" }}>
75
+ <p style={{ textAlign: "left", fontSize: 20, fontWeight: "bold" }}>{symbol}</p>
76
+ <p style={{ textAlign: "left", fontSize: 14, color: "#c6c6c6" }}>${formatter.amount(token.usd)}</p>
77
+ </TokenWrap>
79
78
 
80
- {rightControl || (
81
- <TokenWrap style={{ paddingRight: 4, marginLeft: "auto", alignItems: "flex-end" }}>
82
- <p style={{ textAlign: "right", fontSize: 20 }}>{token.readable(balance)}</p>
83
- <p style={{ textAlign: "right", fontSize: 14, color: "#c6c6c6" }}>${token.readable(balance, token.usd)}</p>
84
- </TokenWrap>
85
- )}
86
- </PopupOption>
87
- );
88
- }
89
- );
79
+ <TokenWrap style={{ paddingRight: 4, marginLeft: "auto", alignItems: "flex-end" }}>
80
+ <p style={{ textAlign: "right", fontSize: 20 }}>{token.readable(balance)}</p>
81
+ <p style={{ textAlign: "right", fontSize: 14, color: "#c6c6c6" }}>${token.readable(balance, token.usd)}</p>
82
+ </TokenWrap>
83
+ </PopupOption>
84
+ );
85
+ });
90
86
 
91
87
  const TokenWrap = styled.div`
92
88
  display: flex;
package/src/ui/router.tsx CHANGED
@@ -1,62 +1,34 @@
1
1
  import { HotConnector } from "../HotConnector";
2
2
  import { OmniConnector } from "../OmniConnector";
3
- import { OmniWallet } from "../OmniWallet";
4
-
5
3
  import { BridgeReview } from "../exchange";
4
+ import { Token } from "../core/token";
5
+ import { OmniWallet } from "../OmniWallet";
6
6
  import { WalletType } from "../core/chains";
7
7
  import { Recipient } from "../core/recipient";
8
- import { Intents } from "../core/Intents";
9
- import { Token } from "../core/token";
10
8
 
11
9
  import { present } from "./Popup";
12
- import { SelectTokenPopup } from "./payment/SelectToken";
13
- import { SelectRecipient } from "./payment/SelectRecipient";
14
- import { SelectSender } from "./payment/SelectSender";
15
- import { BridgeProps } from "./payment/Bridge";
16
10
  import { Payment } from "./payment/Payment";
17
- import { Profile } from "./payment/Profile";
18
- import { Bridge } from "./payment/Bridge";
19
-
20
- import ConnectPrimaryWallet from "./connect/PrimaryWallet";
21
11
  import { LogoutPopup } from "./connect/LogoutPopup";
12
+ import { Bridge } from "./payment/Bridge";
13
+ import { Profile } from "./payment/Profile";
14
+ import { SelectTokenPopup } from "./payment/SelectToken";
22
15
  import { WalletPicker } from "./connect/WalletPicker";
16
+ import { BridgeProps } from "./payment/Bridge";
23
17
  import { Connector } from "./connect/ConnectWallet";
18
+ import { SelectSender } from "./payment/SelectSender";
19
+ import { SelectRecipient } from "./payment/SelectRecipient";
24
20
  import { WCRequest } from "./connect/WCRequest";
25
- import Toast from "./Toast";
26
21
 
27
- export const openPayment = (
28
- connector: HotConnector,
29
- {
30
- intents,
31
- title,
32
- allowedTokens,
33
- prepaidAmount,
34
- payableToken,
35
- needAmount,
36
- onConfirm,
37
- }: {
38
- intents: Intents;
39
- title?: string;
40
- allowedTokens?: string[];
41
- prepaidAmount: bigint;
42
- payableToken: Token;
43
- needAmount: bigint;
44
- onConfirm: (args: { depositQoute?: BridgeReview; processing?: () => Promise<BridgeReview> }) => Promise<void>;
45
- }
46
- ) => {
47
- return new Promise<void>((resolve, reject) => {
22
+ export const openPayment = (connector: HotConnector, token: Token, amount: bigint, recipient?: Recipient) => {
23
+ return new Promise<Promise<BridgeReview>>((resolve, reject) => {
48
24
  present((close) => (
49
25
  <Payment //
50
- close={() => (close(), resolve())}
51
- onReject={() => (close(), reject(new Error("User rejected")))}
52
- onConfirm={(args) => onConfirm(args).finally(() => close())}
53
- prepaidAmount={prepaidAmount}
54
- allowedTokens={allowedTokens}
55
- payableToken={payableToken}
56
- needAmount={needAmount}
26
+ onClose={() => (close(), reject(new Error("User rejected")))}
27
+ onProcess={(task) => (close(), resolve(task))}
57
28
  connector={connector}
58
- intents={intents}
59
- title={title}
29
+ token={token}
30
+ amount={amount}
31
+ recipient={recipient}
60
32
  />
61
33
  ));
62
34
  });
@@ -90,15 +62,7 @@ export const openBridge = (hot: HotConnector, setup?: BridgeProps["setup"]) => {
90
62
  };
91
63
 
92
64
  export const openConnector = (hot: HotConnector) => {
93
- return new Promise<void>((resolve) => {
94
- present((close) => <Connector hot={hot} onClose={() => (resolve(), close())} />);
95
- });
96
- };
97
-
98
- export const openConnectPrimaryWallet = (hot: HotConnector) => {
99
- return new Promise<void>((resolve) => {
100
- present((close) => <ConnectPrimaryWallet hot={hot} onClose={() => (close(), resolve())} />);
101
- });
65
+ present((close) => <Connector hot={hot} onClose={close} />);
102
66
  };
103
67
 
104
68
  export const openProfile = (hot: HotConnector) => {
@@ -126,7 +90,3 @@ export const openWCRequest = <T,>(args: { task: () => Promise<T>; deeplink?: str
126
90
  present((close) => <WCRequest deeplink={args.deeplink} name={args.name} icon={args.icon} onClose={close} task={taskPromise} />);
127
91
  return taskPromise;
128
92
  };
129
-
130
- export const openToast = (message: string) => {
131
- return present(() => <Toast message={message} />);
132
- };
package/src/ui/styles.ts CHANGED
@@ -195,7 +195,6 @@ export const PopupOption = styled.button`
195
195
  outline: none;
196
196
  border: none;
197
197
  background: transparent;
198
- width: 100%;
199
198
  gap: 12px;
200
199
 
201
200
  img {
@@ -265,7 +264,6 @@ export const PopupButton = styled.button`
265
264
 
266
265
  export const PopupRoot = styled.div`
267
266
  height: 100%;
268
- width: 100%;
269
267
 
270
268
  h1,
271
269
  h2,
@@ -1,103 +0,0 @@
1
- import { ChainConfig, WalletType } from "./core/chains";
2
- import { HotBridge } from "./core/bridge";
3
- import { OmniToken } from "./core/chains";
4
- import { Intents } from "./core/Intents";
5
- import { Token } from "./core/token";
6
- import type CosmosWallet from "./cosmos/wallet";
7
- import type NearWallet from "./near/wallet";
8
- import type EvmWallet from "./evm/wallet";
9
- import type SolanaWallet from "./solana/wallet";
10
- import type StellarWallet from "./stellar/wallet";
11
- import type TonWallet from "./ton/wallet";
12
- import { OmniConnector } from "./OmniConnector";
13
- import { OmniWallet } from "./OmniWallet";
14
- import { Exchange } from "./exchange";
15
- import { Activity } from "./activity";
16
- interface HotConnectorOptions {
17
- apiKey: string;
18
- chains?: Record<number, ChainConfig>;
19
- connectors?: ((wibe3: HotConnector) => Promise<OmniConnector>)[];
20
- walletConnect?: {
21
- projectId?: string;
22
- metadata?: {
23
- name: string;
24
- description: string;
25
- url: string;
26
- icons: string[];
27
- };
28
- };
29
- }
30
- export declare class HotConnector {
31
- connectors: OmniConnector[];
32
- balances: Record<string, Record<string, bigint>>;
33
- activity: Activity;
34
- hotBridge: HotBridge;
35
- exchange: Exchange;
36
- private events;
37
- settings: {
38
- webWallet: string;
39
- projectId?: string;
40
- metadata?: {
41
- name: string;
42
- description: string;
43
- url: string;
44
- icons: string[];
45
- };
46
- };
47
- constructor(options?: HotConnectorOptions);
48
- setOmniChainBranding(branding: {
49
- name: string;
50
- icon: string;
51
- }): void;
52
- getWalletConnector(type: WalletType): OmniConnector | null;
53
- omni(token: OmniToken): Token;
54
- get tokens(): Token[];
55
- get priorityWallet(): StellarWallet | NearWallet | EvmWallet | SolanaWallet | TonWallet | undefined;
56
- get wallets(): OmniWallet[];
57
- get walletsTokens(): {
58
- token: Token;
59
- wallet: OmniWallet;
60
- balance: bigint;
61
- }[];
62
- get nearRpc(): import("./near/rpc").NearRpc;
63
- get near(): NearWallet | null;
64
- get evm(): EvmWallet | null;
65
- get solana(): SolanaWallet | null;
66
- get stellar(): StellarWallet | null;
67
- get ton(): TonWallet | null;
68
- get cosmos(): CosmosWallet | null;
69
- isCosmosWallet(wallet?: OmniWallet): wallet is CosmosWallet;
70
- isEvmWallet(wallet?: OmniWallet): wallet is EvmWallet;
71
- isSolanaWallet(wallet?: OmniWallet): wallet is SolanaWallet;
72
- isStellarWallet(wallet?: OmniWallet): wallet is StellarWallet;
73
- isTonWallet(wallet?: OmniWallet): wallet is TonWallet;
74
- isNearWallet(wallet?: OmniWallet): wallet is NearWallet;
75
- getChainBalances(chain: number): number;
76
- balance(wallet?: OmniWallet, token?: Token): bigint;
77
- omniBalance(token: OmniToken): {
78
- token: Token;
79
- onchain: bigint;
80
- omni: bigint;
81
- total: number;
82
- };
83
- fetchToken(token: Token, wallet: OmniWallet): Promise<bigint>;
84
- fetchOmniTokens(wallet: OmniWallet): Promise<void>;
85
- fetchTokens(wallet: OmniWallet): Promise<void>;
86
- intentsBuilder(wallet?: OmniWallet): Intents;
87
- onConnect(handler: (payload: {
88
- wallet: OmniWallet;
89
- connector: OmniConnector;
90
- }) => void): () => void;
91
- onDisconnect(handler: (payload: {
92
- wallet: OmniWallet;
93
- connector: OmniConnector;
94
- }) => void): () => void;
95
- withdraw(token: OmniToken, amount?: number, settings?: {
96
- sender?: OmniWallet;
97
- }): Promise<import("./exchange").BridgeReview>;
98
- deposit(token: OmniToken, amount?: number): Promise<import("./exchange").BridgeReview>;
99
- openBridge(): Promise<void>;
100
- connect(type?: WalletType): Promise<void>;
101
- disconnect(wallet: WalletType | OmniWallet): Promise<void>;
102
- }
103
- export {};