@reown/appkit-core-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 (245) hide show
  1. package/lib/commonjs/controllers/ApiController.js +75 -38
  2. package/lib/commonjs/controllers/ApiController.js.map +1 -1
  3. package/lib/commonjs/controllers/AssetController.js +0 -4
  4. package/lib/commonjs/controllers/AssetController.js.map +1 -1
  5. package/lib/commonjs/controllers/BlockchainApiController.js +156 -57
  6. package/lib/commonjs/controllers/BlockchainApiController.js.map +1 -1
  7. package/lib/commonjs/controllers/ConnectionsController.js +402 -0
  8. package/lib/commonjs/controllers/ConnectionsController.js.map +1 -0
  9. package/lib/commonjs/controllers/EnsController.js.map +1 -1
  10. package/lib/commonjs/controllers/EventsController.js.map +1 -1
  11. package/lib/commonjs/controllers/ModalController.js +6 -7
  12. package/lib/commonjs/controllers/ModalController.js.map +1 -1
  13. package/lib/commonjs/controllers/OnRampController.js +29 -19
  14. package/lib/commonjs/controllers/OnRampController.js.map +1 -1
  15. package/lib/commonjs/controllers/OptionsController.js +22 -7
  16. package/lib/commonjs/controllers/OptionsController.js.map +1 -1
  17. package/lib/commonjs/controllers/PublicStateController.js.map +1 -1
  18. package/lib/commonjs/controllers/RouterController.js +7 -22
  19. package/lib/commonjs/controllers/RouterController.js.map +1 -1
  20. package/lib/commonjs/controllers/SendController.js +96 -96
  21. package/lib/commonjs/controllers/SendController.js.map +1 -1
  22. package/lib/commonjs/controllers/SnackController.js +29 -5
  23. package/lib/commonjs/controllers/SnackController.js.map +1 -1
  24. package/lib/commonjs/controllers/SwapController.js +154 -151
  25. package/lib/commonjs/controllers/SwapController.js.map +1 -1
  26. package/lib/commonjs/controllers/ThemeController.js +9 -1
  27. package/lib/commonjs/controllers/ThemeController.js.map +1 -1
  28. package/lib/commonjs/controllers/TransactionsController.js +22 -18
  29. package/lib/commonjs/controllers/TransactionsController.js.map +1 -1
  30. package/lib/commonjs/controllers/WcController.js +73 -0
  31. package/lib/commonjs/controllers/WcController.js.map +1 -0
  32. package/lib/commonjs/index.js +13 -41
  33. package/lib/commonjs/index.js.map +1 -1
  34. package/lib/commonjs/package.json +1 -0
  35. package/lib/commonjs/utils/ApiUtil.js.map +1 -1
  36. package/lib/commonjs/utils/AssetUtil.js +15 -19
  37. package/lib/commonjs/utils/AssetUtil.js.map +1 -1
  38. package/lib/commonjs/utils/ConstantsUtil.js +122 -5
  39. package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
  40. package/lib/commonjs/utils/CoreHelperUtil.js +19 -7
  41. package/lib/commonjs/utils/CoreHelperUtil.js.map +1 -1
  42. package/lib/commonjs/utils/EventUtil.js.map +1 -1
  43. package/lib/commonjs/utils/FetchUtil.js.map +1 -1
  44. package/lib/commonjs/utils/RouterUtil.js.map +1 -1
  45. package/lib/commonjs/utils/StorageUtil.js +90 -108
  46. package/lib/commonjs/utils/StorageUtil.js.map +1 -1
  47. package/lib/commonjs/utils/SwapApiUtil.js +15 -21
  48. package/lib/commonjs/utils/SwapApiUtil.js.map +1 -1
  49. package/lib/commonjs/utils/SwapCalculationUtil.js.map +1 -1
  50. package/lib/commonjs/utils/WalletUtil.js +23 -0
  51. package/lib/commonjs/utils/WalletUtil.js.map +1 -0
  52. package/lib/module/controllers/ApiController.js +77 -38
  53. package/lib/module/controllers/ApiController.js.map +1 -1
  54. package/lib/module/controllers/AssetController.js +2 -4
  55. package/lib/module/controllers/AssetController.js.map +1 -1
  56. package/lib/module/controllers/BlockchainApiController.js +158 -57
  57. package/lib/module/controllers/BlockchainApiController.js.map +1 -1
  58. package/lib/module/controllers/ConnectionsController.js +399 -0
  59. package/lib/module/controllers/ConnectionsController.js.map +1 -0
  60. package/lib/module/controllers/EnsController.js +2 -0
  61. package/lib/module/controllers/EnsController.js.map +1 -1
  62. package/lib/module/controllers/EventsController.js +2 -0
  63. package/lib/module/controllers/EventsController.js.map +1 -1
  64. package/lib/module/controllers/ModalController.js +8 -7
  65. package/lib/module/controllers/ModalController.js.map +1 -1
  66. package/lib/module/controllers/OnRampController.js +27 -15
  67. package/lib/module/controllers/OnRampController.js.map +1 -1
  68. package/lib/module/controllers/OptionsController.js +24 -7
  69. package/lib/module/controllers/OptionsController.js.map +1 -1
  70. package/lib/module/controllers/PublicStateController.js +2 -0
  71. package/lib/module/controllers/PublicStateController.js.map +1 -1
  72. package/lib/module/controllers/RouterController.js +9 -22
  73. package/lib/module/controllers/RouterController.js.map +1 -1
  74. package/lib/module/controllers/SendController.js +98 -96
  75. package/lib/module/controllers/SendController.js.map +1 -1
  76. package/lib/module/controllers/SnackController.js +31 -5
  77. package/lib/module/controllers/SnackController.js.map +1 -1
  78. package/lib/module/controllers/SwapController.js +156 -151
  79. package/lib/module/controllers/SwapController.js.map +1 -1
  80. package/lib/module/controllers/ThemeController.js +11 -1
  81. package/lib/module/controllers/ThemeController.js.map +1 -1
  82. package/lib/module/controllers/TransactionsController.js +24 -18
  83. package/lib/module/controllers/TransactionsController.js.map +1 -1
  84. package/lib/module/controllers/WcController.js +70 -0
  85. package/lib/module/controllers/WcController.js.map +1 -0
  86. package/lib/module/index.js +7 -7
  87. package/lib/module/index.js.map +1 -1
  88. package/lib/module/utils/ApiUtil.js +2 -0
  89. package/lib/module/utils/ApiUtil.js.map +1 -1
  90. package/lib/module/utils/AssetUtil.js +17 -19
  91. package/lib/module/utils/AssetUtil.js.map +1 -1
  92. package/lib/module/utils/ConstantsUtil.js +124 -5
  93. package/lib/module/utils/ConstantsUtil.js.map +1 -1
  94. package/lib/module/utils/CoreHelperUtil.js +21 -5
  95. package/lib/module/utils/CoreHelperUtil.js.map +1 -1
  96. package/lib/module/utils/EventUtil.js +2 -0
  97. package/lib/module/utils/EventUtil.js.map +1 -1
  98. package/lib/module/utils/FetchUtil.js +2 -0
  99. package/lib/module/utils/FetchUtil.js.map +1 -1
  100. package/lib/module/utils/RouterUtil.js +2 -0
  101. package/lib/module/utils/RouterUtil.js.map +1 -1
  102. package/lib/module/utils/StorageUtil.js +93 -108
  103. package/lib/module/utils/StorageUtil.js.map +1 -1
  104. package/lib/module/utils/SwapApiUtil.js +17 -21
  105. package/lib/module/utils/SwapApiUtil.js.map +1 -1
  106. package/lib/module/utils/SwapCalculationUtil.js +3 -0
  107. package/lib/module/utils/SwapCalculationUtil.js.map +1 -1
  108. package/lib/module/utils/WalletUtil.js +19 -0
  109. package/lib/module/utils/WalletUtil.js.map +1 -0
  110. package/lib/typescript/controllers/ApiController.d.ts +4 -5
  111. package/lib/typescript/controllers/ApiController.d.ts.map +1 -1
  112. package/lib/typescript/controllers/AssetController.d.ts +0 -2
  113. package/lib/typescript/controllers/AssetController.d.ts.map +1 -1
  114. package/lib/typescript/controllers/BlockchainApiController.d.ts +29 -11
  115. package/lib/typescript/controllers/BlockchainApiController.d.ts.map +1 -1
  116. package/lib/typescript/controllers/ConnectionsController.d.ts +45 -0
  117. package/lib/typescript/controllers/ConnectionsController.d.ts.map +1 -0
  118. package/lib/typescript/controllers/EnsController.d.ts +1 -1
  119. package/lib/typescript/controllers/EventsController.d.ts +1 -1
  120. package/lib/typescript/controllers/EventsController.d.ts.map +1 -1
  121. package/lib/typescript/controllers/ModalController.d.ts.map +1 -1
  122. package/lib/typescript/controllers/OnRampController.d.ts +2 -2
  123. package/lib/typescript/controllers/OnRampController.d.ts.map +1 -1
  124. package/lib/typescript/controllers/OptionsController.d.ts +9 -4
  125. package/lib/typescript/controllers/OptionsController.d.ts.map +1 -1
  126. package/lib/typescript/controllers/PublicStateController.d.ts +1 -1
  127. package/lib/typescript/controllers/PublicStateController.d.ts.map +1 -1
  128. package/lib/typescript/controllers/RouterController.d.ts +6 -20
  129. package/lib/typescript/controllers/RouterController.d.ts.map +1 -1
  130. package/lib/typescript/controllers/SendController.d.ts +5 -7
  131. package/lib/typescript/controllers/SendController.d.ts.map +1 -1
  132. package/lib/typescript/controllers/SnackController.d.ts +3 -3
  133. package/lib/typescript/controllers/SnackController.d.ts.map +1 -1
  134. package/lib/typescript/controllers/SwapController.d.ts +12 -12
  135. package/lib/typescript/controllers/SwapController.d.ts.map +1 -1
  136. package/lib/typescript/controllers/ThemeController.d.ts +1 -1
  137. package/lib/typescript/controllers/ThemeController.d.ts.map +1 -1
  138. package/lib/typescript/controllers/TransactionsController.d.ts +3 -3
  139. package/lib/typescript/controllers/TransactionsController.d.ts.map +1 -1
  140. package/lib/typescript/controllers/WcController.d.ts +27 -0
  141. package/lib/typescript/controllers/WcController.d.ts.map +1 -0
  142. package/lib/typescript/index.d.ts +3 -8
  143. package/lib/typescript/index.d.ts.map +1 -1
  144. package/lib/typescript/utils/AssetUtil.d.ts +3 -4
  145. package/lib/typescript/utils/AssetUtil.d.ts.map +1 -1
  146. package/lib/typescript/utils/ConstantsUtil.d.ts +12 -2
  147. package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
  148. package/lib/typescript/utils/CoreHelperUtil.d.ts +5 -4
  149. package/lib/typescript/utils/CoreHelperUtil.d.ts.map +1 -1
  150. package/lib/typescript/utils/EventUtil.d.ts +1 -1
  151. package/lib/typescript/utils/EventUtil.d.ts.map +1 -1
  152. package/lib/typescript/utils/FetchUtil.d.ts +2 -2
  153. package/lib/typescript/utils/FetchUtil.d.ts.map +1 -1
  154. package/lib/typescript/utils/StorageUtil.d.ts +15 -16
  155. package/lib/typescript/utils/StorageUtil.d.ts.map +1 -1
  156. package/lib/typescript/utils/SwapApiUtil.d.ts +3 -4
  157. package/lib/typescript/utils/SwapApiUtil.d.ts.map +1 -1
  158. package/lib/typescript/utils/SwapCalculationUtil.d.ts +1 -1
  159. package/lib/typescript/utils/SwapCalculationUtil.d.ts.map +1 -1
  160. package/lib/typescript/utils/WalletUtil.d.ts +5 -0
  161. package/lib/typescript/utils/WalletUtil.d.ts.map +1 -0
  162. package/package.json +8 -22
  163. package/src/controllers/ApiController.ts +83 -40
  164. package/src/controllers/AssetController.ts +0 -6
  165. package/src/controllers/BlockchainApiController.ts +136 -44
  166. package/src/controllers/ConnectionsController.ts +521 -0
  167. package/src/controllers/EnsController.ts +1 -1
  168. package/src/controllers/EventsController.ts +1 -1
  169. package/src/controllers/ModalController.ts +6 -7
  170. package/src/controllers/OnRampController.ts +37 -18
  171. package/src/controllers/OptionsController.ts +37 -14
  172. package/src/controllers/PublicStateController.ts +1 -1
  173. package/src/controllers/RouterController.ts +17 -54
  174. package/src/controllers/SendController.ts +122 -111
  175. package/src/controllers/SnackController.ts +31 -5
  176. package/src/controllers/SwapController.ts +177 -183
  177. package/src/controllers/ThemeController.ts +11 -2
  178. package/src/controllers/TransactionsController.ts +25 -19
  179. package/src/controllers/WcController.ts +93 -0
  180. package/src/index.ts +6 -20
  181. package/src/utils/AssetUtil.ts +17 -22
  182. package/src/utils/ConstantsUtil.ts +126 -6
  183. package/src/utils/CoreHelperUtil.ts +45 -7
  184. package/src/utils/EventUtil.ts +1 -1
  185. package/src/utils/FetchUtil.ts +2 -2
  186. package/src/utils/StorageUtil.ts +163 -131
  187. package/src/utils/SwapApiUtil.ts +30 -37
  188. package/src/utils/SwapCalculationUtil.ts +1 -2
  189. package/src/utils/WalletUtil.ts +14 -0
  190. package/lib/commonjs/controllers/AccountController.js +0 -93
  191. package/lib/commonjs/controllers/AccountController.js.map +0 -1
  192. package/lib/commonjs/controllers/ConnectionController.js +0 -126
  193. package/lib/commonjs/controllers/ConnectionController.js.map +0 -1
  194. package/lib/commonjs/controllers/ConnectorController.js +0 -49
  195. package/lib/commonjs/controllers/ConnectorController.js.map +0 -1
  196. package/lib/commonjs/controllers/NetworkController.js +0 -90
  197. package/lib/commonjs/controllers/NetworkController.js.map +0 -1
  198. package/lib/commonjs/controllers/WebviewController.js +0 -52
  199. package/lib/commonjs/controllers/WebviewController.js.map +0 -1
  200. package/lib/commonjs/utils/ConnectionUtil.js +0 -33
  201. package/lib/commonjs/utils/ConnectionUtil.js.map +0 -1
  202. package/lib/commonjs/utils/NetworkUtil.js +0 -46
  203. package/lib/commonjs/utils/NetworkUtil.js.map +0 -1
  204. package/lib/commonjs/utils/TypeUtil.js +0 -35
  205. package/lib/commonjs/utils/TypeUtil.js.map +0 -1
  206. package/lib/module/controllers/AccountController.js +0 -88
  207. package/lib/module/controllers/AccountController.js.map +0 -1
  208. package/lib/module/controllers/ConnectionController.js +0 -121
  209. package/lib/module/controllers/ConnectionController.js.map +0 -1
  210. package/lib/module/controllers/ConnectorController.js +0 -44
  211. package/lib/module/controllers/ConnectorController.js.map +0 -1
  212. package/lib/module/controllers/NetworkController.js +0 -85
  213. package/lib/module/controllers/NetworkController.js.map +0 -1
  214. package/lib/module/controllers/WebviewController.js +0 -47
  215. package/lib/module/controllers/WebviewController.js.map +0 -1
  216. package/lib/module/utils/ConnectionUtil.js +0 -27
  217. package/lib/module/utils/ConnectionUtil.js.map +0 -1
  218. package/lib/module/utils/NetworkUtil.js +0 -40
  219. package/lib/module/utils/NetworkUtil.js.map +0 -1
  220. package/lib/module/utils/TypeUtil.js +0 -28
  221. package/lib/module/utils/TypeUtil.js.map +0 -1
  222. package/lib/typescript/controllers/AccountController.d.ts +0 -33
  223. package/lib/typescript/controllers/AccountController.d.ts.map +0 -1
  224. package/lib/typescript/controllers/ConnectionController.d.ts +0 -66
  225. package/lib/typescript/controllers/ConnectionController.d.ts.map +0 -1
  226. package/lib/typescript/controllers/ConnectorController.d.ts +0 -18
  227. package/lib/typescript/controllers/ConnectorController.d.ts.map +0 -1
  228. package/lib/typescript/controllers/NetworkController.d.ts +0 -35
  229. package/lib/typescript/controllers/NetworkController.d.ts.map +0 -1
  230. package/lib/typescript/controllers/WebviewController.d.ts +0 -21
  231. package/lib/typescript/controllers/WebviewController.d.ts.map +0 -1
  232. package/lib/typescript/utils/ConnectionUtil.d.ts +0 -4
  233. package/lib/typescript/utils/ConnectionUtil.d.ts.map +0 -1
  234. package/lib/typescript/utils/NetworkUtil.d.ts +0 -8
  235. package/lib/typescript/utils/NetworkUtil.d.ts.map +0 -1
  236. package/lib/typescript/utils/TypeUtil.d.ts +0 -850
  237. package/lib/typescript/utils/TypeUtil.d.ts.map +0 -1
  238. package/src/controllers/AccountController.ts +0 -128
  239. package/src/controllers/ConnectionController.ts +0 -200
  240. package/src/controllers/ConnectorController.ts +0 -63
  241. package/src/controllers/NetworkController.ts +0 -120
  242. package/src/controllers/WebviewController.ts +0 -63
  243. package/src/utils/ConnectionUtil.ts +0 -27
  244. package/src/utils/NetworkUtil.ts +0 -33
  245. package/src/utils/TypeUtil.ts +0 -1039
@@ -1,7 +1,6 @@
1
- import type { CaipNetwork, Connector, WcWallet } from './TypeUtil';
1
+ import type { AppKitNetwork, WcWallet } from '@reown/appkit-common-react-native';
2
2
  export declare const AssetUtil: {
3
- getWalletImage(wallet?: WcWallet): string | undefined;
4
- getNetworkImage(network?: CaipNetwork): string | undefined;
5
- getConnectorImage(connector?: Connector): string | undefined;
3
+ getWalletImage(wallet?: WcWallet, walletImages?: Record<string, string>): string | undefined;
4
+ getNetworkImage(network?: AppKitNetwork, networkImages?: Record<string, string>): string | undefined;
6
5
  };
7
6
  //# sourceMappingURL=AssetUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssetUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/AssetUtil.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEnE,eAAO,MAAM,SAAS;4BACI,QAAQ;8BAYN,WAAW;kCAYP,SAAS;CAWxC,CAAC"}
1
+ {"version":3,"file":"AssetUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/AssetUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAEjF,eAAO,MAAM,SAAS;4BACI,QAAQ,iBAAiB,OAAO,MAAM,EAAE,MAAM,CAAC;8BAgB7C,aAAa,kBAAkB,OAAO,MAAM,EAAE,MAAM,CAAC;CAehF,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Features } from './TypeUtil';
1
+ import type { Features } from '@reown/appkit-common-react-native';
2
2
  export declare const OnRampErrorType: {
3
3
  readonly AMOUNT_TOO_LOW: "INVALID_AMOUNT_TOO_LOW";
4
4
  readonly AMOUNT_TOO_HIGH: "INVALID_AMOUNT_TOO_HIGH";
@@ -20,7 +20,12 @@ export declare const ConstantsUtil: {
20
20
  ONE_SEC_MS: number;
21
21
  EMAIL_REGEX: RegExp;
22
22
  LINKING_ERROR: string;
23
- NATIVE_TOKEN_ADDRESS: string;
23
+ NATIVE_TOKEN_ADDRESS: {
24
+ readonly eip155: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
25
+ readonly solana: "So11111111111111111111111111111111111111111";
26
+ readonly polkadot: "0x";
27
+ readonly bip122: "0x";
28
+ };
24
29
  ONRAMP_ERROR_TYPES: {
25
30
  readonly AMOUNT_TOO_LOW: "INVALID_AMOUNT_TOO_LOW";
26
31
  readonly AMOUNT_TOO_HIGH: "INVALID_AMOUNT_TOO_HIGH";
@@ -38,7 +43,10 @@ export declare const ConstantsUtil: {
38
43
  };
39
44
  SWAP_SUGGESTED_TOKENS: string[];
40
45
  SWAP_POPULAR_TOKENS: string[];
46
+ ACTIVITY_SUPPORTED_CHAINS: string[];
41
47
  SWAP_SUPPORTED_NETWORKS: string[];
48
+ SEND_SUPPORTED_NAMESPACES: string[];
49
+ ONRAMP_SUPPORTED_NAMESPACES: string[];
42
50
  CONVERT_SLIPPAGE_TOLERANCE: number;
43
51
  DEFAULT_FEATURES: Features;
44
52
  NETWORK_DEFAULT_CURRENCIES: {
@@ -65,6 +73,8 @@ export declare const ConstantsUtil: {
65
73
  'eip155:59144': string;
66
74
  'eip155:1101': string;
67
75
  'eip155:196': string;
76
+ 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': string;
77
+ 'bip122:000000000019d6689c085ae165831e93': string;
68
78
  };
69
79
  };
70
80
  //# sourceMappingURL=ConstantsUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConstantsUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/ConstantsUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAU3C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CAclB,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiKzB,CAAC"}
1
+ {"version":3,"file":"ConstantsUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/ConstantsUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AASlF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CAclB,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0RzB,CAAC"}
@@ -1,5 +1,4 @@
1
- import { type Balance } from '@reown/appkit-common-react-native';
2
- import type { CaipAddress, CaipNetwork, DataWallet, LinkingRecord } from './TypeUtil';
1
+ import { BlockchainAdapter, type Balance, type CaipAddress, type CaipNetwork, type ChainNamespace, type SocialProvider, type LinkingRecord, type DataWallet, type SdkVersion } from '@reown/appkit-common-react-native';
3
2
  export declare const CoreHelperUtil: {
4
3
  isPairingExpired(expiry?: number): boolean;
5
4
  isAllowedRetry(lastRetry: number): boolean;
@@ -10,10 +9,10 @@ export declare const CoreHelperUtil: {
10
9
  isHttpUrl(url: string): boolean;
11
10
  isLinkModeURL(url?: string): boolean;
12
11
  formatNativeUrl(appUrl: string, wcUri: string): LinkingRecord;
13
- formatUniversalUrl(appUrl: string, wcUri: string): LinkingRecord;
12
+ formatUniversalUrl(appUrl: string, wcUri: string, provider?: SocialProvider): LinkingRecord;
14
13
  openLink(url: string): Promise<void>;
15
14
  formatBalance(balance: string | undefined, symbol: string | undefined, decimals?: number): string;
16
- isAddress(address: string, chain?: string): boolean;
15
+ isAddress(address: string, namespace?: ChainNamespace): boolean;
17
16
  getApiUrl(): string;
18
17
  getBlockchainApiUrl(): string;
19
18
  getBlockchainStagingApiUrl(): string;
@@ -37,5 +36,7 @@ export declare const CoreHelperUtil: {
37
36
  };
38
37
  sortNetworks(approvedCaipNetworkIds: `${string}:${string}`[] | undefined, requestedCaipNetworks?: CaipNetwork[]): CaipNetwork[];
39
38
  debounce<F extends (...args: any[]) => any>(func: F, wait: number): (...args: Parameters<F>) => void;
39
+ generateSdkVersion(adapters: BlockchainAdapter[], version: string): SdkVersion;
40
+ getRequestedCaipNetworkIds(): `${string}:${string}`[];
40
41
  };
41
42
  //# sourceMappingURL=CoreHelperUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CoreHelperUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/CoreHelperUtil.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAInG,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA0BtF,eAAO,MAAM,cAAc;8BACC,MAAM;8BAIN,MAAM;;8BAQN,WAAW,GAAG,SAAS;iCAIpB,WAAW,GAAG,SAAS;uBAI3B,MAAM;mBAMhB,MAAM;wBAID,MAAM;4BAQF,MAAM,SAAS,MAAM,GAAG,aAAa;+BA2BlC,MAAM,SAAS,MAAM,GAAG,aAAa;kBAuB5C,MAAM;2BAQH,MAAM,GAAG,SAAS,UAAU,MAAM,GAAG,SAAS;uBAgBlD,MAAM,mBAAqB,OAAO;;;;;;;;sBAmFnC,GAAG,GAAG,MAAM;2BAYD,UAAU,GAAG,QAAQ,OAAO,CAAC;wBAiBtC,MAAM;yBAIL,QAAQ,OAAO,CAAC,EAAE;;;;;;;sCAUL,OAAO,EAAE;;;;yCAiBjB,GAAG,MAAM,IAAI,MAAM,EAAE,EAAE,GAAG,SAAS,0BACpC,WAAW,EAAE;iCAiBT,GAAG,EAAE,KAAK,GAAG,iBAAiB,MAAM;CAalE,CAAC"}
1
+ {"version":3,"file":"CoreHelperUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/CoreHelperUtil.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EAGjB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,mCAAmC,CAAC;AA+B3C,eAAO,MAAM,cAAc;8BACC,MAAM;8BAIN,MAAM;;8BAQN,WAAW,GAAG,SAAS;iCAIpB,WAAW,GAAG,SAAS;uBAI3B,MAAM;mBAMhB,MAAM;wBAID,MAAM;4BAQF,MAAM,SAAS,MAAM,GAAG,aAAa;+BA2BlC,MAAM,SAAS,MAAM,aAAa,cAAc,GAAG,aAAa;kBAyBvE,MAAM;2BAQH,MAAM,GAAG,SAAS,UAAU,MAAM,GAAG,SAAS;uBAgBlD,MAAM,cAAa,cAAc,GAAc,OAAO;;;;;;;;sBAmFvD,GAAG,GAAG,MAAM;2BAYD,UAAU,GAAG,QAAQ,OAAO,CAAC;wBAiBtC,MAAM;yBAIL,QAAQ,OAAO,CAAC,EAAE;;;;;;;sCAUL,OAAO,EAAE;;;;yCAiBjB,GAAG,MAAM,IAAI,MAAM,EAAE,EAAE,GAAG,SAAS,0BACpC,WAAW,EAAE;iCAiBT,GAAG,EAAE,KAAK,GAAG,iBAAiB,MAAM;iCAcpC,iBAAiB,EAAE,WAAW,MAAM,GAAG,UAAU;;CAsB/E,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Platform, WcWallet } from './TypeUtil';
1
+ import type { Platform, WcWallet } from '@reown/appkit-common-react-native';
2
2
  export declare const EventUtil: {
3
3
  getWalletPlatform(wallet: WcWallet, installed?: boolean): Platform | undefined;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EventUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/EventUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAErD,eAAO,MAAM,SAAS;8BACM,QAAQ,cAAc,OAAO,GAAG,QAAQ,GAAG,SAAS;CAkB/E,CAAC"}
1
+ {"version":3,"file":"EventUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/EventUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE5E,eAAO,MAAM,SAAS;8BACM,QAAQ,cAAc,OAAO,GAAG,QAAQ,GAAG,SAAS;CAkB/E,CAAC"}
@@ -1,11 +1,11 @@
1
- import type { RequestCache } from './TypeUtil';
1
+ import type { RequestCache } from '@reown/appkit-common-react-native';
2
2
  interface Options {
3
3
  baseUrl: string;
4
4
  clientId?: string | null;
5
5
  }
6
6
  interface RequestArguments {
7
7
  path: string;
8
- headers?: HeadersInit_;
8
+ headers?: HeadersInit;
9
9
  params?: Record<string, string | undefined>;
10
10
  cache?: RequestCache;
11
11
  signal?: AbortSignal;
@@ -1 +1 @@
1
- {"version":3,"file":"FetchUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/FetchUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,UAAU,OAAO;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAGD,qBAAa,SAAS;IACb,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;gBAElB,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,OAAO;IAKpC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB;IAOrD,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa;IAYzD,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa;IAYxD,MAAM,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa;IAY3D,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAgBtE,OAAO,CAAC,SAAS;YAsCH,eAAe;CA2B9B"}
1
+ {"version":3,"file":"FetchUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/FetchUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGtE,UAAU,OAAO;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAGD,qBAAa,SAAS;IACb,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;gBAElB,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,OAAO;IAKpC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB;IAOrD,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa;IAYzD,GAAG,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa;IAYxD,MAAM,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa;IAY3D,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAgBtE,OAAO,CAAC,SAAS;YAsCH,eAAe;CA2B9B"}
@@ -1,24 +1,20 @@
1
- import type { OnRampCountry, OnRampCountryDefaults, OnRampFiatCurrency, OnRampFiatLimit, OnRampServiceProvider, WcWallet } from './TypeUtil';
2
- import { type SocialProvider, type ConnectorType } from '@reown/appkit-common-react-native';
1
+ import { type OnRampCountry, type OnRampFiatCurrency, type OnRampFiatLimit, type OnRampServiceProvider, type OnRampCountryDefaults, type WcWallet, type ConnectorType, type ChainNamespace, type WalletDeepLink } from '@reown/appkit-common-react-native';
3
2
  export declare const StorageUtil: {
4
- setWalletConnectDeepLink({ href, name }: {
5
- href: string;
6
- name: string;
7
- }): void;
8
- getWalletConnectDeepLink(): Promise<any>;
3
+ setWalletConnectDeepLink({ href, name }: WalletDeepLink): void;
4
+ getWalletConnectDeepLink(): Promise<WalletDeepLink | undefined>;
9
5
  removeWalletConnectDeepLink(): Promise<void>;
10
6
  addRecentWallet(wallet: WcWallet): Promise<WcWallet[] | undefined>;
11
7
  setRecentWallets(wallets: WcWallet[]): Promise<void>;
12
8
  getRecentWallets(): Promise<WcWallet[]>;
13
- setConnectedConnector(connectorType: ConnectorType): Promise<void>;
14
- getConnectedConnector(): Promise<ConnectorType | undefined>;
15
- removeConnectedConnector(): Promise<void>;
16
- setConnectedWalletImageUrl(url: string): Promise<void>;
17
- getConnectedWalletImageUrl(): Promise<string | null | undefined>;
18
- removeConnectedWalletImageUrl(): Promise<void>;
19
- setConnectedSocialProvider(provider: SocialProvider): Promise<void>;
20
- getConnectedSocialProvider(): Promise<any>;
21
- removeConnectedSocialProvider(): Promise<void>;
9
+ setConnectedConnectors({ type, namespaces }: {
10
+ type: ConnectorType;
11
+ namespaces: string[];
12
+ }): Promise<void>;
13
+ getConnectedConnectors(): Promise<{
14
+ type: ConnectorType;
15
+ namespaces: string[];
16
+ }[]>;
17
+ removeConnectedConnectors(type: ConnectorType): Promise<void>;
22
18
  setOnRampPreferredCountry(country: OnRampCountry): Promise<void>;
23
19
  getOnRampPreferredCountry(): Promise<OnRampCountry | undefined>;
24
20
  setOnRampPreferredFiatCurrency(currency: OnRampFiatCurrency): Promise<void>;
@@ -33,5 +29,8 @@ export declare const StorageUtil: {
33
29
  getOnRampFiatLimits(): Promise<OnRampFiatLimit[]>;
34
30
  setOnRampFiatCurrencies(fiatCurrencies: OnRampFiatCurrency[]): Promise<void>;
35
31
  getOnRampFiatCurrencies(): Promise<OnRampFiatCurrency[]>;
32
+ setActiveNamespace(namespace?: ChainNamespace): Promise<void>;
33
+ getActiveNamespace(): Promise<ChainNamespace | undefined>;
34
+ removeActiveNamespace(): Promise<void>;
36
35
  };
37
36
  //# sourceMappingURL=StorageUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StorageUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/StorageUtil.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,mCAAmC,CAAC;AAgB3C,eAAO,MAAM,WAAW;;cAC2B,MAAM;cAAQ,MAAM;;;;4BA6BvC,QAAQ;8BAuBN,QAAQ,EAAE;wBAQhB,QAAQ,QAAQ,EAAE,CAAC;yCAYF,aAAa;6BAQzB,QAAQ,aAAa,GAAG,SAAS,CAAC;;oCAoB3B,MAAM;;;yCA0BD,cAAc;;;uCA4BhB,aAAa;;6CAoBP,kBAAkB;;kCAoB7B,aAAa,EAAE;;kDAoBC,qBAAqB,EAAE;;gDAoCzB,qBAAqB,EAAE;;oCAqCnC,eAAe,EAAE;;4CAoCT,kBAAkB,EAAE;;CAmCnE,CAAC"}
1
+ {"version":3,"file":"StorageUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/StorageUtil.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,QAAQ,EAEb,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EAEpB,MAAM,mCAAmC,CAAC;AAI3C,eAAO,MAAM,WAAW;6CACmB,cAAc;;;4BAkCzB,QAAQ;8BA0BN,QAAQ,EAAE;wBAWhB,QAAQ,QAAQ,EAAE,CAAC;;cAkBrC,aAAa;oBACP,MAAM,EAAE;;8BAiBU,QAAQ;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;oCAclD,aAAa;uCAaV,aAAa;;6CAyBP,kBAAkB;;kCAyB7B,aAAa,EAAE;;kDAyBC,qBAAqB,EAAE;;gDAsCzB,qBAAqB,EAAE;;oCAuCnC,eAAe,EAAE;;4CAsCT,kBAAkB,EAAE;;mCAsC7B,cAAc;;;CAyCpD,CAAC"}
@@ -1,12 +1,11 @@
1
- import type { BlockchainApiBalanceResponse, BlockchainApiSwapAllowanceRequest, SwapTokenWithBalance } from './TypeUtil';
1
+ import type { Balance, BlockchainApiSwapAllowanceRequest, SwapTokenWithBalance } from '@reown/appkit-common-react-native';
2
2
  export declare const SwapApiUtil: {
3
3
  getTokenList(): Promise<SwapTokenWithBalance[]>;
4
4
  fetchSwapAllowance({ tokenAddress, userAddress, sourceTokenAmount, sourceTokenDecimals }: Pick<BlockchainApiSwapAllowanceRequest, "tokenAddress" | "userAddress"> & {
5
5
  sourceTokenAmount: string;
6
6
  sourceTokenDecimals: number;
7
7
  }): Promise<boolean>;
8
- getMyTokensWithBalance(forceUpdate?: string): Promise<SwapTokenWithBalance[]>;
9
- mapBalancesToSwapTokens(balances?: BlockchainApiBalanceResponse['balances']): SwapTokenWithBalance[];
10
- fetchGasPrice(): Promise<import("./TypeUtil").BlockchainApiGasPriceResponse | null | undefined>;
8
+ mapBalancesToSwapTokens(balances?: Balance[]): SwapTokenWithBalance[];
9
+ fetchGasPrice(): Promise<import("@reown/appkit-common-react-native").BlockchainApiGasPriceResponse | null | undefined>;
11
10
  };
12
11
  //# sourceMappingURL=SwapApiUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwapApiUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/SwapApiUtil.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,4BAA4B,EAC5B,iCAAiC,EACjC,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAIpB,eAAO,MAAM,WAAW;;;2BA8BD,MAAM;6BACJ,MAAM;;yCAqBc,MAAM;uCAgBd,4BAA4B,CAAC,UAAU,CAAC;;CA4B5E,CAAC"}
1
+ {"version":3,"file":"SwapApiUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/SwapApiUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAEP,iCAAiC,EACjC,oBAAoB,EACrB,MAAM,mCAAmC,CAAC;AAM3C,eAAO,MAAM,WAAW;;;2BAgCD,MAAM;6BACJ,MAAM;;uCAqBM,OAAO,EAAE;;CAmC7C,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { SwapTokenWithBalance } from './TypeUtil';
1
+ import { type SwapTokenWithBalance } from '@reown/appkit-common-react-native';
2
2
  export declare const SwapCalculationUtil: {
3
3
  getGasPriceInEther(gas: bigint, gasPrice: bigint): number;
4
4
  getGasPriceInUSD(networkPrice: string, gas: bigint, gasPrice: bigint): number;
@@ -1 +1 @@
1
- {"version":3,"file":"SwapCalculationUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/SwapCalculationUtil.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAGvD,eAAO,MAAM,mBAAmB;4BACN,MAAM,YAAY,MAAM;mCAOjB,MAAM,OAAO,MAAM,YAAY,MAAM;;2BAc/C,MAAM;+BACF,MAAM;2BACV,MAAM;uBACV,MAAM;;6BASE,MAAM,iBAAiB,MAAM;sCAOpB,MAAM;2CAOnB,MAAM,yBACF,MAAM;0DASuB,MAAM,iBAAiB,MAAM,GAAG,SAAS;wDAW1E,MAAM,sBACL,MAAM,WACjB,oBAAoB,EAAE,GAAG,SAAS;;qBAmB9B,oBAAoB,GAAG,SAAS;iBACpC,oBAAoB,GAAG,SAAS;0BACvB,MAAM;sBACV,MAAM;2BACD,MAAM;;CA6C5B,CAAC"}
1
+ {"version":3,"file":"SwapCalculationUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/SwapCalculationUtil.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAG1F,eAAO,MAAM,mBAAmB;4BACN,MAAM,YAAY,MAAM;mCAOjB,MAAM,OAAO,MAAM,YAAY,MAAM;;2BAc/C,MAAM;+BACF,MAAM;2BACV,MAAM;uBACV,MAAM;;6BASE,MAAM,iBAAiB,MAAM;sCAOpB,MAAM;2CAOnB,MAAM,yBACF,MAAM;0DASuB,MAAM,iBAAiB,MAAM,GAAG,SAAS;wDAW1E,MAAM,sBACL,MAAM,WACjB,oBAAoB,EAAE,GAAG,SAAS;;qBAmB9B,oBAAoB,GAAG,SAAS;iBACpC,oBAAoB,GAAG,SAAS;0BACvB,MAAM;sBACV,MAAM;2BACD,MAAM;;CA6C5B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { WcWallet } from '@reown/appkit-common-react-native';
2
+ export declare const WalletUtil: {
3
+ getWallet: (walletId: string) => WcWallet | undefined;
4
+ };
5
+ //# sourceMappingURL=WalletUtil.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/WalletUtil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAIlE,eAAO,MAAM,UAAU;0BACC,MAAM,KAAG,QAAQ,GAAG,SAAS;CAQpD,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@reown/appkit-core-react-native",
3
- "version": "0.0.0-fix-approved-networks-20250822000414",
3
+ "version": "0.0.0-fix-improvements-20250827190629",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "types": "lib/typescript/index.d.ts",
6
6
  "module": "lib/module/index.js",
7
+ "react-native": "src/index.ts",
7
8
  "source": "src/index.ts",
8
9
  "scripts": {
9
10
  "build": "bob build",
@@ -38,30 +39,15 @@
38
39
  "access": "public"
39
40
  },
40
41
  "dependencies": {
41
- "@reown/appkit-common-react-native": "0.0.0-fix-approved-networks-20250822000414",
42
+ "@reown/appkit-common-react-native": "0.0.0-fix-improvements-20250827190629",
42
43
  "countries-and-timezones": "3.7.2",
43
- "valtio": "1.13.2"
44
+ "derive-valtio": "0.2.0",
45
+ "valtio": "2.1.5"
44
46
  },
45
47
  "peerDependencies": {
46
- "@react-native-async-storage/async-storage": ">=1.17.0",
47
- "@walletconnect/react-native-compat": ">=2.13.1",
48
- "react": ">=17",
49
- "react-native": ">=0.68.5"
50
- },
51
- "react-native": "src/index.ts",
52
- "react-native-builder-bob": {
53
- "source": "src",
54
- "output": "lib",
55
- "targets": [
56
- "commonjs",
57
- "module",
58
- [
59
- "typescript",
60
- {
61
- "tsc": "../../node_modules/.bin/tsc"
62
- }
63
- ]
64
- ]
48
+ "@walletconnect/react-native-compat": ">=2.16.1",
49
+ "react": ">=18",
50
+ "react-native": ">=0.72"
65
51
  },
66
52
  "eslintIgnore": [
67
53
  "node_modules/",
@@ -4,20 +4,21 @@ import { proxy } from 'valtio';
4
4
  import { CoreHelperUtil } from '../utils/CoreHelperUtil';
5
5
  import { FetchUtil } from '../utils/FetchUtil';
6
6
  import { StorageUtil } from '../utils/StorageUtil';
7
- import type {
8
- ApiGetAnalyticsConfigResponse,
9
- ApiGetDataWalletsResponse,
10
- ApiGetWalletsRequest,
11
- ApiGetWalletsResponse,
12
- WcWallet
13
- } from '../utils/TypeUtil';
7
+ import {
8
+ type ApiGetAnalyticsConfigResponse,
9
+ type ApiGetDataWalletsResponse,
10
+ type ApiGetWalletsRequest,
11
+ type ApiGetWalletsResponse,
12
+ type CustomWallet,
13
+ type WcWallet,
14
+ PresetsUtil
15
+ } from '@reown/appkit-common-react-native';
14
16
  import { AssetController } from './AssetController';
15
- import { NetworkController } from './NetworkController';
16
17
  import { OptionsController } from './OptionsController';
17
- import { ConnectorController } from './ConnectorController';
18
- import { ConnectionController } from './ConnectionController';
18
+ import { WcController } from './WcController';
19
19
  import { ApiUtil } from '../utils/ApiUtil';
20
20
  import { SnackController } from './SnackController';
21
+ import { ConnectionsController } from './ConnectionsController';
21
22
 
22
23
  // -- Helpers ------------------------------------------- //
23
24
  const baseUrl = CoreHelperUtil.getApiUrl();
@@ -84,42 +85,30 @@ export const ApiController = {
84
85
  }
85
86
  },
86
87
 
87
- async _fetchConnectorImage(imageId: string) {
88
- const headers = ApiController._getApiHeaders();
89
- const url = await api.fetchImage(`/public/getAssetImage/${imageId}`, headers);
90
- if (url) {
91
- AssetController.setConnectorImage(imageId, url);
88
+ async _fetchNetworkImage(networkId: string) {
89
+ const imageId = PresetsUtil.NetworkImageIds[networkId];
90
+ if (!imageId) {
91
+ return;
92
92
  }
93
- },
94
93
 
95
- async _fetchNetworkImage(imageId: string) {
96
94
  const headers = ApiController._getApiHeaders();
97
95
  const url = await api.fetchImage(`/public/getAssetImage/${imageId}`, headers);
98
96
  if (url) {
99
- AssetController.setNetworkImage(imageId, url);
97
+ AssetController.setNetworkImage(networkId, url);
100
98
  }
101
99
  },
102
100
 
103
- async fetchConnectorImages() {
104
- const { connectors } = ConnectorController.state;
105
- const ids = connectors.map(({ imageId }) => imageId).filter(Boolean);
106
- await CoreHelperUtil.allSettled(
107
- (ids as string[]).map(id => ApiController._fetchConnectorImage(id))
108
- );
109
- },
110
-
111
101
  async fetchNetworkImages() {
112
- const { requestedCaipNetworks } = NetworkController.state;
113
- const ids = requestedCaipNetworks?.map(({ imageId }) => imageId).filter(Boolean);
114
- if (ids) {
102
+ const networks = ConnectionsController.state.networks;
103
+ if (networks) {
115
104
  await CoreHelperUtil.allSettled(
116
- (ids as string[]).map(id => ApiController._fetchNetworkImage(id))
105
+ networks.map(network => ApiController._fetchNetworkImage(network.id as string))
117
106
  );
118
107
  }
119
108
  },
120
109
 
121
110
  async fetchInstalledWallets() {
122
- const { includeWalletIds } = OptionsController.state;
111
+ const { includeWalletIds, customWallets } = OptionsController.state;
123
112
  const path = Platform.select({ default: 'getIosData', android: 'getAndroidData' });
124
113
  const response = await api.get<ApiGetDataWalletsResponse>({
125
114
  path,
@@ -141,10 +130,20 @@ export const ApiController = {
141
130
  };
142
131
  });
143
132
 
133
+ const customPromises = customWallets?.map(async item => {
134
+ return {
135
+ id: item.id,
136
+ isInstalled: await CoreHelperUtil.checkInstalled(item)
137
+ };
138
+ });
139
+
144
140
  const results = await Promise.all(promises);
145
141
  const installed = results.filter(({ isInstalled }) => isInstalled).map(({ id }) => id);
146
142
  const { excludeWalletIds } = OptionsController.state;
143
+ const chains = CoreHelperUtil.getRequestedCaipNetworkIds();
147
144
 
145
+ // Collect API-sourced installed wallets
146
+ let apiInstalledWallets: WcWallet[] = [];
148
147
  if (installed.length > 0) {
149
148
  const walletResponse = await api.get<ApiGetWalletsResponse>({
150
149
  path: '/getWallets',
@@ -154,7 +153,8 @@ export const ApiController = {
154
153
  platform: this.platform(),
155
154
  entries: installed?.length.toString(),
156
155
  include: installed?.join(','),
157
- exclude: excludeWalletIds?.join(',')
156
+ exclude: excludeWalletIds?.join(','),
157
+ chains: chains.join(',')
158
158
  }
159
159
  });
160
160
 
@@ -163,15 +163,39 @@ export const ApiController = {
163
163
  await CoreHelperUtil.allSettled(
164
164
  (walletImages as string[]).map(id => ApiController._fetchWalletImage(id))
165
165
  );
166
- state.installed = walletResponse.data;
167
- this.updateRecentWalletsInfo(walletResponse.data);
166
+ apiInstalledWallets = walletResponse.data;
168
167
  }
169
168
  }
169
+
170
+ // Collect custom installed wallets
171
+ let customInstalledWallets: CustomWallet[] = [];
172
+ if (customPromises?.length) {
173
+ const customResults = await Promise.all(customPromises);
174
+ const customInstalled = customResults
175
+ .filter(({ isInstalled }) => isInstalled)
176
+ .map(({ id }) => id);
177
+ customInstalledWallets =
178
+ customWallets?.filter(wallet => customInstalled.includes(wallet.id)) ?? [];
179
+ }
180
+
181
+ // Merge and de-duplicate by id, preserving order (API first, then custom)
182
+ const byId = new Map<string, WcWallet>();
183
+ [...apiInstalledWallets, ...customInstalledWallets].forEach(wallet => {
184
+ if (!byId.has(wallet.id)) {
185
+ byId.set(wallet.id, wallet);
186
+ }
187
+ });
188
+ const combinedInstalled = Array.from(byId.values());
189
+ state.installed = combinedInstalled;
190
+ if (combinedInstalled.length) {
191
+ this.updateRecentWalletsInfo(combinedInstalled);
192
+ }
170
193
  },
171
194
 
172
195
  async fetchFeaturedWallets() {
173
196
  const { featuredWalletIds } = OptionsController.state;
174
197
  const exclude = state.installed.map(({ id }) => id);
198
+ const chains = CoreHelperUtil.getRequestedCaipNetworkIds();
175
199
 
176
200
  if (featuredWalletIds?.length) {
177
201
  const response = await api.get<ApiGetWalletsResponse>({
@@ -184,7 +208,8 @@ export const ApiController = {
184
208
  ? String(featuredWalletIds.length)
185
209
  : recommendedEntries,
186
210
  include: featuredWalletIds?.join(','),
187
- exclude: exclude?.join(',')
211
+ exclude: exclude?.join(','),
212
+ chains: chains.join(',')
188
213
  }
189
214
  });
190
215
  if (!response) return;
@@ -201,9 +226,22 @@ export const ApiController = {
201
226
  }
202
227
  },
203
228
 
229
+ async fetchCustomWalletImages() {
230
+ const { customWallets } = OptionsController.state;
231
+ if (!customWallets?.length) {
232
+ return;
233
+ }
234
+
235
+ const images = customWallets.map(w => w.image_id).filter(Boolean);
236
+ await CoreHelperUtil.allSettled(
237
+ (images as string[]).map(id => ApiController._fetchWalletImage(id))
238
+ );
239
+ },
240
+
204
241
  async fetchRecommendedWallets() {
205
242
  const { installed } = ApiController.state;
206
243
  const { includeWalletIds, excludeWalletIds, featuredWalletIds } = OptionsController.state;
244
+ const chains = CoreHelperUtil.getRequestedCaipNetworkIds();
207
245
 
208
246
  const exclude = [
209
247
  ...installed.map(({ id }) => id),
@@ -219,7 +257,8 @@ export const ApiController = {
219
257
  platform: this.platform(),
220
258
  entries: recommendedEntries,
221
259
  include: includeWalletIds?.join(','),
222
- exclude: exclude?.join(',')
260
+ exclude: exclude?.join(','),
261
+ chains: chains.join(',')
223
262
  }
224
263
  });
225
264
 
@@ -242,6 +281,7 @@ export const ApiController = {
242
281
 
243
282
  async fetchWallets({ page }: Pick<ApiGetWalletsRequest, 'page'>) {
244
283
  const { includeWalletIds, excludeWalletIds, featuredWalletIds } = OptionsController.state;
284
+ const chains = CoreHelperUtil.getRequestedCaipNetworkIds();
245
285
  const exclude = [
246
286
  ...state.installed.map(({ id }) => id),
247
287
  ...state.recommended.map(({ id }) => id),
@@ -256,7 +296,8 @@ export const ApiController = {
256
296
  platform: this.platform(),
257
297
  entries: String(defaultEntries),
258
298
  include: includeWalletIds?.join(','),
259
- exclude: exclude.join(',')
299
+ exclude: exclude.join(','),
300
+ chains: chains.join(',')
260
301
  }
261
302
  });
262
303
 
@@ -279,6 +320,7 @@ export const ApiController = {
279
320
 
280
321
  async searchWallet({ search }: Pick<ApiGetWalletsRequest, 'search'>) {
281
322
  const { includeWalletIds, excludeWalletIds } = OptionsController.state;
323
+ const chains = CoreHelperUtil.getRequestedCaipNetworkIds();
282
324
  state.search = [];
283
325
  const response = await api.get<ApiGetWalletsResponse>({
284
326
  path: '/getWallets',
@@ -289,7 +331,8 @@ export const ApiController = {
289
331
  entries: String(defaultEntries),
290
332
  search,
291
333
  include: includeWalletIds?.join(','),
292
- exclude: excludeWalletIds?.join(',')
334
+ exclude: excludeWalletIds?.join(','),
335
+ chains: chains.join(',')
293
336
  }
294
337
  });
295
338
 
@@ -324,7 +367,7 @@ export const ApiController = {
324
367
 
325
368
  if (update) {
326
369
  await StorageUtil.setRecentWallets(updatedRecent);
327
- ConnectionController.setRecentWallets(updatedRecent);
370
+ WcController.setRecentWallets(updatedRecent);
328
371
  }
329
372
  },
330
373
 
@@ -339,7 +382,7 @@ export const ApiController = {
339
382
  ApiController.fetchFeaturedWallets(),
340
383
  ApiController.fetchRecommendedWallets(),
341
384
  ApiController.fetchNetworkImages(),
342
- ApiController.fetchConnectorImages()
385
+ ApiController.fetchCustomWalletImages()
343
386
  ];
344
387
  if (OptionsController.state.enableAnalytics === undefined) {
345
388
  promises.push(ApiController.fetchAnalyticsConfig());
@@ -4,7 +4,6 @@ import { proxy } from 'valtio';
4
4
  export interface AssetControllerState {
5
5
  walletImages: Record<string, string>;
6
6
  networkImages: Record<string, string>;
7
- connectorImages: Record<string, string>;
8
7
  tokenImages: Record<string, string>;
9
8
  }
10
9
 
@@ -12,7 +11,6 @@ export interface AssetControllerState {
12
11
  const state = proxy<AssetControllerState>({
13
12
  walletImages: {},
14
13
  networkImages: {},
15
- connectorImages: {},
16
14
  tokenImages: {}
17
15
  });
18
16
 
@@ -28,10 +26,6 @@ export const AssetController = {
28
26
  state.networkImages[key] = value;
29
27
  },
30
28
 
31
- setConnectorImage(key: string, value: string) {
32
- state.connectorImages[key] = value;
33
- },
34
-
35
29
  setTokenImage(key: string, value: string) {
36
30
  state.tokenImages[key] = value;
37
31
  }