@reown/appkit-common-react-native 0.0.0-fix-approved-networks-20250822000414 → 0.0.0-fix-improvements-20250827190629

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 (292) hide show
  1. package/lib/commonjs/adapters/BlockchainAdapter.js +94 -0
  2. package/lib/commonjs/adapters/BlockchainAdapter.js.map +1 -0
  3. package/lib/commonjs/adapters/EvmAdapter.js +193 -0
  4. package/lib/commonjs/adapters/EvmAdapter.js.map +1 -0
  5. package/lib/commonjs/adapters/SolanaBaseAdapter.js +10 -0
  6. package/lib/commonjs/adapters/SolanaBaseAdapter.js.map +1 -0
  7. package/lib/commonjs/contracts/erc20.js.map +1 -1
  8. package/lib/commonjs/contracts/usdt.js.map +1 -1
  9. package/lib/commonjs/index.js +66 -5
  10. package/lib/commonjs/index.js.map +1 -1
  11. package/lib/commonjs/networks/bitcoin.js +40 -0
  12. package/lib/commonjs/networks/bitcoin.js.map +1 -0
  13. package/lib/commonjs/networks/solana.js +78 -0
  14. package/lib/commonjs/networks/solana.js.map +1 -0
  15. package/lib/commonjs/package.json +1 -0
  16. package/lib/commonjs/types/api/blockchain-api.js +15 -0
  17. package/lib/commonjs/types/api/blockchain-api.js.map +1 -0
  18. package/lib/commonjs/types/api/events.js +6 -0
  19. package/lib/commonjs/types/api/events.js.map +1 -0
  20. package/lib/commonjs/types/api/index.js +39 -0
  21. package/lib/commonjs/types/api/index.js.map +1 -0
  22. package/lib/commonjs/types/api/wallet-api.js +6 -0
  23. package/lib/commonjs/types/api/wallet-api.js.map +1 -0
  24. package/lib/commonjs/types/blockchain/adapter.js +6 -0
  25. package/lib/commonjs/types/blockchain/adapter.js.map +1 -0
  26. package/lib/commonjs/types/blockchain/balance.js +6 -0
  27. package/lib/commonjs/types/blockchain/balance.js.map +1 -0
  28. package/lib/commonjs/types/blockchain/index.js +50 -0
  29. package/lib/commonjs/types/blockchain/index.js.map +1 -0
  30. package/lib/commonjs/types/blockchain/network.js +6 -0
  31. package/lib/commonjs/types/blockchain/network.js.map +1 -0
  32. package/lib/commonjs/types/blockchain/transaction.js +2 -0
  33. package/lib/commonjs/types/blockchain/transaction.js.map +1 -0
  34. package/lib/commonjs/types/common.js +2 -0
  35. package/lib/commonjs/types/common.js.map +1 -0
  36. package/lib/commonjs/types/index.js +105 -0
  37. package/lib/commonjs/types/index.js.map +1 -0
  38. package/lib/commonjs/types/onramp/countries.js +2 -0
  39. package/lib/commonjs/types/onramp/countries.js.map +1 -0
  40. package/lib/commonjs/types/onramp/currencies.js +2 -0
  41. package/lib/commonjs/types/onramp/currencies.js.map +1 -0
  42. package/lib/commonjs/types/onramp/errors.js +22 -0
  43. package/lib/commonjs/types/onramp/errors.js.map +1 -0
  44. package/lib/commonjs/types/onramp/index.js +50 -0
  45. package/lib/commonjs/types/onramp/index.js.map +1 -0
  46. package/lib/commonjs/types/onramp/quotes.js +2 -0
  47. package/lib/commonjs/types/onramp/quotes.js.map +1 -0
  48. package/lib/commonjs/types/siwe/config.js +6 -0
  49. package/lib/commonjs/types/siwe/config.js.map +1 -0
  50. package/lib/commonjs/types/siwe/index.js +28 -0
  51. package/lib/commonjs/types/siwe/index.js.map +1 -0
  52. package/lib/commonjs/types/siwe/message.js +6 -0
  53. package/lib/commonjs/types/siwe/message.js.map +1 -0
  54. package/lib/commonjs/types/storage.js +2 -0
  55. package/lib/commonjs/types/storage.js.map +1 -0
  56. package/lib/commonjs/types/swap/index.js +17 -0
  57. package/lib/commonjs/types/swap/index.js.map +1 -0
  58. package/lib/commonjs/types/swap/tokens.js +6 -0
  59. package/lib/commonjs/types/swap/tokens.js.map +1 -0
  60. package/lib/commonjs/types/ui.js +6 -0
  61. package/lib/commonjs/{utils/TypeUtil.js.map → types/ui.js.map} +1 -1
  62. package/lib/commonjs/types/wallet/connection.js +6 -0
  63. package/lib/commonjs/types/wallet/connection.js.map +1 -0
  64. package/lib/commonjs/types/wallet/connector.js +30 -0
  65. package/lib/commonjs/types/wallet/connector.js.map +1 -0
  66. package/lib/commonjs/types/wallet/index.js +39 -0
  67. package/lib/commonjs/types/wallet/index.js.map +1 -0
  68. package/lib/commonjs/types/wallet/wallet-info.js +6 -0
  69. package/lib/commonjs/types/wallet/wallet-info.js.map +1 -0
  70. package/lib/commonjs/utils/ConstantsUtil.js +52 -6
  71. package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
  72. package/lib/commonjs/utils/ContractUtil.js.map +1 -1
  73. package/lib/commonjs/utils/DateUtil.js.map +1 -1
  74. package/lib/commonjs/utils/ErrorUtil.js.map +1 -1
  75. package/lib/commonjs/utils/NamesUtil.js.map +1 -1
  76. package/lib/commonjs/utils/NetworkUtil.js +3 -0
  77. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  78. package/lib/commonjs/utils/NumberUtil.js +53 -13
  79. package/lib/commonjs/utils/NumberUtil.js.map +1 -1
  80. package/lib/commonjs/utils/PresetsUtil.js +34 -21
  81. package/lib/commonjs/utils/PresetsUtil.js.map +1 -1
  82. package/lib/commonjs/utils/StringUtil.js +7 -0
  83. package/lib/commonjs/utils/StringUtil.js.map +1 -1
  84. package/lib/module/adapters/BlockchainAdapter.js +89 -0
  85. package/lib/module/adapters/BlockchainAdapter.js.map +1 -0
  86. package/lib/module/adapters/EvmAdapter.js +189 -0
  87. package/lib/module/adapters/EvmAdapter.js.map +1 -0
  88. package/lib/module/adapters/SolanaBaseAdapter.js +5 -0
  89. package/lib/module/adapters/SolanaBaseAdapter.js.map +1 -0
  90. package/lib/module/contracts/erc20.js +2 -0
  91. package/lib/module/contracts/erc20.js.map +1 -1
  92. package/lib/module/contracts/usdt.js +2 -0
  93. package/lib/module/contracts/usdt.js.map +1 -1
  94. package/lib/module/index.js +8 -1
  95. package/lib/module/index.js.map +1 -1
  96. package/lib/module/networks/bitcoin.js +36 -0
  97. package/lib/module/networks/bitcoin.js.map +1 -0
  98. package/lib/module/networks/solana.js +74 -0
  99. package/lib/module/networks/solana.js.map +1 -0
  100. package/lib/module/types/api/blockchain-api.js +10 -0
  101. package/lib/module/types/api/blockchain-api.js.map +1 -0
  102. package/lib/module/types/api/events.js +4 -0
  103. package/lib/module/types/api/events.js.map +1 -0
  104. package/lib/module/types/api/index.js +7 -0
  105. package/lib/module/types/api/index.js.map +1 -0
  106. package/lib/module/types/api/wallet-api.js +4 -0
  107. package/lib/module/types/api/wallet-api.js.map +1 -0
  108. package/lib/module/types/blockchain/adapter.js +4 -0
  109. package/lib/module/types/blockchain/adapter.js.map +1 -0
  110. package/lib/module/types/blockchain/balance.js +4 -0
  111. package/lib/module/types/blockchain/balance.js.map +1 -0
  112. package/lib/module/types/blockchain/index.js +8 -0
  113. package/lib/module/types/blockchain/index.js.map +1 -0
  114. package/lib/module/types/blockchain/network.js +4 -0
  115. package/lib/module/types/blockchain/network.js.map +1 -0
  116. package/lib/module/types/blockchain/transaction.js +2 -0
  117. package/lib/module/types/blockchain/transaction.js.map +1 -0
  118. package/lib/module/types/common.js +2 -0
  119. package/lib/module/types/common.js.map +1 -0
  120. package/lib/module/types/index.js +31 -0
  121. package/lib/module/types/index.js.map +1 -0
  122. package/lib/module/types/onramp/countries.js +2 -0
  123. package/lib/module/types/onramp/countries.js.map +1 -0
  124. package/lib/module/types/onramp/currencies.js +2 -0
  125. package/lib/module/types/onramp/currencies.js.map +1 -0
  126. package/lib/module/types/onramp/errors.js +18 -0
  127. package/lib/module/types/onramp/errors.js.map +1 -0
  128. package/lib/module/types/onramp/index.js +8 -0
  129. package/lib/module/types/onramp/index.js.map +1 -0
  130. package/lib/module/types/onramp/quotes.js +2 -0
  131. package/lib/module/types/onramp/quotes.js.map +1 -0
  132. package/lib/module/types/siwe/config.js +4 -0
  133. package/lib/module/types/siwe/config.js.map +1 -0
  134. package/lib/module/types/siwe/index.js +6 -0
  135. package/lib/module/types/siwe/index.js.map +1 -0
  136. package/lib/module/types/siwe/message.js +4 -0
  137. package/lib/module/types/siwe/message.js.map +1 -0
  138. package/lib/module/types/storage.js +2 -0
  139. package/lib/module/types/storage.js.map +1 -0
  140. package/lib/module/types/swap/index.js +5 -0
  141. package/lib/module/types/swap/index.js.map +1 -0
  142. package/lib/module/types/swap/tokens.js +4 -0
  143. package/lib/module/types/swap/tokens.js.map +1 -0
  144. package/lib/module/types/ui.js +4 -0
  145. package/lib/module/{utils/TypeUtil.js.map → types/ui.js.map} +1 -1
  146. package/lib/module/types/wallet/connection.js +4 -0
  147. package/lib/module/types/wallet/connection.js.map +1 -0
  148. package/lib/module/types/wallet/connector.js +25 -0
  149. package/lib/module/types/wallet/connector.js.map +1 -0
  150. package/lib/module/types/wallet/index.js +7 -0
  151. package/lib/module/types/wallet/index.js.map +1 -0
  152. package/lib/module/types/wallet/wallet-info.js +4 -0
  153. package/lib/module/types/wallet/wallet-info.js.map +1 -0
  154. package/lib/module/utils/ConstantsUtil.js +54 -6
  155. package/lib/module/utils/ConstantsUtil.js.map +1 -1
  156. package/lib/module/utils/ContractUtil.js +2 -0
  157. package/lib/module/utils/ContractUtil.js.map +1 -1
  158. package/lib/module/utils/DateUtil.js +2 -0
  159. package/lib/module/utils/DateUtil.js.map +1 -1
  160. package/lib/module/utils/ErrorUtil.js +2 -0
  161. package/lib/module/utils/ErrorUtil.js.map +1 -1
  162. package/lib/module/utils/NamesUtil.js +2 -0
  163. package/lib/module/utils/NamesUtil.js.map +1 -1
  164. package/lib/module/utils/NetworkUtil.js +5 -0
  165. package/lib/module/utils/NetworkUtil.js.map +1 -1
  166. package/lib/module/utils/NumberUtil.js +54 -11
  167. package/lib/module/utils/NumberUtil.js.map +1 -1
  168. package/lib/module/utils/PresetsUtil.js +36 -21
  169. package/lib/module/utils/PresetsUtil.js.map +1 -1
  170. package/lib/module/utils/StringUtil.js +9 -0
  171. package/lib/module/utils/StringUtil.js.map +1 -1
  172. package/lib/typescript/adapters/BlockchainAdapter.d.ts +26 -0
  173. package/lib/typescript/adapters/BlockchainAdapter.d.ts.map +1 -0
  174. package/lib/typescript/adapters/EvmAdapter.d.ts +26 -0
  175. package/lib/typescript/adapters/EvmAdapter.d.ts.map +1 -0
  176. package/lib/typescript/adapters/SolanaBaseAdapter.d.ts +6 -0
  177. package/lib/typescript/adapters/SolanaBaseAdapter.d.ts.map +1 -0
  178. package/lib/typescript/adapters/__tests__/EvmAdapter.test.d.ts +2 -0
  179. package/lib/typescript/adapters/__tests__/EvmAdapter.test.d.ts.map +1 -0
  180. package/lib/typescript/index.d.ts +6 -1
  181. package/lib/typescript/index.d.ts.map +1 -1
  182. package/lib/typescript/networks/bitcoin.d.ts +4 -0
  183. package/lib/typescript/networks/bitcoin.d.ts.map +1 -0
  184. package/lib/typescript/networks/solana.d.ts +5 -0
  185. package/lib/typescript/networks/solana.d.ts.map +1 -0
  186. package/lib/typescript/types/api/blockchain-api.d.ts +183 -0
  187. package/lib/typescript/types/api/blockchain-api.d.ts.map +1 -0
  188. package/lib/typescript/types/api/events.d.ts +304 -0
  189. package/lib/typescript/types/api/events.d.ts.map +1 -0
  190. package/lib/typescript/types/api/index.d.ts +4 -0
  191. package/lib/typescript/types/api/index.d.ts.map +1 -0
  192. package/lib/typescript/types/api/wallet-api.d.ts +50 -0
  193. package/lib/typescript/types/api/wallet-api.d.ts.map +1 -0
  194. package/lib/typescript/types/blockchain/adapter.d.ts +40 -0
  195. package/lib/typescript/types/blockchain/adapter.d.ts.map +1 -0
  196. package/lib/typescript/types/blockchain/balance.d.ts +28 -0
  197. package/lib/typescript/types/blockchain/balance.d.ts.map +1 -0
  198. package/lib/typescript/types/blockchain/index.d.ts +5 -0
  199. package/lib/typescript/types/blockchain/index.d.ts.map +1 -0
  200. package/lib/typescript/types/blockchain/network.d.ts +47 -0
  201. package/lib/typescript/types/blockchain/network.d.ts.map +1 -0
  202. package/lib/typescript/{utils/TypeUtil.d.ts → types/blockchain/transaction.d.ts} +1 -22
  203. package/lib/typescript/types/blockchain/transaction.d.ts.map +1 -0
  204. package/lib/typescript/types/common.d.ts +24 -0
  205. package/lib/typescript/types/common.d.ts.map +1 -0
  206. package/lib/typescript/types/index.d.ts +10 -0
  207. package/lib/typescript/types/index.d.ts.map +1 -0
  208. package/lib/typescript/types/onramp/countries.d.ts +11 -0
  209. package/lib/typescript/types/onramp/countries.d.ts.map +1 -0
  210. package/lib/typescript/types/onramp/currencies.d.ts +30 -0
  211. package/lib/typescript/types/onramp/currencies.d.ts.map +1 -0
  212. package/lib/typescript/types/onramp/errors.d.ts +21 -0
  213. package/lib/typescript/types/onramp/errors.d.ts.map +1 -0
  214. package/lib/typescript/types/onramp/index.d.ts +5 -0
  215. package/lib/typescript/types/onramp/index.d.ts.map +1 -0
  216. package/lib/typescript/types/onramp/quotes.d.ts +45 -0
  217. package/lib/typescript/types/onramp/quotes.d.ts.map +1 -0
  218. package/lib/typescript/types/siwe/config.d.ts +31 -0
  219. package/lib/typescript/types/siwe/config.d.ts.map +1 -0
  220. package/lib/typescript/types/siwe/index.d.ts +3 -0
  221. package/lib/typescript/types/siwe/index.d.ts.map +1 -0
  222. package/lib/typescript/types/siwe/message.d.ts +57 -0
  223. package/lib/typescript/types/siwe/message.d.ts.map +1 -0
  224. package/lib/typescript/types/storage.d.ts +27 -0
  225. package/lib/typescript/types/storage.d.ts.map +1 -0
  226. package/lib/typescript/types/swap/index.d.ts +2 -0
  227. package/lib/typescript/types/swap/index.d.ts.map +1 -0
  228. package/lib/typescript/types/swap/tokens.d.ts +19 -0
  229. package/lib/typescript/types/swap/tokens.d.ts.map +1 -0
  230. package/lib/typescript/types/ui.d.ts +26 -0
  231. package/lib/typescript/types/ui.d.ts.map +1 -0
  232. package/lib/typescript/types/wallet/connection.d.ts +30 -0
  233. package/lib/typescript/types/wallet/connection.d.ts.map +1 -0
  234. package/lib/typescript/types/wallet/connector.d.ts +61 -0
  235. package/lib/typescript/types/wallet/connector.d.ts.map +1 -0
  236. package/lib/typescript/types/wallet/index.d.ts +4 -0
  237. package/lib/typescript/types/wallet/index.d.ts.map +1 -0
  238. package/lib/typescript/types/wallet/wallet-info.d.ts +36 -0
  239. package/lib/typescript/types/wallet/wallet-info.d.ts.map +1 -0
  240. package/lib/typescript/utils/ConstantsUtil.d.ts +48 -4
  241. package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
  242. package/lib/typescript/utils/NetworkUtil.d.ts +2 -0
  243. package/lib/typescript/utils/NetworkUtil.d.ts.map +1 -1
  244. package/lib/typescript/utils/NumberUtil.d.ts +39 -11
  245. package/lib/typescript/utils/NumberUtil.d.ts.map +1 -1
  246. package/lib/typescript/utils/PresetsUtil.d.ts +1 -6
  247. package/lib/typescript/utils/PresetsUtil.d.ts.map +1 -1
  248. package/lib/typescript/utils/StringUtil.d.ts +1 -0
  249. package/lib/typescript/utils/StringUtil.d.ts.map +1 -1
  250. package/package.json +6 -16
  251. package/src/adapters/BlockchainAdapter.ts +126 -0
  252. package/src/adapters/EvmAdapter.ts +247 -0
  253. package/src/adapters/SolanaBaseAdapter.ts +6 -0
  254. package/src/adapters/__tests__/EvmAdapter.test.ts +126 -0
  255. package/src/index.ts +7 -1
  256. package/src/networks/bitcoin.ts +32 -0
  257. package/src/networks/solana.ts +44 -0
  258. package/src/types/api/blockchain-api.ts +213 -0
  259. package/src/types/api/events.ts +394 -0
  260. package/src/types/api/index.ts +4 -0
  261. package/src/types/api/wallet-api.ts +70 -0
  262. package/src/types/blockchain/adapter.ts +52 -0
  263. package/src/types/blockchain/balance.ts +31 -0
  264. package/src/types/blockchain/index.ts +5 -0
  265. package/src/types/blockchain/network.ts +39 -0
  266. package/src/{utils/TypeUtil.ts → types/blockchain/transaction.ts} +0 -26
  267. package/src/types/common.ts +56 -0
  268. package/src/types/index.ts +28 -0
  269. package/src/types/onramp/countries.ts +11 -0
  270. package/src/types/onramp/currencies.ts +32 -0
  271. package/src/types/onramp/errors.ts +22 -0
  272. package/src/types/onramp/index.ts +5 -0
  273. package/src/types/onramp/quotes.ts +46 -0
  274. package/src/types/siwe/config.ts +44 -0
  275. package/src/types/siwe/index.ts +3 -0
  276. package/src/types/siwe/message.ts +62 -0
  277. package/src/types/storage.ts +30 -0
  278. package/src/types/swap/index.ts +2 -0
  279. package/src/types/swap/tokens.ts +21 -0
  280. package/src/types/ui.ts +26 -0
  281. package/src/types/wallet/connection.ts +33 -0
  282. package/src/types/wallet/connector.ts +85 -0
  283. package/src/types/wallet/index.ts +4 -0
  284. package/src/types/wallet/wallet-info.ts +41 -0
  285. package/src/utils/ConstantsUtil.ts +55 -8
  286. package/src/utils/NetworkUtil.ts +5 -0
  287. package/src/utils/NumberUtil.ts +54 -11
  288. package/src/utils/PresetsUtil.ts +34 -26
  289. package/src/utils/StringUtil.ts +7 -0
  290. package/lib/commonjs/utils/TypeUtil.js +0 -2
  291. package/lib/module/utils/TypeUtil.js +0 -2
  292. package/lib/typescript/utils/TypeUtil.d.ts.map +0 -1
@@ -0,0 +1,394 @@
1
+ import type { Platform, SocialProvider, AccountType } from '../common';
2
+
3
+ export type EventName =
4
+ | 'MODAL_LOADED'
5
+ | 'MODAL_OPEN'
6
+ | 'MODAL_CLOSE'
7
+ | 'CLICK_ALL_WALLETS'
8
+ | 'CLICK_NETWORKS'
9
+ | 'SWITCH_NETWORK'
10
+ | 'SELECT_WALLET'
11
+ | 'CONNECT_SUCCESS'
12
+ | 'CONNECT_ERROR'
13
+ | 'DISCONNECT_SUCCESS'
14
+ | 'DISCONNECT_ERROR'
15
+ | 'CLICK_WALLET_HELP'
16
+ | 'CLICK_NETWORK_HELP'
17
+ | 'CLICK_GET_WALLET'
18
+ | 'EMAIL_LOGIN_SELECTED'
19
+ | 'EMAIL_VERIFICATION_CODE_PASS'
20
+ | 'EMAIL_VERIFICATION_CODE_FAIL'
21
+ | 'EMAIL_EDIT'
22
+ | 'EMAIL_EDIT_COMPLETE'
23
+ | 'EMAIL_UPGRADE_FROM_MODAL'
24
+ | 'CLICK_SIGN_SIWE_MESSAGE'
25
+ | 'CLICK_CANCEL_SIWE'
26
+ | 'SIWE_AUTH_SUCCESS'
27
+ | 'SIWE_AUTH_ERROR'
28
+ | 'CLICK_TRANSACTIONS'
29
+ | 'ERROR_FETCH_TRANSACTIONS'
30
+ | 'LOAD_MORE_TRANSACTIONS'
31
+ | 'OPEN_SEND'
32
+ | 'OPEN_SWAP'
33
+ | 'INITIATE_SWAP'
34
+ | 'SWAP_SUCCESS'
35
+ | 'SWAP_ERROR'
36
+ | 'SEND_INITIATED'
37
+ | 'SEND_SUCCESS'
38
+ | 'SEND_ERROR'
39
+ | 'SOCIAL_LOGIN_STARTED'
40
+ | 'SOCIAL_LOGIN_SUCCESS'
41
+ | 'SOCIAL_LOGIN_REQUEST_USER_DATA'
42
+ | 'SOCIAL_LOGIN_CANCELED'
43
+ | 'SOCIAL_LOGIN_ERROR'
44
+ | 'SET_PREFERRED_ACCOUNT_TYPE';
45
+
46
+ export type Event =
47
+ | {
48
+ type: 'track';
49
+ event: 'MODAL_CREATED';
50
+ }
51
+ | {
52
+ type: 'track';
53
+ event: 'MODAL_LOADED';
54
+ }
55
+ | {
56
+ type: 'track';
57
+ event: 'MODAL_OPEN';
58
+ properties: {
59
+ connected: boolean;
60
+ };
61
+ }
62
+ | {
63
+ type: 'track';
64
+ event: 'MODAL_CLOSE';
65
+ properties: {
66
+ connected: boolean;
67
+ };
68
+ }
69
+ | {
70
+ type: 'track';
71
+ event: 'CLICK_ALL_WALLETS';
72
+ }
73
+ | {
74
+ type: 'track';
75
+ event: 'CLICK_NETWORKS';
76
+ }
77
+ | {
78
+ type: 'track';
79
+ event: 'SWITCH_NETWORK';
80
+ properties: {
81
+ network: number | string;
82
+ };
83
+ }
84
+ | {
85
+ type: 'track';
86
+ event: 'SELECT_WALLET';
87
+ properties: {
88
+ name: string;
89
+ platform?: Platform;
90
+ explorer_id?: string;
91
+ };
92
+ }
93
+ | {
94
+ type: 'track';
95
+ event: 'CONNECT_SUCCESS';
96
+ properties: {
97
+ name: string;
98
+ method: Platform;
99
+ explorer_id?: string;
100
+ };
101
+ }
102
+ | {
103
+ type: 'track';
104
+ event: 'CONNECT_ERROR';
105
+ properties: {
106
+ message: string;
107
+ };
108
+ }
109
+ | {
110
+ type: 'track';
111
+ event: 'DISCONNECT_SUCCESS';
112
+ }
113
+ | {
114
+ type: 'track';
115
+ event: 'DISCONNECT_ERROR';
116
+ }
117
+ | {
118
+ type: 'track';
119
+ event: 'CLICK_WALLET_HELP';
120
+ }
121
+ | {
122
+ type: 'track';
123
+ event: 'CLICK_NETWORK_HELP';
124
+ }
125
+ | {
126
+ type: 'track';
127
+ event: 'CLICK_GET_WALLET';
128
+ }
129
+ | {
130
+ type: 'track';
131
+ event: 'EMAIL_LOGIN_SELECTED';
132
+ }
133
+ | {
134
+ type: 'track';
135
+ event: 'EMAIL_VERIFICATION_CODE_PASS';
136
+ }
137
+ | {
138
+ type: 'track';
139
+ event: 'EMAIL_VERIFICATION_CODE_FAIL';
140
+ }
141
+ | {
142
+ type: 'track';
143
+ event: 'EMAIL_EDIT';
144
+ }
145
+ | {
146
+ type: 'track';
147
+ event: 'EMAIL_EDIT_COMPLETE';
148
+ }
149
+ | {
150
+ type: 'track';
151
+ event: 'EMAIL_UPGRADE_FROM_MODAL';
152
+ }
153
+ | {
154
+ type: 'track';
155
+ event: 'CLICK_SIGN_SIWE_MESSAGE';
156
+ properties: {
157
+ network: string;
158
+ isSmartAccount: boolean;
159
+ };
160
+ }
161
+ | {
162
+ type: 'track';
163
+ event: 'CLICK_CANCEL_SIWE';
164
+ properties: {
165
+ network: string;
166
+ isSmartAccount: boolean;
167
+ };
168
+ }
169
+ | {
170
+ type: 'track';
171
+ event: 'SIWE_AUTH_SUCCESS';
172
+ properties: {
173
+ network: string;
174
+ isSmartAccount: boolean;
175
+ };
176
+ }
177
+ | {
178
+ type: 'track';
179
+ event: 'SIWE_AUTH_ERROR';
180
+ properties: {
181
+ network: string;
182
+ isSmartAccount: boolean;
183
+ };
184
+ }
185
+ | {
186
+ type: 'track';
187
+ event: 'CLICK_TRANSACTIONS';
188
+ properties: {
189
+ isSmartAccount: boolean;
190
+ };
191
+ }
192
+ | {
193
+ type: 'track';
194
+ event: 'ERROR_FETCH_TRANSACTIONS';
195
+ properties: {
196
+ address: string;
197
+ projectId: string;
198
+ cursor: string | undefined;
199
+ isSmartAccount: boolean;
200
+ };
201
+ }
202
+ | {
203
+ type: 'track';
204
+ event: 'LOAD_MORE_TRANSACTIONS';
205
+ properties: {
206
+ address: string | undefined;
207
+ projectId: string;
208
+ cursor: string | undefined;
209
+ isSmartAccount: boolean;
210
+ };
211
+ }
212
+ | {
213
+ type: 'track';
214
+ event: 'OPEN_SEND';
215
+ properties: {
216
+ isSmartAccount: boolean;
217
+ network: string;
218
+ };
219
+ }
220
+ | {
221
+ type: 'track';
222
+ event: 'OPEN_SWAP';
223
+ properties: {
224
+ isSmartAccount: boolean;
225
+ network: string;
226
+ };
227
+ }
228
+ | {
229
+ type: 'track';
230
+ event: 'INITIATE_SWAP';
231
+ properties: {
232
+ isSmartAccount: boolean;
233
+ network: string;
234
+ swapFromToken: string;
235
+ swapToToken: string;
236
+ swapFromAmount: string;
237
+ swapToAmount: string;
238
+ };
239
+ }
240
+ | {
241
+ type: 'track';
242
+ event: 'SWAP_SUCCESS';
243
+ properties: {
244
+ isSmartAccount: boolean;
245
+ network: string;
246
+ swapFromToken: string;
247
+ swapToToken: string;
248
+ swapFromAmount: string;
249
+ swapToAmount: string;
250
+ };
251
+ }
252
+ | {
253
+ type: 'track';
254
+ event: 'SWAP_ERROR';
255
+ properties: {
256
+ isSmartAccount: boolean;
257
+ network: string;
258
+ swapFromToken: string;
259
+ swapToToken: string;
260
+ swapFromAmount: string;
261
+ swapToAmount: string;
262
+ message: string;
263
+ };
264
+ }
265
+ | {
266
+ type: 'track';
267
+ event: 'SEND_INITIATED';
268
+ properties: {
269
+ isSmartAccount: boolean;
270
+ network: string;
271
+ token: string;
272
+ amount: number;
273
+ };
274
+ }
275
+ | {
276
+ type: 'track';
277
+ event: 'SEND_SUCCESS';
278
+ properties: {
279
+ isSmartAccount: boolean;
280
+ network: string;
281
+ token: string;
282
+ amount: number;
283
+ };
284
+ }
285
+ | {
286
+ type: 'track';
287
+ event: 'SEND_ERROR';
288
+ properties: {
289
+ isSmartAccount: boolean;
290
+ network: string;
291
+ token: string;
292
+ amount: number;
293
+ };
294
+ }
295
+ | {
296
+ type: 'track';
297
+ event: 'SOCIAL_LOGIN_STARTED';
298
+ properties: {
299
+ provider: SocialProvider;
300
+ };
301
+ }
302
+ | {
303
+ type: 'track';
304
+ event: 'SOCIAL_LOGIN_SUCCESS';
305
+ properties: {
306
+ provider: SocialProvider;
307
+ };
308
+ }
309
+ | {
310
+ type: 'track';
311
+ event: 'SOCIAL_LOGIN_REQUEST_USER_DATA';
312
+ properties: {
313
+ provider: SocialProvider;
314
+ };
315
+ }
316
+ | {
317
+ type: 'track';
318
+ event: 'SOCIAL_LOGIN_CANCELED';
319
+ properties: {
320
+ provider: SocialProvider;
321
+ };
322
+ }
323
+ | {
324
+ type: 'track';
325
+ event: 'SOCIAL_LOGIN_ERROR';
326
+ properties: {
327
+ provider: SocialProvider;
328
+ };
329
+ }
330
+ | {
331
+ type: 'track';
332
+ event: 'SET_PREFERRED_ACCOUNT_TYPE';
333
+ properties: {
334
+ accountType: AccountType;
335
+ network: string;
336
+ };
337
+ }
338
+ | {
339
+ type: 'track';
340
+ event: 'SELECT_BUY_CRYPTO';
341
+ }
342
+ | {
343
+ type: 'track';
344
+ event: 'SELECT_BUY_ASSET';
345
+ properties: {
346
+ asset: string;
347
+ };
348
+ }
349
+ | {
350
+ type: 'track';
351
+ event: 'BUY_SUBMITTED';
352
+ properties: {
353
+ asset?: string;
354
+ network?: string;
355
+ amount?: string;
356
+ currency?: string;
357
+ provider?: string;
358
+ serviceProvider?: string;
359
+ paymentMethod?: string;
360
+ };
361
+ }
362
+ | {
363
+ type: 'track';
364
+ event: 'BUY_SUCCESS';
365
+ properties: {
366
+ asset?: string | null;
367
+ network?: string | null;
368
+ amount?: string | null;
369
+ currency?: string | null;
370
+ provider?: string | null;
371
+ orderId?: string | null;
372
+ };
373
+ }
374
+ | {
375
+ type: 'track';
376
+ event: 'BUY_FAIL';
377
+ properties: {
378
+ asset?: string;
379
+ network?: string;
380
+ amount?: string;
381
+ currency?: string;
382
+ provider?: string;
383
+ serviceProvider?: string;
384
+ paymentMethod?: string;
385
+ message?: string;
386
+ };
387
+ }
388
+ | {
389
+ type: 'track';
390
+ event: 'BUY_CANCEL';
391
+ properties?: {
392
+ message?: string;
393
+ };
394
+ };
@@ -0,0 +1,4 @@
1
+ // API types barrel export
2
+ export * from './blockchain-api';
3
+ export * from './wallet-api';
4
+ export * from './events';
@@ -0,0 +1,70 @@
1
+ import type { CaipNetworkId } from '../common';
2
+
3
+ export interface WcWallet {
4
+ id: string;
5
+ name: string;
6
+ homepage?: string;
7
+ image_id?: string;
8
+ image_url?: string;
9
+ order?: number;
10
+ mobile_link?: string | null;
11
+ desktop_link?: string | null;
12
+ webapp_link?: string | null;
13
+ link_mode?: string | null;
14
+ app_store?: string | null;
15
+ play_store?: string | null;
16
+ chains?: readonly CaipNetworkId[];
17
+ }
18
+
19
+ export interface DataWallet {
20
+ id: string;
21
+ ios_schema?: string;
22
+ android_app_id?: string;
23
+ }
24
+
25
+ export interface ApiGetWalletsRequest {
26
+ page: number;
27
+ entries: number;
28
+ search?: string;
29
+ include?: string[];
30
+ exclude?: string[];
31
+ }
32
+
33
+ export interface ApiGetWalletsResponse {
34
+ data: WcWallet[];
35
+ count: number;
36
+ }
37
+
38
+ export interface ApiGetDataWalletsResponse {
39
+ data: DataWallet[];
40
+ count: number;
41
+ }
42
+
43
+ export interface ApiGetAnalyticsConfigResponse {
44
+ isAnalyticsEnabled: boolean;
45
+ }
46
+
47
+ export type CustomWallet = Pick<
48
+ WcWallet,
49
+ | 'id'
50
+ | 'name'
51
+ | 'homepage'
52
+ | 'image_url'
53
+ | 'image_id'
54
+ | 'mobile_link'
55
+ | 'desktop_link'
56
+ | 'webapp_link'
57
+ | 'link_mode'
58
+ | 'app_store'
59
+ | 'play_store'
60
+ > & {
61
+ android_app_id?: string;
62
+ ios_schema?: string;
63
+ };
64
+
65
+ export type UniversalProviderConfigOverride = {
66
+ methods?: Record<string, string[]>;
67
+ chains?: Record<string, string[]>;
68
+ events?: Record<string, string[]>;
69
+ rpcMap?: Record<string, string>;
70
+ };
@@ -0,0 +1,52 @@
1
+ import type { ChainNamespace, CaipAddress, AdapterType } from '../common';
2
+ import type { WalletConnector } from '../wallet';
3
+ import type { BalanceChangedEvent } from './balance';
4
+
5
+ export interface BlockchainAdapterConfig {
6
+ supportedNamespace: ChainNamespace;
7
+ adapterType: AdapterType;
8
+ }
9
+
10
+ export interface BlockchainAdapterInitParams {
11
+ connector: WalletConnector;
12
+ }
13
+
14
+ export interface AdapterEvents {
15
+ accountsChanged: (event: AccountsChangedEvent) => void;
16
+ chainChanged: (event: ChainChangedEvent) => void;
17
+ disconnect: (event: DisconnectEvent) => void;
18
+ balanceChanged: (event: BalanceChangedEvent) => void;
19
+ }
20
+
21
+ export type AccountsChangedEvent = {
22
+ accounts: CaipAddress[];
23
+ };
24
+
25
+ export type ChainChangedEvent = {
26
+ chainId: string;
27
+ };
28
+
29
+ export type DisconnectEvent = undefined;
30
+
31
+ export interface Provider {
32
+ connect<T>(params?: any): Promise<T>;
33
+ disconnect(): Promise<void>;
34
+ request<T = unknown>(
35
+ args: RequestArguments,
36
+ chain?: string | undefined,
37
+ expiry?: number | undefined
38
+ ): Promise<T>;
39
+ on(event: string, listener: (args?: any) => void): any;
40
+ off(event: string, listener: (args?: any) => void): any;
41
+ }
42
+
43
+ export interface RequestArguments {
44
+ method: string;
45
+ params?: unknown[] | Record<string, unknown> | object | undefined;
46
+ }
47
+
48
+ export interface ConnectionResponse {
49
+ accounts: string[];
50
+ chainId: string;
51
+ [key: string]: any;
52
+ }
@@ -0,0 +1,31 @@
1
+ import type { CaipAddress } from '../common';
2
+ import type { Tokens } from '../wallet';
3
+ import type { AppKitNetwork } from './network';
4
+
5
+ export interface Balance {
6
+ name?: string;
7
+ amount: string;
8
+ symbol: string;
9
+ quantity?: {
10
+ decimals: string;
11
+ numeric: string;
12
+ };
13
+ chainId?: string;
14
+ address?: CaipAddress; // contract address
15
+ value?: number; //total value of the amount in currency
16
+ price?: number; //price of the token in currency
17
+ iconUrl?: string;
18
+ }
19
+
20
+ export interface GetBalanceParams {
21
+ network: AppKitNetwork;
22
+ address?: CaipAddress;
23
+ tokens?: Tokens;
24
+ }
25
+
26
+ export type GetBalanceResponse = Balance;
27
+
28
+ export type BalanceChangedEvent = {
29
+ address: CaipAddress;
30
+ balance: Balance;
31
+ };
@@ -0,0 +1,5 @@
1
+ // Blockchain types barrel export
2
+ export * from './adapter';
3
+ export * from './balance';
4
+ export * from './network';
5
+ export * from './transaction';
@@ -0,0 +1,39 @@
1
+ import type { ChainNamespace, CaipNetworkId } from '../common';
2
+
3
+ export type Network = {
4
+ // Core viem/chain properties
5
+ id: number | string;
6
+ name: string;
7
+ nativeCurrency: { name: string; symbol: string; decimals: number };
8
+ rpcUrls: {
9
+ default: { http: readonly string[] };
10
+ [key: string]: { http: readonly string[] } | undefined;
11
+ };
12
+ blockExplorers?: {
13
+ default: { name: string; url: string };
14
+ [key: string]: { name: string; url: string } | undefined;
15
+ };
16
+
17
+ // AppKit specific / CAIP properties (Optional in type, but needed in practice)
18
+ chainNamespace?: ChainNamespace; // e.g., 'eip155'
19
+ caipNetworkId?: CaipNetworkId; // e.g., 'eip155:1'
20
+ testnet?: boolean;
21
+ deprecatedCaipNetworkId?: CaipNetworkId; // for Solana deprecated id
22
+ imageUrl?: string;
23
+ };
24
+
25
+ export type AppKitNetwork = Network & {
26
+ chainNamespace: ChainNamespace; // mandatory for AppKitNetwork
27
+ caipNetworkId: CaipNetworkId; // mandatory for AppKitNetwork
28
+ };
29
+
30
+ export interface CaipNetwork {
31
+ id: CaipNetworkId;
32
+ name?: string;
33
+ imageId?: string;
34
+ imageUrl?: string;
35
+ }
36
+
37
+ export interface AppKitOpenOptions {
38
+ view: 'Account' | 'Connect' | 'Networks' | 'Swap' | 'OnRamp';
39
+ }
@@ -1,19 +1,3 @@
1
- export interface Balance {
2
- name: string;
3
- symbol: string;
4
- chainId: string;
5
- address?: string;
6
- value?: number;
7
- price: number;
8
- quantity: BalanceQuantity;
9
- iconUrl: string;
10
- }
11
-
12
- type BalanceQuantity = {
13
- decimals: string;
14
- numeric: string;
15
- };
16
-
17
1
  export type TransactionStatus = 'confirmed' | 'failed' | 'pending';
18
2
  export type TransactionDirection = 'in' | 'out' | 'self';
19
3
  export type TransactionImage = {
@@ -85,13 +69,3 @@ export interface TransactionDetail {
85
69
  export interface TransactionQuantity {
86
70
  numeric: string;
87
71
  }
88
-
89
- export type SocialProvider = 'apple' | 'x' | 'discord' | 'farcaster';
90
-
91
- export type ThemeMode = 'dark' | 'light';
92
-
93
- export interface ThemeVariables {
94
- accent?: string;
95
- }
96
-
97
- export type ConnectorType = 'WALLET_CONNECT' | 'COINBASE' | 'AUTH' | 'EXTERNAL';
@@ -0,0 +1,56 @@
1
+ // Common types used across the AppKit ecosystem
2
+
3
+ export type CaipAddress = `${string}:${string}:${string}`;
4
+
5
+ export type CaipNetworkId = `${string}:${string}`;
6
+
7
+ export type ChainNamespace = 'eip155' | 'solana' | 'polkadot' | 'bip122';
8
+
9
+ export type AdapterType = 'solana' | 'wagmi' | 'ethers' | 'universal' | 'bip122';
10
+
11
+ export type AccountType = 'eoa' | 'smartAccount';
12
+
13
+ export type SocialProvider =
14
+ | 'google'
15
+ | 'facebook'
16
+ | 'github'
17
+ | 'apple'
18
+ | 'x'
19
+ | 'discord'
20
+ | 'email'
21
+ | 'farcaster';
22
+
23
+ export type ThemeMode = 'dark' | 'light';
24
+
25
+ export interface ThemeVariables {
26
+ accent?: string;
27
+ }
28
+
29
+ export interface BaseError {
30
+ message?: string;
31
+ }
32
+
33
+ export type ProjectId = string;
34
+
35
+ export type Platform = 'mobile' | 'web' | 'qrcode' | 'email' | 'unsupported';
36
+
37
+ export type SdkType = 'appkit';
38
+
39
+ export type SdkVersion = `react-native-${string}-${string}`;
40
+
41
+ export type RequestCache =
42
+ | 'default'
43
+ | 'force-cache'
44
+ | 'no-cache'
45
+ | 'no-store'
46
+ | 'only-if-cached'
47
+ | 'reload';
48
+
49
+ export type CaipNamespaces = Record<
50
+ string,
51
+ {
52
+ chains: CaipNetworkId[];
53
+ methods: string[];
54
+ events: string[];
55
+ }
56
+ >;
@@ -0,0 +1,28 @@
1
+ // Main types barrel export - re-exports all types from all domains
2
+
3
+ // Common types
4
+ export * from './common';
5
+
6
+ // Blockchain types
7
+ export * from './blockchain';
8
+
9
+ // Wallet types
10
+ export * from './wallet';
11
+
12
+ // API types
13
+ export * from './api';
14
+
15
+ // Swap types
16
+ export * from './swap';
17
+
18
+ // OnRamp types
19
+ export * from './onramp';
20
+
21
+ // SIWE types
22
+ export * from './siwe';
23
+
24
+ // Storage types
25
+ export * from './storage';
26
+
27
+ // UI types
28
+ export * from './ui';