@reown/appkit-core-react-native 0.0.0-feat-multichain-20250804182547 → 0.0.0-feat-multichain-20250808214347

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 (98) hide show
  1. package/lib/commonjs/controllers/ApiController.js +1 -1
  2. package/lib/commonjs/controllers/ApiController.js.map +1 -1
  3. package/lib/commonjs/controllers/BlockchainApiController.js +0 -2
  4. package/lib/commonjs/controllers/BlockchainApiController.js.map +1 -1
  5. package/lib/commonjs/controllers/OnRampController.js +3 -3
  6. package/lib/commonjs/controllers/OnRampController.js.map +1 -1
  7. package/lib/commonjs/controllers/OptionsController.js.map +1 -1
  8. package/lib/commonjs/controllers/RouterController.js.map +1 -1
  9. package/lib/commonjs/controllers/SwapController.js.map +1 -1
  10. package/lib/commonjs/controllers/WcController.js.map +1 -1
  11. package/lib/commonjs/utils/AssetUtil.js.map +1 -1
  12. package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
  13. package/lib/commonjs/utils/CoreHelperUtil.js.map +1 -1
  14. package/lib/commonjs/utils/StorageUtil.js.map +1 -1
  15. package/lib/commonjs/utils/SwapApiUtil.js.map +1 -1
  16. package/lib/commonjs/utils/SwapCalculationUtil.js.map +1 -1
  17. package/lib/module/controllers/ApiController.js +1 -1
  18. package/lib/module/controllers/ApiController.js.map +1 -1
  19. package/lib/module/controllers/BlockchainApiController.js +0 -2
  20. package/lib/module/controllers/BlockchainApiController.js.map +1 -1
  21. package/lib/module/controllers/OnRampController.js +1 -1
  22. package/lib/module/controllers/OnRampController.js.map +1 -1
  23. package/lib/module/controllers/OptionsController.js.map +1 -1
  24. package/lib/module/controllers/RouterController.js.map +1 -1
  25. package/lib/module/controllers/SwapController.js.map +1 -1
  26. package/lib/module/controllers/WcController.js.map +1 -1
  27. package/lib/module/index.js +2 -0
  28. package/lib/module/index.js.map +1 -1
  29. package/lib/module/utils/AssetUtil.js.map +1 -1
  30. package/lib/module/utils/ConstantsUtil.js.map +1 -1
  31. package/lib/module/utils/CoreHelperUtil.js +1 -0
  32. package/lib/module/utils/CoreHelperUtil.js.map +1 -1
  33. package/lib/module/utils/StorageUtil.js +0 -1
  34. package/lib/module/utils/StorageUtil.js.map +1 -1
  35. package/lib/module/utils/SwapApiUtil.js.map +1 -1
  36. package/lib/module/utils/SwapCalculationUtil.js +1 -0
  37. package/lib/module/utils/SwapCalculationUtil.js.map +1 -1
  38. package/lib/typescript/controllers/ApiController.d.ts +1 -1
  39. package/lib/typescript/controllers/ApiController.d.ts.map +1 -1
  40. package/lib/typescript/controllers/BlockchainApiController.d.ts +4 -3
  41. package/lib/typescript/controllers/BlockchainApiController.d.ts.map +1 -1
  42. package/lib/typescript/controllers/EnsController.d.ts +1 -1
  43. package/lib/typescript/controllers/EventsController.d.ts +1 -1
  44. package/lib/typescript/controllers/EventsController.d.ts.map +1 -1
  45. package/lib/typescript/controllers/OnRampController.d.ts +2 -2
  46. package/lib/typescript/controllers/OnRampController.d.ts.map +1 -1
  47. package/lib/typescript/controllers/OptionsController.d.ts +1 -2
  48. package/lib/typescript/controllers/OptionsController.d.ts.map +1 -1
  49. package/lib/typescript/controllers/RouterController.d.ts +1 -2
  50. package/lib/typescript/controllers/RouterController.d.ts.map +1 -1
  51. package/lib/typescript/controllers/SwapController.d.ts +1 -2
  52. package/lib/typescript/controllers/SwapController.d.ts.map +1 -1
  53. package/lib/typescript/controllers/WcController.d.ts +1 -2
  54. package/lib/typescript/controllers/WcController.d.ts.map +1 -1
  55. package/lib/typescript/index.d.ts +0 -1
  56. package/lib/typescript/index.d.ts.map +1 -1
  57. package/lib/typescript/utils/AssetUtil.d.ts +1 -2
  58. package/lib/typescript/utils/AssetUtil.d.ts.map +1 -1
  59. package/lib/typescript/utils/ConstantsUtil.d.ts +1 -1
  60. package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
  61. package/lib/typescript/utils/CoreHelperUtil.d.ts +1 -2
  62. package/lib/typescript/utils/CoreHelperUtil.d.ts.map +1 -1
  63. package/lib/typescript/utils/EventUtil.d.ts +1 -1
  64. package/lib/typescript/utils/EventUtil.d.ts.map +1 -1
  65. package/lib/typescript/utils/FetchUtil.d.ts +1 -1
  66. package/lib/typescript/utils/FetchUtil.d.ts.map +1 -1
  67. package/lib/typescript/utils/StorageUtil.d.ts +1 -2
  68. package/lib/typescript/utils/StorageUtil.d.ts.map +1 -1
  69. package/lib/typescript/utils/SwapApiUtil.d.ts +2 -3
  70. package/lib/typescript/utils/SwapApiUtil.d.ts.map +1 -1
  71. package/lib/typescript/utils/SwapCalculationUtil.d.ts +1 -1
  72. package/lib/typescript/utils/SwapCalculationUtil.d.ts.map +1 -1
  73. package/package.json +2 -2
  74. package/src/controllers/ApiController.ts +8 -8
  75. package/src/controllers/BlockchainApiController.ts +5 -5
  76. package/src/controllers/EnsController.ts +1 -1
  77. package/src/controllers/EventsController.ts +1 -1
  78. package/src/controllers/OnRampController.ts +1 -1
  79. package/src/controllers/OptionsController.ts +10 -2
  80. package/src/controllers/RouterController.ts +6 -3
  81. package/src/controllers/SwapController.ts +3 -2
  82. package/src/controllers/WcController.ts +1 -2
  83. package/src/index.ts +1 -1
  84. package/src/utils/AssetUtil.ts +1 -2
  85. package/src/utils/ConstantsUtil.ts +1 -2
  86. package/src/utils/CoreHelperUtil.ts +3 -2
  87. package/src/utils/EventUtil.ts +1 -1
  88. package/src/utils/FetchUtil.ts +1 -1
  89. package/src/utils/StorageUtil.ts +6 -8
  90. package/src/utils/SwapApiUtil.ts +6 -2
  91. package/src/utils/SwapCalculationUtil.ts +1 -2
  92. package/lib/commonjs/utils/TypeUtil.js +0 -27
  93. package/lib/commonjs/utils/TypeUtil.js.map +0 -1
  94. package/lib/module/utils/TypeUtil.js +0 -22
  95. package/lib/module/utils/TypeUtil.js.map +0 -1
  96. package/lib/typescript/utils/TypeUtil.d.ts +0 -688
  97. package/lib/typescript/utils/TypeUtil.d.ts.map +0 -1
  98. package/src/utils/TypeUtil.ts +0 -878
@@ -33,12 +33,13 @@ import type {
33
33
  BlockchainApiOnRampWidgetRequest,
34
34
  BlockchainApiOnRampQuotesRequest,
35
35
  OnRampFiatLimit,
36
- OnRampCountryDefaults
37
- } from '../utils/TypeUtil';
36
+ OnRampCountryDefaults,
37
+ CaipAddress,
38
+ CaipNetworkId
39
+ } from '@reown/appkit-common-react-native';
38
40
  import { OptionsController } from './OptionsController';
39
41
  import { ConstantsUtil } from '../utils/ConstantsUtil';
40
42
  import { ApiUtil } from '../utils/ApiUtil';
41
- import type { CaipAddress, CaipNetworkId } from '@reown/appkit-common-react-native';
42
43
 
43
44
  import { SnackController } from './SnackController';
44
45
 
@@ -117,7 +118,7 @@ export const BlockchainApiController = {
117
118
  },
118
119
 
119
120
  async fetchTransactions(params: BlockchainApiTransactionsRequest) {
120
- const { account, projectId, cursor, onramp, signal, cache, chainId } = params;
121
+ const { account, projectId, cursor, signal, cache, chainId } = params;
121
122
  const isSupported = await BlockchainApiController.isNetworkSupported(chainId);
122
123
 
123
124
  if (!isSupported) {
@@ -130,7 +131,6 @@ export const BlockchainApiController = {
130
131
  params: {
131
132
  projectId,
132
133
  cursor,
133
- onramp,
134
134
  chainId
135
135
  },
136
136
  signal,
@@ -1,7 +1,7 @@
1
1
  import { subscribeKey as subKey } from 'valtio/utils';
2
2
  import { proxy, subscribe as sub } from 'valtio';
3
3
  import { BlockchainApiController } from './BlockchainApiController';
4
- import type { BlockchainApiEnsError } from '../utils/TypeUtil';
4
+ import type { BlockchainApiEnsError } from '@reown/appkit-common-react-native';
5
5
 
6
6
  // -- Types --------------------------------------------- //
7
7
 
@@ -3,7 +3,7 @@ import { ApiController } from './ApiController';
3
3
  import { OptionsController } from './OptionsController';
4
4
  import { CoreHelperUtil } from '../utils/CoreHelperUtil';
5
5
  import { FetchUtil } from '../utils/FetchUtil';
6
- import type { Event, EventName } from '../utils/TypeUtil';
6
+ import type { Event, EventName } from '@reown/appkit-common-react-native';
7
7
 
8
8
  // -- Helpers ------------------------------------------- //
9
9
  const baseUrl = CoreHelperUtil.getAnalyticsUrl();
@@ -12,7 +12,7 @@ import {
12
12
  type OnRampErrorTypeValues,
13
13
  type OnRampCountryDefaults,
14
14
  BlockchainOnRampError
15
- } from '../utils/TypeUtil';
15
+ } from '@reown/appkit-common-react-native';
16
16
 
17
17
  import { CoreHelperUtil } from '../utils/CoreHelperUtil';
18
18
  import { OptionsController } from './OptionsController';
@@ -1,6 +1,14 @@
1
1
  import { proxy, ref } from 'valtio';
2
- import type { Storage, Metadata, AppKitNetwork } from '@reown/appkit-common-react-native';
3
- import type { CustomWallet, Features, ProjectId, SdkType, SdkVersion } from '../utils/TypeUtil';
2
+ import type {
3
+ Storage,
4
+ Metadata,
5
+ AppKitNetwork,
6
+ CustomWallet,
7
+ Features,
8
+ ProjectId,
9
+ SdkType,
10
+ SdkVersion
11
+ } from '@reown/appkit-common-react-native';
4
12
 
5
13
  import { ConstantsUtil } from '../utils/ConstantsUtil';
6
14
 
@@ -1,7 +1,10 @@
1
1
  import { proxy } from 'valtio';
2
- import type { AppKitNetwork, SocialProvider } from '@reown/appkit-common-react-native';
3
-
4
- import type { WcWallet, OnRampTransactionResult } from '../utils/TypeUtil';
2
+ import type {
3
+ AppKitNetwork,
4
+ SocialProvider,
5
+ WcWallet,
6
+ OnRampTransactionResult
7
+ } from '@reown/appkit-common-react-native';
5
8
 
6
9
  // -- Types --------------------------------------------- //
7
10
  export interface RouterControllerState {
@@ -3,7 +3,9 @@ import { proxy, subscribe as sub } from 'valtio';
3
3
  import {
4
4
  NumberUtil,
5
5
  type CaipAddress,
6
- type CaipNetworkId
6
+ type CaipNetworkId,
7
+ type SwapInputTarget,
8
+ type SwapTokenWithBalance
7
9
  } from '@reown/appkit-common-react-native';
8
10
 
9
11
  import { ConstantsUtil } from '../utils/ConstantsUtil';
@@ -13,7 +15,6 @@ import { OptionsController } from './OptionsController';
13
15
  import { SwapCalculationUtil } from '../utils/SwapCalculationUtil';
14
16
  import { SnackController } from './SnackController';
15
17
  import { RouterController } from './RouterController';
16
- import type { SwapInputTarget, SwapTokenWithBalance } from '../utils/TypeUtil';
17
18
  import { CoreHelperUtil } from '../utils/CoreHelperUtil';
18
19
  import { TransactionsController } from './TransactionsController';
19
20
  import { EventsController } from './EventsController';
@@ -1,9 +1,8 @@
1
1
  import { proxy } from 'valtio';
2
2
  import { subscribeKey as subKey } from 'valtio/utils';
3
- import type { WalletDeepLink } from '@reown/appkit-common-react-native';
3
+ import type { WalletDeepLink, WcWallet } from '@reown/appkit-common-react-native';
4
4
  import { CoreHelperUtil } from '../utils/CoreHelperUtil';
5
5
  import { StorageUtil } from '../utils/StorageUtil';
6
- import type { WcWallet } from '../utils/TypeUtil';
7
6
 
8
7
  // -- Types --------------------------------------------- //
9
8
  export interface WcControllerState {
package/src/index.ts CHANGED
@@ -55,4 +55,4 @@ export { StorageUtil } from './utils/StorageUtil';
55
55
  export { EventUtil } from './utils/EventUtil';
56
56
  export { RouterUtil } from './utils/RouterUtil';
57
57
 
58
- export type * from './utils/TypeUtil';
58
+ // Types are now exported from @reown/appkit-common-react-native
@@ -1,6 +1,5 @@
1
- import type { AppKitNetwork } from '@reown/appkit-common-react-native';
1
+ import type { AppKitNetwork, WcWallet } from '@reown/appkit-common-react-native';
2
2
  import { AssetController } from '../controllers/AssetController';
3
- import type { WcWallet } from './TypeUtil';
4
3
 
5
4
  export const AssetUtil = {
6
5
  getWalletImage(wallet?: WcWallet) {
@@ -1,5 +1,4 @@
1
- import type { ChainNamespace } from '@reown/appkit-common-react-native';
2
- import type { Features } from './TypeUtil';
1
+ import type { ChainNamespace, Features } from '@reown/appkit-common-react-native';
3
2
 
4
3
  const defaultFeatures: Features = {
5
4
  swaps: true,
@@ -10,13 +10,14 @@ import {
10
10
  type CaipNetwork,
11
11
  type ChainNamespace,
12
12
  type SocialProvider,
13
- type LinkingRecord
13
+ type LinkingRecord,
14
+ type DataWallet,
15
+ type SdkVersion
14
16
  } from '@reown/appkit-common-react-native';
15
17
 
16
18
  import * as ct from 'countries-and-timezones';
17
19
 
18
20
  import { ConstantsUtil } from './ConstantsUtil';
19
- import type { DataWallet, SdkVersion } from './TypeUtil';
20
21
 
21
22
  // -- Helpers -----------------------------------------------------------------
22
23
  async function isAppInstalledIos(deepLink?: string): Promise<boolean> {
@@ -1,4 +1,4 @@
1
- import type { Platform, WcWallet } from './TypeUtil';
1
+ import type { Platform, WcWallet } from '@reown/appkit-common-react-native';
2
2
 
3
3
  export const EventUtil = {
4
4
  getWalletPlatform(wallet: WcWallet, installed?: boolean): Platform | undefined {
@@ -1,4 +1,4 @@
1
- import type { RequestCache } from './TypeUtil';
1
+ import type { RequestCache } from '@reown/appkit-common-react-native';
2
2
 
3
3
  // -- Types ----------------------------------------------------------------------
4
4
  interface Options {
@@ -1,13 +1,11 @@
1
1
  /* eslint-disable no-console */
2
- import type {
3
- OnRampCountry,
4
- OnRampFiatCurrency,
5
- OnRampFiatLimit,
6
- OnRampServiceProvider,
7
- OnRampCountryDefaults,
8
- WcWallet
9
- } from './TypeUtil';
10
2
  import {
3
+ type OnRampCountry,
4
+ type OnRampFiatCurrency,
5
+ type OnRampFiatLimit,
6
+ type OnRampServiceProvider,
7
+ type OnRampCountryDefaults,
8
+ type WcWallet,
11
9
  DateUtil,
12
10
  type ConnectorType,
13
11
  type ChainNamespace,
@@ -1,7 +1,11 @@
1
- import type { Balance, CaipNetworkId } from '@reown/appkit-common-react-native';
1
+ import type {
2
+ Balance,
3
+ CaipNetworkId,
4
+ BlockchainApiSwapAllowanceRequest,
5
+ SwapTokenWithBalance
6
+ } from '@reown/appkit-common-react-native';
2
7
  import { BlockchainApiController } from '../controllers/BlockchainApiController';
3
8
  import { OptionsController } from '../controllers/OptionsController';
4
- import type { BlockchainApiSwapAllowanceRequest, SwapTokenWithBalance } from './TypeUtil';
5
9
  import { ConnectionsController } from '../controllers/ConnectionsController';
6
10
  import { ConstantsUtil } from './ConstantsUtil';
7
11
 
@@ -1,7 +1,6 @@
1
1
  // -- Types --------------------------------------------- //
2
2
 
3
- import { NumberUtil } from '@reown/appkit-common-react-native';
4
- import type { SwapTokenWithBalance } from './TypeUtil';
3
+ import { NumberUtil, type SwapTokenWithBalance } from '@reown/appkit-common-react-native';
5
4
 
6
5
  // -- Util ---------------------------------------- //
7
6
  export const SwapCalculationUtil = {
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BlockchainOnRampError = void 0;
7
- // -- ApiController Types -------------------------------------------------------
8
-
9
- // -- BlockchainApiController Types ---------------------------------------------
10
-
11
- class BlockchainOnRampError extends Error {
12
- constructor(code, message) {
13
- super(message);
14
- this.code = code;
15
- this.message = message;
16
- }
17
- }
18
-
19
- // -- OptionsController Types ---------------------------------------------------
20
-
21
- // -- EventsController Types ----------------------------------------------------
22
-
23
- // -- Swap Controller Types -------------------------------------
24
-
25
- // -- OnRamp Controller Types ------------------------------------------------
26
- exports.BlockchainOnRampError = BlockchainOnRampError;
27
- //# sourceMappingURL=TypeUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["BlockchainOnRampError","Error","constructor","code","message","exports"],"sourceRoot":"../../../src","sources":["utils/TypeUtil.ts"],"mappings":";;;;;;AAwEA;;AAoDA;;AA2MO,MAAMA,qBAAqB,SAASC,KAAK,CAAC;EAE/CC,WAAWA,CAACC,IAAY,EAAEC,OAAe,EAAE;IACzC,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,OAAO,GAAGA,OAAO;EACxB;AACF;;AAEA;;AA4BA;;AA0YA;;AAqBA;AAAAC,OAAA,CAAAL,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- // -- ApiController Types -------------------------------------------------------
4
-
5
- // -- BlockchainApiController Types ---------------------------------------------
6
-
7
- export class BlockchainOnRampError extends Error {
8
- constructor(code, message) {
9
- super(message);
10
- this.code = code;
11
- this.message = message;
12
- }
13
- }
14
-
15
- // -- OptionsController Types ---------------------------------------------------
16
-
17
- // -- EventsController Types ----------------------------------------------------
18
-
19
- // -- Swap Controller Types -------------------------------------
20
-
21
- // -- OnRamp Controller Types ------------------------------------------------
22
- //# sourceMappingURL=TypeUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["BlockchainOnRampError","Error","constructor","code","message"],"sourceRoot":"../../../src","sources":["utils/TypeUtil.ts"],"mappings":";;AAwEA;;AAoDA;;AA2MA,OAAO,MAAMA,qBAAqB,SAASC,KAAK,CAAC;EAE/CC,WAAWA,CAACC,IAAY,EAAEC,OAAe,EAAE;IACzC,KAAK,CAACA,OAAO,CAAC;IACd,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,OAAO,GAAGA,OAAO;EACxB;AACF;;AAEA;;AA4BA;;AA0YA;;AAqBA","ignoreList":[]}