@reown/appkit-common-react-native 0.0.0-develop-20250728153935 → 0.0.0-develop-20251030154825

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 (313) hide show
  1. package/lib/commonjs/adapters/BitcoinBaseAdapter.js +10 -0
  2. package/lib/commonjs/adapters/BitcoinBaseAdapter.js.map +1 -0
  3. package/lib/commonjs/adapters/BlockchainAdapter.js +103 -0
  4. package/lib/commonjs/adapters/BlockchainAdapter.js.map +1 -0
  5. package/lib/commonjs/adapters/EvmAdapter.js +193 -0
  6. package/lib/commonjs/adapters/EvmAdapter.js.map +1 -0
  7. package/lib/commonjs/adapters/SolanaBaseAdapter.js +10 -0
  8. package/lib/commonjs/adapters/SolanaBaseAdapter.js.map +1 -0
  9. package/lib/commonjs/contracts/erc20.js.map +1 -1
  10. package/lib/commonjs/contracts/usdt.js.map +1 -1
  11. package/lib/commonjs/index.js +74 -5
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/commonjs/networks/bitcoin.js +40 -0
  14. package/lib/commonjs/networks/bitcoin.js.map +1 -0
  15. package/lib/commonjs/networks/solana.js +78 -0
  16. package/lib/commonjs/networks/solana.js.map +1 -0
  17. package/lib/commonjs/package.json +1 -0
  18. package/lib/commonjs/types/api/blockchain-api.js +15 -0
  19. package/lib/commonjs/types/api/blockchain-api.js.map +1 -0
  20. package/lib/commonjs/types/api/events.js +6 -0
  21. package/lib/commonjs/types/api/events.js.map +1 -0
  22. package/lib/commonjs/types/api/index.js +39 -0
  23. package/lib/commonjs/types/api/index.js.map +1 -0
  24. package/lib/commonjs/types/api/wallet-api.js +6 -0
  25. package/lib/commonjs/types/api/wallet-api.js.map +1 -0
  26. package/lib/commonjs/types/blockchain/adapter.js +6 -0
  27. package/lib/commonjs/types/blockchain/adapter.js.map +1 -0
  28. package/lib/commonjs/types/blockchain/balance.js +6 -0
  29. package/lib/commonjs/types/blockchain/balance.js.map +1 -0
  30. package/lib/commonjs/types/blockchain/index.js +50 -0
  31. package/lib/commonjs/types/blockchain/index.js.map +1 -0
  32. package/lib/commonjs/types/blockchain/network.js +6 -0
  33. package/lib/commonjs/types/blockchain/network.js.map +1 -0
  34. package/lib/commonjs/types/blockchain/transaction.js +2 -0
  35. package/lib/commonjs/types/blockchain/transaction.js.map +1 -0
  36. package/lib/commonjs/types/common.js +2 -0
  37. package/lib/commonjs/types/common.js.map +1 -0
  38. package/lib/commonjs/types/index.js +105 -0
  39. package/lib/commonjs/types/index.js.map +1 -0
  40. package/lib/commonjs/types/onramp/countries.js +2 -0
  41. package/lib/commonjs/types/onramp/countries.js.map +1 -0
  42. package/lib/commonjs/types/onramp/currencies.js +2 -0
  43. package/lib/commonjs/types/onramp/currencies.js.map +1 -0
  44. package/lib/commonjs/types/onramp/errors.js +22 -0
  45. package/lib/commonjs/types/onramp/errors.js.map +1 -0
  46. package/lib/commonjs/types/onramp/index.js +50 -0
  47. package/lib/commonjs/types/onramp/index.js.map +1 -0
  48. package/lib/commonjs/types/onramp/quotes.js +2 -0
  49. package/lib/commonjs/types/onramp/quotes.js.map +1 -0
  50. package/lib/commonjs/types/siwx/config.js +6 -0
  51. package/lib/commonjs/types/siwx/config.js.map +1 -0
  52. package/lib/commonjs/types/siwx/index.js +50 -0
  53. package/lib/commonjs/types/siwx/index.js.map +1 -0
  54. package/lib/commonjs/types/siwx/message.js +6 -0
  55. package/lib/commonjs/types/siwx/message.js.map +1 -0
  56. package/lib/commonjs/types/siwx/storage.js +6 -0
  57. package/lib/commonjs/types/siwx/storage.js.map +1 -0
  58. package/lib/commonjs/types/siwx/verifier.js +35 -0
  59. package/lib/commonjs/types/siwx/verifier.js.map +1 -0
  60. package/lib/commonjs/types/storage.js +24 -0
  61. package/lib/commonjs/types/storage.js.map +1 -0
  62. package/lib/commonjs/types/swap/index.js +17 -0
  63. package/lib/commonjs/types/swap/index.js.map +1 -0
  64. package/lib/commonjs/types/swap/tokens.js +6 -0
  65. package/lib/commonjs/types/swap/tokens.js.map +1 -0
  66. package/lib/commonjs/types/ui.js +6 -0
  67. package/lib/commonjs/{utils/TypeUtil.js.map → types/ui.js.map} +1 -1
  68. package/lib/commonjs/types/wallet/connection.js +6 -0
  69. package/lib/commonjs/types/wallet/connection.js.map +1 -0
  70. package/lib/commonjs/types/wallet/connector.js +30 -0
  71. package/lib/commonjs/types/wallet/connector.js.map +1 -0
  72. package/lib/commonjs/types/wallet/index.js +39 -0
  73. package/lib/commonjs/types/wallet/index.js.map +1 -0
  74. package/lib/commonjs/types/wallet/wallet-info.js +6 -0
  75. package/lib/commonjs/types/wallet/wallet-info.js.map +1 -0
  76. package/lib/commonjs/utils/ConstantsUtil.js +45 -6
  77. package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
  78. package/lib/commonjs/utils/ContractUtil.js.map +1 -1
  79. package/lib/commonjs/utils/DateUtil.js.map +1 -1
  80. package/lib/commonjs/utils/ErrorUtil.js.map +1 -1
  81. package/lib/commonjs/utils/NamesUtil.js.map +1 -1
  82. package/lib/commonjs/utils/NetworkUtil.js +3 -0
  83. package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
  84. package/lib/commonjs/utils/NumberUtil.js +53 -13
  85. package/lib/commonjs/utils/NumberUtil.js.map +1 -1
  86. package/lib/commonjs/utils/PresetsUtil.js +34 -21
  87. package/lib/commonjs/utils/PresetsUtil.js.map +1 -1
  88. package/lib/commonjs/utils/StringUtil.js +7 -0
  89. package/lib/commonjs/utils/StringUtil.js.map +1 -1
  90. package/lib/module/adapters/BitcoinBaseAdapter.js +5 -0
  91. package/lib/module/adapters/BitcoinBaseAdapter.js.map +1 -0
  92. package/lib/module/adapters/BlockchainAdapter.js +98 -0
  93. package/lib/module/adapters/BlockchainAdapter.js.map +1 -0
  94. package/lib/module/adapters/EvmAdapter.js +189 -0
  95. package/lib/module/adapters/EvmAdapter.js.map +1 -0
  96. package/lib/module/adapters/SolanaBaseAdapter.js +5 -0
  97. package/lib/module/adapters/SolanaBaseAdapter.js.map +1 -0
  98. package/lib/module/contracts/erc20.js +2 -0
  99. package/lib/module/contracts/erc20.js.map +1 -1
  100. package/lib/module/contracts/usdt.js +2 -0
  101. package/lib/module/contracts/usdt.js.map +1 -1
  102. package/lib/module/index.js +9 -1
  103. package/lib/module/index.js.map +1 -1
  104. package/lib/module/networks/bitcoin.js +36 -0
  105. package/lib/module/networks/bitcoin.js.map +1 -0
  106. package/lib/module/networks/solana.js +74 -0
  107. package/lib/module/networks/solana.js.map +1 -0
  108. package/lib/module/types/api/blockchain-api.js +10 -0
  109. package/lib/module/types/api/blockchain-api.js.map +1 -0
  110. package/lib/module/types/api/events.js +4 -0
  111. package/lib/module/types/api/events.js.map +1 -0
  112. package/lib/module/types/api/index.js +7 -0
  113. package/lib/module/types/api/index.js.map +1 -0
  114. package/lib/module/types/api/wallet-api.js +4 -0
  115. package/lib/module/types/api/wallet-api.js.map +1 -0
  116. package/lib/module/types/blockchain/adapter.js +4 -0
  117. package/lib/module/types/blockchain/adapter.js.map +1 -0
  118. package/lib/module/types/blockchain/balance.js +4 -0
  119. package/lib/module/types/blockchain/balance.js.map +1 -0
  120. package/lib/module/types/blockchain/index.js +8 -0
  121. package/lib/module/types/blockchain/index.js.map +1 -0
  122. package/lib/module/types/blockchain/network.js +4 -0
  123. package/lib/module/types/blockchain/network.js.map +1 -0
  124. package/lib/module/types/blockchain/transaction.js +2 -0
  125. package/lib/module/types/blockchain/transaction.js.map +1 -0
  126. package/lib/module/types/common.js +2 -0
  127. package/lib/module/types/common.js.map +1 -0
  128. package/lib/module/types/index.js +31 -0
  129. package/lib/module/types/index.js.map +1 -0
  130. package/lib/module/types/onramp/countries.js +2 -0
  131. package/lib/module/types/onramp/countries.js.map +1 -0
  132. package/lib/module/types/onramp/currencies.js +2 -0
  133. package/lib/module/types/onramp/currencies.js.map +1 -0
  134. package/lib/module/types/onramp/errors.js +18 -0
  135. package/lib/module/types/onramp/errors.js.map +1 -0
  136. package/lib/module/types/onramp/index.js +8 -0
  137. package/lib/module/types/onramp/index.js.map +1 -0
  138. package/lib/module/types/onramp/quotes.js +2 -0
  139. package/lib/module/types/onramp/quotes.js.map +1 -0
  140. package/lib/module/types/siwx/config.js +4 -0
  141. package/lib/module/types/siwx/config.js.map +1 -0
  142. package/lib/module/types/siwx/index.js +7 -0
  143. package/lib/module/types/siwx/index.js.map +1 -0
  144. package/lib/module/types/siwx/message.js +4 -0
  145. package/lib/module/types/siwx/message.js.map +1 -0
  146. package/lib/module/types/siwx/storage.js +4 -0
  147. package/lib/module/types/siwx/storage.js.map +1 -0
  148. package/lib/module/types/siwx/verifier.js +30 -0
  149. package/lib/module/types/siwx/verifier.js.map +1 -0
  150. package/lib/module/types/storage.js +20 -0
  151. package/lib/module/types/storage.js.map +1 -0
  152. package/lib/module/types/swap/index.js +5 -0
  153. package/lib/module/types/swap/index.js.map +1 -0
  154. package/lib/module/types/swap/tokens.js +4 -0
  155. package/lib/module/types/swap/tokens.js.map +1 -0
  156. package/lib/module/types/ui.js +4 -0
  157. package/lib/module/{utils/TypeUtil.js.map → types/ui.js.map} +1 -1
  158. package/lib/module/types/wallet/connection.js +4 -0
  159. package/lib/module/types/wallet/connection.js.map +1 -0
  160. package/lib/module/types/wallet/connector.js +25 -0
  161. package/lib/module/types/wallet/connector.js.map +1 -0
  162. package/lib/module/types/wallet/index.js +7 -0
  163. package/lib/module/types/wallet/index.js.map +1 -0
  164. package/lib/module/types/wallet/wallet-info.js +4 -0
  165. package/lib/module/types/wallet/wallet-info.js.map +1 -0
  166. package/lib/module/utils/ConstantsUtil.js +47 -6
  167. package/lib/module/utils/ConstantsUtil.js.map +1 -1
  168. package/lib/module/utils/ContractUtil.js +2 -0
  169. package/lib/module/utils/ContractUtil.js.map +1 -1
  170. package/lib/module/utils/DateUtil.js +2 -0
  171. package/lib/module/utils/DateUtil.js.map +1 -1
  172. package/lib/module/utils/ErrorUtil.js +2 -0
  173. package/lib/module/utils/ErrorUtil.js.map +1 -1
  174. package/lib/module/utils/NamesUtil.js +2 -0
  175. package/lib/module/utils/NamesUtil.js.map +1 -1
  176. package/lib/module/utils/NetworkUtil.js +5 -0
  177. package/lib/module/utils/NetworkUtil.js.map +1 -1
  178. package/lib/module/utils/NumberUtil.js +54 -11
  179. package/lib/module/utils/NumberUtil.js.map +1 -1
  180. package/lib/module/utils/PresetsUtil.js +36 -21
  181. package/lib/module/utils/PresetsUtil.js.map +1 -1
  182. package/lib/module/utils/StringUtil.js +9 -0
  183. package/lib/module/utils/StringUtil.js.map +1 -1
  184. package/lib/typescript/adapters/BitcoinBaseAdapter.d.ts +5 -0
  185. package/lib/typescript/adapters/BitcoinBaseAdapter.d.ts.map +1 -0
  186. package/lib/typescript/adapters/BlockchainAdapter.d.ts +26 -0
  187. package/lib/typescript/adapters/BlockchainAdapter.d.ts.map +1 -0
  188. package/lib/typescript/adapters/EvmAdapter.d.ts +26 -0
  189. package/lib/typescript/adapters/EvmAdapter.d.ts.map +1 -0
  190. package/lib/typescript/adapters/SolanaBaseAdapter.d.ts +7 -0
  191. package/lib/typescript/adapters/SolanaBaseAdapter.d.ts.map +1 -0
  192. package/lib/typescript/adapters/__tests__/EvmAdapter.test.d.ts +2 -0
  193. package/lib/typescript/adapters/__tests__/EvmAdapter.test.d.ts.map +1 -0
  194. package/lib/typescript/index.d.ts +7 -1
  195. package/lib/typescript/index.d.ts.map +1 -1
  196. package/lib/typescript/networks/bitcoin.d.ts +4 -0
  197. package/lib/typescript/networks/bitcoin.d.ts.map +1 -0
  198. package/lib/typescript/networks/solana.d.ts +5 -0
  199. package/lib/typescript/networks/solana.d.ts.map +1 -0
  200. package/lib/typescript/types/api/blockchain-api.d.ts +183 -0
  201. package/lib/typescript/types/api/blockchain-api.d.ts.map +1 -0
  202. package/lib/typescript/types/api/events.d.ts +357 -0
  203. package/lib/typescript/types/api/events.d.ts.map +1 -0
  204. package/lib/typescript/types/api/index.d.ts +4 -0
  205. package/lib/typescript/types/api/index.d.ts.map +1 -0
  206. package/lib/typescript/types/api/wallet-api.d.ts +51 -0
  207. package/lib/typescript/types/api/wallet-api.d.ts.map +1 -0
  208. package/lib/typescript/types/blockchain/adapter.d.ts +40 -0
  209. package/lib/typescript/types/blockchain/adapter.d.ts.map +1 -0
  210. package/lib/typescript/types/blockchain/balance.d.ts +28 -0
  211. package/lib/typescript/types/blockchain/balance.d.ts.map +1 -0
  212. package/lib/typescript/types/blockchain/index.d.ts +5 -0
  213. package/lib/typescript/types/blockchain/index.d.ts.map +1 -0
  214. package/lib/typescript/types/blockchain/network.d.ts +47 -0
  215. package/lib/typescript/types/blockchain/network.d.ts.map +1 -0
  216. package/lib/typescript/{utils/TypeUtil.d.ts → types/blockchain/transaction.d.ts} +1 -22
  217. package/lib/typescript/types/blockchain/transaction.d.ts.map +1 -0
  218. package/lib/typescript/types/common.d.ts +24 -0
  219. package/lib/typescript/types/common.d.ts.map +1 -0
  220. package/lib/typescript/types/index.d.ts +10 -0
  221. package/lib/typescript/types/index.d.ts.map +1 -0
  222. package/lib/typescript/types/onramp/countries.d.ts +11 -0
  223. package/lib/typescript/types/onramp/countries.d.ts.map +1 -0
  224. package/lib/typescript/types/onramp/currencies.d.ts +30 -0
  225. package/lib/typescript/types/onramp/currencies.d.ts.map +1 -0
  226. package/lib/typescript/types/onramp/errors.d.ts +21 -0
  227. package/lib/typescript/types/onramp/errors.d.ts.map +1 -0
  228. package/lib/typescript/types/onramp/index.d.ts +5 -0
  229. package/lib/typescript/types/onramp/index.d.ts.map +1 -0
  230. package/lib/typescript/types/onramp/quotes.d.ts +45 -0
  231. package/lib/typescript/types/onramp/quotes.d.ts.map +1 -0
  232. package/lib/typescript/types/siwx/config.d.ts +73 -0
  233. package/lib/typescript/types/siwx/config.d.ts.map +1 -0
  234. package/lib/typescript/types/siwx/index.d.ts +5 -0
  235. package/lib/typescript/types/siwx/index.d.ts.map +1 -0
  236. package/lib/typescript/types/siwx/message.d.ts +92 -0
  237. package/lib/typescript/types/siwx/message.d.ts.map +1 -0
  238. package/lib/typescript/types/siwx/storage.d.ts +41 -0
  239. package/lib/typescript/types/siwx/storage.d.ts.map +1 -0
  240. package/lib/typescript/types/siwx/verifier.d.ts +28 -0
  241. package/lib/typescript/types/siwx/verifier.d.ts.map +1 -0
  242. package/lib/typescript/types/storage.d.ts +59 -0
  243. package/lib/typescript/types/storage.d.ts.map +1 -0
  244. package/lib/typescript/types/swap/index.d.ts +2 -0
  245. package/lib/typescript/types/swap/index.d.ts.map +1 -0
  246. package/lib/typescript/types/swap/tokens.d.ts +19 -0
  247. package/lib/typescript/types/swap/tokens.d.ts.map +1 -0
  248. package/lib/typescript/types/ui.d.ts +26 -0
  249. package/lib/typescript/types/ui.d.ts.map +1 -0
  250. package/lib/typescript/types/wallet/connection.d.ts +31 -0
  251. package/lib/typescript/types/wallet/connection.d.ts.map +1 -0
  252. package/lib/typescript/types/wallet/connector.d.ts +59 -0
  253. package/lib/typescript/types/wallet/connector.d.ts.map +1 -0
  254. package/lib/typescript/types/wallet/index.d.ts +4 -0
  255. package/lib/typescript/types/wallet/index.d.ts.map +1 -0
  256. package/lib/typescript/types/wallet/wallet-info.d.ts +37 -0
  257. package/lib/typescript/types/wallet/wallet-info.d.ts.map +1 -0
  258. package/lib/typescript/utils/ConstantsUtil.d.ts +43 -4
  259. package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
  260. package/lib/typescript/utils/NetworkUtil.d.ts +2 -0
  261. package/lib/typescript/utils/NetworkUtil.d.ts.map +1 -1
  262. package/lib/typescript/utils/NumberUtil.d.ts +39 -11
  263. package/lib/typescript/utils/NumberUtil.d.ts.map +1 -1
  264. package/lib/typescript/utils/PresetsUtil.d.ts +1 -6
  265. package/lib/typescript/utils/PresetsUtil.d.ts.map +1 -1
  266. package/lib/typescript/utils/StringUtil.d.ts +1 -0
  267. package/lib/typescript/utils/StringUtil.d.ts.map +1 -1
  268. package/package.json +9 -18
  269. package/src/adapters/BitcoinBaseAdapter.ts +5 -0
  270. package/src/adapters/BlockchainAdapter.ts +136 -0
  271. package/src/adapters/EvmAdapter.ts +247 -0
  272. package/src/adapters/SolanaBaseAdapter.ts +7 -0
  273. package/src/adapters/__tests__/EvmAdapter.test.ts +126 -0
  274. package/src/index.ts +8 -1
  275. package/src/networks/bitcoin.ts +32 -0
  276. package/src/networks/solana.ts +44 -0
  277. package/src/types/api/blockchain-api.ts +213 -0
  278. package/src/types/api/events.ts +462 -0
  279. package/src/types/api/index.ts +4 -0
  280. package/src/types/api/wallet-api.ts +71 -0
  281. package/src/types/blockchain/adapter.ts +52 -0
  282. package/src/types/blockchain/balance.ts +31 -0
  283. package/src/types/blockchain/index.ts +5 -0
  284. package/src/types/blockchain/network.ts +39 -0
  285. package/src/{utils/TypeUtil.ts → types/blockchain/transaction.ts} +0 -26
  286. package/src/types/common.ts +56 -0
  287. package/src/types/index.ts +28 -0
  288. package/src/types/onramp/countries.ts +11 -0
  289. package/src/types/onramp/currencies.ts +32 -0
  290. package/src/types/onramp/errors.ts +22 -0
  291. package/src/types/onramp/index.ts +5 -0
  292. package/src/types/onramp/quotes.ts +46 -0
  293. package/src/types/siwx/config.ts +73 -0
  294. package/src/types/siwx/index.ts +4 -0
  295. package/src/types/siwx/message.ts +92 -0
  296. package/src/types/siwx/storage.ts +44 -0
  297. package/src/types/siwx/verifier.ts +32 -0
  298. package/src/types/storage.ts +64 -0
  299. package/src/types/swap/index.ts +2 -0
  300. package/src/types/swap/tokens.ts +21 -0
  301. package/src/types/ui.ts +26 -0
  302. package/src/types/wallet/connection.ts +34 -0
  303. package/src/types/wallet/connector.ts +83 -0
  304. package/src/types/wallet/index.ts +4 -0
  305. package/src/types/wallet/wallet-info.ts +42 -0
  306. package/src/utils/ConstantsUtil.ts +48 -7
  307. package/src/utils/NetworkUtil.ts +5 -0
  308. package/src/utils/NumberUtil.ts +54 -11
  309. package/src/utils/PresetsUtil.ts +34 -26
  310. package/src/utils/StringUtil.ts +7 -0
  311. package/lib/commonjs/utils/TypeUtil.js +0 -2
  312. package/lib/module/utils/TypeUtil.js +0 -2
  313. package/lib/typescript/utils/TypeUtil.d.ts.map +0 -1
@@ -0,0 +1,51 @@
1
+ import type { CaipNetworkId } from '../common';
2
+ export interface WcWallet {
3
+ id: string;
4
+ name: string;
5
+ homepage?: string;
6
+ image_id?: string;
7
+ image_url?: string;
8
+ order?: number;
9
+ mobile_link?: string | null;
10
+ desktop_link?: string | null;
11
+ webapp_link?: string | null;
12
+ link_mode?: string | null;
13
+ app_store?: string | null;
14
+ play_store?: string | null;
15
+ chains?: readonly CaipNetworkId[];
16
+ badge_type?: 'certified' | 'none';
17
+ }
18
+ export interface DataWallet {
19
+ id: string;
20
+ ios_schema?: string;
21
+ android_app_id?: string;
22
+ }
23
+ export interface ApiGetWalletsRequest {
24
+ page: number;
25
+ entries: number;
26
+ search?: string;
27
+ include?: string[];
28
+ exclude?: string[];
29
+ }
30
+ export interface ApiGetWalletsResponse {
31
+ data: WcWallet[];
32
+ count: number;
33
+ }
34
+ export interface ApiGetDataWalletsResponse {
35
+ data: DataWallet[];
36
+ count: number;
37
+ }
38
+ export interface ApiGetAnalyticsConfigResponse {
39
+ isAnalyticsEnabled: boolean;
40
+ }
41
+ export type CustomWallet = Pick<WcWallet, 'id' | 'name' | 'homepage' | 'image_url' | 'image_id' | 'mobile_link' | 'desktop_link' | 'webapp_link' | 'link_mode' | 'app_store' | 'play_store'> & {
42
+ android_app_id?: string;
43
+ ios_schema?: string;
44
+ };
45
+ export type UniversalProviderConfigOverride = {
46
+ methods?: Record<string, string[]>;
47
+ chains?: Record<string, string[]>;
48
+ events?: Record<string, string[]>;
49
+ rpcMap?: Record<string, string>;
50
+ };
51
+ //# sourceMappingURL=wallet-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-api.d.ts","sourceRoot":"","sources":["../../../../src/types/api/wallet-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,QAAQ,EACN,IAAI,GACJ,MAAM,GACN,UAAU,GACV,WAAW,GACX,UAAU,GACV,aAAa,GACb,cAAc,GACd,aAAa,GACb,WAAW,GACX,WAAW,GACX,YAAY,CACf,GAAG;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { ChainNamespace, CaipAddress, AdapterType } from '../common';
2
+ import type { WalletConnector } from '../wallet';
3
+ import type { BalanceChangedEvent } from './balance';
4
+ export interface BlockchainAdapterConfig {
5
+ supportedNamespace: ChainNamespace;
6
+ adapterType: AdapterType;
7
+ }
8
+ export interface BlockchainAdapterInitParams {
9
+ connector: WalletConnector;
10
+ }
11
+ export interface AdapterEvents {
12
+ accountsChanged: (event: AccountsChangedEvent) => void;
13
+ chainChanged: (event: ChainChangedEvent) => void;
14
+ disconnect: (event: DisconnectEvent) => void;
15
+ balanceChanged: (event: BalanceChangedEvent) => void;
16
+ }
17
+ export type AccountsChangedEvent = {
18
+ accounts: CaipAddress[];
19
+ };
20
+ export type ChainChangedEvent = {
21
+ chainId: string;
22
+ };
23
+ export type DisconnectEvent = undefined;
24
+ export interface Provider {
25
+ connect<T>(params?: any): Promise<T>;
26
+ disconnect(): Promise<void>;
27
+ request<T = unknown>(args: RequestArguments, chain?: string | undefined, expiry?: number | undefined): Promise<T>;
28
+ on(event: string, listener: (args?: any) => void): any;
29
+ off(event: string, listener: (args?: any) => void): any;
30
+ }
31
+ export interface RequestArguments {
32
+ method: string;
33
+ params?: unknown[] | Record<string, unknown> | object | undefined;
34
+ }
35
+ export interface ConnectionResponse {
36
+ accounts: string[];
37
+ chainId: string;
38
+ [key: string]: any;
39
+ }
40
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/types/blockchain/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,cAAc,CAAC;IACnC,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,eAAe,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACvD,YAAY,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACjD,UAAU,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACtD;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,WAAW,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC;AAExC,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACrC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,CAAC,CAAC,GAAG,OAAO,EACjB,IAAI,EAAE,gBAAgB,EACtB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAC1B,OAAO,CAAC,CAAC,CAAC,CAAC;IACd,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG,CAAC;IACvD,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG,CAAC;CACzD;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;CACnE;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
@@ -0,0 +1,28 @@
1
+ import type { CaipAddress } from '../common';
2
+ import type { Tokens } from '../wallet';
3
+ import type { AppKitNetwork } from './network';
4
+ export interface Balance {
5
+ name?: string;
6
+ amount: string;
7
+ symbol: string;
8
+ quantity?: {
9
+ decimals: string;
10
+ numeric: string;
11
+ };
12
+ chainId?: string;
13
+ address?: CaipAddress | string;
14
+ value?: number;
15
+ price?: number;
16
+ iconUrl?: string;
17
+ }
18
+ export interface GetBalanceParams {
19
+ network: AppKitNetwork;
20
+ address?: CaipAddress;
21
+ tokens?: Tokens;
22
+ }
23
+ export type GetBalanceResponse = Balance;
24
+ export type BalanceChangedEvent = {
25
+ address: CaipAddress;
26
+ balance: Balance;
27
+ };
28
+ //# sourceMappingURL=balance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../../../src/types/blockchain/balance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAEzC,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './adapter';
2
+ export * from './balance';
3
+ export * from './network';
4
+ export * from './transaction';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/blockchain/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type { ChainNamespace, CaipNetworkId } from '../common';
2
+ export type Network = {
3
+ id: number | string;
4
+ name: string;
5
+ nativeCurrency: {
6
+ name: string;
7
+ symbol: string;
8
+ decimals: number;
9
+ };
10
+ rpcUrls: {
11
+ default: {
12
+ http: readonly string[];
13
+ };
14
+ [key: string]: {
15
+ http: readonly string[];
16
+ } | undefined;
17
+ };
18
+ blockExplorers?: {
19
+ default: {
20
+ name: string;
21
+ url: string;
22
+ };
23
+ [key: string]: {
24
+ name: string;
25
+ url: string;
26
+ } | undefined;
27
+ };
28
+ chainNamespace?: ChainNamespace;
29
+ caipNetworkId?: CaipNetworkId;
30
+ testnet?: boolean;
31
+ deprecatedCaipNetworkId?: CaipNetworkId;
32
+ imageUrl?: string;
33
+ };
34
+ export type AppKitNetwork = Network & {
35
+ chainNamespace: ChainNamespace;
36
+ caipNetworkId: CaipNetworkId;
37
+ };
38
+ export interface CaipNetwork {
39
+ id: CaipNetworkId;
40
+ name?: string;
41
+ imageId?: string;
42
+ imageUrl?: string;
43
+ }
44
+ export interface AppKitOpenOptions {
45
+ view: 'Account' | 'Connect' | 'WalletConnect' | 'Networks' | 'Swap' | 'OnRamp';
46
+ }
47
+ //# sourceMappingURL=network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../src/types/blockchain/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/D,MAAM,MAAM,OAAO,GAAG;IAEpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,OAAO,EAAE;QACP,OAAO,EAAE;YAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;SAAE,CAAC;QACrC,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;SAAE,GAAG,SAAS,CAAC;KACxD,CAAC;IACF,cAAc,CAAC,EAAE;QACf,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;QACvC,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,GAAG,SAAS,CAAC;KAC1D,CAAC;IAGF,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,aAAa,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG;IACpC,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,aAAa,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,eAAe,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;CAChF"}
@@ -1,17 +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
- type BalanceQuantity = {
12
- decimals: string;
13
- numeric: string;
14
- };
15
1
  export type TransactionStatus = 'confirmed' | 'failed' | 'pending';
16
2
  export type TransactionDirection = 'in' | 'out' | 'self';
17
3
  export type TransactionImage = {
@@ -74,11 +60,4 @@ export interface TransactionDetail {
74
60
  export interface TransactionQuantity {
75
61
  numeric: string;
76
62
  }
77
- export type SocialProvider = 'apple' | 'x' | 'discord' | 'farcaster';
78
- export type ThemeMode = 'dark' | 'light';
79
- export interface ThemeVariables {
80
- accent?: string;
81
- }
82
- export type ConnectorType = 'WALLET_CONNECT' | 'COINBASE' | 'AUTH' | 'EXTERNAL';
83
- export {};
84
- //# sourceMappingURL=TypeUtil.d.ts.map
63
+ //# sourceMappingURL=transaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../../src/types/blockchain/transaction.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AACnE,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,UAAU,GAAG,KAAK,GAAG,SAAS,CAAC;IACrC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,SAAS,EAAE,mBAAmB,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE;QACX,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,EAAE;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;KACH,CAAC;IACF,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,oBAAoB,CAAC;IAChC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,KAAK,EAAE,uBAAuB,CAAC;CAChC;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,24 @@
1
+ export type CaipAddress = `${string}:${string}:${string}`;
2
+ export type CaipNetworkId = `${string}:${string}`;
3
+ export type ChainNamespace = 'eip155' | 'solana' | 'bip122';
4
+ export type AdapterType = 'solana' | 'wagmi' | 'ethers' | 'universal' | 'bip122';
5
+ export type AccountType = 'eoa' | 'smartAccount';
6
+ export type SocialProvider = 'google' | 'facebook' | 'github' | 'apple' | 'x' | 'discord' | 'email' | 'farcaster';
7
+ export type ThemeMode = 'dark' | 'light';
8
+ export interface ThemeVariables {
9
+ accent?: string;
10
+ }
11
+ export interface BaseError {
12
+ message?: string;
13
+ }
14
+ export type ProjectId = string;
15
+ export type Platform = 'mobile' | 'web' | 'qrcode' | 'email' | 'unsupported';
16
+ export type SdkType = 'appkit';
17
+ export type SdkVersion = `react-native-${string}-${string}`;
18
+ export type RequestCache = 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
19
+ export type CaipNamespaces = Record<string, {
20
+ chains: CaipNetworkId[];
21
+ methods: string[];
22
+ events: string[];
23
+ }>;
24
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5D,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEjF,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,cAAc,CAAC;AAEjD,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,GAAG,GACH,SAAS,GACT,OAAO,GACP,WAAW,CAAC;AAEhB,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzC,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC;AAE7E,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC;AAE/B,MAAM,MAAM,UAAU,GAAG,gBAAgB,MAAM,IAAI,MAAM,EAAE,CAAC;AAE5D,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,aAAa,GACb,UAAU,GACV,UAAU,GACV,gBAAgB,GAChB,QAAQ,CAAC;AAEb,MAAM,MAAM,cAAc,GAAG,MAAM,CACjC,MAAM,EACN;IACE,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from './common';
2
+ export * from './blockchain';
3
+ export * from './wallet';
4
+ export * from './api';
5
+ export * from './swap';
6
+ export * from './onramp';
7
+ export * from './siwx';
8
+ export * from './storage';
9
+ export * from './ui';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAC;AAGzB,cAAc,cAAc,CAAC;AAG7B,cAAc,UAAU,CAAC;AAGzB,cAAc,OAAO,CAAC;AAGtB,cAAc,QAAQ,CAAC;AAGvB,cAAc,UAAU,CAAC;AAGzB,cAAc,QAAQ,CAAC;AAGvB,cAAc,WAAW,CAAC;AAG1B,cAAc,MAAM,CAAC"}
@@ -0,0 +1,11 @@
1
+ export type OnRampCountry = {
2
+ countryCode: string;
3
+ flagImageUrl: string;
4
+ name: string;
5
+ };
6
+ export type OnRampCountryDefaults = {
7
+ countryCode: string;
8
+ defaultCurrencyCode: string;
9
+ defaultPaymentMethods: string[];
10
+ };
11
+ //# sourceMappingURL=countries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/countries.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAAC"}
@@ -0,0 +1,30 @@
1
+ export type OnRampFiatCurrency = {
2
+ currencyCode: string;
3
+ name: string;
4
+ symbolImageUrl: string;
5
+ };
6
+ export type OnRampCryptoCurrency = {
7
+ currencyCode: string;
8
+ name: string;
9
+ chainCode: string;
10
+ chainName: string;
11
+ chainId: string;
12
+ contractAddress: string | null;
13
+ symbolImageUrl: string;
14
+ };
15
+ export type OnRampFiatLimit = {
16
+ currencyCode: string;
17
+ defaultAmount: number | null;
18
+ minimumAmount: number;
19
+ maximumAmount: number;
20
+ };
21
+ export type OnRampTransactionResult = {
22
+ purchaseCurrency: string | null;
23
+ purchaseAmount: string | null;
24
+ purchaseImageUrl: string | null;
25
+ paymentCurrency: string | null;
26
+ paymentAmount: string | null;
27
+ status: string | null;
28
+ network: string | null;
29
+ };
30
+ //# sourceMappingURL=currencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/currencies.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare const OnRampErrorType: {
2
+ readonly AMOUNT_TOO_LOW: "INVALID_AMOUNT_TOO_LOW";
3
+ readonly AMOUNT_TOO_HIGH: "INVALID_AMOUNT_TOO_HIGH";
4
+ readonly INVALID_AMOUNT: "INVALID_AMOUNT";
5
+ readonly INCOMPATIBLE_REQUEST: "INCOMPATIBLE_REQUEST";
6
+ readonly BAD_REQUEST: "BAD_REQUEST";
7
+ readonly NO_VALID_QUOTES: "NO_VALID_QUOTES";
8
+ readonly FAILED_TO_LOAD: "FAILED_TO_LOAD";
9
+ readonly FAILED_TO_LOAD_COUNTRIES: "FAILED_TO_LOAD_COUNTRIES";
10
+ readonly FAILED_TO_LOAD_PROVIDERS: "FAILED_TO_LOAD_PROVIDERS";
11
+ readonly FAILED_TO_LOAD_METHODS: "FAILED_TO_LOAD_METHODS";
12
+ readonly FAILED_TO_LOAD_CURRENCIES: "FAILED_TO_LOAD_CURRENCIES";
13
+ readonly FAILED_TO_LOAD_LIMITS: "FAILED_TO_LOAD_LIMITS";
14
+ readonly UNKNOWN: "UNKNOWN_ERROR";
15
+ };
16
+ export type OnRampErrorTypeValues = (typeof OnRampErrorType)[keyof typeof OnRampErrorType];
17
+ export interface OnRampError {
18
+ type: OnRampErrorTypeValues;
19
+ message: string;
20
+ }
21
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CAclB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAE3F,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ export * from './countries';
2
+ export * from './currencies';
3
+ export * from './quotes';
4
+ export * from './errors';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,45 @@
1
+ export type OnRampPaymentMethod = {
2
+ logos: {
3
+ dark: string;
4
+ light: string;
5
+ };
6
+ name: string;
7
+ paymentMethod: string;
8
+ paymentType: string;
9
+ };
10
+ export type OnRampQuote = {
11
+ countryCode: string;
12
+ customerScore: number;
13
+ destinationAmount: number;
14
+ destinationAmountWithoutFees: number;
15
+ destinationCurrencyCode: string;
16
+ exchangeRate: number;
17
+ fiatAmountWithoutFees: number;
18
+ lowKyc: boolean;
19
+ networkFee: number;
20
+ paymentMethodType: string;
21
+ serviceProvider: string;
22
+ sourceAmount: number;
23
+ sourceAmountWithoutFees: number;
24
+ sourceCurrencyCode: string;
25
+ totalFee: number;
26
+ transactionFee: number;
27
+ transactionType: string;
28
+ };
29
+ export type OnRampServiceProvider = {
30
+ categories: string[];
31
+ categoryStatuses: {
32
+ additionalProp: string;
33
+ };
34
+ logos: {
35
+ dark: string;
36
+ darkShort: string;
37
+ light: string;
38
+ lightShort: string;
39
+ };
40
+ name: string;
41
+ serviceProvider: string;
42
+ status: string;
43
+ websiteUrl: string;
44
+ };
45
+ //# sourceMappingURL=quotes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/quotes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4BAA4B,EAAE,MAAM,CAAC;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,gBAAgB,EAAE;QAChB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,73 @@
1
+ import type { CaipNetworkId } from '../common';
2
+ import type { SIWXSession, SIWXMessage } from './message';
3
+ /**
4
+ * This interface represents the SIWX configuration plugin, which is used to create and manage SIWX messages and sessions.
5
+ * You may use it to create a custom implementation following your needs, but watch close for the methods requirements.
6
+ */
7
+ export interface SIWXConfig {
8
+ /**
9
+ * This method will be called to create a new message to be signed by the user.
10
+ *
11
+ * Constraints:
12
+ * - The message MUST be unique and contain all the necessary information to verify the user's identity.
13
+ * - SIWXMessage.toString() method MUST be implemented to return the message string.
14
+ *
15
+ * @param input SIWXMessage.Input
16
+ * @returns SIWXMessage
17
+ */
18
+ createMessage: (input: SIWXMessage.Input) => Promise<SIWXMessage>;
19
+ /**
20
+ * This method will be called to store a new single session.
21
+ *
22
+ * Constraints:
23
+ * - This method MUST verify if the session is valid and store it in the storage successfully.
24
+ *
25
+ * @param session SIWXSession
26
+ */
27
+ addSession: (session: SIWXSession) => Promise<void>;
28
+ /**
29
+ * This method will be called to revoke all the sessions stored for a specific chain and address.
30
+ *
31
+ * Constraints:
32
+ * - This method MUST delete all the sessions stored for the specific chain and address successfully.
33
+ *
34
+ * @param chainId CaipNetworkId
35
+ * @param address string
36
+ */
37
+ revokeSession: (chainId: CaipNetworkId, address: string) => Promise<void>;
38
+ /**
39
+ * This method will be called to replace all the sessions in the storage with the new ones.
40
+ *
41
+ * Constraints:
42
+ * - This method MUST verify all the sessions before storing them in the storage;
43
+ * - This method MUST replace all the sessions in the storage with the new ones succesfully otherwise it MUST throw an error.
44
+ *
45
+ * @param sessions SIWXSession[]
46
+ */
47
+ setSessions: (sessions: SIWXSession[]) => Promise<void>;
48
+ /**
49
+ * This method will be called to get all the sessions stored for a specific chain and address.
50
+ *
51
+ * Constraints:
52
+ * - This method MUST return only sessions that are verified and valid;
53
+ * - This method MUST NOT return expired sessions.
54
+ *
55
+ * @param chainId CaipNetworkId
56
+ * @param address string
57
+ * @returns
58
+ */
59
+ getSessions: (chainId: CaipNetworkId, address: string) => Promise<SIWXSession[]>;
60
+ /**
61
+ * This method determines whether the wallet stays connected when the user denies the signature request.
62
+ *
63
+ * @returns {boolean}
64
+ */
65
+ getRequired?: () => boolean;
66
+ /**
67
+ * This flag determines whether the session should be cleared when the user disconnects.
68
+ *
69
+ * @default true
70
+ */
71
+ signOutOnDisconnect?: boolean;
72
+ }
73
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/types/siwx/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;OASG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,KAAK,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAClE;;;;;;;OAOG;IACH,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD;;;;;;;;OAQG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E;;;;;;;;OAQG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD;;;;;;;;;;OAUG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACjF;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;IAC5B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
@@ -0,0 +1,5 @@
1
+ export * from './config';
2
+ export * from './message';
3
+ export * from './verifier';
4
+ export * from './storage';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/siwx/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,92 @@
1
+ import type { CaipNetworkId } from '../common';
2
+ /**
3
+ * This interface represents a SIWX session, which is used to store the user's identity information.
4
+ */
5
+ export interface SIWXSession {
6
+ data: SIWXMessage.Data;
7
+ message: string;
8
+ signature: string;
9
+ cacao?: Cacao;
10
+ }
11
+ /**
12
+ * This interface represents a SIWX message, which is used to create a message to be signed by the user.
13
+ * This must contain the necessary information to verify the user's identity and how to generate the string message.
14
+ */
15
+ export interface SIWXMessage extends SIWXMessage.Data, SIWXMessage.Methods {
16
+ }
17
+ export declare namespace SIWXMessage {
18
+ /**
19
+ * This interface represents the SIWX message data, which is used to create a message to be signed by the user.
20
+ */
21
+ interface Data extends Input, Metadata, Identifier {
22
+ }
23
+ /**
24
+ * This interface represents the SIWX message input.
25
+ * Here must contain what is different for each user of the application.
26
+ */
27
+ interface Input {
28
+ accountAddress: string;
29
+ chainId: CaipNetworkId;
30
+ notBefore?: Timestamp;
31
+ }
32
+ /**
33
+ * This interface represents the SIWX message metadata.
34
+ * Here must contain the main data related to the app.
35
+ */
36
+ interface Metadata {
37
+ domain: string;
38
+ uri: string;
39
+ version: string;
40
+ nonce: string;
41
+ statement?: string;
42
+ resources?: string[];
43
+ }
44
+ /**
45
+ * This interface represents the SIWX message identifier.
46
+ * Here must contain the request id and the timestamps.
47
+ */
48
+ interface Identifier {
49
+ requestId?: string;
50
+ issuedAt?: Timestamp;
51
+ expirationTime?: Timestamp;
52
+ }
53
+ /**
54
+ * This interface represents the SIWX message methods.
55
+ * Here must contain the method to generate the message string and any other method performed by the SIWX message.
56
+ */
57
+ interface Methods {
58
+ toString: () => string;
59
+ }
60
+ /**
61
+ * The timestamp is a UTC string representing the time in ISO 8601 format.
62
+ */
63
+ type Timestamp = string;
64
+ }
65
+ interface CacaoHeader {
66
+ t: 'caip122';
67
+ }
68
+ interface CacaoPayload {
69
+ domain: string;
70
+ aud: string;
71
+ nonce: string;
72
+ iss: string;
73
+ version?: string;
74
+ iat?: string;
75
+ nbf?: string;
76
+ exp?: string;
77
+ statement?: string;
78
+ requestId?: string;
79
+ resources?: string[];
80
+ type?: string;
81
+ }
82
+ interface Cacao {
83
+ h: CacaoHeader;
84
+ p: CacaoPayload;
85
+ s: {
86
+ t: 'eip191' | 'eip1271';
87
+ s: string;
88
+ m?: string;
89
+ };
90
+ }
91
+ export {};
92
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/types/siwx/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AACD;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO;CAAG;AAC7E,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC;;OAEG;IACH,UAAU,IAAK,SAAQ,KAAK,EAAE,QAAQ,EAAE,UAAU;KAAG;IACrD;;;OAGG;IACH,UAAU,KAAK;QACb,cAAc,EAAE,MAAM,CAAC;QACvB,OAAO,EAAE,aAAa,CAAC;QACvB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB;IACD;;;OAGG;IACH,UAAU,QAAQ;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;KACtB;IACD;;;OAGG;IACH,UAAU,UAAU;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,cAAc,CAAC,EAAE,SAAS,CAAC;KAC5B;IACD;;;OAGG;IACH,UAAU,OAAO;QACf,QAAQ,EAAE,MAAM,MAAM,CAAC;KACxB;IACD;;OAEG;IACH,KAAK,SAAS,GAAG,MAAM,CAAC;CACzB;AAED,UAAU,WAAW;IACnB,CAAC,EAAE,SAAS,CAAC;CACd;AAED,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb,CAAC,EAAE,WAAW,CAAC;IACf,CAAC,EAAE,YAAY,CAAC;IAChB,CAAC,EAAE;QACD,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;QACxB,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,CAAC,EAAE,MAAM,CAAC;KACZ,CAAC;CACH"}
@@ -0,0 +1,41 @@
1
+ import type { CaipNetworkId } from '../common';
2
+ import type { SIWXSession } from './message';
3
+ /**
4
+ * This is the interface for a SIWX storage.
5
+ */
6
+ export interface SIWXStorage {
7
+ /**
8
+ * Adds a new session for the storage.
9
+ * This method should not verify the session, only store it.
10
+ *
11
+ * @param session SIWXSession
12
+ * @returns Promise<void>
13
+ */
14
+ add(session: SIWXSession): Promise<void>;
15
+ /**
16
+ * Deletes a session from the storage.
17
+ *
18
+ * @param chainId CaipNetworkId
19
+ * @param address string
20
+ * @returns Promise<void>
21
+ */
22
+ delete(chainId: CaipNetworkId, address: string): Promise<void>;
23
+ /**
24
+ * Gets a list of sessions for a given chainId and address.
25
+ * This method should not verify sessions, only return the sessions that are stored.
26
+ *
27
+ * @param chainId CaipNetworkId
28
+ * @param address string
29
+ * @returns Promise<SIWXSession[]>
30
+ */
31
+ get(chainId: CaipNetworkId, address: string): Promise<SIWXSession[]>;
32
+ /**
33
+ * Replaces the current sessions with the new list of sessions.
34
+ * This method should not verify sessions, only store them.
35
+ *
36
+ * @param sessions SIWXSession[]
37
+ * @returns Promise<void>
38
+ */
39
+ set(sessions: SIWXSession[]): Promise<void>;
40
+ }
41
+ //# sourceMappingURL=storage.d.ts.map