@reown/appkit-core-react-native 0.0.0-feat-swaps-20250114204346 → 0.0.0-feat-theme-20250116191337
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.
- package/lib/commonjs/controllers/BlockchainApiController.js +22 -98
- package/lib/commonjs/controllers/BlockchainApiController.js.map +1 -1
- package/lib/commonjs/controllers/SwapController.js +4 -4
- package/lib/commonjs/controllers/ThemeController.js +1 -1
- package/lib/commonjs/controllers/ThemeController.js.map +1 -1
- package/lib/commonjs/utils/ConnectionUtil.js +0 -1
- package/lib/commonjs/utils/ConnectionUtil.js.map +1 -1
- package/lib/commonjs/utils/ConstantsUtil.js +1 -1
- package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
- package/lib/commonjs/utils/SwapCalculationUtil.js +2 -2
- package/lib/module/controllers/BlockchainApiController.js +22 -98
- package/lib/module/controllers/BlockchainApiController.js.map +1 -1
- package/lib/module/controllers/SwapController.js +4 -4
- package/lib/module/controllers/ThemeController.js +1 -1
- package/lib/module/controllers/ThemeController.js.map +1 -1
- package/lib/module/utils/ConnectionUtil.js +0 -1
- package/lib/module/utils/ConnectionUtil.js.map +1 -1
- package/lib/module/utils/ConstantsUtil.js +1 -1
- package/lib/module/utils/ConstantsUtil.js.map +1 -1
- package/lib/module/utils/SwapCalculationUtil.js +2 -2
- package/lib/typescript/controllers/BlockchainApiController.d.ts.map +1 -1
- package/lib/typescript/controllers/ThemeController.d.ts +2 -2
- package/lib/typescript/controllers/ThemeController.d.ts.map +1 -1
- package/lib/typescript/utils/ConnectionUtil.d.ts.map +1 -1
- package/lib/typescript/utils/TypeUtil.d.ts +6 -9
- package/lib/typescript/utils/TypeUtil.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/controllers/BlockchainApiController.ts +21 -76
- package/src/controllers/SwapController.ts +4 -4
- package/src/controllers/ThemeController.ts +3 -3
- package/src/utils/ConnectionUtil.ts +0 -1
- package/src/utils/ConstantsUtil.ts +1 -1
- package/src/utils/SwapCalculationUtil.ts +2 -2
- package/src/utils/TypeUtil.ts +11 -13
package/src/utils/TypeUtil.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type EventEmitter } from 'events';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
Balance,
|
|
4
|
+
SocialProvider,
|
|
5
|
+
ThemeMode,
|
|
6
|
+
Transaction
|
|
7
|
+
} from '@reown/appkit-common-react-native';
|
|
3
8
|
|
|
4
9
|
export interface BaseError {
|
|
5
10
|
message?: string;
|
|
@@ -63,6 +68,8 @@ export type SdkVersion =
|
|
|
63
68
|
| `react-native-ethers5-${string}`
|
|
64
69
|
| `react-native-ethers-${string}`;
|
|
65
70
|
|
|
71
|
+
type EnabledSocials = Exclude<SocialProvider, 'farcaster'>;
|
|
72
|
+
|
|
66
73
|
export type Features = {
|
|
67
74
|
/**
|
|
68
75
|
* @description Enable or disable the swaps feature. Enabled by default.
|
|
@@ -81,9 +88,9 @@ export type Features = {
|
|
|
81
88
|
emailShowWallets?: boolean;
|
|
82
89
|
/**
|
|
83
90
|
* @description Enable or disable the socials feature. Enabled by default.
|
|
84
|
-
* @type {
|
|
91
|
+
* @type {EnabledSocials[]}
|
|
85
92
|
*/
|
|
86
|
-
socials?:
|
|
93
|
+
socials?: EnabledSocials[] | false;
|
|
87
94
|
};
|
|
88
95
|
|
|
89
96
|
// -- ApiController Types -------------------------------------------------------
|
|
@@ -138,14 +145,6 @@ export type RequestCache =
|
|
|
138
145
|
| 'only-if-cached'
|
|
139
146
|
| 'reload';
|
|
140
147
|
|
|
141
|
-
// -- ThemeController Types ---------------------------------------------------
|
|
142
|
-
|
|
143
|
-
export type ThemeMode = 'dark' | 'light';
|
|
144
|
-
|
|
145
|
-
export interface ThemeVariables {
|
|
146
|
-
accent?: string;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
148
|
// -- BlockchainApiController Types ---------------------------------------------
|
|
150
149
|
export interface BlockchainApiIdentityRequest {
|
|
151
150
|
address: string;
|
|
@@ -652,7 +651,7 @@ export type Event =
|
|
|
652
651
|
|
|
653
652
|
// -- Send Controller Types -------------------------------------
|
|
654
653
|
export type EstimateGasTransactionArgs = {
|
|
655
|
-
chainNamespace?:
|
|
654
|
+
chainNamespace?: 'eip155';
|
|
656
655
|
address: `0x${string}`;
|
|
657
656
|
to: `0x${string}`;
|
|
658
657
|
data: `0x${string}`;
|
|
@@ -713,7 +712,6 @@ export interface AppKitFrameProvider {
|
|
|
713
712
|
getSecureSiteURL(): string;
|
|
714
713
|
getSecureSiteDashboardURL(): string;
|
|
715
714
|
getSecureSiteIconURL(): string;
|
|
716
|
-
getSecureSiteHeaders(): Record<string, string>;
|
|
717
715
|
getEmail(): string | undefined;
|
|
718
716
|
getUsername(): string | undefined;
|
|
719
717
|
getLastUsedChainId(): Promise<number | undefined>;
|