@reown/appkit-core-react-native 2.0.0-alpha.2 → 2.0.0-alpha.4

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 (139) hide show
  1. package/lib/commonjs/controllers/ApiController.js +56 -30
  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 +0 -2
  6. package/lib/commonjs/controllers/BlockchainApiController.js.map +1 -1
  7. package/lib/commonjs/controllers/ConnectionsController.js +0 -15
  8. package/lib/commonjs/controllers/ConnectionsController.js.map +1 -1
  9. package/lib/commonjs/controllers/OnRampController.js +3 -3
  10. package/lib/commonjs/controllers/OnRampController.js.map +1 -1
  11. package/lib/commonjs/controllers/OptionsController.js +5 -4
  12. package/lib/commonjs/controllers/OptionsController.js.map +1 -1
  13. package/lib/commonjs/controllers/RouterController.js +8 -2
  14. package/lib/commonjs/controllers/RouterController.js.map +1 -1
  15. package/lib/commonjs/controllers/SwapController.js +3 -1
  16. package/lib/commonjs/controllers/SwapController.js.map +1 -1
  17. package/lib/commonjs/controllers/WcController.js +73 -0
  18. package/lib/commonjs/controllers/WcController.js.map +1 -0
  19. package/lib/commonjs/index.js +14 -7
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/utils/AssetUtil.js +9 -7
  22. package/lib/commonjs/utils/AssetUtil.js.map +1 -1
  23. package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
  24. package/lib/commonjs/utils/CoreHelperUtil.js +7 -0
  25. package/lib/commonjs/utils/CoreHelperUtil.js.map +1 -1
  26. package/lib/commonjs/utils/StorageUtil.js +0 -46
  27. package/lib/commonjs/utils/StorageUtil.js.map +1 -1
  28. package/lib/commonjs/utils/SwapApiUtil.js.map +1 -1
  29. package/lib/commonjs/utils/SwapCalculationUtil.js.map +1 -1
  30. package/lib/commonjs/utils/WalletUtil.js +23 -0
  31. package/lib/commonjs/utils/WalletUtil.js.map +1 -0
  32. package/lib/module/controllers/ApiController.js +56 -29
  33. package/lib/module/controllers/ApiController.js.map +1 -1
  34. package/lib/module/controllers/AssetController.js +0 -4
  35. package/lib/module/controllers/AssetController.js.map +1 -1
  36. package/lib/module/controllers/BlockchainApiController.js +0 -2
  37. package/lib/module/controllers/BlockchainApiController.js.map +1 -1
  38. package/lib/module/controllers/ConnectionsController.js +0 -15
  39. package/lib/module/controllers/ConnectionsController.js.map +1 -1
  40. package/lib/module/controllers/OnRampController.js +1 -1
  41. package/lib/module/controllers/OnRampController.js.map +1 -1
  42. package/lib/module/controllers/OptionsController.js +5 -4
  43. package/lib/module/controllers/OptionsController.js.map +1 -1
  44. package/lib/module/controllers/RouterController.js +8 -2
  45. package/lib/module/controllers/RouterController.js.map +1 -1
  46. package/lib/module/controllers/SwapController.js +3 -1
  47. package/lib/module/controllers/SwapController.js.map +1 -1
  48. package/lib/module/controllers/WcController.js +70 -0
  49. package/lib/module/controllers/WcController.js.map +1 -0
  50. package/lib/module/index.js +4 -1
  51. package/lib/module/index.js.map +1 -1
  52. package/lib/module/utils/AssetUtil.js +9 -7
  53. package/lib/module/utils/AssetUtil.js.map +1 -1
  54. package/lib/module/utils/ConstantsUtil.js.map +1 -1
  55. package/lib/module/utils/CoreHelperUtil.js +8 -0
  56. package/lib/module/utils/CoreHelperUtil.js.map +1 -1
  57. package/lib/module/utils/StorageUtil.js +0 -47
  58. package/lib/module/utils/StorageUtil.js.map +1 -1
  59. package/lib/module/utils/SwapApiUtil.js.map +1 -1
  60. package/lib/module/utils/SwapCalculationUtil.js +1 -0
  61. package/lib/module/utils/SwapCalculationUtil.js.map +1 -1
  62. package/lib/module/utils/WalletUtil.js +19 -0
  63. package/lib/module/utils/WalletUtil.js.map +1 -0
  64. package/lib/typescript/controllers/ApiController.d.ts +1 -3
  65. package/lib/typescript/controllers/ApiController.d.ts.map +1 -1
  66. package/lib/typescript/controllers/AssetController.d.ts +0 -2
  67. package/lib/typescript/controllers/AssetController.d.ts.map +1 -1
  68. package/lib/typescript/controllers/BlockchainApiController.d.ts +4 -3
  69. package/lib/typescript/controllers/BlockchainApiController.d.ts.map +1 -1
  70. package/lib/typescript/controllers/ConnectionsController.d.ts.map +1 -1
  71. package/lib/typescript/controllers/EnsController.d.ts +1 -1
  72. package/lib/typescript/controllers/EventsController.d.ts +1 -1
  73. package/lib/typescript/controllers/EventsController.d.ts.map +1 -1
  74. package/lib/typescript/controllers/OnRampController.d.ts +2 -2
  75. package/lib/typescript/controllers/OnRampController.d.ts.map +1 -1
  76. package/lib/typescript/controllers/OptionsController.d.ts +3 -4
  77. package/lib/typescript/controllers/OptionsController.d.ts.map +1 -1
  78. package/lib/typescript/controllers/RouterController.d.ts +4 -6
  79. package/lib/typescript/controllers/RouterController.d.ts.map +1 -1
  80. package/lib/typescript/controllers/SwapController.d.ts +1 -2
  81. package/lib/typescript/controllers/SwapController.d.ts.map +1 -1
  82. package/lib/typescript/controllers/WcController.d.ts +27 -0
  83. package/lib/typescript/controllers/WcController.d.ts.map +1 -0
  84. package/lib/typescript/index.d.ts +2 -2
  85. package/lib/typescript/index.d.ts.map +1 -1
  86. package/lib/typescript/utils/AssetUtil.d.ts +3 -3
  87. package/lib/typescript/utils/AssetUtil.d.ts.map +1 -1
  88. package/lib/typescript/utils/ConstantsUtil.d.ts +1 -1
  89. package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
  90. package/lib/typescript/utils/CoreHelperUtil.d.ts +2 -2
  91. package/lib/typescript/utils/CoreHelperUtil.d.ts.map +1 -1
  92. package/lib/typescript/utils/EventUtil.d.ts +1 -1
  93. package/lib/typescript/utils/EventUtil.d.ts.map +1 -1
  94. package/lib/typescript/utils/FetchUtil.d.ts +1 -1
  95. package/lib/typescript/utils/FetchUtil.d.ts.map +1 -1
  96. package/lib/typescript/utils/StorageUtil.d.ts +1 -8
  97. package/lib/typescript/utils/StorageUtil.d.ts.map +1 -1
  98. package/lib/typescript/utils/SwapApiUtil.d.ts +2 -3
  99. package/lib/typescript/utils/SwapApiUtil.d.ts.map +1 -1
  100. package/lib/typescript/utils/SwapCalculationUtil.d.ts +1 -1
  101. package/lib/typescript/utils/SwapCalculationUtil.d.ts.map +1 -1
  102. package/lib/typescript/utils/WalletUtil.d.ts +5 -0
  103. package/lib/typescript/utils/WalletUtil.d.ts.map +1 -0
  104. package/package.json +2 -2
  105. package/src/controllers/ApiController.ts +61 -36
  106. package/src/controllers/AssetController.ts +0 -6
  107. package/src/controllers/BlockchainApiController.ts +5 -5
  108. package/src/controllers/ConnectionsController.ts +0 -22
  109. package/src/controllers/EnsController.ts +1 -1
  110. package/src/controllers/EventsController.ts +1 -1
  111. package/src/controllers/OnRampController.ts +1 -1
  112. package/src/controllers/OptionsController.ts +17 -8
  113. package/src/controllers/RouterController.ts +20 -8
  114. package/src/controllers/SwapController.ts +4 -3
  115. package/src/controllers/WcController.ts +93 -0
  116. package/src/index.ts +3 -6
  117. package/src/utils/AssetUtil.ts +11 -8
  118. package/src/utils/ConstantsUtil.ts +1 -2
  119. package/src/utils/CoreHelperUtil.ts +13 -2
  120. package/src/utils/EventUtil.ts +1 -1
  121. package/src/utils/FetchUtil.ts +1 -1
  122. package/src/utils/StorageUtil.ts +6 -76
  123. package/src/utils/SwapApiUtil.ts +6 -2
  124. package/src/utils/SwapCalculationUtil.ts +1 -2
  125. package/src/utils/WalletUtil.ts +14 -0
  126. package/lib/commonjs/controllers/ConnectionController.js +0 -123
  127. package/lib/commonjs/controllers/ConnectionController.js.map +0 -1
  128. package/lib/commonjs/utils/TypeUtil.js +0 -31
  129. package/lib/commonjs/utils/TypeUtil.js.map +0 -1
  130. package/lib/module/controllers/ConnectionController.js +0 -120
  131. package/lib/module/controllers/ConnectionController.js.map +0 -1
  132. package/lib/module/utils/TypeUtil.js +0 -26
  133. package/lib/module/utils/TypeUtil.js.map +0 -1
  134. package/lib/typescript/controllers/ConnectionController.d.ts +0 -55
  135. package/lib/typescript/controllers/ConnectionController.d.ts.map +0 -1
  136. package/lib/typescript/utils/TypeUtil.d.ts +0 -705
  137. package/lib/typescript/utils/TypeUtil.d.ts.map +0 -1
  138. package/src/controllers/ConnectionController.ts +0 -185
  139. package/src/utils/TypeUtil.ts +0 -899
@@ -1,705 +0,0 @@
1
- import type { AccountType, CaipAddress, CaipNetworkId, SocialProvider, Transaction } from '@reown/appkit-common-react-native';
2
- import { OnRampErrorType } from './ConstantsUtil';
3
- export interface BaseError {
4
- message?: string;
5
- }
6
- export type ConnectedWalletInfo = {
7
- name?: string;
8
- icon?: string;
9
- description?: string;
10
- url?: string;
11
- icons?: string[];
12
- redirect?: {
13
- native?: string;
14
- universal?: string;
15
- linkMode?: boolean;
16
- };
17
- [key: string]: unknown;
18
- } | undefined;
19
- export type ProjectId = string;
20
- export type Platform = 'mobile' | 'web' | 'qrcode' | 'email' | 'unsupported';
21
- export type CaipNamespaces = Record<string, {
22
- chains: CaipNetworkId[];
23
- methods: string[];
24
- events: string[];
25
- }>;
26
- export type SdkType = 'appkit';
27
- export type SdkVersion = `react-native-${string}-${string}`;
28
- type EnabledSocials = SocialProvider;
29
- export type Features = {
30
- /**
31
- * @description Enable or disable the swaps feature. Enabled by default.
32
- * @type {boolean}
33
- */
34
- swaps?: boolean;
35
- /**
36
- * @description Enable or disable the onramp feature. Enabled by default.
37
- * @type {boolean}
38
- */
39
- onramp?: boolean;
40
- /**
41
- * @description Show or hide the regular wallet options when socials are enabled. Enabled by default.
42
- * @type {boolean}
43
- */
44
- showWallets?: boolean;
45
- /**
46
- * @description Enable or disable the socials feature. Enabled by default.
47
- * @type {EnabledSocials[]}
48
- */
49
- socials?: EnabledSocials[] | false;
50
- };
51
- export interface WcWallet {
52
- id: string;
53
- name: string;
54
- homepage?: string;
55
- image_id?: string;
56
- image_url?: string;
57
- order?: number;
58
- mobile_link?: string | null;
59
- desktop_link?: string | null;
60
- webapp_link?: string | null;
61
- link_mode?: string | null;
62
- app_store?: string | null;
63
- play_store?: string | null;
64
- }
65
- export interface DataWallet {
66
- id: string;
67
- ios_schema?: string;
68
- android_app_id?: string;
69
- }
70
- export interface ApiGetWalletsRequest {
71
- page: number;
72
- entries: number;
73
- search?: string;
74
- include?: string[];
75
- exclude?: string[];
76
- }
77
- export interface ApiGetWalletsResponse {
78
- data: WcWallet[];
79
- count: number;
80
- }
81
- export interface ApiGetDataWalletsResponse {
82
- data: DataWallet[];
83
- count: number;
84
- }
85
- export interface ApiGetAnalyticsConfigResponse {
86
- isAnalyticsEnabled: boolean;
87
- }
88
- export type RequestCache = 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
89
- export interface BlockchainApiIdentityRequest {
90
- address: `0x${string}`;
91
- }
92
- export interface BlockchainApiIdentityResponse {
93
- avatar: string;
94
- name: string;
95
- }
96
- export interface BlockchainApiBalance {
97
- name: string;
98
- symbol: string;
99
- chainId: string;
100
- address?: CaipAddress;
101
- value?: number;
102
- price: number;
103
- quantity: {
104
- decimals: string;
105
- numeric: string;
106
- };
107
- iconUrl: string;
108
- }
109
- export interface BlockchainApiBalanceResponse {
110
- balances: BlockchainApiBalance[];
111
- }
112
- export interface BlockchainApiTransactionsRequest {
113
- account: string;
114
- projectId: string;
115
- cursor?: string;
116
- onramp?: 'coinbase';
117
- signal?: AbortSignal;
118
- cache?: RequestCache;
119
- chainId: CaipNetworkId;
120
- }
121
- export interface BlockchainApiTransactionsResponse {
122
- data: Transaction[];
123
- next: string | null;
124
- }
125
- export interface BlockchainApiSwapAllowanceResponse {
126
- allowance: string;
127
- }
128
- export interface BlockchainApiGenerateSwapCalldataRequest {
129
- projectId: string;
130
- userAddress: CaipAddress;
131
- from: CaipAddress;
132
- to: CaipAddress;
133
- amount: string;
134
- eip155?: {
135
- slippage: string;
136
- permit?: string;
137
- };
138
- }
139
- export interface BlockchainApiGenerateSwapCalldataResponse {
140
- tx: {
141
- from: CaipAddress;
142
- to: CaipAddress;
143
- data: `0x${string}`;
144
- amount: string;
145
- eip155: {
146
- gas: string;
147
- gasPrice: string;
148
- };
149
- };
150
- }
151
- export interface BlockchainApiGenerateApproveCalldataRequest {
152
- projectId: string;
153
- userAddress: CaipAddress;
154
- from: CaipAddress;
155
- to: CaipAddress;
156
- amount?: number;
157
- }
158
- export interface BlockchainApiGenerateApproveCalldataResponse {
159
- tx: {
160
- from: CaipAddress;
161
- to: CaipAddress;
162
- data: `0x${string}`;
163
- value: string;
164
- eip155: {
165
- gas: number;
166
- gasPrice: string;
167
- };
168
- };
169
- }
170
- export interface BlockchainApiTokenPriceRequest {
171
- projectId: string;
172
- currency?: 'usd' | 'eur' | 'gbp' | 'aud' | 'cad' | 'inr' | 'jpy' | 'btc' | 'eth';
173
- addresses: CaipAddress[];
174
- }
175
- export interface BlockchainApiTokenPriceResponse {
176
- fungibles: {
177
- name: string;
178
- symbol: string;
179
- iconUrl: string;
180
- price: number;
181
- }[];
182
- }
183
- export interface BlockchainApiSwapAllowanceRequest {
184
- projectId: string;
185
- tokenAddress: CaipAddress;
186
- userAddress: CaipAddress;
187
- }
188
- export interface BlockchainApiGasPriceRequest {
189
- projectId: string;
190
- chainId: CaipNetworkId;
191
- }
192
- export interface BlockchainApiGasPriceResponse {
193
- standard: string;
194
- fast: string;
195
- instant: string;
196
- }
197
- export interface BlockchainApiEnsError extends BaseError {
198
- status: string;
199
- reasons: {
200
- name: string;
201
- description: string;
202
- }[];
203
- }
204
- export type ReownName = `${string}.reown.id` | `${string}.wcn.id`;
205
- export interface BlockchainApiLookupEnsName {
206
- name: ReownName;
207
- registered: number;
208
- updated: number;
209
- addresses: Record<string, {
210
- address: string;
211
- created: string;
212
- }>;
213
- attributes: {
214
- avatar?: string;
215
- bio?: string;
216
- }[];
217
- }
218
- export interface BlockchainApiSwapQuoteRequest {
219
- projectId: string;
220
- chainId?: CaipNetworkId;
221
- amount: string;
222
- userAddress: CaipAddress;
223
- from: CaipAddress;
224
- to: CaipAddress;
225
- gasPrice: string;
226
- }
227
- export interface BlockchainApiSwapQuoteResponse {
228
- quotes: {
229
- id: string | null;
230
- fromAmount: string;
231
- fromAccount: string;
232
- toAmount: string;
233
- toAccount: string;
234
- }[];
235
- }
236
- export interface BlockchainApiSwapTokensRequest {
237
- projectId: string;
238
- chainId: CaipNetworkId;
239
- }
240
- export interface BlockchainApiOnRampQuotesRequest {
241
- countryCode: string;
242
- paymentMethodType?: string;
243
- destinationCurrencyCode: string;
244
- sourceAmount: number;
245
- sourceCurrencyCode: string;
246
- walletAddress: string;
247
- excludeProviders?: string[];
248
- }
249
- export interface BlockchainApiSwapTokensResponse {
250
- tokens: SwapToken[];
251
- }
252
- export interface BlockchainApiOnRampWidgetRequest {
253
- countryCode: string;
254
- destinationCurrencyCode: string;
255
- paymentMethodType: string;
256
- serviceProvider: string;
257
- sourceAmount: number;
258
- sourceCurrencyCode: string;
259
- walletAddress: string;
260
- redirectUrl?: string;
261
- }
262
- export type BlockchainApiOnRampWidgetResponse = {
263
- widgetUrl: string;
264
- };
265
- export declare class BlockchainOnRampError extends Error {
266
- code: string;
267
- constructor(code: string, message: string);
268
- }
269
- export interface Token {
270
- address: string;
271
- image?: string;
272
- }
273
- export type CustomWallet = Pick<WcWallet, 'id' | 'name' | 'homepage' | 'image_url' | 'image_id' | 'mobile_link' | 'desktop_link' | 'webapp_link' | 'link_mode' | 'app_store' | 'play_store'>;
274
- export type EventName = 'MODAL_LOADED' | 'MODAL_OPEN' | 'MODAL_CLOSE' | 'CLICK_ALL_WALLETS' | 'CLICK_NETWORKS' | 'SWITCH_NETWORK' | 'SELECT_WALLET' | 'CONNECT_SUCCESS' | 'CONNECT_ERROR' | 'DISCONNECT_SUCCESS' | 'DISCONNECT_ERROR' | 'CLICK_WALLET_HELP' | 'CLICK_NETWORK_HELP' | 'CLICK_GET_WALLET' | 'EMAIL_LOGIN_SELECTED' | 'EMAIL_VERIFICATION_CODE_PASS' | 'EMAIL_VERIFICATION_CODE_FAIL' | 'EMAIL_EDIT' | 'EMAIL_EDIT_COMPLETE' | 'EMAIL_UPGRADE_FROM_MODAL' | 'CLICK_SIGN_SIWE_MESSAGE' | 'CLICK_CANCEL_SIWE' | 'SIWE_AUTH_SUCCESS' | 'SIWE_AUTH_ERROR' | 'CLICK_TRANSACTIONS' | 'ERROR_FETCH_TRANSACTIONS' | 'LOAD_MORE_TRANSACTIONS' | 'OPEN_SEND' | 'OPEN_SWAP' | 'INITIATE_SWAP' | 'SWAP_SUCCESS' | 'SWAP_ERROR' | 'SEND_INITIATED' | 'SEND_SUCCESS' | 'SEND_ERROR' | 'SOCIAL_LOGIN_STARTED' | 'SOCIAL_LOGIN_SUCCESS' | 'SOCIAL_LOGIN_REQUEST_USER_DATA' | 'SOCIAL_LOGIN_CANCELED' | 'SOCIAL_LOGIN_ERROR' | 'SET_PREFERRED_ACCOUNT_TYPE';
275
- export type Event = {
276
- type: 'track';
277
- event: 'MODAL_CREATED';
278
- } | {
279
- type: 'track';
280
- event: 'MODAL_LOADED';
281
- } | {
282
- type: 'track';
283
- event: 'MODAL_OPEN';
284
- properties: {
285
- connected: boolean;
286
- };
287
- } | {
288
- type: 'track';
289
- event: 'MODAL_CLOSE';
290
- properties: {
291
- connected: boolean;
292
- };
293
- } | {
294
- type: 'track';
295
- event: 'CLICK_ALL_WALLETS';
296
- } | {
297
- type: 'track';
298
- event: 'CLICK_NETWORKS';
299
- } | {
300
- type: 'track';
301
- event: 'SWITCH_NETWORK';
302
- properties: {
303
- network: number | string;
304
- };
305
- } | {
306
- type: 'track';
307
- event: 'SELECT_WALLET';
308
- properties: {
309
- name: string;
310
- platform?: Platform;
311
- explorer_id?: string;
312
- };
313
- } | {
314
- type: 'track';
315
- event: 'CONNECT_SUCCESS';
316
- properties: {
317
- name: string;
318
- method: Platform;
319
- explorer_id?: string;
320
- };
321
- } | {
322
- type: 'track';
323
- event: 'CONNECT_ERROR';
324
- properties: {
325
- message: string;
326
- };
327
- } | {
328
- type: 'track';
329
- event: 'DISCONNECT_SUCCESS';
330
- } | {
331
- type: 'track';
332
- event: 'DISCONNECT_ERROR';
333
- } | {
334
- type: 'track';
335
- event: 'CLICK_WALLET_HELP';
336
- } | {
337
- type: 'track';
338
- event: 'CLICK_NETWORK_HELP';
339
- } | {
340
- type: 'track';
341
- event: 'CLICK_GET_WALLET';
342
- } | {
343
- type: 'track';
344
- event: 'EMAIL_LOGIN_SELECTED';
345
- } | {
346
- type: 'track';
347
- event: 'EMAIL_VERIFICATION_CODE_PASS';
348
- } | {
349
- type: 'track';
350
- event: 'EMAIL_VERIFICATION_CODE_FAIL';
351
- } | {
352
- type: 'track';
353
- event: 'EMAIL_EDIT';
354
- } | {
355
- type: 'track';
356
- event: 'EMAIL_EDIT_COMPLETE';
357
- } | {
358
- type: 'track';
359
- event: 'EMAIL_UPGRADE_FROM_MODAL';
360
- } | {
361
- type: 'track';
362
- event: 'CLICK_SIGN_SIWE_MESSAGE';
363
- properties: {
364
- network: string;
365
- isSmartAccount: boolean;
366
- };
367
- } | {
368
- type: 'track';
369
- event: 'CLICK_CANCEL_SIWE';
370
- properties: {
371
- network: string;
372
- isSmartAccount: boolean;
373
- };
374
- } | {
375
- type: 'track';
376
- event: 'SIWE_AUTH_SUCCESS';
377
- properties: {
378
- network: string;
379
- isSmartAccount: boolean;
380
- };
381
- } | {
382
- type: 'track';
383
- event: 'SIWE_AUTH_ERROR';
384
- properties: {
385
- network: string;
386
- isSmartAccount: boolean;
387
- };
388
- } | {
389
- type: 'track';
390
- event: 'CLICK_TRANSACTIONS';
391
- properties: {
392
- isSmartAccount: boolean;
393
- };
394
- } | {
395
- type: 'track';
396
- event: 'ERROR_FETCH_TRANSACTIONS';
397
- properties: {
398
- address: string;
399
- projectId: string;
400
- cursor: string | undefined;
401
- isSmartAccount: boolean;
402
- };
403
- } | {
404
- type: 'track';
405
- event: 'LOAD_MORE_TRANSACTIONS';
406
- properties: {
407
- address: string | undefined;
408
- projectId: string;
409
- cursor: string | undefined;
410
- isSmartAccount: boolean;
411
- };
412
- } | {
413
- type: 'track';
414
- event: 'OPEN_SEND';
415
- properties: {
416
- isSmartAccount: boolean;
417
- network: string;
418
- };
419
- } | {
420
- type: 'track';
421
- event: 'OPEN_SWAP';
422
- properties: {
423
- isSmartAccount: boolean;
424
- network: string;
425
- };
426
- } | {
427
- type: 'track';
428
- event: 'INITIATE_SWAP';
429
- properties: {
430
- isSmartAccount: boolean;
431
- network: string;
432
- swapFromToken: string;
433
- swapToToken: string;
434
- swapFromAmount: string;
435
- swapToAmount: string;
436
- };
437
- } | {
438
- type: 'track';
439
- event: 'SWAP_SUCCESS';
440
- properties: {
441
- isSmartAccount: boolean;
442
- network: string;
443
- swapFromToken: string;
444
- swapToToken: string;
445
- swapFromAmount: string;
446
- swapToAmount: string;
447
- };
448
- } | {
449
- type: 'track';
450
- event: 'SWAP_ERROR';
451
- properties: {
452
- isSmartAccount: boolean;
453
- network: string;
454
- swapFromToken: string;
455
- swapToToken: string;
456
- swapFromAmount: string;
457
- swapToAmount: string;
458
- message: string;
459
- };
460
- } | {
461
- type: 'track';
462
- event: 'SEND_INITIATED';
463
- properties: {
464
- isSmartAccount: boolean;
465
- network: string;
466
- token: string;
467
- amount: number;
468
- };
469
- } | {
470
- type: 'track';
471
- event: 'SEND_SUCCESS';
472
- properties: {
473
- isSmartAccount: boolean;
474
- network: string;
475
- token: string;
476
- amount: number;
477
- };
478
- } | {
479
- type: 'track';
480
- event: 'SEND_ERROR';
481
- properties: {
482
- isSmartAccount: boolean;
483
- network: string;
484
- token: string;
485
- amount: number;
486
- };
487
- } | {
488
- type: 'track';
489
- event: 'SOCIAL_LOGIN_STARTED';
490
- properties: {
491
- provider: SocialProvider;
492
- };
493
- } | {
494
- type: 'track';
495
- event: 'SOCIAL_LOGIN_SUCCESS';
496
- properties: {
497
- provider: SocialProvider;
498
- };
499
- } | {
500
- type: 'track';
501
- event: 'SOCIAL_LOGIN_REQUEST_USER_DATA';
502
- properties: {
503
- provider: SocialProvider;
504
- };
505
- } | {
506
- type: 'track';
507
- event: 'SOCIAL_LOGIN_CANCELED';
508
- properties: {
509
- provider: SocialProvider;
510
- };
511
- } | {
512
- type: 'track';
513
- event: 'SOCIAL_LOGIN_ERROR';
514
- properties: {
515
- provider: SocialProvider;
516
- };
517
- } | {
518
- type: 'track';
519
- event: 'SET_PREFERRED_ACCOUNT_TYPE';
520
- properties: {
521
- accountType: AccountType;
522
- network: string;
523
- };
524
- } | {
525
- type: 'track';
526
- event: 'SELECT_BUY_CRYPTO';
527
- } | {
528
- type: 'track';
529
- event: 'SELECT_BUY_ASSET';
530
- properties: {
531
- asset: string;
532
- };
533
- } | {
534
- type: 'track';
535
- event: 'BUY_SUBMITTED';
536
- properties: {
537
- asset?: string;
538
- network?: string;
539
- amount?: string;
540
- currency?: string;
541
- provider?: string;
542
- serviceProvider?: string;
543
- paymentMethod?: string;
544
- };
545
- } | {
546
- type: 'track';
547
- event: 'BUY_SUCCESS';
548
- properties: {
549
- asset?: string | null;
550
- network?: string | null;
551
- amount?: string | null;
552
- currency?: string | null;
553
- provider?: string | null;
554
- orderId?: string | null;
555
- };
556
- } | {
557
- type: 'track';
558
- event: 'BUY_FAIL';
559
- properties: {
560
- asset?: string;
561
- network?: string;
562
- amount?: string;
563
- currency?: string;
564
- provider?: string;
565
- serviceProvider?: string;
566
- paymentMethod?: string;
567
- message?: string;
568
- };
569
- } | {
570
- type: 'track';
571
- event: 'BUY_CANCEL';
572
- properties?: {
573
- message?: string;
574
- };
575
- };
576
- export type EstimateGasTransactionArgs = {
577
- chainNamespace?: 'eip155';
578
- address: `0x${string}`;
579
- to: `0x${string}`;
580
- data: `0x${string}`;
581
- };
582
- export interface SendTransactionArgs {
583
- to: `0x${string}`;
584
- data: `0x${string}`;
585
- value: bigint;
586
- gas?: bigint;
587
- gasPrice: bigint;
588
- address: `0x${string}`;
589
- chainNamespace?: 'eip155';
590
- }
591
- export interface WriteContractArgs {
592
- receiverAddress: `0x${string}`;
593
- tokenAmount: bigint;
594
- tokenAddress: `0x${string}`;
595
- fromAddress: `0x${string}`;
596
- method: 'send' | 'transfer' | 'call';
597
- abi: any;
598
- }
599
- export type SwapToken = {
600
- name: string;
601
- symbol: string;
602
- address: CaipAddress;
603
- decimals: number;
604
- logoUri: string;
605
- eip2612?: boolean;
606
- };
607
- export type SwapTokenWithBalance = SwapToken & {
608
- quantity: {
609
- decimals: string;
610
- numeric: string;
611
- };
612
- price: number;
613
- value: number;
614
- };
615
- export type SwapInputTarget = 'sourceToken' | 'toToken';
616
- export type OnRampErrorTypeValues = (typeof OnRampErrorType)[keyof typeof OnRampErrorType];
617
- export interface OnRampError {
618
- type: OnRampErrorTypeValues;
619
- message: string;
620
- }
621
- export type OnRampPaymentMethod = {
622
- logos: {
623
- dark: string;
624
- light: string;
625
- };
626
- name: string;
627
- paymentMethod: string;
628
- paymentType: string;
629
- };
630
- export type OnRampCountry = {
631
- countryCode: string;
632
- flagImageUrl: string;
633
- name: string;
634
- };
635
- export type OnRampCountryDefaults = {
636
- countryCode: string;
637
- defaultCurrencyCode: string;
638
- defaultPaymentMethods: string[];
639
- };
640
- export type OnRampFiatCurrency = {
641
- currencyCode: string;
642
- name: string;
643
- symbolImageUrl: string;
644
- };
645
- export type OnRampCryptoCurrency = {
646
- currencyCode: string;
647
- name: string;
648
- chainCode: string;
649
- chainName: string;
650
- chainId: string;
651
- contractAddress: string | null;
652
- symbolImageUrl: string;
653
- };
654
- export type OnRampQuote = {
655
- countryCode: string;
656
- customerScore: number;
657
- destinationAmount: number;
658
- destinationAmountWithoutFees: number;
659
- destinationCurrencyCode: string;
660
- exchangeRate: number;
661
- fiatAmountWithoutFees: number;
662
- lowKyc: boolean;
663
- networkFee: number;
664
- paymentMethodType: string;
665
- serviceProvider: string;
666
- sourceAmount: number;
667
- sourceAmountWithoutFees: number;
668
- sourceCurrencyCode: string;
669
- totalFee: number;
670
- transactionFee: number;
671
- transactionType: string;
672
- };
673
- export type OnRampServiceProvider = {
674
- categories: string[];
675
- categoryStatuses: {
676
- additionalProp: string;
677
- };
678
- logos: {
679
- dark: string;
680
- darkShort: string;
681
- light: string;
682
- lightShort: string;
683
- };
684
- name: string;
685
- serviceProvider: string;
686
- status: string;
687
- websiteUrl: string;
688
- };
689
- export type OnRampFiatLimit = {
690
- currencyCode: string;
691
- defaultAmount: number | null;
692
- minimumAmount: number;
693
- maximumAmount: number;
694
- };
695
- export type OnRampTransactionResult = {
696
- purchaseCurrency: string | null;
697
- purchaseAmount: string | null;
698
- purchaseImageUrl: string | null;
699
- paymentCurrency: string | null;
700
- paymentAmount: string | null;
701
- status: string | null;
702
- network: string | null;
703
- };
704
- export {};
705
- //# sourceMappingURL=TypeUtil.d.ts.map