@unisat/wallet-state 1.0.4 → 1.1.0
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/LICENSE +0 -5
- package/lib/index.d.mts +2012 -200
- package/lib/index.d.ts +2012 -200
- package/lib/index.js +6951 -570
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +6754 -517
- package/lib/index.mjs.map +1 -1
- package/lib/types/index.d.mts +1 -1
- package/lib/types/index.d.ts +1 -1
- package/package.json +19 -15
- package/src/.DS_Store +0 -0
- package/src/context/ApprovalContext.tsx +27 -0
- package/src/context/DeviceContext.tsx +36 -0
- package/src/context/I18nContext.tsx +14 -172
- package/src/context/NavigationContext.tsx +305 -0
- package/src/context/PriceContext.tsx +2 -2
- package/src/context/StorageContext.tsx +393 -0
- package/src/context/ToolsContext.tsx +50 -0
- package/src/context/WalletContext.tsx +119 -108
- package/src/context/index.ts +17 -2
- package/src/hooks/accounts.ts +11 -5
- package/src/hooks/browser.ts +11 -0
- package/src/hooks/global.ts +170 -7
- package/src/hooks/index.ts +1 -2
- package/src/hooks/settings.ts +28 -37
- package/src/hooks/transactions.ts +28 -155
- package/src/hooks/ui.ts +232 -36
- package/src/index.ts +33 -24
- package/src/reducers/accounts.ts +19 -2
- package/src/reducers/browser.ts +223 -0
- package/src/reducers/global.ts +67 -1
- package/src/reducers/index.ts +1 -0
- package/src/reducers/transactions.ts +0 -9
- package/src/reducers/ui.ts +127 -8
- package/src/types/index.ts +1 -1
- package/src/ui-hooks/index.ts +107 -0
- package/src/ui-hooks/useActionOverviewSectionLogic.ts +150 -0
- package/src/ui-hooks/useAddressTypeScreenLogic.ts +160 -0
- package/src/ui-hooks/useAlkanesBalanceCardLogic.ts +41 -0
- package/src/ui-hooks/useAlkanesCollectionListLogic.ts +68 -0
- package/src/ui-hooks/useAlkanesListLogic.ts +69 -0
- package/src/ui-hooks/useAlkanesNFTListLogic.ts +42 -0
- package/src/ui-hooks/useAlkanesNFTScreenLogic.ts +45 -0
- package/src/ui-hooks/useAlkanesTokenScreenLogic.ts +130 -0
- package/src/ui-hooks/useAmountInputLogic.ts +80 -0
- package/src/ui-hooks/useAnnouncementCardLogic.ts +91 -0
- package/src/ui-hooks/useBRC20BalanceCardLogic.ts +115 -0
- package/src/ui-hooks/useBRC20InscribeTransferLogic.ts +398 -0
- package/src/ui-hooks/useBRC20ListLogic.ts +75 -0
- package/src/ui-hooks/useBRC20ProgListLogic.ts +77 -0
- package/src/ui-hooks/useBRC20SendScreenLogic.ts +411 -0
- package/src/ui-hooks/useBRC20SingleStepScreenLogic.ts +208 -0
- package/src/ui-hooks/useBRC20TokenScreenLogic.ts +469 -0
- package/src/ui-hooks/useBalanceCardLogic.ts +164 -0
- package/src/ui-hooks/useBtcDisplayLogic.ts +16 -0
- package/src/ui-hooks/useCAT20BalanceCardLogic.ts +35 -0
- package/src/ui-hooks/useCAT20ListLogic.ts +83 -0
- package/src/ui-hooks/useCAT20TokenScreenLogic.ts +122 -0
- package/src/ui-hooks/useCAT721ListLogic.ts +68 -0
- package/src/ui-hooks/useCAT721NFTScreenLogic.ts +37 -0
- package/src/ui-hooks/useCreatePasswordScreenLogic.ts +92 -0
- package/src/ui-hooks/useCreateWalletLogicImportWordsStep.ts +299 -0
- package/src/ui-hooks/useEditAccountNameScreenLogic.ts +71 -0
- package/src/ui-hooks/useEditContactScreenLogic.ts +162 -0
- package/src/ui-hooks/useEditWalletNameScreenLogic.ts +58 -0
- package/src/ui-hooks/useExportMnemonicsScreenLogic.ts +75 -0
- package/src/ui-hooks/useExportPrivateKeyScreenLogic.ts +64 -0
- package/src/ui-hooks/useFeeRateBarLogic.ts +303 -0
- package/src/ui-hooks/useInfiniteList.ts +85 -0
- package/src/ui-hooks/useInscriptionListLogic.ts +68 -0
- package/src/ui-hooks/useLockTimePageLogic.ts +43 -0
- package/src/ui-hooks/useNotificationsLogic.ts +115 -0
- package/src/ui-hooks/useOrdinalsInscriptionScreenLogic.ts +130 -0
- package/src/ui-hooks/useRunesBalanceCardLogic.ts +44 -0
- package/src/ui-hooks/useRunesListLogic.ts +74 -0
- package/src/ui-hooks/useRunesTokenScreenLogic.ts +149 -0
- package/src/ui-hooks/useSecurityCardLogic.ts +0 -0
- package/src/ui-hooks/useSendAlkanesNFTScreenLogic.ts +138 -0
- package/src/ui-hooks/useSendAlkanesScreenLogic.ts +192 -0
- package/src/ui-hooks/useSendCAT20ScreenLogic.ts +297 -0
- package/src/ui-hooks/useSendCAT721ScreenLogic.ts +205 -0
- package/src/ui-hooks/useSendOrdinalsInscriptionScreenLogic.ts +137 -0
- package/src/ui-hooks/useSendRunesScreenLogic.ts +172 -0
- package/src/ui-hooks/useSettingsTabScreenLogic.ts +211 -0
- package/src/ui-hooks/useSignMessageLogic.ts +302 -0
- package/src/ui-hooks/useSignPsbtLogic.ts +517 -0
- package/src/ui-hooks/useSplitOrdinalsInscriptionScreenLogic.ts +95 -0
- package/src/ui-hooks/useTxConfirmScreenLogic.ts +47 -0
- package/src/ui-hooks/useTxCreateScreenLogic.ts +161 -0
- package/src/ui-hooks/useTxFailScreenLogic.ts +26 -0
- package/src/ui-hooks/useTxSuccessScreenLogic.ts +33 -0
- package/src/updater/accounts.ts +11 -11
- package/src/utils/bitcoin-utils.ts +17 -8
- package/src/utils/eventBus.ts +2 -1
- package/src/utils/password-utils.ts +78 -0
- package/src/utils/ui-utils.ts +28 -0
- package/src/hooks/approval.ts +0 -72
- package/src/hooks/i18n.ts +0 -53
- package/src/utils/i18n.ts +0 -41
package/lib/index.d.ts
CHANGED
|
@@ -1,15 +1,65 @@
|
|
|
1
1
|
import * as _reduxjs_toolkit_dist_configureStore from '@reduxjs/toolkit/dist/configureStore';
|
|
2
2
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
3
|
+
import * as redux from 'redux';
|
|
4
|
+
import * as _unisat_wallet_shared from '@unisat/wallet-shared';
|
|
5
|
+
import { AppInfo, Inscription, WalletKeyring, WalletConfig, UnspentOutput, Account, BitcoinBalanceV2, TxHistoryItem, AppSummary, InscriptionSummary, AddressSummary, TokenBalance, TokenInfo, RuneBalance, RuneInfo, AlkanesBalance, AlkanesInfo, CAT_VERSION, CAT20Balance, CAT20TokenInfo, CAT721CollectionInfo, BabylonTxInfo, ToSignData, CoinPrice, VersionDetail, BitcoinBalance, SignedData, ToSignMessage, SignedMessage, ConnectedSite, FeeSummary, TickPriceItem, InscribeOrder, TokenTransfer, DecodedPsbt, LocalPsbtSummary, AddressTokenSummary, UTXO_Detail, UTXO, WebsiteResult, SignPsbtOptions, ToSignInput, AddressFlagType, CosmosSignDataType, AddressRunesTokenSummary, AddressCAT20TokenSummary, AddressCAT20UtxoSummary, CAT20MergeOrder, CAT721Balance, AddressCAT721CollectionSummary, BtcChannelItem, BabylonAddressSummary, CosmosBalance, AddressAlkanesTokenSummary, AlkanesCollection, BRC20HistoryItem, RateUsStatus, Announcement, StoredNotification, DummyTxType, ToAddressInfo, RawTxInfo, SignPsbtParams, SignPsbtResult, WordsType, RestoreWalletType, ApprovalSession, PsbtActionInfo } from '@unisat/wallet-shared';
|
|
6
|
+
export { PsbtLocalInfo } from '@unisat/wallet-shared';
|
|
3
7
|
import * as _unisat_wallet_types from '@unisat/wallet-types';
|
|
4
8
|
import { ChainType, NetworkType, AddressType } from '@unisat/wallet-types';
|
|
5
|
-
import * as _unisat_wallet_shared from '@unisat/wallet-shared';
|
|
6
|
-
import { AppInfo, Inscription, WalletKeyring, WalletConfig, UnspentOutput, Account, BitcoinBalanceV2, TxHistoryItem, AppSummary, InscriptionSummary, AddressSummary, BitcoinBalance, ToSignInput, ConnectedSite, FeeSummary, CoinPrice, TickPriceItem, InscribeOrder, TokenTransfer, DecodedPsbt, TokenBalance, AddressTokenSummary, UTXO_Detail, UTXO, WebsiteResult, SignPsbtOptions, AddressFlagType, VersionDetail, CosmosSignDataType, RuneBalance, AddressRunesTokenSummary, CAT20Balance, AddressCAT20TokenSummary, AddressCAT20UtxoSummary, UserToSignInput, CAT20MergeOrder, CAT721Balance, AddressCAT721CollectionSummary, BtcChannelItem, BabylonAddressSummary, CosmosBalance, AlkanesBalance, AddressAlkanesTokenSummary, AlkanesCollection, AlkanesInfo, BRC20HistoryItem, CAT_VERSION, ToAddressInfo, RawTxInfo, TypeChain } from '@unisat/wallet-shared';
|
|
7
9
|
import { AssetTabKey, OrdinalsAssetTabKey, CATAssetTabKey, AlkanesAssetTabKey, NavigationSource, TabOption } from './types/index.js';
|
|
8
|
-
import
|
|
10
|
+
import * as react from 'react';
|
|
11
|
+
import react__default, { ReactNode } from 'react';
|
|
12
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
13
|
import * as _unisat_babylon_service_types from '@unisat/babylon-service/types';
|
|
10
14
|
import { BabylonConfigV2 } from '@unisat/babylon-service/types';
|
|
15
|
+
import * as redux_thunk from 'redux-thunk';
|
|
11
16
|
import { TypedUseSelectorHook } from 'react-redux';
|
|
12
17
|
|
|
18
|
+
declare enum WalletTabScreenTabKey {
|
|
19
|
+
ALL = 0,
|
|
20
|
+
BRC20 = 1
|
|
21
|
+
}
|
|
22
|
+
type suspensionType = {
|
|
23
|
+
suspensionIf: boolean;
|
|
24
|
+
info: AppInfo | object | any;
|
|
25
|
+
web: any;
|
|
26
|
+
};
|
|
27
|
+
type wcars = {
|
|
28
|
+
if?: boolean;
|
|
29
|
+
url: string;
|
|
30
|
+
};
|
|
31
|
+
type guideListsType = {
|
|
32
|
+
id: number;
|
|
33
|
+
title: string;
|
|
34
|
+
content: string;
|
|
35
|
+
img: string;
|
|
36
|
+
};
|
|
37
|
+
interface setSessionDateProps {
|
|
38
|
+
icon: string;
|
|
39
|
+
name: string;
|
|
40
|
+
origin: string;
|
|
41
|
+
}
|
|
42
|
+
interface BrowserState {
|
|
43
|
+
walletTabScreen: {
|
|
44
|
+
tabKey: wcars;
|
|
45
|
+
riskIf: boolean;
|
|
46
|
+
collect: any;
|
|
47
|
+
historyList: any;
|
|
48
|
+
suspension: suspensionType;
|
|
49
|
+
yy: any;
|
|
50
|
+
riseHeight: number;
|
|
51
|
+
ScanData: string;
|
|
52
|
+
amountValue: string;
|
|
53
|
+
guideList: guideListsType[];
|
|
54
|
+
popUp: boolean;
|
|
55
|
+
setStatusBar: boolean;
|
|
56
|
+
i18Class: string;
|
|
57
|
+
setSessionDate: setSessionDateProps;
|
|
58
|
+
webViewLod: boolean;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
declare const browserActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<BrowserState>, string>;
|
|
62
|
+
|
|
13
63
|
interface DiscoveryState {
|
|
14
64
|
bannerList: {
|
|
15
65
|
id: string;
|
|
@@ -27,6 +77,13 @@ interface DiscoveryState {
|
|
|
27
77
|
}
|
|
28
78
|
declare const discoveryActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<DiscoveryState>, string>;
|
|
29
79
|
|
|
80
|
+
declare enum WallettopTabScreenTabKey {
|
|
81
|
+
Ordinals = 0,
|
|
82
|
+
Atomicals = 1,
|
|
83
|
+
Runes = 2,
|
|
84
|
+
CAT20 = 3,
|
|
85
|
+
Alkanes = 4
|
|
86
|
+
}
|
|
30
87
|
interface UIState {
|
|
31
88
|
assetTabKey: AssetTabKey;
|
|
32
89
|
ordinalsAssetTabKey: OrdinalsAssetTabKey;
|
|
@@ -39,8 +96,21 @@ interface UIState {
|
|
|
39
96
|
inscription?: Inscription;
|
|
40
97
|
};
|
|
41
98
|
inputAmount: string;
|
|
42
|
-
|
|
99
|
+
};
|
|
100
|
+
addressInput: {
|
|
101
|
+
address: string;
|
|
102
|
+
domain: string;
|
|
103
|
+
inscription?: Inscription;
|
|
104
|
+
};
|
|
105
|
+
amountInput: {
|
|
106
|
+
amount: string;
|
|
107
|
+
};
|
|
108
|
+
feeRateBar: {
|
|
43
109
|
feeRate: number;
|
|
110
|
+
feeRateInputVal: string;
|
|
111
|
+
enableLowFeeRate: boolean;
|
|
112
|
+
feeOptionIndex: number;
|
|
113
|
+
showCustomInput: boolean;
|
|
44
114
|
};
|
|
45
115
|
babylonSendScreen: {
|
|
46
116
|
inputAmount: string;
|
|
@@ -48,6 +118,10 @@ interface UIState {
|
|
|
48
118
|
};
|
|
49
119
|
navigationSource: NavigationSource;
|
|
50
120
|
isBalanceHidden: boolean;
|
|
121
|
+
balanceDetailExpanded: boolean;
|
|
122
|
+
walletTopTabScreen: {
|
|
123
|
+
toptabKey: WallettopTabScreenTabKey;
|
|
124
|
+
};
|
|
51
125
|
}
|
|
52
126
|
declare const uiActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<UIState>, string>;
|
|
53
127
|
|
|
@@ -62,6 +136,29 @@ interface GlobalState {
|
|
|
62
136
|
isUnlocked: boolean;
|
|
63
137
|
isReady: boolean;
|
|
64
138
|
isBooted: boolean;
|
|
139
|
+
screenState?: {
|
|
140
|
+
type: string;
|
|
141
|
+
options: any;
|
|
142
|
+
};
|
|
143
|
+
isRefresh: boolean;
|
|
144
|
+
backRefresh: boolean;
|
|
145
|
+
wallRefresh: boolean;
|
|
146
|
+
wallTabRefresh: boolean;
|
|
147
|
+
unlockRefres: boolean;
|
|
148
|
+
unlockRead: boolean;
|
|
149
|
+
layerState: boolean;
|
|
150
|
+
isUnlockTimeRefres: boolean;
|
|
151
|
+
infiniteListScrollOffset: number;
|
|
152
|
+
infiniteListScrollDirection: 'up' | 'down';
|
|
153
|
+
infiniteListScrollActiveTime: number;
|
|
154
|
+
isScrollViewTop: number;
|
|
155
|
+
isScrollViewBot: number;
|
|
156
|
+
isBiometricsSupported: boolean;
|
|
157
|
+
hasBiometricsKey: boolean;
|
|
158
|
+
wallTabFocusRefresh: 0;
|
|
159
|
+
goBackRefresh: 0;
|
|
160
|
+
switchChainModalVisible: boolean;
|
|
161
|
+
isLockedOverlayVisible: boolean;
|
|
65
162
|
}
|
|
66
163
|
declare const globalActions: any;
|
|
67
164
|
|
|
@@ -90,7 +187,6 @@ interface BitcoinTx {
|
|
|
90
187
|
psbtHex: string;
|
|
91
188
|
feeRate: number;
|
|
92
189
|
toDomain: string;
|
|
93
|
-
enableRBF: boolean;
|
|
94
190
|
}
|
|
95
191
|
interface OrdinalsTx {
|
|
96
192
|
fromAddress: string;
|
|
@@ -106,7 +202,6 @@ interface OrdinalsTx {
|
|
|
106
202
|
feeRate: number;
|
|
107
203
|
toDomain: string;
|
|
108
204
|
outputValue: number;
|
|
109
|
-
enableRBF: boolean;
|
|
110
205
|
}
|
|
111
206
|
interface RunesTx {
|
|
112
207
|
fromAddress: string;
|
|
@@ -121,7 +216,6 @@ interface RunesTx {
|
|
|
121
216
|
feeRate: number;
|
|
122
217
|
toDomain: string;
|
|
123
218
|
outputValue: number;
|
|
124
|
-
enableRBF: boolean;
|
|
125
219
|
runeid?: string;
|
|
126
220
|
runeAmount?: string;
|
|
127
221
|
}
|
|
@@ -136,6 +230,14 @@ interface TransactionsState {
|
|
|
136
230
|
}
|
|
137
231
|
declare const transactionsActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<TransactionsState>, string>;
|
|
138
232
|
|
|
233
|
+
interface Molels {
|
|
234
|
+
states: boolean;
|
|
235
|
+
}
|
|
236
|
+
interface MolelsPopover {
|
|
237
|
+
state: boolean;
|
|
238
|
+
title: string;
|
|
239
|
+
data: any;
|
|
240
|
+
}
|
|
139
241
|
interface AccountsState {
|
|
140
242
|
accounts: Account[];
|
|
141
243
|
current: Account;
|
|
@@ -168,12 +270,342 @@ interface AccountsState {
|
|
|
168
270
|
appSummary: AppSummary;
|
|
169
271
|
inscriptionSummary: InscriptionSummary;
|
|
170
272
|
addressSummary: AddressSummary;
|
|
273
|
+
model: Molels;
|
|
274
|
+
molelsPopover: MolelsPopover;
|
|
171
275
|
}
|
|
172
276
|
declare const accountActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<AccountsState>, string>;
|
|
173
277
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
278
|
+
interface ApprovalContextType {
|
|
279
|
+
getApproval: () => Promise<any>;
|
|
280
|
+
resolveApproval: (data?: any, stay?: boolean, forceReject?: boolean) => Promise<void>;
|
|
281
|
+
rejectApproval: (reason?: string, stay?: boolean, isInternal?: boolean) => Promise<void>;
|
|
282
|
+
}
|
|
283
|
+
declare const ApprovalContext: react__default.Context<ApprovalContextType>;
|
|
284
|
+
declare function useApproval(): ApprovalContextType;
|
|
285
|
+
|
|
286
|
+
interface DeviceContextType {
|
|
287
|
+
isMobile: boolean;
|
|
288
|
+
isIOS: boolean;
|
|
289
|
+
isAndroid: boolean;
|
|
290
|
+
isExtensionInExpandView: boolean;
|
|
291
|
+
isExtensionInSideBar: boolean;
|
|
292
|
+
isExtension: boolean;
|
|
293
|
+
isMobileScreenSize: boolean;
|
|
294
|
+
isDesktopScreenSize: boolean;
|
|
295
|
+
platform: string;
|
|
296
|
+
hasBottomButton: boolean;
|
|
297
|
+
cardColumnsInList: number;
|
|
298
|
+
}
|
|
299
|
+
declare const DeviceContext: react__default.Context<DeviceContextType>;
|
|
300
|
+
declare function useDevice(): DeviceContextType;
|
|
301
|
+
|
|
302
|
+
interface I18nContextType {
|
|
303
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
304
|
+
locale: string;
|
|
305
|
+
supportedLocales: string[];
|
|
306
|
+
localeNames: Record<string, string>;
|
|
307
|
+
changeLocale: (locale: string) => Promise<void>;
|
|
308
|
+
addResourceBundle?: (locale: string) => Promise<void>;
|
|
309
|
+
isSpecialLocale: boolean;
|
|
310
|
+
}
|
|
311
|
+
declare const I18nContext: react__default.Context<I18nContextType>;
|
|
312
|
+
declare function useI18n(): I18nContextType;
|
|
313
|
+
|
|
314
|
+
type RouteParamList = {
|
|
315
|
+
WelcomeScreen: undefined;
|
|
316
|
+
UnlockScreen: {
|
|
317
|
+
autoUnlockByFace: boolean;
|
|
318
|
+
};
|
|
319
|
+
CreatePasswordScreen: {
|
|
320
|
+
isNewAccount?: boolean;
|
|
321
|
+
isKeystone?: boolean;
|
|
322
|
+
fromColdWallet?: boolean;
|
|
323
|
+
};
|
|
324
|
+
MainScreen: undefined;
|
|
325
|
+
WalletTabScreen: undefined;
|
|
326
|
+
AppTabScreen: undefined;
|
|
327
|
+
TabMainScreen: undefined;
|
|
328
|
+
DiscoverTabScreen: undefined;
|
|
329
|
+
SettingsTabScreen: undefined;
|
|
330
|
+
CreateHDWalletScreen: {
|
|
331
|
+
restoreTiTle?: boolean;
|
|
332
|
+
topTitle?: boolean;
|
|
333
|
+
finalButton?: string;
|
|
334
|
+
existingMnemonic?: string;
|
|
335
|
+
isBackupFlow?: boolean;
|
|
336
|
+
isImport?: boolean;
|
|
337
|
+
comeFrom?: string;
|
|
338
|
+
fromUnlock?: boolean;
|
|
339
|
+
goBack?: boolean;
|
|
340
|
+
};
|
|
341
|
+
CreateSimpleWalletScreen: undefined;
|
|
342
|
+
CreateWatchWalletScreen: undefined;
|
|
343
|
+
CreateColdWalletScreen: {
|
|
344
|
+
fromUnlock?: boolean;
|
|
345
|
+
};
|
|
346
|
+
CreateKeystoneWalletScreen: {
|
|
347
|
+
fromUnlock?: boolean;
|
|
348
|
+
};
|
|
349
|
+
EditWalletNameScreen: {
|
|
350
|
+
keyring: WalletKeyring;
|
|
351
|
+
};
|
|
352
|
+
ExportMnemonicsScreen: {
|
|
353
|
+
keyring: WalletKeyring;
|
|
354
|
+
};
|
|
355
|
+
ExportPrivateKeyScreen: {
|
|
356
|
+
account: Account;
|
|
357
|
+
};
|
|
358
|
+
SwitchAccountScreen: undefined;
|
|
359
|
+
ReceiveScreen: undefined;
|
|
360
|
+
HistoryScreen: undefined;
|
|
361
|
+
KeyringOrAccountScreen: undefined;
|
|
362
|
+
AddKeyringScreen: undefined;
|
|
363
|
+
ImportHDWalletScreen: {
|
|
364
|
+
comeFrom?: string;
|
|
365
|
+
};
|
|
366
|
+
CreateAccountScreen: {
|
|
367
|
+
keyringKey?: string;
|
|
368
|
+
};
|
|
369
|
+
CreateKeystoneScreen: {
|
|
370
|
+
comeFrom?: string;
|
|
371
|
+
goBack?: boolean;
|
|
372
|
+
};
|
|
373
|
+
EditAccountNameScreen: {
|
|
374
|
+
account: Account;
|
|
375
|
+
};
|
|
376
|
+
KeyringDetailScreen: {
|
|
377
|
+
keyringKey?: string;
|
|
378
|
+
};
|
|
379
|
+
ConnectedSitesScreen: undefined;
|
|
380
|
+
AddressTypeScreen: undefined;
|
|
381
|
+
AdvancedScreen: undefined;
|
|
382
|
+
ContactsScreen: {
|
|
383
|
+
returnWithNetwork?: ChainType;
|
|
384
|
+
lastEditedContactAddress?: string;
|
|
385
|
+
};
|
|
386
|
+
EditContactScreen: {
|
|
387
|
+
address?: string;
|
|
388
|
+
chain?: string;
|
|
389
|
+
selectedNetworkFilter: string;
|
|
390
|
+
};
|
|
391
|
+
AboutUsScreen: undefined;
|
|
392
|
+
LanguageScreen: undefined;
|
|
393
|
+
ChangePasswordScreen: undefined;
|
|
394
|
+
ModuleAssets: undefined;
|
|
395
|
+
NotificationListScreen: undefined;
|
|
396
|
+
UtxoToolsMainScreen: undefined;
|
|
397
|
+
ScanScreen: {
|
|
398
|
+
from?: string;
|
|
399
|
+
};
|
|
400
|
+
BrowserScreen: {
|
|
401
|
+
info: any;
|
|
402
|
+
};
|
|
403
|
+
TxCreateScreen: undefined;
|
|
404
|
+
OrdinalsInscriptionScreen: {
|
|
405
|
+
inscription: Inscription;
|
|
406
|
+
inscriptionId?: string;
|
|
407
|
+
withSend?: boolean;
|
|
408
|
+
};
|
|
409
|
+
SendOrdinalsInscriptionScreen: {
|
|
410
|
+
inscription: Inscription;
|
|
411
|
+
inscriptionId?: string;
|
|
412
|
+
};
|
|
413
|
+
SplitOrdinalsInscriptionScreen: {
|
|
414
|
+
inscription: Inscription;
|
|
415
|
+
inscriptionId?: string;
|
|
416
|
+
};
|
|
417
|
+
BRC20TokenScreen: {
|
|
418
|
+
ticker: string;
|
|
419
|
+
tokenBalance?: TokenBalance;
|
|
420
|
+
};
|
|
421
|
+
BRC20SendScreen: {
|
|
422
|
+
tokenBalance: TokenBalance;
|
|
423
|
+
tokenInfo: TokenInfo;
|
|
424
|
+
selectedInscriptionIds?: string[];
|
|
425
|
+
selectedAmount?: string;
|
|
426
|
+
};
|
|
427
|
+
BRC20InscribeTransfer: {
|
|
428
|
+
ticker: string;
|
|
429
|
+
};
|
|
430
|
+
BRC20SingleStepScreen: {
|
|
431
|
+
tokenBalance: TokenBalance;
|
|
432
|
+
tokenInfo: TokenInfo;
|
|
433
|
+
};
|
|
434
|
+
InscribeTransferScreen: {
|
|
435
|
+
ticker: string;
|
|
436
|
+
};
|
|
437
|
+
RunesTokenScreen: {
|
|
438
|
+
runeid: string;
|
|
439
|
+
};
|
|
440
|
+
SendRunesScreen: {
|
|
441
|
+
runeBalance: RuneBalance;
|
|
442
|
+
runeInfo: RuneInfo;
|
|
443
|
+
};
|
|
444
|
+
AlkanesTokenScreen: {
|
|
445
|
+
alkaneid: string;
|
|
446
|
+
};
|
|
447
|
+
SendAlkanesScreen: {
|
|
448
|
+
tokenBalance: AlkanesBalance;
|
|
449
|
+
tokenInfo: AlkanesInfo;
|
|
450
|
+
};
|
|
451
|
+
AlkanesCollectionScreen: {
|
|
452
|
+
collectionId: string;
|
|
453
|
+
};
|
|
454
|
+
AlkanesNFTScreen: {
|
|
455
|
+
alkanesInfo: AlkanesInfo;
|
|
456
|
+
};
|
|
457
|
+
SendAlkanesNFTScreen: {
|
|
458
|
+
alkanesInfo: AlkanesInfo;
|
|
459
|
+
};
|
|
460
|
+
CAT20TokenScreen: {
|
|
461
|
+
tokenId: string;
|
|
462
|
+
version: CAT_VERSION;
|
|
463
|
+
};
|
|
464
|
+
SendCAT20Screen: {
|
|
465
|
+
version: CAT_VERSION;
|
|
466
|
+
cat20Balance: CAT20Balance;
|
|
467
|
+
cat20Info: CAT20TokenInfo;
|
|
468
|
+
};
|
|
469
|
+
MergeCAT20Screen: {
|
|
470
|
+
version: CAT_VERSION;
|
|
471
|
+
cat20Balance: CAT20Balance;
|
|
472
|
+
cat20Info: CAT20TokenInfo;
|
|
473
|
+
};
|
|
474
|
+
CAT721CollectionScreen: {
|
|
475
|
+
collectionId: string;
|
|
476
|
+
version: CAT_VERSION;
|
|
477
|
+
};
|
|
478
|
+
CAT721NFTScreen: {
|
|
479
|
+
version: CAT_VERSION;
|
|
480
|
+
collectionInfo: CAT721CollectionInfo;
|
|
481
|
+
localId: string;
|
|
482
|
+
};
|
|
483
|
+
SendCAT721Screen: {
|
|
484
|
+
version: CAT_VERSION;
|
|
485
|
+
collectionInfo: CAT721CollectionInfo;
|
|
486
|
+
localId: string;
|
|
487
|
+
};
|
|
488
|
+
BabylonTxConfirmScreen: {
|
|
489
|
+
txInfo: BabylonTxInfo;
|
|
490
|
+
};
|
|
491
|
+
BabylonStakingScreen: undefined;
|
|
492
|
+
SendBabyScreen: undefined;
|
|
493
|
+
TxConfirmScreen: {
|
|
494
|
+
toSignData: ToSignData;
|
|
495
|
+
};
|
|
496
|
+
TxSuccessScreen: {
|
|
497
|
+
txid: string;
|
|
498
|
+
};
|
|
499
|
+
TxFailScreen: {
|
|
500
|
+
error: string;
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
type RouteTypes = keyof RouteParamList;
|
|
504
|
+
type NavigateArgs<T extends RouteTypes> = RouteParamList[T] extends undefined ? [screenName: T] : [screenName: T, params: RouteParamList[T]];
|
|
505
|
+
interface NavigationContextType {
|
|
506
|
+
navigate<T extends RouteTypes>(...args: NavigateArgs<T>): void;
|
|
507
|
+
replace<T extends RouteTypes>(...args: NavigateArgs<T>): void;
|
|
508
|
+
poptotop: () => void;
|
|
509
|
+
goBack: () => void;
|
|
510
|
+
navToTab: () => void;
|
|
511
|
+
navToTest: () => void;
|
|
512
|
+
navToLock: (params?: any) => void;
|
|
513
|
+
navToWelcome: () => void;
|
|
514
|
+
getRouteState<T extends RouteTypes>(): RouteParamList[T];
|
|
515
|
+
navToUtxoTools: () => void;
|
|
516
|
+
navToUrl: (url: string, externalBrowser?: boolean) => void;
|
|
517
|
+
navToExplorerTx: (txid: string) => void;
|
|
518
|
+
navToExplorerAddress: (address: string) => void;
|
|
519
|
+
navToMarketPlace: () => void;
|
|
520
|
+
navToMarketPlaceBrc20: (ticker: string) => void;
|
|
521
|
+
navToInscribeBrc20: (ticker: string) => void;
|
|
522
|
+
openExtensionInTab?: () => void;
|
|
523
|
+
navToRootHome: () => void;
|
|
524
|
+
}
|
|
525
|
+
declare const NavigationContext: react__default.Context<NavigationContextType>;
|
|
526
|
+
declare function useNavigation(): NavigationContextType;
|
|
527
|
+
|
|
528
|
+
interface PriceContextType {
|
|
529
|
+
isLoadingCoinPrice: boolean;
|
|
530
|
+
coinPrice: CoinPrice;
|
|
531
|
+
refreshCoinPrice: () => void;
|
|
532
|
+
}
|
|
533
|
+
declare function usePrice(): PriceContextType;
|
|
534
|
+
declare function PriceProvider({ children }: {
|
|
535
|
+
children: ReactNode;
|
|
536
|
+
}): react_jsx_runtime.JSX.Element;
|
|
537
|
+
|
|
538
|
+
type AutoLockTime = {
|
|
539
|
+
id: number;
|
|
540
|
+
time: number;
|
|
541
|
+
label: string;
|
|
542
|
+
};
|
|
543
|
+
type WebSearchHistoryItem = string;
|
|
544
|
+
type WebRiskWarningItem = {
|
|
545
|
+
url: string;
|
|
546
|
+
};
|
|
547
|
+
interface BaseStorageProvider {
|
|
548
|
+
get: (key: string) => Promise<any>;
|
|
549
|
+
set: (key: string, value: any) => Promise<void>;
|
|
550
|
+
}
|
|
551
|
+
interface StorageContextType {
|
|
552
|
+
get: (key: string) => Promise<string>;
|
|
553
|
+
set: (key: string, value: string) => Promise<void>;
|
|
554
|
+
clear: () => Promise<void>;
|
|
555
|
+
getAutomaticLockTime: () => Promise<AutoLockTime>;
|
|
556
|
+
clearAutomaticLockTime: () => Promise<void>;
|
|
557
|
+
getAnnouncementDismissedIds: () => Promise<string[]>;
|
|
558
|
+
setAnnouncementDismissedIds: (ids: string[]) => Promise<void>;
|
|
559
|
+
clearAnnouncementDismissedIds: () => Promise<void>;
|
|
560
|
+
getI18nSavedLang: () => Promise<string>;
|
|
561
|
+
setI18nSavedLang: (lang: string) => Promise<void>;
|
|
562
|
+
clearI18nSavedLang: () => Promise<void>;
|
|
563
|
+
getWebSearchHistory: () => Promise<WebSearchHistoryItem[]>;
|
|
564
|
+
setWebSearchHistory: (history: WebSearchHistoryItem[]) => Promise<void>;
|
|
565
|
+
clearWebSearchHistory: () => Promise<void>;
|
|
566
|
+
getWebRiskWarning: () => Promise<WebRiskWarningItem[]>;
|
|
567
|
+
setWebRiskWarning: (warnings: WebRiskWarningItem[]) => Promise<void>;
|
|
568
|
+
clearWebRiskWarning: () => Promise<void>;
|
|
569
|
+
getEnableExplore: () => Promise<boolean>;
|
|
570
|
+
setEnableExplore: (enable: boolean) => Promise<void>;
|
|
571
|
+
clearEnableExplore: () => Promise<void>;
|
|
572
|
+
getUnbackupKeyringIds: () => Promise<string[]>;
|
|
573
|
+
setUnbackupKeyringIds: (keyrings: string[]) => Promise<void>;
|
|
574
|
+
clearUnbackupKeyringIds: () => Promise<void>;
|
|
575
|
+
getEnableFaceId: () => Promise<boolean>;
|
|
576
|
+
setEnableFaceId: (enable: boolean) => Promise<void>;
|
|
577
|
+
clearEnableFaceId: () => Promise<void>;
|
|
578
|
+
getBalanceHidden: () => Promise<boolean>;
|
|
579
|
+
setBalanceHidden: (enable: boolean) => Promise<void>;
|
|
580
|
+
clearBalanceHidden: () => Promise<void>;
|
|
581
|
+
getVersionDetail: () => Promise<VersionDetail>;
|
|
582
|
+
setVersionDetail: (detail: VersionDetail) => Promise<void>;
|
|
583
|
+
clearVersionDetail: () => Promise<void>;
|
|
584
|
+
getThemeMode: () => Promise<string>;
|
|
585
|
+
setThemeMode: (mode: string) => Promise<void>;
|
|
586
|
+
clearThemeMode: () => Promise<void>;
|
|
587
|
+
getUtxoManageVisited: () => Promise<boolean>;
|
|
588
|
+
setUtxoManageVisited: () => Promise<void>;
|
|
589
|
+
clearUtxoManageVisited: () => Promise<void>;
|
|
590
|
+
}
|
|
591
|
+
declare function createStorageProvider(base: BaseStorageProvider): StorageContextType;
|
|
592
|
+
declare const StorageContext: react__default.Context<StorageContextType>;
|
|
593
|
+
declare function useStorage(): StorageContextType;
|
|
594
|
+
|
|
595
|
+
type ToastFunction = (content: string) => void;
|
|
596
|
+
type LoadingFunction = (visible: boolean, content?: string) => void;
|
|
597
|
+
interface ToolsContextType {
|
|
598
|
+
toast: ToastFunction;
|
|
599
|
+
toastSuccess: ToastFunction;
|
|
600
|
+
toastError: ToastFunction;
|
|
601
|
+
toastWarning: ToastFunction;
|
|
602
|
+
showLoading: LoadingFunction;
|
|
603
|
+
showTip: ToastFunction;
|
|
604
|
+
copyToClipboard: (text: string) => void;
|
|
605
|
+
openUrl: (url: string) => void;
|
|
606
|
+
}
|
|
607
|
+
declare const ToolsContext: react__default.Context<ToolsContextType>;
|
|
608
|
+
declare function useTools(): ToolsContextType;
|
|
177
609
|
|
|
178
610
|
interface ContactBookItem {
|
|
179
611
|
name: string;
|
|
@@ -188,13 +620,17 @@ interface WalletController {
|
|
|
188
620
|
openapi: {
|
|
189
621
|
[key: string]: (...params: any) => Promise<any>;
|
|
190
622
|
};
|
|
623
|
+
requestMethod: (...params: any) => Promise<any>;
|
|
624
|
+
setBackgroundInited(value: boolean): Promise<void>;
|
|
625
|
+
getBackgroundInited(): Promise<boolean>;
|
|
626
|
+
getDesc: () => string;
|
|
191
627
|
boot(password: string): Promise<void>;
|
|
192
628
|
isBooted(): Promise<boolean>;
|
|
193
629
|
getApproval(): Promise<any>;
|
|
194
630
|
resolveApproval(data?: any, data2?: any): Promise<void>;
|
|
195
631
|
rejectApproval(data?: any, data2?: any, data3?: any): Promise<void>;
|
|
196
632
|
hasVault(): Promise<boolean>;
|
|
197
|
-
verifyPassword(password: string): Promise<
|
|
633
|
+
verifyPassword(password: string): Promise<boolean>;
|
|
198
634
|
changePassword: (password: string, newPassword: string) => Promise<void>;
|
|
199
635
|
unlock(password: string): Promise<void>;
|
|
200
636
|
isUnlocked(): Promise<boolean>;
|
|
@@ -252,7 +688,7 @@ interface WalletController {
|
|
|
252
688
|
getPreMnemonics(): Promise<any>;
|
|
253
689
|
generatePreMnemonic(): Promise<string>;
|
|
254
690
|
removePreMnemonics(): void;
|
|
255
|
-
createKeyringWithMnemonics(mnemonic: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount: number): Promise<{
|
|
691
|
+
createKeyringWithMnemonics(mnemonic: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount: number, accountIndexDerivation?: boolean): Promise<{
|
|
256
692
|
address: string;
|
|
257
693
|
type: string;
|
|
258
694
|
}[]>;
|
|
@@ -267,7 +703,9 @@ interface WalletController {
|
|
|
267
703
|
pubkey: string;
|
|
268
704
|
address: string;
|
|
269
705
|
}[]>;
|
|
270
|
-
createTmpKeyringWithMnemonics(mnemonic: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount?: number): Promise<WalletKeyring>;
|
|
706
|
+
createTmpKeyringWithMnemonics(mnemonic: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount?: number, accountIndexDerivation?: boolean): Promise<WalletKeyring>;
|
|
707
|
+
createTmpKeyringWithMnemonics2(mnemonic: string, passphrase: string, hdPaths: string[], addressTypes: AddressType[]): Promise<WalletKeyring[]>;
|
|
708
|
+
createTmpKeyringWithMnemonicsScan(mnemonic: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount: number, accountIndexDerivation?: boolean): Promise<WalletKeyring>;
|
|
271
709
|
removeKeyring(keyring: WalletKeyring): Promise<WalletKeyring>;
|
|
272
710
|
deriveNewAccountFromMnemonic(keyring: WalletKeyring, alianName?: string): Promise<string[]>;
|
|
273
711
|
getAccountsCount(): Promise<number>;
|
|
@@ -277,65 +715,40 @@ interface WalletController {
|
|
|
277
715
|
getAccounts(): Promise<Account[]>;
|
|
278
716
|
getNextAlianName: (keyring: WalletKeyring) => Promise<string>;
|
|
279
717
|
getCurrentKeyringAccounts(): Promise<Account[]>;
|
|
280
|
-
|
|
281
|
-
|
|
718
|
+
signPsbtV2(toSignData: ToSignData): Promise<SignedData>;
|
|
719
|
+
signMessage(params: ToSignMessage): Promise<SignedMessage>;
|
|
720
|
+
createSendBTCPsbt(data: {
|
|
282
721
|
to: string;
|
|
283
722
|
amount: number;
|
|
284
723
|
btcUtxos: UnspentOutput[];
|
|
285
724
|
feeRate: number;
|
|
286
|
-
enableRBF: boolean;
|
|
287
725
|
memo?: string;
|
|
288
726
|
memos?: string[];
|
|
289
|
-
}): Promise<
|
|
290
|
-
|
|
291
|
-
rawtx: string;
|
|
292
|
-
fee: number;
|
|
293
|
-
}>;
|
|
294
|
-
sendAllBTC(data: {
|
|
727
|
+
}): Promise<ToSignData>;
|
|
728
|
+
createSendAllBTCPsbt(data: {
|
|
295
729
|
to: string;
|
|
296
730
|
btcUtxos: UnspentOutput[];
|
|
297
731
|
feeRate: number;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
psbtHex: string;
|
|
301
|
-
rawtx: string;
|
|
302
|
-
fee: number;
|
|
303
|
-
}>;
|
|
304
|
-
sendOrdinalsInscription(data: {
|
|
732
|
+
}): Promise<ToSignData>;
|
|
733
|
+
createSendInscriptionPsbt(data: {
|
|
305
734
|
to: string;
|
|
306
735
|
inscriptionId: string;
|
|
307
736
|
feeRate: number;
|
|
308
737
|
outputValue?: number;
|
|
309
|
-
enableRBF: boolean;
|
|
310
738
|
btcUtxos: UnspentOutput[];
|
|
311
|
-
}): Promise<
|
|
312
|
-
|
|
313
|
-
rawtx: string;
|
|
314
|
-
fee: number;
|
|
315
|
-
}>;
|
|
316
|
-
sendOrdinalsInscriptions(data: {
|
|
739
|
+
}): Promise<ToSignData>;
|
|
740
|
+
createSendMultipleInscriptionsPsbt(data: {
|
|
317
741
|
to: string;
|
|
318
742
|
inscriptionIds: string[];
|
|
319
743
|
feeRate: number;
|
|
320
|
-
enableRBF: boolean;
|
|
321
744
|
btcUtxos: UnspentOutput[];
|
|
322
|
-
}): Promise<
|
|
323
|
-
|
|
324
|
-
rawtx: string;
|
|
325
|
-
fee: number;
|
|
326
|
-
}>;
|
|
327
|
-
splitOrdinalsInscription(data: {
|
|
745
|
+
}): Promise<ToSignData>;
|
|
746
|
+
createSplitInscriptionPsbt(data: {
|
|
328
747
|
inscriptionId: string;
|
|
329
748
|
feeRate: number;
|
|
330
749
|
outputValue: number;
|
|
331
|
-
enableRBF: boolean;
|
|
332
750
|
btcUtxos: UnspentOutput[];
|
|
333
|
-
}): Promise<
|
|
334
|
-
psbtHex: string;
|
|
335
|
-
rawtx: string;
|
|
336
|
-
fee: number;
|
|
337
|
-
splitedCount: number;
|
|
338
|
-
}>;
|
|
751
|
+
}): Promise<ToSignData>;
|
|
339
752
|
pushTx(rawtx: string): Promise<string>;
|
|
340
753
|
queryDomainInfo(domain: string): Promise<Inscription>;
|
|
341
754
|
getInscriptionSummary(): Promise<InscriptionSummary>;
|
|
@@ -349,14 +762,17 @@ interface WalletController {
|
|
|
349
762
|
getConnectedSites(): Promise<ConnectedSite[]>;
|
|
350
763
|
removeConnectedSite(origin: string): Promise<void>;
|
|
351
764
|
getCurrentConnectedSite(id: string): Promise<ConnectedSite>;
|
|
765
|
+
updateConnectSite(origin: string, data: Partial<ConnectedSite>): Promise<void>;
|
|
352
766
|
getCurrentKeyring(): Promise<WalletKeyring>;
|
|
353
767
|
getKeyrings(): Promise<WalletKeyring[]>;
|
|
768
|
+
getTotalKeyringCount(): Promise<number>;
|
|
354
769
|
changeKeyring(keyring: WalletKeyring, accountIndex?: number): Promise<void>;
|
|
355
770
|
getAllAddresses(keyring: WalletKeyring, index: number): Promise<string[]>;
|
|
356
771
|
setKeyringAlianName(keyring: WalletKeyring, name: string): Promise<WalletKeyring>;
|
|
357
772
|
changeAddressType(addressType: AddressType): Promise<void>;
|
|
358
773
|
setAccountAlianName(account: Account, name: string): Promise<Account>;
|
|
359
774
|
getFeeSummary(): Promise<FeeSummary>;
|
|
775
|
+
getLowFeeSummary(): Promise<FeeSummary>;
|
|
360
776
|
getCoinPrice(): Promise<CoinPrice>;
|
|
361
777
|
getBrc20sPrice(ticks: string[]): Promise<{
|
|
362
778
|
[tick: string]: TickPriceItem;
|
|
@@ -377,6 +793,7 @@ interface WalletController {
|
|
|
377
793
|
inscribeBRC20Transfer(address: string, tick: string, amount: string, feeRate: number, outputValue: number): Promise<InscribeOrder>;
|
|
378
794
|
getInscribeResult(orderId: string): Promise<TokenTransfer>;
|
|
379
795
|
decodePsbt(psbtHex: string, website: string): Promise<DecodedPsbt>;
|
|
796
|
+
analyzeLocalPsbts(toSignDatas: ToSignData[]): Promise<LocalPsbtSummary>;
|
|
380
797
|
decodeContracts(contracts: any[], account: any): Promise<any[]>;
|
|
381
798
|
getAllInscriptionList(address: string, currentPage: number, pageSize: number): Promise<{
|
|
382
799
|
currentPage: number;
|
|
@@ -471,20 +888,15 @@ interface WalletController {
|
|
|
471
888
|
}>;
|
|
472
889
|
getAssetUtxosRunes(rune: string): Promise<UnspentOutput[]>;
|
|
473
890
|
getAddressRunesTokenSummary(address: string, runeid: string): Promise<AddressRunesTokenSummary>;
|
|
474
|
-
|
|
891
|
+
createSendRunesPsbt(data: {
|
|
475
892
|
to: string;
|
|
476
893
|
runeid: string;
|
|
477
894
|
runeAmount: string;
|
|
478
895
|
feeRate: number;
|
|
479
|
-
enableRBF: boolean;
|
|
480
896
|
btcUtxos?: UnspentOutput[];
|
|
481
897
|
assetUtxos?: UnspentOutput[];
|
|
482
898
|
outputValue?: number;
|
|
483
|
-
}): Promise<
|
|
484
|
-
psbtHex: string;
|
|
485
|
-
rawtx: string;
|
|
486
|
-
fee: number;
|
|
487
|
-
}>;
|
|
899
|
+
}): Promise<ToSignData>;
|
|
488
900
|
setAutoLockTimeId(timeId: number): Promise<void>;
|
|
489
901
|
getAutoLockTimeId(): Promise<number>;
|
|
490
902
|
getDeveloperMode(): Promise<boolean>;
|
|
@@ -499,23 +911,20 @@ interface WalletController {
|
|
|
499
911
|
getAddressCAT20UtxoSummary(version: 'v1' | 'v2', address: string, tokenId: string): Promise<AddressCAT20UtxoSummary>;
|
|
500
912
|
transferCAT20Step1(version: 'v1' | 'v2', to: string, tokenId: string, tokenAmount: string, feeRate: number): Promise<{
|
|
501
913
|
id: string;
|
|
502
|
-
commitTx: string;
|
|
503
|
-
toSignInputs: UserToSignInput[];
|
|
504
914
|
feeRate: number;
|
|
915
|
+
toSignData: ToSignData;
|
|
505
916
|
}>;
|
|
506
|
-
transferCAT20Step2(version: 'v1' | 'v2', transferId: string,
|
|
507
|
-
|
|
508
|
-
toSignInputs: UserToSignInput[];
|
|
917
|
+
transferCAT20Step2(version: 'v1' | 'v2', transferId: string, psbtHex: string): Promise<{
|
|
918
|
+
toSignData: ToSignData;
|
|
509
919
|
}>;
|
|
510
|
-
transferCAT20Step3(version: 'v1' | 'v2', transferId: string,
|
|
920
|
+
transferCAT20Step3(version: 'v1' | 'v2', transferId: string, psbtHex: string): Promise<{
|
|
511
921
|
txid: string;
|
|
512
922
|
}>;
|
|
513
923
|
mergeCAT20Prepare(version: 'v1' | 'v2', tokenId: string, utxoCount: number, feeRate: number): Promise<CAT20MergeOrder>;
|
|
514
924
|
transferCAT20Step1ByMerge(version: 'v1' | 'v2', mergeId: string): Promise<{
|
|
515
925
|
id: string;
|
|
516
|
-
commitTx: string;
|
|
517
|
-
toSignInputs: UserToSignInput[];
|
|
518
926
|
feeRate: number;
|
|
927
|
+
toSignData: ToSignData;
|
|
519
928
|
}>;
|
|
520
929
|
getMergeCAT20Status(version: 'v1' | 'v2', mergeId: string): Promise<any>;
|
|
521
930
|
getAppList(): Promise<{
|
|
@@ -540,15 +949,13 @@ interface WalletController {
|
|
|
540
949
|
getAddressCAT721CollectionSummary(version: 'v1' | 'v2', address: string, collectionId: string): Promise<AddressCAT721CollectionSummary>;
|
|
541
950
|
transferCAT721Step1(version: 'v1' | 'v2', to: string, collectionId: string, localId: string, feeRate: number): Promise<{
|
|
542
951
|
id: string;
|
|
543
|
-
commitTx: string;
|
|
544
|
-
toSignInputs: UserToSignInput[];
|
|
545
952
|
feeRate: number;
|
|
953
|
+
toSignData: ToSignData;
|
|
546
954
|
}>;
|
|
547
|
-
transferCAT721Step2(version: 'v1' | 'v2', transferId: string,
|
|
548
|
-
|
|
549
|
-
toSignInputs: UserToSignInput[];
|
|
955
|
+
transferCAT721Step2(version: 'v1' | 'v2', transferId: string, psbtHex: string): Promise<{
|
|
956
|
+
toSignData: ToSignData;
|
|
550
957
|
}>;
|
|
551
|
-
transferCAT721Step3(version: 'v1' | 'v2', transferId: string,
|
|
958
|
+
transferCAT721Step3(version: 'v1' | 'v2', transferId: string, psbtHex: string): Promise<{
|
|
552
959
|
txid: string;
|
|
553
960
|
}>;
|
|
554
961
|
getBuyCoinChannelList(coin: string): Promise<BtcChannelItem[]>;
|
|
@@ -581,35 +988,27 @@ interface WalletController {
|
|
|
581
988
|
feeRate: number;
|
|
582
989
|
}): Promise<{
|
|
583
990
|
orderId: string;
|
|
584
|
-
|
|
585
|
-
toSignInputs: UserToSignInput[];
|
|
991
|
+
toSignData: ToSignData;
|
|
586
992
|
}>;
|
|
587
993
|
singleStepTransferBRC20Step2(params: {
|
|
588
994
|
orderId: string;
|
|
589
995
|
commitTx: string;
|
|
590
|
-
toSignInputs: UserToSignInput[];
|
|
591
996
|
}): Promise<{
|
|
592
|
-
|
|
593
|
-
toSignInputs: UserToSignInput[];
|
|
997
|
+
toSignData: ToSignData;
|
|
594
998
|
}>;
|
|
595
999
|
singleStepTransferBRC20Step3(params: {
|
|
596
1000
|
orderId: string;
|
|
597
1001
|
revealTx: string;
|
|
598
|
-
toSignInputs: UserToSignInput[];
|
|
599
1002
|
}): Promise<{
|
|
600
1003
|
txid: string;
|
|
601
1004
|
}>;
|
|
602
1005
|
setLastActiveTime(): void;
|
|
603
1006
|
getOpenInSidePanel(): Promise<boolean>;
|
|
604
1007
|
setOpenInSidePanel(openInSidePanel: boolean): Promise<void>;
|
|
605
|
-
|
|
1008
|
+
createSendBTCOffsetPsbt(tos: {
|
|
606
1009
|
address: string;
|
|
607
1010
|
satoshis: number;
|
|
608
|
-
}[], feeRate: number): Promise<
|
|
609
|
-
psbtHex: string;
|
|
610
|
-
rawtx: string;
|
|
611
|
-
fee: number;
|
|
612
|
-
}>;
|
|
1011
|
+
}[], feeRate: number): Promise<ToSignData>;
|
|
613
1012
|
getAlkanesList(address: string, currentPage: number, pageSize: number): Promise<{
|
|
614
1013
|
currentPage: number;
|
|
615
1014
|
pageSize: number;
|
|
@@ -618,30 +1017,13 @@ interface WalletController {
|
|
|
618
1017
|
}>;
|
|
619
1018
|
getAssetUtxosAlkanes(rune: string): Promise<UnspentOutput[]>;
|
|
620
1019
|
getAddressAlkanesTokenSummary(address: string, alkaneid: string, fetchAvailable: boolean): Promise<AddressAlkanesTokenSummary>;
|
|
621
|
-
|
|
622
|
-
userAddress: string;
|
|
623
|
-
userPubkey: string;
|
|
624
|
-
receiver: string;
|
|
625
|
-
alkaneid: string;
|
|
626
|
-
amount: string;
|
|
627
|
-
feeRate: number;
|
|
628
|
-
}): Promise<{
|
|
629
|
-
psbtHex: string;
|
|
630
|
-
toSignInputs: UserToSignInput[];
|
|
631
|
-
}>;
|
|
632
|
-
signAlkanesSendTx(params: {
|
|
633
|
-
commitTx: string;
|
|
634
|
-
toSignInputs: ToSignInput[];
|
|
635
|
-
}): Promise<{
|
|
636
|
-
txid: string;
|
|
637
|
-
}>;
|
|
638
|
-
sendAlkanes(params: {
|
|
1020
|
+
createSendAlkanesPsbt(params: {
|
|
639
1021
|
to: string;
|
|
640
1022
|
alkaneid: string;
|
|
641
1023
|
amount: string;
|
|
642
1024
|
feeRate: number;
|
|
643
|
-
|
|
644
|
-
}): Promise<
|
|
1025
|
+
type: 'ft' | 'nft';
|
|
1026
|
+
}): Promise<ToSignData>;
|
|
645
1027
|
getAlkanesCollectionList(address: string, currentPage: number, pageSize: number): Promise<{
|
|
646
1028
|
list: AlkanesCollection[];
|
|
647
1029
|
total: number;
|
|
@@ -653,23 +1035,39 @@ interface WalletController {
|
|
|
653
1035
|
total: number;
|
|
654
1036
|
}>;
|
|
655
1037
|
getBRC20RecentHistory(address: string, ticker: string): Promise<BRC20HistoryItem[]>;
|
|
1038
|
+
resetAllData(): Promise<void>;
|
|
1039
|
+
getGuideReaded(): Promise<boolean>;
|
|
1040
|
+
setGuideReaded(): Promise<void>;
|
|
1041
|
+
getRateUsStatus(): Promise<RateUsStatus>;
|
|
1042
|
+
setHasRated(hasRated: boolean): Promise<void>;
|
|
1043
|
+
setRatePromptDismissedAt(timestamp: number | null): Promise<void>;
|
|
1044
|
+
setHasShownSecondPrompt(hasShown: boolean): Promise<void>;
|
|
1045
|
+
resetRateUsStatus(): Promise<void>;
|
|
1046
|
+
getAnnouncements(cursor: number, size: number): Promise<{
|
|
1047
|
+
hasMore: boolean;
|
|
1048
|
+
list: Announcement[];
|
|
1049
|
+
}>;
|
|
1050
|
+
getNotifications(): Promise<StoredNotification[]>;
|
|
1051
|
+
readNotification(id: string): Promise<void>;
|
|
1052
|
+
readAllNotifications(): Promise<void>;
|
|
1053
|
+
deleteNotification(id: string): Promise<void>;
|
|
1054
|
+
getNotificationUnreadCount(): Promise<number>;
|
|
1055
|
+
getAcceptLowFeeMode(): Promise<boolean>;
|
|
1056
|
+
setAcceptLowFeeMode(accept: boolean): Promise<void>;
|
|
1057
|
+
createTmpKeyringWithPublicKey(publicKey: string, addressType: AddressType): Promise<WalletKeyring>;
|
|
1058
|
+
createKeyringWithPublicKey(data: string, addressType: AddressType): Promise<void>;
|
|
1059
|
+
createTmpKeyringWithAddress(address: string): Promise<WalletKeyring>;
|
|
1060
|
+
createKeyringWithAddress(address: string): Promise<void>;
|
|
1061
|
+
createDummyPsbt(params: {
|
|
1062
|
+
txType: DummyTxType;
|
|
1063
|
+
}): Promise<ToSignData>;
|
|
656
1064
|
}
|
|
657
1065
|
declare const WalletProvider: ({ children, wallet, }: {
|
|
658
1066
|
children?: ReactNode;
|
|
659
1067
|
wallet: WalletController;
|
|
660
|
-
}) => JSX.Element;
|
|
1068
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
661
1069
|
declare const useWallet: () => WalletController;
|
|
662
1070
|
|
|
663
|
-
interface PriceContextType {
|
|
664
|
-
isLoadingCoinPrice: boolean;
|
|
665
|
-
coinPrice: CoinPrice;
|
|
666
|
-
refreshCoinPrice: () => void;
|
|
667
|
-
}
|
|
668
|
-
declare function usePrice(): PriceContextType;
|
|
669
|
-
declare function PriceProvider({ children }: {
|
|
670
|
-
children: ReactNode;
|
|
671
|
-
}): JSX.Element;
|
|
672
|
-
|
|
673
1071
|
declare function useAccountsState(): AppState['accounts'];
|
|
674
1072
|
declare function useCurrentAccount(): Account;
|
|
675
1073
|
declare function useCurrentAddress(): string;
|
|
@@ -699,17 +1097,9 @@ declare function useChangeAddressFlagCallback(): (isAdd: boolean, flag: number)
|
|
|
699
1097
|
declare function useFetchBalanceCallback(): () => Promise<void>;
|
|
700
1098
|
declare function useReloadAccounts(): () => Promise<void>;
|
|
701
1099
|
declare function useIsKeystoneWallet(): boolean;
|
|
1100
|
+
declare function useModelPopover(): MolelsPopover;
|
|
702
1101
|
|
|
703
|
-
|
|
704
|
-
isTab: boolean;
|
|
705
|
-
isNotification: boolean;
|
|
706
|
-
isPop: boolean;
|
|
707
|
-
isSidePanel: boolean;
|
|
708
|
-
};
|
|
709
|
-
declare const getUiType: () => UiTypeCheck;
|
|
710
|
-
declare const useApproval: () => readonly [() => Promise<any>, (data?: any, stay?: boolean, forceReject?: boolean) => Promise<void>, (err: any, stay?: boolean, isInternal?: boolean) => Promise<void>];
|
|
711
|
-
|
|
712
|
-
declare const useAppDispatch: () => _reduxjs_toolkit.ThunkDispatch<{
|
|
1102
|
+
declare const useAppDispatch: () => redux_thunk.ThunkDispatch<{
|
|
713
1103
|
accounts: AccountsState;
|
|
714
1104
|
transactions: TransactionsState;
|
|
715
1105
|
settings: SettingsState;
|
|
@@ -717,7 +1107,8 @@ declare const useAppDispatch: () => _reduxjs_toolkit.ThunkDispatch<{
|
|
|
717
1107
|
keyrings: KeyringsState;
|
|
718
1108
|
ui: UIState;
|
|
719
1109
|
discovery: DiscoveryState;
|
|
720
|
-
|
|
1110
|
+
browser: BrowserState;
|
|
1111
|
+
}, undefined, redux.AnyAction> & redux.Dispatch<redux.AnyAction>;
|
|
721
1112
|
declare const useAppSelector: TypedUseSelectorHook<AppState>;
|
|
722
1113
|
|
|
723
1114
|
declare function useDiscoveryState(): AppState['discovery'];
|
|
@@ -738,34 +1129,44 @@ declare function useHasNewBanner(): boolean;
|
|
|
738
1129
|
|
|
739
1130
|
declare function useGlobalState(): AppState['global'];
|
|
740
1131
|
declare function useTab(): TabOption;
|
|
1132
|
+
declare function useScreenState(): {
|
|
1133
|
+
type: string;
|
|
1134
|
+
options: any;
|
|
1135
|
+
};
|
|
1136
|
+
declare function useUpdateScreenStateCallback(): (screenState: Partial<AppState['global']['screenState']>) => void;
|
|
741
1137
|
declare function useSetTabCallback(): (tab: TabOption) => void;
|
|
742
1138
|
declare function useBooted(): boolean;
|
|
743
1139
|
declare function useIsUnlocked(): boolean;
|
|
744
1140
|
declare function useIsReady(): boolean;
|
|
1141
|
+
declare function useIsRefresh(): boolean;
|
|
1142
|
+
declare function useBackRefresh(): boolean;
|
|
1143
|
+
declare function useWallRefresh(): boolean;
|
|
1144
|
+
declare function useWallTabRefresh(): boolean;
|
|
1145
|
+
declare function useWallTabFocusRefresh(): 0;
|
|
1146
|
+
declare function useGoBackRefresh(): 0;
|
|
1147
|
+
declare function useLayerState(): boolean;
|
|
1148
|
+
declare function useUnlockRefresh(): boolean;
|
|
1149
|
+
declare function useUnlockRead(): boolean;
|
|
1150
|
+
declare function useIsUnlockTimeRefres(): boolean;
|
|
1151
|
+
declare function useInfiniteListScrollOffset(): number;
|
|
1152
|
+
declare function useInfiniteListScrollState(): {
|
|
1153
|
+
offset: number;
|
|
1154
|
+
direction: "up" | "down";
|
|
1155
|
+
activeTime: number;
|
|
1156
|
+
};
|
|
1157
|
+
declare function useIsScrollViewTop(): number;
|
|
1158
|
+
declare function useIsScrollViewBot(): number;
|
|
1159
|
+
declare function useIsBiometricsSupported(): boolean;
|
|
1160
|
+
declare function useHasBiometricsKey(): boolean;
|
|
1161
|
+
declare function useSwitchChainModalVisible(): boolean;
|
|
1162
|
+
declare function useSetLockedOverlayVisibleCallback(): (visible: boolean) => void;
|
|
1163
|
+
declare function useLockedOverlayVisible(): boolean;
|
|
1164
|
+
declare function useLockCallback(): () => Promise<void>;
|
|
745
1165
|
declare function useUnlockCallback(): (password: string) => Promise<void>;
|
|
746
|
-
declare function useCreateAccountCallback(): (mnemonics: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount: number) => Promise<void>;
|
|
1166
|
+
declare function useCreateAccountCallback(): (mnemonics: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount: number, accountIndexDerivation?: boolean) => Promise<void>;
|
|
747
1167
|
declare function useImportAccountsFromKeystoneCallback(): (urType: string, urCbor: string, addressType: AddressType, accountCount: number, hdPath: string, filterPubkey?: string[], connectionType?: 'USB' | 'QR') => Promise<void>;
|
|
748
1168
|
declare function useCreateColdWalletCallback(): (xpub: string, addressType: AddressType, alianName?: string, hdPath?: string, accountCount?: number) => Promise<void>;
|
|
749
1169
|
|
|
750
|
-
/**
|
|
751
|
-
* Use i18n Hook
|
|
752
|
-
* @returns i18n context
|
|
753
|
-
*/
|
|
754
|
-
declare const useI18n: () => any;
|
|
755
|
-
/**
|
|
756
|
-
* Get current language
|
|
757
|
-
* @returns current language code
|
|
758
|
-
*/
|
|
759
|
-
declare const getCurrentLocale: () => Promise<string>;
|
|
760
|
-
/**
|
|
761
|
-
* Select special languages for style adaptation
|
|
762
|
-
* @returns { currentLocale: string, isSpecialLocale: boolean }
|
|
763
|
-
*/
|
|
764
|
-
declare const getSpecialLocale: () => Promise<{
|
|
765
|
-
currentLocale: string;
|
|
766
|
-
isSpecialLocale: boolean;
|
|
767
|
-
}>;
|
|
768
|
-
|
|
769
1170
|
declare function useKeyringsState(): AppState['keyrings'];
|
|
770
1171
|
declare function useKeyrings(): _unisat_wallet_shared.WalletKeyring[];
|
|
771
1172
|
declare function useCurrentKeyring(): _unisat_wallet_shared.WalletKeyring;
|
|
@@ -783,7 +1184,9 @@ declare function useTxExplorerUrl(txid: string): string;
|
|
|
783
1184
|
declare function useGetTxExplorerUrlCallback(): (txid: string) => string;
|
|
784
1185
|
declare function useAddressExplorerUrl(address: string): string;
|
|
785
1186
|
declare function useCAT20TokenInfoExplorerUrl(version: CAT_VERSION, tokenId: string): string;
|
|
1187
|
+
declare function useBRC20TokenInfoExplorerUrl(ticker: string): string;
|
|
786
1188
|
declare function useUnisatWebsite(): string;
|
|
1189
|
+
declare function useIconBaseUrl(): string;
|
|
787
1190
|
declare function useOrdinalsWebsite(): string;
|
|
788
1191
|
declare function useWalletConfig(): _unisat_wallet_shared.WalletConfig;
|
|
789
1192
|
declare function useVersionInfo(): {
|
|
@@ -791,21 +1194,16 @@ declare function useVersionInfo(): {
|
|
|
791
1194
|
newVersion: string;
|
|
792
1195
|
latestVersion: string;
|
|
793
1196
|
skipped: boolean;
|
|
1197
|
+
downloadUrl: string;
|
|
1198
|
+
isNewest: boolean;
|
|
794
1199
|
};
|
|
795
1200
|
declare function useSkipVersionCallback(): (version: string) => void;
|
|
796
1201
|
declare function useAutoLockTimeId(): number;
|
|
797
|
-
declare function getAddressTips(address: string, chanEnum: ChainType): {
|
|
798
|
-
homeTip: string;
|
|
799
|
-
sendTip: string;
|
|
800
|
-
};
|
|
801
1202
|
declare function useAddressTips(): {
|
|
802
1203
|
homeTip: string;
|
|
803
1204
|
sendTip: string;
|
|
804
1205
|
};
|
|
805
1206
|
declare function useCAT721NFTContentBaseUrl(version: CAT_VERSION): "" | "https://tracker-fractal-mainnet.catprotocol.org" | "https://tracker2-fractal-mainnet.catprotocol.org" | "https://tracker-fractal-testnet.catprotocol.org";
|
|
806
|
-
declare function useBRC20MarketPlaceWebsite(ticker: string): string;
|
|
807
|
-
declare function useRunesMarketPlaceWebsite(ticker: string): string;
|
|
808
|
-
declare function useCAT20MarketPlaceWebsite(tokenId: string): string;
|
|
809
1207
|
declare function useBabylonConfig(): _unisat_babylon_service_types.BabylonConfig;
|
|
810
1208
|
declare function useIsMainnetChain(): boolean;
|
|
811
1209
|
declare function useDeveloperMode(): boolean;
|
|
@@ -813,48 +1211,41 @@ declare function useSetDeveloperModeCallback(): (developerMode: boolean) => Prom
|
|
|
813
1211
|
|
|
814
1212
|
declare function useTransactionsState(): AppState['transactions'];
|
|
815
1213
|
declare function useBitcoinTx(): BitcoinTx;
|
|
816
|
-
declare function usePrepareSendBTCCallback(): ({ toAddressInfo, toAmount, feeRate,
|
|
1214
|
+
declare function usePrepareSendBTCCallback(): ({ toAddressInfo, toAmount, feeRate, memo, memos, disableAutoAdjust, }: {
|
|
817
1215
|
toAddressInfo: ToAddressInfo;
|
|
818
1216
|
toAmount: number;
|
|
819
1217
|
feeRate?: number;
|
|
820
|
-
enableRBF: boolean;
|
|
821
1218
|
memo?: string;
|
|
822
1219
|
memos?: string[];
|
|
823
1220
|
disableAutoAdjust?: boolean;
|
|
824
|
-
}) => Promise<
|
|
1221
|
+
}) => Promise<ToSignData>;
|
|
825
1222
|
declare function usePrepareSendBypassHeadOffsetsCallback(): ({ toAddressInfo, toAmount, feeRate, }: {
|
|
826
1223
|
toAddressInfo: ToAddressInfo;
|
|
827
1224
|
toAmount: number;
|
|
828
1225
|
feeRate: number;
|
|
829
|
-
}) => Promise<
|
|
1226
|
+
}) => Promise<ToSignData>;
|
|
830
1227
|
declare function usePushBitcoinTxCallback(): (rawtx: string) => Promise<{
|
|
831
1228
|
success: boolean;
|
|
832
1229
|
txid: string;
|
|
833
1230
|
error: string;
|
|
834
1231
|
}>;
|
|
835
1232
|
declare function useOrdinalsTx(): OrdinalsTx;
|
|
836
|
-
declare function usePrepareSendOrdinalsInscriptionCallback(): ({ toAddressInfo, inscriptionId, feeRate, outputValue,
|
|
1233
|
+
declare function usePrepareSendOrdinalsInscriptionCallback(): ({ toAddressInfo, inscriptionId, feeRate, outputValue, }: {
|
|
837
1234
|
toAddressInfo: ToAddressInfo;
|
|
838
1235
|
inscriptionId: string;
|
|
839
1236
|
feeRate?: number;
|
|
840
1237
|
outputValue?: number;
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
declare function usePrepareSendOrdinalsInscriptionsCallback(): ({ toAddressInfo, inscriptionIds, feeRate, enableRBF, }: {
|
|
1238
|
+
}) => Promise<ToSignData>;
|
|
1239
|
+
declare function usePrepareSendOrdinalsInscriptionsCallback(): ({ toAddressInfo, inscriptionIds, feeRate, }: {
|
|
844
1240
|
toAddressInfo: ToAddressInfo;
|
|
845
1241
|
inscriptionIds: string[];
|
|
846
1242
|
feeRate?: number;
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
declare function useCreateSplitTxCallback(): ({ inscriptionId, feeRate, outputValue, enableRBF, }: {
|
|
1243
|
+
}) => Promise<ToSignData>;
|
|
1244
|
+
declare function useCreateSplitTxCallback(): ({ inscriptionId, feeRate, outputValue, }: {
|
|
850
1245
|
inscriptionId: string;
|
|
851
1246
|
feeRate: number;
|
|
852
1247
|
outputValue: number;
|
|
853
|
-
|
|
854
|
-
}) => Promise<{
|
|
855
|
-
rawTxInfo: RawTxInfo;
|
|
856
|
-
splitedCount: number;
|
|
857
|
-
}>;
|
|
1248
|
+
}) => Promise<ToSignData>;
|
|
858
1249
|
declare function usePushOrdinalsTxCallback(): (rawtx: string) => Promise<{
|
|
859
1250
|
success: boolean;
|
|
860
1251
|
txid: string;
|
|
@@ -867,16 +1258,15 @@ declare function useSetSpendUnavailableUtxosCallback(): (utxos: UnspentOutput[])
|
|
|
867
1258
|
declare function useSafeBalance(): string;
|
|
868
1259
|
declare function useAssetUtxosRunes(): UnspentOutput[];
|
|
869
1260
|
declare function useFetchAssetUtxosRunesCallback(): (rune: string) => Promise<UnspentOutput[]>;
|
|
870
|
-
declare function usePrepareSendRunesCallback(): ({ toAddressInfo, runeid, runeAmount, outputValue, feeRate,
|
|
1261
|
+
declare function usePrepareSendRunesCallback(): ({ toAddressInfo, runeid, runeAmount, outputValue, feeRate, }: {
|
|
871
1262
|
toAddressInfo: ToAddressInfo;
|
|
872
1263
|
runeid: string;
|
|
873
1264
|
runeAmount: string;
|
|
874
1265
|
outputValue?: number;
|
|
875
1266
|
feeRate: number;
|
|
876
|
-
|
|
877
|
-
}) => Promise<RawTxInfo>;
|
|
1267
|
+
}) => Promise<ToSignData>;
|
|
878
1268
|
declare function useRunesTx(): RunesTx;
|
|
879
|
-
declare function usePrepareSendAlkanesCallback(): (toAddressInfo: ToAddressInfo, alkaneid: string, amount: string, feeRate: number,
|
|
1269
|
+
declare function usePrepareSendAlkanesCallback(): (toAddressInfo: ToAddressInfo, alkaneid: string, amount: string, feeRate: number, type: 'ft' | 'nft') => Promise<ToSignData>;
|
|
880
1270
|
|
|
881
1271
|
declare function useUIState(): AppState['ui'];
|
|
882
1272
|
declare function useAssetTabKey(): AssetTabKey;
|
|
@@ -890,57 +1280,1479 @@ declare function useUiTxCreateScreen(): {
|
|
|
890
1280
|
inscription?: Inscription;
|
|
891
1281
|
};
|
|
892
1282
|
inputAmount: string;
|
|
893
|
-
enableRBF: boolean;
|
|
894
|
-
feeRate: number;
|
|
895
1283
|
};
|
|
896
|
-
declare function useUpdateUiTxCreateScreen(): ({ toInfo, inputAmount,
|
|
1284
|
+
declare function useUpdateUiTxCreateScreen(): ({ toInfo, inputAmount, }: {
|
|
897
1285
|
toInfo?: {
|
|
898
1286
|
address: string;
|
|
899
1287
|
domain: string;
|
|
900
1288
|
inscription?: Inscription;
|
|
901
1289
|
};
|
|
902
1290
|
inputAmount?: string;
|
|
903
|
-
|
|
1291
|
+
}) => void;
|
|
1292
|
+
declare function useFeeRateBar(): {
|
|
1293
|
+
feeRate: number;
|
|
1294
|
+
feeRateInputVal: string;
|
|
1295
|
+
enableLowFeeRate: boolean;
|
|
1296
|
+
feeOptionIndex: number;
|
|
1297
|
+
showCustomInput: boolean;
|
|
1298
|
+
};
|
|
1299
|
+
declare function useUpdateFeeRateBar(): ({ feeRate, feeRateInputVal, enableLowFeeRate, feeOptionIndex, showCustomInput, }: {
|
|
904
1300
|
feeRate?: number;
|
|
1301
|
+
feeRateInputVal?: string;
|
|
1302
|
+
enableLowFeeRate?: boolean;
|
|
1303
|
+
feeOptionIndex?: number;
|
|
1304
|
+
showCustomInput?: boolean;
|
|
1305
|
+
}) => void;
|
|
1306
|
+
declare function useResetFeeRateBar(): () => void;
|
|
1307
|
+
declare function useAddressInput(): {
|
|
1308
|
+
address: string;
|
|
1309
|
+
domain: string;
|
|
1310
|
+
inscription?: Inscription;
|
|
1311
|
+
};
|
|
1312
|
+
declare function useUpdateAddressInput(): ({ address, domain }: {
|
|
1313
|
+
address?: string;
|
|
1314
|
+
domain?: string;
|
|
1315
|
+
}) => void;
|
|
1316
|
+
declare function useResetAddressInput(): () => void;
|
|
1317
|
+
declare function useAmountInput(): {
|
|
1318
|
+
amount: string;
|
|
1319
|
+
};
|
|
1320
|
+
declare function useUpdateAmountInput(): ({ amount }: {
|
|
1321
|
+
amount?: string;
|
|
905
1322
|
}) => void;
|
|
1323
|
+
declare function useResetAmountInput(): () => void;
|
|
1324
|
+
declare function useResetTxState(): () => void;
|
|
906
1325
|
declare function useResetUiTxCreateScreen(): () => void;
|
|
907
|
-
declare
|
|
1326
|
+
declare const useThrottle: (callback: any, delay: any, lastCallRef: any) => (...args: any[]) => void;
|
|
1327
|
+
declare function getSupportedAssets(chainType: ChainType, address: string): {
|
|
1328
|
+
assets: {
|
|
1329
|
+
ordinals: boolean;
|
|
1330
|
+
runes: boolean;
|
|
1331
|
+
CAT20: boolean;
|
|
1332
|
+
alkanes: boolean;
|
|
1333
|
+
brc20Prog: boolean;
|
|
1334
|
+
};
|
|
908
1335
|
tabKeys: AssetTabKey[];
|
|
1336
|
+
key: string;
|
|
1337
|
+
};
|
|
1338
|
+
declare function useSupportedAssets(): {
|
|
909
1339
|
assets: {
|
|
910
1340
|
ordinals: boolean;
|
|
911
1341
|
runes: boolean;
|
|
912
1342
|
CAT20: boolean;
|
|
913
1343
|
alkanes: boolean;
|
|
1344
|
+
brc20Prog: boolean;
|
|
914
1345
|
};
|
|
1346
|
+
tabKeys: AssetTabKey[];
|
|
915
1347
|
key: string;
|
|
916
1348
|
};
|
|
917
1349
|
declare const useIsInExpandView: () => boolean;
|
|
918
|
-
declare
|
|
919
|
-
|
|
1350
|
+
declare function useWalletTopTabScreenState(): {
|
|
1351
|
+
toptabKey: WallettopTabScreenTabKey;
|
|
1352
|
+
};
|
|
1353
|
+
declare function useBRC20IconInfo(ticker: string): {
|
|
1354
|
+
iconUrl: string;
|
|
1355
|
+
iconShortName: string;
|
|
1356
|
+
};
|
|
1357
|
+
declare function useRunesIconInfo(spacedRune: string): {
|
|
1358
|
+
iconUrl: string;
|
|
1359
|
+
iconShortName: string;
|
|
1360
|
+
};
|
|
1361
|
+
declare function useAlkanesIconInfo(name: string, alkaneid: string): {
|
|
1362
|
+
iconUrl: string;
|
|
1363
|
+
iconShortName: string;
|
|
1364
|
+
};
|
|
1365
|
+
declare function useCAT20IconInfo(name: string, tokenId: string): {
|
|
1366
|
+
iconUrl: string;
|
|
1367
|
+
iconShortName: string;
|
|
1368
|
+
};
|
|
1369
|
+
declare function useBRC20MarketPlaceWebsite(ticker: string): string;
|
|
1370
|
+
declare function useRunesMarketUrl(ticker: string): string;
|
|
1371
|
+
declare function useAlkanesMarketPlaceWebsite(alkaneid: string): string;
|
|
1372
|
+
declare function useCAT20MarketPlaceWebsite(tokenId: string): string;
|
|
1373
|
+
declare function useRunesInscribeUrl(rune: string): string;
|
|
1374
|
+
declare function useBalanceCardDetailExpanded(): boolean;
|
|
1375
|
+
declare function useToggleBalanceCardDetailExpanded(): () => void;
|
|
1376
|
+
|
|
1377
|
+
declare function useBrowserState(): AppState['browser'];
|
|
1378
|
+
declare function useWalletTabScreenState(): {
|
|
1379
|
+
tabKey: {
|
|
1380
|
+
if?: boolean;
|
|
1381
|
+
url: string;
|
|
1382
|
+
};
|
|
1383
|
+
riskIf: boolean;
|
|
1384
|
+
collect: any;
|
|
1385
|
+
historyList: any;
|
|
1386
|
+
suspension: {
|
|
1387
|
+
suspensionIf: boolean;
|
|
1388
|
+
info: any;
|
|
1389
|
+
web: any;
|
|
1390
|
+
};
|
|
1391
|
+
yy: any;
|
|
1392
|
+
riseHeight: number;
|
|
1393
|
+
ScanData: string;
|
|
1394
|
+
amountValue: string;
|
|
1395
|
+
guideList: {
|
|
1396
|
+
id: number;
|
|
1397
|
+
title: string;
|
|
1398
|
+
content: string;
|
|
1399
|
+
img: string;
|
|
1400
|
+
}[];
|
|
1401
|
+
popUp: boolean;
|
|
1402
|
+
setStatusBar: boolean;
|
|
1403
|
+
i18Class: string;
|
|
1404
|
+
setSessionDate: setSessionDateProps;
|
|
1405
|
+
webViewLod: boolean;
|
|
920
1406
|
};
|
|
921
|
-
declare function useLocationState<T>(): T;
|
|
922
1407
|
|
|
923
1408
|
declare function AccountUpdater(): any;
|
|
924
1409
|
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
1410
|
+
interface AddressTypeItem {
|
|
1411
|
+
address: string;
|
|
1412
|
+
assets: {
|
|
1413
|
+
total_btc: string;
|
|
1414
|
+
satoshis: number;
|
|
1415
|
+
total_inscription: number;
|
|
1416
|
+
};
|
|
1417
|
+
name: string;
|
|
1418
|
+
value: AddressType;
|
|
1419
|
+
}
|
|
1420
|
+
declare function useAddressTypeScreenLogic(): {
|
|
1421
|
+
currentKeyring: _unisat_wallet_shared.WalletKeyring;
|
|
1422
|
+
items: AddressTypeItem[];
|
|
1423
|
+
wallet: WalletController;
|
|
1424
|
+
onClickItem: (item: AddressTypeItem) => Promise<void>;
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
declare function useAlkanesListLogic(): {
|
|
1428
|
+
items: AlkanesBalance[];
|
|
1429
|
+
total: number;
|
|
1430
|
+
loading: boolean;
|
|
1431
|
+
hasMore: boolean;
|
|
1432
|
+
onRefresh: () => Promise<void>;
|
|
1433
|
+
onLoadMore: () => void;
|
|
1434
|
+
onClickItem: (item: AlkanesBalance) => void;
|
|
1435
|
+
priceMap: {
|
|
1436
|
+
[key: string]: TickPriceItem;
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1440
|
+
declare function useAmountInputLogic(props: {
|
|
1441
|
+
value?: string;
|
|
1442
|
+
runesDecimal?: number;
|
|
1443
|
+
disableDecimal?: boolean;
|
|
1444
|
+
enableBrc20Decimal?: boolean;
|
|
1445
|
+
onAmountInputChange?: (amount: string) => void;
|
|
1446
|
+
min?: number;
|
|
1447
|
+
step?: number;
|
|
1448
|
+
}): {
|
|
1449
|
+
handleInputAmount: (e: {
|
|
1450
|
+
target: {
|
|
1451
|
+
value: string;
|
|
1452
|
+
};
|
|
1453
|
+
} | string) => void;
|
|
1454
|
+
handleStepUp: () => void;
|
|
1455
|
+
handleStepDown: () => void;
|
|
1456
|
+
handleReset: () => void;
|
|
1457
|
+
inputValue: string;
|
|
1458
|
+
};
|
|
1459
|
+
|
|
1460
|
+
declare function useAnnouncementCardLogic(): {
|
|
1461
|
+
loading: boolean;
|
|
1462
|
+
validAnnouncements: Announcement[];
|
|
1463
|
+
current: Announcement;
|
|
1464
|
+
activeIndex: number;
|
|
1465
|
+
handleDotClick: (index: number) => void;
|
|
1466
|
+
handleDismissAll: () => Promise<void>;
|
|
1467
|
+
isLinkable: (announcement: Announcement) => boolean;
|
|
1468
|
+
};
|
|
1469
|
+
|
|
1470
|
+
declare enum BRC20SendTabKey {
|
|
1471
|
+
STEP1 = 0,
|
|
1472
|
+
STEP2 = 1,
|
|
1473
|
+
STEP3 = 2
|
|
1474
|
+
}
|
|
1475
|
+
interface ContextData$2 {
|
|
1476
|
+
tabKey: BRC20SendTabKey;
|
|
1477
|
+
tokenBalance: TokenBalance;
|
|
1478
|
+
transferAmount: string;
|
|
1479
|
+
transferableList: TokenTransfer[];
|
|
1480
|
+
inscriptionIdSet: Set<string>;
|
|
1481
|
+
receiver: string;
|
|
1482
|
+
rawTxInfo: RawTxInfo;
|
|
1483
|
+
tokenInfo: TokenInfo;
|
|
1484
|
+
}
|
|
1485
|
+
interface UpdateContextDataParams$2 {
|
|
1486
|
+
tabKey?: BRC20SendTabKey;
|
|
1487
|
+
tokenBalance?: TokenBalance;
|
|
1488
|
+
transferAmount?: string;
|
|
1489
|
+
transferableList?: TokenTransfer[];
|
|
1490
|
+
inscriptionIdSet?: Set<string>;
|
|
1491
|
+
receiver?: string;
|
|
1492
|
+
rawTxInfo?: RawTxInfo;
|
|
1493
|
+
}
|
|
1494
|
+
interface BRC20SendStepParams {
|
|
1495
|
+
contextData: ContextData$2;
|
|
1496
|
+
updateContextData: (params: UpdateContextDataParams$2) => void;
|
|
1497
|
+
}
|
|
1498
|
+
declare function useBRC20SendScreenLogic(): {
|
|
1499
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1500
|
+
contextData: ContextData$2;
|
|
1501
|
+
updateContextData: (params: UpdateContextDataParams$2) => void;
|
|
1502
|
+
onHeaderBack: () => void;
|
|
1503
|
+
onTabClick: (key: string) => void;
|
|
1504
|
+
};
|
|
1505
|
+
declare function useBRC20SendScreenLogicStep1({ contextData, updateContextData, }: BRC20SendStepParams): {
|
|
1506
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1507
|
+
disabled: boolean;
|
|
1508
|
+
tokenBalance: TokenBalance;
|
|
1509
|
+
onClickNext: () => void;
|
|
1510
|
+
};
|
|
1511
|
+
declare function useBRC20SendScreenLogicStep2({ contextData, updateContextData, }: BRC20SendStepParams): {
|
|
1512
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1513
|
+
disabled: boolean;
|
|
1514
|
+
onStep2ClickNext: () => Promise<void>;
|
|
1515
|
+
onStep2ClickBack: () => Promise<void>;
|
|
1516
|
+
};
|
|
1517
|
+
declare function useBRC20SendScreenLogicStep3({ contextData, updateContextData, }: BRC20SendStepParams): {
|
|
1518
|
+
signPsbtParams: SignPsbtParams;
|
|
1519
|
+
onSignPsbtConfirm: (res: any) => Promise<void>;
|
|
1520
|
+
};
|
|
1521
|
+
declare function useTransferableListLogic({ contextData, updateContextData }: BRC20SendStepParams): {
|
|
1522
|
+
items: TokenTransfer[];
|
|
1523
|
+
selectedCount: number;
|
|
1524
|
+
allSelected: boolean;
|
|
1525
|
+
loading: boolean;
|
|
1526
|
+
loadingLump: boolean;
|
|
1527
|
+
onClickItem: (item: TokenTransfer) => void;
|
|
1528
|
+
onCheckBoxChange: (e: any) => void;
|
|
1529
|
+
onClickCheckBoxInMobile: () => void;
|
|
1530
|
+
onClickRefresh: () => void;
|
|
1531
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1532
|
+
};
|
|
942
1533
|
|
|
943
|
-
|
|
944
|
-
|
|
1534
|
+
declare enum BRC20SingleStepKey {
|
|
1535
|
+
STEP1 = "STEP1",
|
|
1536
|
+
STEP2 = "STEP2",
|
|
1537
|
+
STEP3 = "STEP3"
|
|
1538
|
+
}
|
|
1539
|
+
declare function useBRC20SingleStepScreenLogic(): {
|
|
1540
|
+
signPsbtParamsStep2: SignPsbtParams;
|
|
1541
|
+
signPsbtParamsStep3: SignPsbtParams;
|
|
1542
|
+
availableBalance: string;
|
|
1543
|
+
tokenBalance: _unisat_wallet_shared.TokenBalance;
|
|
1544
|
+
tokenInfo: _unisat_wallet_shared.TokenInfo;
|
|
1545
|
+
inputAmount: string;
|
|
1546
|
+
setInputAmount: react.Dispatch<react.SetStateAction<string>>;
|
|
1547
|
+
disabled: boolean;
|
|
1548
|
+
error: string;
|
|
1549
|
+
toInfo: {
|
|
1550
|
+
address: string;
|
|
1551
|
+
domain: string;
|
|
1552
|
+
inscription?: Inscription;
|
|
1553
|
+
};
|
|
1554
|
+
setToInfo: react.Dispatch<react.SetStateAction<{
|
|
1555
|
+
address: string;
|
|
1556
|
+
domain: string;
|
|
1557
|
+
inscription?: Inscription;
|
|
1558
|
+
}>>;
|
|
1559
|
+
step: BRC20SingleStepKey;
|
|
1560
|
+
onClickBack: () => void;
|
|
1561
|
+
onClickConfirmStep1: () => Promise<void>;
|
|
1562
|
+
onClickConfirmStep2: (signPsbtResult: SignPsbtResult) => Promise<void>;
|
|
1563
|
+
onClickConfirmStep3: (signPsbtResult: SignPsbtResult) => Promise<void>;
|
|
1564
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1565
|
+
tools: ToolsContextType;
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1568
|
+
declare enum BRC20TokenScreenTabKey {
|
|
1569
|
+
DETAILS = "details",
|
|
1570
|
+
HISTORY = "history"
|
|
1571
|
+
}
|
|
1572
|
+
interface BRC20OutWalletBalanceItem {
|
|
1573
|
+
key: 'wallet' | 'swap' | 'prog';
|
|
1574
|
+
label: string;
|
|
1575
|
+
amount: string;
|
|
1576
|
+
}
|
|
1577
|
+
declare function useBRC20TokenHistoryLogic(props: {
|
|
1578
|
+
ticker: string;
|
|
1579
|
+
displayName?: string;
|
|
1580
|
+
}): {
|
|
1581
|
+
displayItems: {
|
|
1582
|
+
date: string;
|
|
1583
|
+
items: {
|
|
1584
|
+
key: string;
|
|
1585
|
+
icon: string;
|
|
1586
|
+
mainTitle: string;
|
|
1587
|
+
subTitle: string;
|
|
1588
|
+
amount: string;
|
|
1589
|
+
pending: boolean;
|
|
1590
|
+
txid: string;
|
|
1591
|
+
}[];
|
|
1592
|
+
}[];
|
|
1593
|
+
isFailed: boolean;
|
|
1594
|
+
isEmpty: boolean;
|
|
1595
|
+
isLoading: boolean;
|
|
1596
|
+
};
|
|
1597
|
+
declare function useBRC20TokenScreenLogic(): {
|
|
1598
|
+
totalBalance: string;
|
|
1599
|
+
onSwapBalance: string;
|
|
1600
|
+
onProgBalance: string;
|
|
1601
|
+
inWalletBalance: string;
|
|
1602
|
+
outWalletBalanceItems: BRC20OutWalletBalanceItem[];
|
|
1603
|
+
hasOutWalletBalance: boolean;
|
|
1604
|
+
enableHistory: boolean;
|
|
1605
|
+
enableTrade: boolean;
|
|
1606
|
+
enableMint: boolean;
|
|
1607
|
+
enableTransfer: boolean;
|
|
1608
|
+
loading: boolean;
|
|
1609
|
+
tokenSummary: AddressTokenSummary;
|
|
1610
|
+
deployInscription: Inscription;
|
|
1611
|
+
activeTab: BRC20TokenScreenTabKey;
|
|
1612
|
+
setActiveTab: react.Dispatch<react.SetStateAction<BRC20TokenScreenTabKey>>;
|
|
1613
|
+
tabItems: {
|
|
1614
|
+
key: BRC20TokenScreenTabKey;
|
|
1615
|
+
label: string;
|
|
1616
|
+
}[];
|
|
1617
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1618
|
+
ticker: string;
|
|
1619
|
+
chain: _unisat_wallet_shared.TypeChain;
|
|
1620
|
+
tools: ToolsContextType;
|
|
1621
|
+
isBrc20Prog: boolean;
|
|
1622
|
+
iconInfo: {
|
|
1623
|
+
iconUrl: string;
|
|
1624
|
+
iconShortName: string;
|
|
1625
|
+
};
|
|
1626
|
+
onClickWrapBrc20Prog: () => void;
|
|
1627
|
+
onClickUnwrapBrc20Prog: () => void;
|
|
1628
|
+
onClickSendBrc20Prog: () => void;
|
|
1629
|
+
onClickSwapInSwap: () => void;
|
|
1630
|
+
onClickAddLiquidityInSwap: () => void;
|
|
1631
|
+
onClickRemoveLiquidityInSwap: () => void;
|
|
1632
|
+
onClickWrapInSwap: () => void;
|
|
1633
|
+
onClickUnwrapInSwap: () => void;
|
|
1634
|
+
onClickSendInSwap: () => void;
|
|
1635
|
+
onClickMint: () => void;
|
|
1636
|
+
onClickSend: () => void;
|
|
1637
|
+
onClickTrade: () => void;
|
|
1638
|
+
onClickSingleStepSend: () => void;
|
|
1639
|
+
};
|
|
1640
|
+
|
|
1641
|
+
declare function useEditWalletNameScreenLogic(): {
|
|
1642
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1643
|
+
keyring: _unisat_wallet_shared.WalletKeyring;
|
|
1644
|
+
isValidName: boolean;
|
|
1645
|
+
truncatedTitle: string;
|
|
1646
|
+
handleOnClick: () => Promise<void>;
|
|
1647
|
+
handleOnKeyUp: (e: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
1648
|
+
onInputChange: (e: {
|
|
1649
|
+
target: {
|
|
1650
|
+
value: string;
|
|
1651
|
+
};
|
|
1652
|
+
} | string) => void;
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1655
|
+
declare enum FeeRateType {
|
|
1656
|
+
SLOW = 0,
|
|
1657
|
+
AVG = 1,
|
|
1658
|
+
FAST = 2,
|
|
1659
|
+
CUSTOM = 3
|
|
1660
|
+
}
|
|
1661
|
+
interface FeeOption {
|
|
1662
|
+
type?: FeeRateType;
|
|
1663
|
+
title: string;
|
|
1664
|
+
desc?: string;
|
|
1665
|
+
feeRate: number;
|
|
1666
|
+
}
|
|
1667
|
+
declare function useFeeRateBarLogic({ readonly }: {
|
|
1668
|
+
readonly?: boolean;
|
|
1669
|
+
}): {
|
|
1670
|
+
feeOptions: FeeOption[];
|
|
1671
|
+
feeOptionIndex: number;
|
|
1672
|
+
setFeeOptionIndex: (index: number) => Promise<void>;
|
|
1673
|
+
feeRateInputVal: string;
|
|
1674
|
+
adjustFeeRateInput: (inputVal: string) => void;
|
|
1675
|
+
isCustomOption: (option: FeeOption) => boolean;
|
|
1676
|
+
fontSize: string;
|
|
1677
|
+
isSpecialLocale: boolean;
|
|
1678
|
+
toggleLowFeeRate: () => Promise<void>;
|
|
1679
|
+
showCustomInput: boolean;
|
|
1680
|
+
toggleCustomInput: (show: boolean) => void;
|
|
1681
|
+
supportLowFeeMode: boolean;
|
|
1682
|
+
showLowFeeModeTipsPopover: boolean;
|
|
1683
|
+
setShowLowFeeModeTipsPopover: react.Dispatch<react.SetStateAction<boolean>>;
|
|
1684
|
+
isSub1FeeOptionOn: boolean;
|
|
1685
|
+
};
|
|
1686
|
+
|
|
1687
|
+
declare function useLockTimePageLogic(): {
|
|
1688
|
+
autoLockTimeId: number;
|
|
1689
|
+
autoLockTimes: {
|
|
1690
|
+
id: number;
|
|
1691
|
+
time: number;
|
|
1692
|
+
label: string;
|
|
1693
|
+
}[];
|
|
1694
|
+
loading: boolean;
|
|
1695
|
+
handleSelectOption: (option: any) => Promise<void>;
|
|
1696
|
+
};
|
|
1697
|
+
|
|
1698
|
+
declare function useUnreadNotificationsCount(): number;
|
|
1699
|
+
declare function useNotificationsLogic(): {
|
|
1700
|
+
notifications: StoredNotification[];
|
|
1701
|
+
loading: boolean;
|
|
1702
|
+
unreadCount: number;
|
|
1703
|
+
handleReadNotification: (id: string) => Promise<void>;
|
|
1704
|
+
handleReadAll: () => Promise<void>;
|
|
1705
|
+
handleDeleteNotification: (id: string) => Promise<void>;
|
|
1706
|
+
fetchNotifications: () => Promise<void>;
|
|
1707
|
+
handleCardClick: (notification: StoredNotification) => Promise<void>;
|
|
1708
|
+
formatTime: (timestamp: number) => string;
|
|
1709
|
+
};
|
|
1710
|
+
|
|
1711
|
+
declare function useSendOrdinalsInscriptionScreenLogic(): {
|
|
1712
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1713
|
+
onAddressInputChange: (val: any) => void;
|
|
1714
|
+
toInfo: {
|
|
1715
|
+
address: string;
|
|
1716
|
+
domain: string;
|
|
1717
|
+
};
|
|
1718
|
+
outputValue: number;
|
|
1719
|
+
minOutputValue: number;
|
|
1720
|
+
defaultOutputValue: number;
|
|
1721
|
+
setOutputValue: react.Dispatch<react.SetStateAction<number>>;
|
|
1722
|
+
inscriptions: Inscription[];
|
|
1723
|
+
disabled: boolean;
|
|
1724
|
+
error: string;
|
|
1725
|
+
onClickBack: () => void;
|
|
1726
|
+
onClickNext: () => void;
|
|
1727
|
+
};
|
|
1728
|
+
|
|
1729
|
+
declare function useTxCreateScreenLogic(): {
|
|
1730
|
+
headerTitle: string;
|
|
1731
|
+
chain: _unisat_wallet_shared.TypeChain;
|
|
1732
|
+
toInfo: {
|
|
1733
|
+
address: string;
|
|
1734
|
+
domain: string;
|
|
1735
|
+
inscription?: _unisat_wallet_shared.Inscription;
|
|
1736
|
+
};
|
|
1737
|
+
onAddressInputChange: (val: any) => void;
|
|
1738
|
+
toSatoshis: number;
|
|
1739
|
+
inputAmount: string;
|
|
1740
|
+
onAmountInputChange: (amount: any) => void;
|
|
1741
|
+
onAmountMaxClick: () => void;
|
|
1742
|
+
showUnavailable: boolean;
|
|
1743
|
+
availableAmount: string;
|
|
1744
|
+
unavailableAmount: string;
|
|
1745
|
+
unavailableTipText: string;
|
|
1746
|
+
btcUnit: string;
|
|
1747
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1748
|
+
walletConfig: _unisat_wallet_shared.WalletConfig;
|
|
1749
|
+
isSpecialLocale: boolean;
|
|
1750
|
+
error: string;
|
|
1751
|
+
disabled: boolean;
|
|
1752
|
+
onClickNext: () => void;
|
|
1753
|
+
};
|
|
1754
|
+
|
|
1755
|
+
declare enum Step {
|
|
1756
|
+
STEP1 = 0,
|
|
1757
|
+
STEP2 = 1,
|
|
1758
|
+
STEP3 = 2,
|
|
1759
|
+
STEP4 = 3
|
|
1760
|
+
}
|
|
1761
|
+
interface ContextData$1 {
|
|
1762
|
+
step: Step;
|
|
1763
|
+
ticker: string;
|
|
1764
|
+
session?: any;
|
|
1765
|
+
tokenBalance?: TokenBalance;
|
|
1766
|
+
order?: InscribeOrder;
|
|
1767
|
+
toSignData?: ToSignData;
|
|
1768
|
+
amount?: string;
|
|
1769
|
+
isApproval: boolean;
|
|
1770
|
+
tokenInfo?: TokenInfo;
|
|
1771
|
+
amountEditable?: boolean;
|
|
1772
|
+
}
|
|
1773
|
+
interface UpdateContextDataParams$1 {
|
|
1774
|
+
step?: Step;
|
|
1775
|
+
ticket?: string;
|
|
1776
|
+
session?: any;
|
|
1777
|
+
tokenBalance?: TokenBalance;
|
|
1778
|
+
order?: InscribeOrder;
|
|
1779
|
+
toSignData?: ToSignData;
|
|
1780
|
+
amount?: string;
|
|
1781
|
+
tokenInfo?: TokenInfo;
|
|
1782
|
+
amountEditable?: boolean;
|
|
1783
|
+
}
|
|
1784
|
+
interface BRC20InscribeTransferParams {
|
|
1785
|
+
contextData: ContextData$1;
|
|
1786
|
+
updateContextData: (params: UpdateContextDataParams$1) => void;
|
|
1787
|
+
}
|
|
1788
|
+
declare function useBRC20InscribeTransferLogic(): {
|
|
1789
|
+
contextData: ContextData$1;
|
|
1790
|
+
updateContextData: (params: UpdateContextDataParams$1) => void;
|
|
1791
|
+
};
|
|
1792
|
+
declare function useBRC20InscribeTransferLogicStep1(params: BRC20InscribeTransferParams): {
|
|
1793
|
+
onClickInscribe: () => Promise<void>;
|
|
1794
|
+
loading: boolean;
|
|
1795
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1796
|
+
nav: NavigationContextType;
|
|
1797
|
+
inputAmount: string;
|
|
1798
|
+
inputError: string;
|
|
1799
|
+
setInputAmount: react.Dispatch<react.SetStateAction<string>>;
|
|
1800
|
+
inputDisabled: boolean;
|
|
1801
|
+
inputErrorAvailable: string;
|
|
1802
|
+
defaultOutputValue: number;
|
|
1803
|
+
setOutputValue: react.Dispatch<react.SetStateAction<number>>;
|
|
1804
|
+
disabled: boolean;
|
|
1805
|
+
loadingOnly: boolean;
|
|
1806
|
+
handleCancel: () => void;
|
|
1807
|
+
};
|
|
1808
|
+
declare function useBRC20InscribeTransferLogicStep2(params: BRC20InscribeTransferParams): {
|
|
1809
|
+
isEmpty: boolean;
|
|
1810
|
+
networkFee: string;
|
|
1811
|
+
outputValue: string;
|
|
1812
|
+
minerFee: string;
|
|
1813
|
+
originServiceFee: string;
|
|
1814
|
+
serviceFee: string;
|
|
1815
|
+
totalFee: string;
|
|
1816
|
+
btcUnit: string;
|
|
1817
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1818
|
+
session: any;
|
|
1819
|
+
amount: string;
|
|
1820
|
+
tokenBalance: TokenBalance;
|
|
1821
|
+
order?: undefined;
|
|
1822
|
+
toSignData?: undefined;
|
|
1823
|
+
} | {
|
|
1824
|
+
networkFee: string;
|
|
1825
|
+
outputValue: string;
|
|
1826
|
+
minerFee: string;
|
|
1827
|
+
originServiceFee: string;
|
|
1828
|
+
serviceFee: string;
|
|
1829
|
+
totalFee: string;
|
|
1830
|
+
btcUnit: string;
|
|
1831
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1832
|
+
session: any;
|
|
1833
|
+
amount: string;
|
|
1834
|
+
tokenBalance: TokenBalance;
|
|
1835
|
+
order: InscribeOrder;
|
|
1836
|
+
toSignData: ToSignData;
|
|
1837
|
+
isEmpty?: undefined;
|
|
1838
|
+
};
|
|
1839
|
+
declare function useBRC20InscribeTransferLogicStep3(params: BRC20InscribeTransferParams): {
|
|
1840
|
+
signPsbtParams: SignPsbtParams;
|
|
1841
|
+
onSignPsbtHandleConfirm: (signedDatas: SignedData[]) => Promise<void>;
|
|
1842
|
+
onSignPsbtHandleCancel: () => void;
|
|
1843
|
+
onHeaderBack: () => void;
|
|
1844
|
+
};
|
|
1845
|
+
declare function useBRC20InscribeTransferLogicStep4(params: BRC20InscribeTransferParams): {
|
|
1846
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1847
|
+
result: any;
|
|
1848
|
+
onClickConfirm: () => void;
|
|
1849
|
+
};
|
|
1850
|
+
|
|
1851
|
+
declare function useAlkanesNFTScreenLogic(): {
|
|
1852
|
+
alkanesInfo: _unisat_wallet_shared.AlkanesInfo;
|
|
1853
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1854
|
+
availableUtxo: number;
|
|
1855
|
+
onClickBack: () => void;
|
|
1856
|
+
onClickSend: () => void;
|
|
1857
|
+
disabledSend: boolean;
|
|
1858
|
+
};
|
|
1859
|
+
|
|
1860
|
+
declare function useAlkanesTokenScreenLogic(): {
|
|
1861
|
+
tokenSummary: AddressAlkanesTokenSummary;
|
|
1862
|
+
loading: boolean;
|
|
1863
|
+
enableMint: boolean;
|
|
1864
|
+
enableTransfer: boolean;
|
|
1865
|
+
enableTrade: boolean;
|
|
1866
|
+
warning: boolean;
|
|
1867
|
+
setWarning: react.Dispatch<react.SetStateAction<boolean>>;
|
|
1868
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1869
|
+
tools: ToolsContextType;
|
|
1870
|
+
onClickMint: () => void;
|
|
1871
|
+
onClickSend: () => void;
|
|
1872
|
+
onClickTrade: () => void;
|
|
1873
|
+
iconInfo: {
|
|
1874
|
+
iconUrl: string;
|
|
1875
|
+
iconShortName: string;
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
|
|
1879
|
+
declare enum TabType {
|
|
1880
|
+
STEP1 = "STEP1",
|
|
1881
|
+
STEP2 = "STEP2",
|
|
1882
|
+
CHOOSE_ADDRESS_TYPE = "CHOOSE_ADDRESS_TYPE"
|
|
1883
|
+
}
|
|
1884
|
+
interface ContextData {
|
|
1885
|
+
mnemonics: string;
|
|
1886
|
+
hdPath: string;
|
|
1887
|
+
passphrase: string;
|
|
1888
|
+
addressType: AddressType;
|
|
1889
|
+
step1Completed: boolean;
|
|
1890
|
+
tabType: TabType;
|
|
1891
|
+
restoreWalletType: RestoreWalletType;
|
|
1892
|
+
isRestore: boolean;
|
|
1893
|
+
isCustom: boolean;
|
|
1894
|
+
customHdPath: string;
|
|
1895
|
+
addressTypeIndex: number;
|
|
1896
|
+
wordsType: WordsType;
|
|
1897
|
+
walletName?: string;
|
|
1898
|
+
}
|
|
1899
|
+
interface UpdateContextDataParams {
|
|
1900
|
+
mnemonics?: string;
|
|
1901
|
+
hdPath?: string;
|
|
1902
|
+
passphrase?: string;
|
|
1903
|
+
addressType?: AddressType;
|
|
1904
|
+
step1Completed?: boolean;
|
|
1905
|
+
tabType?: TabType;
|
|
1906
|
+
restoreWalletType?: RestoreWalletType;
|
|
1907
|
+
isCustom?: boolean;
|
|
1908
|
+
customHdPath?: string;
|
|
1909
|
+
addressTypeIndex?: number;
|
|
1910
|
+
wordsType?: WordsType;
|
|
1911
|
+
walletName?: string;
|
|
1912
|
+
}
|
|
1913
|
+
interface WordsItem {
|
|
1914
|
+
key: WordsType;
|
|
1915
|
+
label: string;
|
|
1916
|
+
count: number;
|
|
1917
|
+
}
|
|
1918
|
+
interface CreateWalletLogicParams {
|
|
1919
|
+
contextData: ContextData;
|
|
1920
|
+
updateContextData: (params: UpdateContextDataParams) => void;
|
|
1921
|
+
}
|
|
1922
|
+
declare function useCreateWalletLogicImportWordsStep(params: CreateWalletLogicParams): {
|
|
1923
|
+
wordsItems: WordsItem[];
|
|
1924
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1925
|
+
disabled: boolean;
|
|
1926
|
+
inputWords: string[];
|
|
1927
|
+
inputWordsText: string;
|
|
1928
|
+
onHandleEventPaste: (event: any, index: number) => void;
|
|
1929
|
+
onClickNext: () => Promise<void>;
|
|
1930
|
+
onClickWordsItem: (wordsItem: WordsItem) => void;
|
|
1931
|
+
inputWordsError: boolean;
|
|
1932
|
+
onInputWordsTextChange: (e: {
|
|
1933
|
+
target: {
|
|
1934
|
+
value: string;
|
|
1935
|
+
};
|
|
1936
|
+
} | string) => void;
|
|
1937
|
+
onInputWordsChange: (e: {
|
|
1938
|
+
target: {
|
|
1939
|
+
value: string;
|
|
1940
|
+
};
|
|
1941
|
+
} | string, index: number) => void;
|
|
1942
|
+
loading: boolean;
|
|
1943
|
+
enablePhrase: boolean;
|
|
1944
|
+
walletName: string;
|
|
1945
|
+
onInputWalletNameChange: (e: {
|
|
1946
|
+
target: {
|
|
1947
|
+
value: string;
|
|
1948
|
+
};
|
|
1949
|
+
} | string) => void;
|
|
1950
|
+
enteredWordsCount: number;
|
|
1951
|
+
shouldEnteredWordsCount: number;
|
|
1952
|
+
};
|
|
1953
|
+
|
|
1954
|
+
declare enum TabKey {
|
|
1955
|
+
DETAILS = "DETAILS",
|
|
1956
|
+
PROVENANCE = "PROVENANCE"
|
|
1957
|
+
}
|
|
1958
|
+
declare function useOrdinalsInscriptionScreenLogic(): {
|
|
1959
|
+
inscription: Inscription;
|
|
1960
|
+
isLoadingDetails: boolean;
|
|
1961
|
+
isInitialLoading: boolean;
|
|
1962
|
+
isNeedToSplit: boolean;
|
|
1963
|
+
isMultiStuck: boolean;
|
|
1964
|
+
tabKey: TabKey;
|
|
1965
|
+
setTabKey: react.Dispatch<react.SetStateAction<TabKey>>;
|
|
1966
|
+
TabKey: typeof TabKey;
|
|
1967
|
+
resetState: () => void;
|
|
1968
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1969
|
+
inscriptionId: string;
|
|
1970
|
+
onClickSend: () => void;
|
|
1971
|
+
onClickSplit: () => void;
|
|
1972
|
+
isUnconfirmed: boolean;
|
|
1973
|
+
withSend: boolean;
|
|
1974
|
+
shouldShowTabs: boolean;
|
|
1975
|
+
nav: NavigationContextType;
|
|
1976
|
+
};
|
|
1977
|
+
|
|
1978
|
+
declare function useRunesTokenScreenLogic(): {
|
|
1979
|
+
runeid: string;
|
|
1980
|
+
tokenSummary: AddressRunesTokenSummary;
|
|
1981
|
+
iconInfo: {
|
|
1982
|
+
iconUrl: string;
|
|
1983
|
+
iconShortName: string;
|
|
1984
|
+
};
|
|
1985
|
+
loading: boolean;
|
|
1986
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
1987
|
+
enableMint: boolean;
|
|
1988
|
+
onClickMint: () => void;
|
|
1989
|
+
tools: ToolsContextType;
|
|
1990
|
+
ordinalsWebsite: string;
|
|
1991
|
+
txExplorerUrl: string;
|
|
1992
|
+
enableTransfer: boolean;
|
|
1993
|
+
onClickSend: () => void;
|
|
1994
|
+
enableTrade: boolean;
|
|
1995
|
+
onClickTrade: () => void;
|
|
1996
|
+
};
|
|
1997
|
+
|
|
1998
|
+
interface BRC20BalanceCardProps {
|
|
1999
|
+
tokenBalance: TokenBalance;
|
|
2000
|
+
onClick?: () => void;
|
|
2001
|
+
price?: TickPriceItem;
|
|
2002
|
+
}
|
|
2003
|
+
declare function useBRC20BalanceCardLogic(props: BRC20BalanceCardProps): {
|
|
2004
|
+
ticker: string;
|
|
2005
|
+
displayName: string;
|
|
2006
|
+
selfMint: boolean;
|
|
2007
|
+
tag: string;
|
|
2008
|
+
iconInfo: {
|
|
2009
|
+
iconUrl: string;
|
|
2010
|
+
iconShortName: string;
|
|
2011
|
+
};
|
|
2012
|
+
totalBalance: string;
|
|
2013
|
+
hasOutWalletBalance: boolean;
|
|
2014
|
+
onProgBalance: string;
|
|
2015
|
+
inWalletBalance: string;
|
|
2016
|
+
onSwapBalance: string;
|
|
2017
|
+
price: TickPriceItem;
|
|
2018
|
+
showPrice: boolean;
|
|
2019
|
+
onClick: () => void;
|
|
2020
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2021
|
+
};
|
|
2022
|
+
|
|
2023
|
+
declare function useExportMnemonicsScreenLogic(): {
|
|
2024
|
+
words: string[];
|
|
2025
|
+
pathName: string;
|
|
2026
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2027
|
+
setPassword: react.Dispatch<react.SetStateAction<string>>;
|
|
2028
|
+
disabled: boolean;
|
|
2029
|
+
btnClick: () => Promise<void>;
|
|
2030
|
+
handleOnKeyUp: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
2031
|
+
mnemonic: string;
|
|
2032
|
+
passphrase: string;
|
|
2033
|
+
error: string;
|
|
2034
|
+
copy: (str: string) => void;
|
|
2035
|
+
keyring: _unisat_wallet_shared.WalletKeyring;
|
|
2036
|
+
onClickBack: () => void;
|
|
2037
|
+
};
|
|
2038
|
+
|
|
2039
|
+
declare function useExportPrivateKeyScreenLogic(): {
|
|
2040
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2041
|
+
setPassword: react.Dispatch<react.SetStateAction<string>>;
|
|
2042
|
+
disabled: boolean;
|
|
2043
|
+
btnClick: () => Promise<void>;
|
|
2044
|
+
handleOnKeyUp: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
2045
|
+
privateKey: {
|
|
2046
|
+
hex: string;
|
|
2047
|
+
wif: string;
|
|
2048
|
+
};
|
|
2049
|
+
error: string;
|
|
2050
|
+
copy: (str: string) => void;
|
|
2051
|
+
onClickBack: () => void;
|
|
2052
|
+
};
|
|
2053
|
+
|
|
2054
|
+
declare function useSendRunesScreenLogic(): {
|
|
2055
|
+
runeInfo: _unisat_wallet_shared.RuneInfo;
|
|
2056
|
+
inputAmount: string;
|
|
2057
|
+
totalBalanceStr: string;
|
|
2058
|
+
availableBalanceStr: string;
|
|
2059
|
+
setInputAmount: react.Dispatch<react.SetStateAction<string>>;
|
|
2060
|
+
disabled: boolean;
|
|
2061
|
+
toInfo: {
|
|
2062
|
+
address: string;
|
|
2063
|
+
domain: string;
|
|
2064
|
+
inscription?: Inscription;
|
|
2065
|
+
};
|
|
2066
|
+
setToInfo: react.Dispatch<react.SetStateAction<{
|
|
2067
|
+
address: string;
|
|
2068
|
+
domain: string;
|
|
2069
|
+
inscription?: Inscription;
|
|
2070
|
+
}>>;
|
|
2071
|
+
error: string;
|
|
2072
|
+
defaultOutputValue: number;
|
|
2073
|
+
minOutputValue: number;
|
|
2074
|
+
setOutputValue: react.Dispatch<react.SetStateAction<number>>;
|
|
2075
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2076
|
+
onClickBack: () => void;
|
|
2077
|
+
onClickNext: () => void;
|
|
2078
|
+
};
|
|
2079
|
+
|
|
2080
|
+
declare function useEditContactScreenLogic(): {
|
|
2081
|
+
name: string;
|
|
2082
|
+
contactAddress: string;
|
|
2083
|
+
chainType: ChainType;
|
|
2084
|
+
error: string;
|
|
2085
|
+
loading: boolean;
|
|
2086
|
+
handleNameChange: (e: {
|
|
2087
|
+
target: {
|
|
2088
|
+
value: string;
|
|
2089
|
+
};
|
|
2090
|
+
} | string) => void;
|
|
2091
|
+
handleAddressChange: (e: {
|
|
2092
|
+
target: {
|
|
2093
|
+
value: string;
|
|
2094
|
+
};
|
|
2095
|
+
} | string) => void;
|
|
2096
|
+
handleSubmit: () => Promise<void>;
|
|
2097
|
+
handleDelete: () => Promise<void>;
|
|
2098
|
+
onClickBack: () => void;
|
|
2099
|
+
address: string;
|
|
2100
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2101
|
+
};
|
|
2102
|
+
|
|
2103
|
+
declare function useEditAccountNameScreenLogic(): {
|
|
2104
|
+
alianName: string;
|
|
2105
|
+
handleOnClick: () => Promise<void>;
|
|
2106
|
+
handleOnKeyUp: (e: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
2107
|
+
isValidName: boolean;
|
|
2108
|
+
truncatedTitle: string;
|
|
2109
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2110
|
+
account: Account;
|
|
2111
|
+
onInputChange: (e: {
|
|
2112
|
+
target: {
|
|
2113
|
+
value: string;
|
|
2114
|
+
};
|
|
2115
|
+
} | string) => void;
|
|
2116
|
+
onClickBack: () => void;
|
|
2117
|
+
};
|
|
2118
|
+
|
|
2119
|
+
declare function useAlkanesCollectionListLogic(): {
|
|
2120
|
+
items: AlkanesCollection[];
|
|
2121
|
+
total: number;
|
|
2122
|
+
loading: boolean;
|
|
2123
|
+
hasMore: boolean;
|
|
2124
|
+
onRefresh: () => Promise<void>;
|
|
2125
|
+
onLoadMore: () => void;
|
|
2126
|
+
onClickItem: (item: AlkanesCollection) => void;
|
|
2127
|
+
};
|
|
2128
|
+
|
|
2129
|
+
declare function useBRC20ListLogic(): {
|
|
2130
|
+
items: TokenBalance[];
|
|
2131
|
+
total: number;
|
|
2132
|
+
loading: boolean;
|
|
2133
|
+
hasMore: boolean;
|
|
2134
|
+
onRefresh: () => Promise<void>;
|
|
2135
|
+
onLoadMore: () => void;
|
|
2136
|
+
onClickItem: (item: TokenBalance) => void;
|
|
2137
|
+
priceMap: {
|
|
2138
|
+
[key: string]: TickPriceItem;
|
|
2139
|
+
};
|
|
2140
|
+
};
|
|
2141
|
+
|
|
2142
|
+
declare function useInscriptionListLogic(): {
|
|
2143
|
+
items: Inscription[];
|
|
2144
|
+
total: number;
|
|
2145
|
+
loading: boolean;
|
|
2146
|
+
hasMore: boolean;
|
|
2147
|
+
onRefresh: () => Promise<void>;
|
|
2148
|
+
onLoadMore: () => void;
|
|
2149
|
+
onClickItem: (item: Inscription) => void;
|
|
2150
|
+
};
|
|
2151
|
+
|
|
2152
|
+
declare function useRunesListLogic(): {
|
|
2153
|
+
items: RuneBalance[];
|
|
2154
|
+
total: number;
|
|
2155
|
+
loading: boolean;
|
|
2156
|
+
hasMore: boolean;
|
|
2157
|
+
onRefresh: () => Promise<void>;
|
|
2158
|
+
onLoadMore: () => void;
|
|
2159
|
+
onClickItem: (item: RuneBalance) => void;
|
|
2160
|
+
priceMap: {
|
|
2161
|
+
[key: string]: TickPriceItem;
|
|
2162
|
+
};
|
|
2163
|
+
};
|
|
2164
|
+
|
|
2165
|
+
declare function useCAT20ListLogic(version: CAT_VERSION): {
|
|
2166
|
+
tokens: CAT20Balance[];
|
|
2167
|
+
total: number;
|
|
2168
|
+
loading: boolean;
|
|
2169
|
+
hasMore: boolean;
|
|
2170
|
+
onRefresh: () => Promise<void>;
|
|
2171
|
+
onLoadMore: () => void;
|
|
2172
|
+
onClickItem: (item: CAT20Balance) => void;
|
|
2173
|
+
priceMap: {
|
|
2174
|
+
[key: string]: TickPriceItem;
|
|
2175
|
+
};
|
|
2176
|
+
};
|
|
2177
|
+
|
|
2178
|
+
declare enum SendCAT20ScreenStep {
|
|
2179
|
+
PREPARE = 0,
|
|
2180
|
+
SIGN_COMMIT = 1,
|
|
2181
|
+
WAITING = 2,
|
|
2182
|
+
SIGN_REVEAL = 3
|
|
2183
|
+
}
|
|
2184
|
+
declare function useSendCAT20ScreenLogic(): {
|
|
2185
|
+
cat20Info: _unisat_wallet_shared.CAT20TokenInfo;
|
|
2186
|
+
cat20Balance: _unisat_wallet_shared.CAT20Balance;
|
|
2187
|
+
availableTokenAmount: string;
|
|
2188
|
+
toInfo: {
|
|
2189
|
+
address: string;
|
|
2190
|
+
domain: string;
|
|
2191
|
+
inscription?: Inscription;
|
|
2192
|
+
};
|
|
2193
|
+
setToInfo: react.Dispatch<react.SetStateAction<{
|
|
2194
|
+
address: string;
|
|
2195
|
+
domain: string;
|
|
2196
|
+
inscription?: Inscription;
|
|
2197
|
+
}>>;
|
|
2198
|
+
inputAmount: string;
|
|
2199
|
+
setInputAmount: react.Dispatch<react.SetStateAction<string>>;
|
|
2200
|
+
error: string;
|
|
2201
|
+
disabled: boolean;
|
|
2202
|
+
step: SendCAT20ScreenStep;
|
|
2203
|
+
showMergeBTCUTXOPopover: boolean;
|
|
2204
|
+
setShowMergeBTCUTXOPopover: react.Dispatch<react.SetStateAction<boolean>>;
|
|
2205
|
+
shouldShowMerge: boolean;
|
|
2206
|
+
onClickNext: () => Promise<void>;
|
|
2207
|
+
onClickBack: () => void;
|
|
2208
|
+
onSignCommitPsbtHandleConfirm: (signedDatas: SignedData[]) => Promise<void>;
|
|
2209
|
+
onSignCommitPsbtHandleCancel: () => void;
|
|
2210
|
+
onSignCommitPsbtHandleBack: () => void;
|
|
2211
|
+
signCommitPsbtParams: SignPsbtParams;
|
|
2212
|
+
onSignRevealPsbtHandleConfirm: (signedDatas: SignedData[]) => Promise<void>;
|
|
2213
|
+
onSignRevealPsbtHandleCancel: () => void;
|
|
2214
|
+
onSignRevealPsbtHandleBack: () => void;
|
|
2215
|
+
signRevealPsbtParams: SignPsbtParams;
|
|
2216
|
+
onClickMergeUTXO: () => void;
|
|
2217
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2218
|
+
};
|
|
2219
|
+
|
|
2220
|
+
declare enum SendCAT721ScreenStep {
|
|
2221
|
+
PREPARE = 0,
|
|
2222
|
+
SIGN_COMMIT = 1,
|
|
2223
|
+
WAITING = 2,
|
|
2224
|
+
SIGN_REVEAL = 3
|
|
2225
|
+
}
|
|
2226
|
+
declare function useSendCAT721ScreenLogic(): {
|
|
2227
|
+
version: _unisat_wallet_shared.CAT_VERSION;
|
|
2228
|
+
localId: string;
|
|
2229
|
+
collectionInfo: _unisat_wallet_shared.CAT721CollectionInfo;
|
|
2230
|
+
toInfo: {
|
|
2231
|
+
address: string;
|
|
2232
|
+
domain: string;
|
|
2233
|
+
inscription?: Inscription;
|
|
2234
|
+
};
|
|
2235
|
+
setToInfo: react.Dispatch<react.SetStateAction<{
|
|
2236
|
+
address: string;
|
|
2237
|
+
domain: string;
|
|
2238
|
+
inscription?: Inscription;
|
|
2239
|
+
}>>;
|
|
2240
|
+
error: string;
|
|
2241
|
+
disabled: boolean;
|
|
2242
|
+
step: SendCAT721ScreenStep;
|
|
2243
|
+
showMergeBTCUTXOPopover: boolean;
|
|
2244
|
+
setShowMergeBTCUTXOPopover: react.Dispatch<react.SetStateAction<boolean>>;
|
|
2245
|
+
onClickNext: () => Promise<void>;
|
|
2246
|
+
onClickBack: () => void;
|
|
2247
|
+
onSignCommitPsbtHandleConfirm: (signedDatas: SignedData[]) => Promise<void>;
|
|
2248
|
+
onSignCommitPsbtHandleCancel: () => void;
|
|
2249
|
+
onSignCommitPsbtHandleBack: () => void;
|
|
2250
|
+
signCommitPsbtParams: SignPsbtParams;
|
|
2251
|
+
onSignRevealPsbtHandleConfirm: (signedDatas: SignedData[]) => Promise<void>;
|
|
2252
|
+
onSignRevealPsbtHandleCancel: () => void;
|
|
2253
|
+
onSignRevealPsbtHandleBack: () => void;
|
|
2254
|
+
signRevealPsbtParams: SignPsbtParams;
|
|
2255
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2256
|
+
};
|
|
2257
|
+
|
|
2258
|
+
declare function useAlkanesNFTListLogic(collectionId: string): {
|
|
2259
|
+
items: AlkanesInfo[];
|
|
2260
|
+
total: number;
|
|
2261
|
+
loading: boolean;
|
|
2262
|
+
hasMore: boolean;
|
|
2263
|
+
onRefresh: () => Promise<void>;
|
|
2264
|
+
onLoadMore: () => void;
|
|
2265
|
+
onClickItem: (item: AlkanesInfo) => void;
|
|
2266
|
+
};
|
|
2267
|
+
|
|
2268
|
+
declare function useBRC20ProgListLogic(): {
|
|
2269
|
+
items: TokenBalance[];
|
|
2270
|
+
total: number;
|
|
2271
|
+
loading: boolean;
|
|
2272
|
+
hasMore: boolean;
|
|
2273
|
+
onRefresh: () => Promise<void>;
|
|
2274
|
+
onLoadMore: () => void;
|
|
2275
|
+
onClickItem: (item: TokenBalance) => void;
|
|
2276
|
+
priceMap: {
|
|
2277
|
+
[key: string]: TickPriceItem;
|
|
2278
|
+
};
|
|
2279
|
+
};
|
|
2280
|
+
|
|
2281
|
+
declare function useCAT721ListLogic(version: CAT_VERSION): {
|
|
2282
|
+
tokens: CAT721Balance[];
|
|
2283
|
+
total: number;
|
|
2284
|
+
loading: boolean;
|
|
2285
|
+
hasMore: boolean;
|
|
2286
|
+
onRefresh: () => Promise<void>;
|
|
2287
|
+
onLoadMore: () => void;
|
|
2288
|
+
onClickItem: (item: CAT721Balance) => void;
|
|
2289
|
+
};
|
|
2290
|
+
|
|
2291
|
+
declare function useCAT20TokenScreenLogic(): {
|
|
2292
|
+
tokenSummary: AddressCAT20TokenSummary;
|
|
2293
|
+
loading: boolean;
|
|
2294
|
+
tokenUrl: string;
|
|
2295
|
+
enableTransfer: boolean;
|
|
2296
|
+
enableTrade: boolean;
|
|
2297
|
+
iconInfo: {
|
|
2298
|
+
iconUrl: string;
|
|
2299
|
+
iconShortName: string;
|
|
2300
|
+
};
|
|
2301
|
+
onClickMerge: (e: any) => void;
|
|
2302
|
+
onClickSend: (e: any) => void;
|
|
2303
|
+
onClickTrade: (e: any) => void;
|
|
2304
|
+
onClickBack: () => void;
|
|
2305
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2306
|
+
};
|
|
2307
|
+
|
|
2308
|
+
declare function useSplitOrdinalsInscriptionScreenLogic(): {
|
|
2309
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2310
|
+
inscriptions: Inscription[];
|
|
2311
|
+
minOutputValue: number;
|
|
2312
|
+
splitedCount: number;
|
|
2313
|
+
error: string;
|
|
2314
|
+
disabled: boolean;
|
|
2315
|
+
onOutputValueChange: (value: number) => void;
|
|
2316
|
+
onClickBack: () => void;
|
|
2317
|
+
onClickNext: () => void;
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2320
|
+
declare function useCreatePasswordScreenLogic(): {
|
|
2321
|
+
disabled: boolean;
|
|
2322
|
+
strongTextRenderData: {
|
|
2323
|
+
text: any;
|
|
2324
|
+
color: string;
|
|
2325
|
+
tip: any;
|
|
2326
|
+
} | {
|
|
2327
|
+
text: any;
|
|
2328
|
+
color: string;
|
|
2329
|
+
tip?: undefined;
|
|
2330
|
+
};
|
|
2331
|
+
matchTextRenderData: {
|
|
2332
|
+
text: string;
|
|
2333
|
+
};
|
|
2334
|
+
onClickConfirm: () => void;
|
|
2335
|
+
onPasswordChange: (e: string | {
|
|
2336
|
+
target: {
|
|
2337
|
+
value: string;
|
|
2338
|
+
};
|
|
2339
|
+
}) => void;
|
|
2340
|
+
onConfirmPasswordChange: (e: string | {
|
|
2341
|
+
target: {
|
|
2342
|
+
value: string;
|
|
2343
|
+
};
|
|
2344
|
+
}) => void;
|
|
2345
|
+
};
|
|
2346
|
+
|
|
2347
|
+
declare enum SendAlkanesNFTScreenStep {
|
|
2348
|
+
CREATE_TX = 0,
|
|
2349
|
+
SIGN_TX = 1
|
|
2350
|
+
}
|
|
2351
|
+
declare function useSendAlkanesNFTScreenLogic(): {
|
|
2352
|
+
step: number;
|
|
2353
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2354
|
+
alkanesInfo: _unisat_wallet_shared.AlkanesInfo;
|
|
2355
|
+
toInfo: {
|
|
2356
|
+
address: string;
|
|
2357
|
+
domain: string;
|
|
2358
|
+
inscription?: Inscription;
|
|
2359
|
+
};
|
|
2360
|
+
disabled: boolean;
|
|
2361
|
+
error: string;
|
|
2362
|
+
setToInfo: react.Dispatch<react.SetStateAction<{
|
|
2363
|
+
address: string;
|
|
2364
|
+
domain: string;
|
|
2365
|
+
inscription?: Inscription;
|
|
2366
|
+
}>>;
|
|
2367
|
+
onCreateTxHandleConfirm: () => Promise<void>;
|
|
2368
|
+
onCreateTxHandleBack: () => void;
|
|
2369
|
+
onSignPsbtHandleConfirm: (signedDatas: SignedData[]) => Promise<void>;
|
|
2370
|
+
onSignPsbtHandleCancel: () => void;
|
|
2371
|
+
onSignPsbtHandleBack: () => void;
|
|
2372
|
+
signPsbtParams: SignPsbtParams;
|
|
2373
|
+
};
|
|
2374
|
+
|
|
2375
|
+
declare enum SendAlkanesScreenStep {
|
|
2376
|
+
CREATE_TX = 0,
|
|
2377
|
+
SIGN_TX = 1
|
|
2378
|
+
}
|
|
2379
|
+
declare function useSendAlkanesScreenLogic(): {
|
|
2380
|
+
step: SendAlkanesScreenStep;
|
|
2381
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2382
|
+
tokenBalance: _unisat_wallet_shared.AlkanesBalance;
|
|
2383
|
+
tokenInfo: _unisat_wallet_shared.AlkanesInfo;
|
|
2384
|
+
toInfo: {
|
|
2385
|
+
address: string;
|
|
2386
|
+
domain: string;
|
|
2387
|
+
inscription?: Inscription;
|
|
2388
|
+
};
|
|
2389
|
+
totalBalanceStr: string;
|
|
2390
|
+
availableBalanceStr: string;
|
|
2391
|
+
inputAmount: string;
|
|
2392
|
+
disabled: boolean;
|
|
2393
|
+
error: string;
|
|
2394
|
+
setToInfo: react.Dispatch<react.SetStateAction<{
|
|
2395
|
+
address: string;
|
|
2396
|
+
domain: string;
|
|
2397
|
+
inscription?: Inscription;
|
|
2398
|
+
}>>;
|
|
2399
|
+
setInputAmount: react.Dispatch<react.SetStateAction<string>>;
|
|
2400
|
+
onClickBack: () => void;
|
|
2401
|
+
onClickNext: () => Promise<void>;
|
|
2402
|
+
onSignPsbtHandleConfirm: (signedDatas: SignedData[]) => Promise<void>;
|
|
2403
|
+
onSignPsbtHandleCancel: () => void;
|
|
2404
|
+
onSignPsbtHandleBack: () => void;
|
|
2405
|
+
signPsbtParams: SignPsbtParams;
|
|
2406
|
+
};
|
|
2407
|
+
|
|
2408
|
+
interface RunesBalanceCardProps {
|
|
2409
|
+
tokenBalance: RuneBalance;
|
|
2410
|
+
onClick?: () => void;
|
|
2411
|
+
price?: TickPriceItem;
|
|
2412
|
+
}
|
|
2413
|
+
declare function useRunesBalanceCardLogic(props: RunesBalanceCardProps): {
|
|
2414
|
+
tokenBalance: RuneBalance;
|
|
2415
|
+
balance: BigNumber;
|
|
2416
|
+
balanceStr: string;
|
|
2417
|
+
showPrice: boolean;
|
|
2418
|
+
price: TickPriceItem;
|
|
2419
|
+
iconInfo: {
|
|
2420
|
+
iconUrl: string;
|
|
2421
|
+
iconShortName: string;
|
|
2422
|
+
};
|
|
2423
|
+
onClick: () => void;
|
|
2424
|
+
};
|
|
2425
|
+
|
|
2426
|
+
interface CAT20BalanceCardProps {
|
|
2427
|
+
tokenBalance: CAT20Balance;
|
|
2428
|
+
onClick?: () => void;
|
|
2429
|
+
showPrice?: boolean;
|
|
2430
|
+
price?: TickPriceItem;
|
|
2431
|
+
}
|
|
2432
|
+
declare function useCAT20BalanceCardLogic(props: CAT20BalanceCardProps): {
|
|
2433
|
+
tokenBalance: CAT20Balance;
|
|
2434
|
+
balance: BigNumber;
|
|
2435
|
+
balanceStr: string;
|
|
2436
|
+
price: TickPriceItem;
|
|
2437
|
+
showPrice: boolean;
|
|
2438
|
+
iconInfo: {
|
|
2439
|
+
iconUrl: string;
|
|
2440
|
+
iconShortName: string;
|
|
2441
|
+
};
|
|
2442
|
+
onClick: () => void;
|
|
2443
|
+
};
|
|
2444
|
+
|
|
2445
|
+
interface AlkanesBalanceCardProps {
|
|
2446
|
+
tokenBalance: AlkanesBalance;
|
|
2447
|
+
onClick?: () => void;
|
|
2448
|
+
price?: TickPriceItem;
|
|
2449
|
+
}
|
|
2450
|
+
declare function useAlkanesBalanceCardLogic(props: AlkanesBalanceCardProps): {
|
|
2451
|
+
tokenBalance: AlkanesBalance;
|
|
2452
|
+
balance: BigNumber;
|
|
2453
|
+
balanceStr: string;
|
|
2454
|
+
showPrice: boolean;
|
|
2455
|
+
price: TickPriceItem;
|
|
2456
|
+
iconInfo: {
|
|
2457
|
+
iconUrl: string;
|
|
2458
|
+
iconShortName: string;
|
|
2459
|
+
};
|
|
2460
|
+
onClick: () => void;
|
|
2461
|
+
};
|
|
2462
|
+
|
|
2463
|
+
declare function useCAT721NFTScreenLogic(): {
|
|
2464
|
+
collectionInfo: _unisat_wallet_shared.CAT721CollectionInfo;
|
|
2465
|
+
localId: string;
|
|
2466
|
+
version: _unisat_wallet_shared.CAT_VERSION;
|
|
2467
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2468
|
+
onClickBack: () => void;
|
|
2469
|
+
onClickSend: () => void;
|
|
2470
|
+
};
|
|
2471
|
+
|
|
2472
|
+
interface SignMessageProps {
|
|
2473
|
+
header?: React.ReactNode;
|
|
2474
|
+
params: {
|
|
2475
|
+
data: {
|
|
2476
|
+
toSignMessages: ToSignMessage[];
|
|
2477
|
+
};
|
|
2478
|
+
session?: {
|
|
2479
|
+
origin: string;
|
|
2480
|
+
icon: string;
|
|
2481
|
+
name: string;
|
|
2482
|
+
};
|
|
2483
|
+
};
|
|
2484
|
+
handleCancel?: () => void;
|
|
2485
|
+
handleConfirm?: (signedMessages: SignedMessage[]) => void;
|
|
2486
|
+
}
|
|
2487
|
+
declare function useSignMessageLogic(props: SignMessageProps): {
|
|
2488
|
+
loading: boolean;
|
|
2489
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2490
|
+
session: {
|
|
2491
|
+
origin: string;
|
|
2492
|
+
icon: string;
|
|
2493
|
+
name: string;
|
|
2494
|
+
};
|
|
2495
|
+
isKeystoneSigning: boolean;
|
|
2496
|
+
isColdWalletSigning: boolean;
|
|
2497
|
+
showMultiSignView: boolean;
|
|
2498
|
+
disclaimerVisible: boolean;
|
|
2499
|
+
toSignMessages: ToSignMessage[];
|
|
2500
|
+
currentToSignMessage: ToSignMessage;
|
|
2501
|
+
isScammer: boolean;
|
|
2502
|
+
allowQuickMultiSign: boolean;
|
|
2503
|
+
isAllSigned: boolean;
|
|
2504
|
+
signedCount: number;
|
|
2505
|
+
multiSignList: {
|
|
2506
|
+
index: number;
|
|
2507
|
+
title: string;
|
|
2508
|
+
buttonText: string;
|
|
2509
|
+
buttonPreset: string;
|
|
2510
|
+
onClick: () => void;
|
|
2511
|
+
}[];
|
|
2512
|
+
onClickBack: () => void;
|
|
2513
|
+
onClickSign: () => void;
|
|
2514
|
+
onQuickMultiSign: () => Promise<void>;
|
|
2515
|
+
onTryMultiSign: () => Promise<void>;
|
|
2516
|
+
onTrustSite: () => Promise<void>;
|
|
2517
|
+
onKeystoneSigningSuccess: (data: SignedMessage) => void;
|
|
2518
|
+
onKeystoneSigningBack: () => void;
|
|
2519
|
+
onColdWalletSigningSuccess: (data: SignedMessage) => void;
|
|
2520
|
+
onColdWalletSigningBack: () => void;
|
|
2521
|
+
onDisclaimerModalClose: () => void;
|
|
2522
|
+
};
|
|
2523
|
+
|
|
2524
|
+
interface SignPsbtProps {
|
|
2525
|
+
header?: React.ReactNode;
|
|
2526
|
+
params: {
|
|
2527
|
+
data: {
|
|
2528
|
+
toSignDatas: ToSignData[];
|
|
2529
|
+
};
|
|
2530
|
+
session?: ApprovalSession;
|
|
2531
|
+
};
|
|
2532
|
+
handleCancel?: () => void;
|
|
2533
|
+
handleConfirm?: (signedDatas: SignedData[]) => void;
|
|
2534
|
+
fromApproval?: boolean;
|
|
2535
|
+
}
|
|
2536
|
+
declare function useSignPsbtLogic(props: SignPsbtProps): {
|
|
2537
|
+
isPsbtRiskPopoverVisible: boolean;
|
|
2538
|
+
contractPopoverData: any;
|
|
2539
|
+
setContractPopoverData: react.Dispatch<any>;
|
|
2540
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2541
|
+
brc20PriceMap: Record<string, TickPriceItem>;
|
|
2542
|
+
runesPriceMap: Record<string, TickPriceItem>;
|
|
2543
|
+
session: ApprovalSession;
|
|
2544
|
+
isPsbtSigning: boolean;
|
|
2545
|
+
isKeystoneSigning: boolean;
|
|
2546
|
+
isColdWalletSigning: boolean;
|
|
2547
|
+
showMultiSignView: boolean;
|
|
2548
|
+
showLoading: boolean;
|
|
2549
|
+
disclaimerVisible: boolean;
|
|
2550
|
+
localPsbtSummary: LocalPsbtSummary;
|
|
2551
|
+
toSignDatas: ToSignData[];
|
|
2552
|
+
currentToSignData: ToSignData;
|
|
2553
|
+
currentDecodedPsbt: DecodedPsbt;
|
|
2554
|
+
networkFee: string;
|
|
2555
|
+
isValid: boolean;
|
|
2556
|
+
hasRisk: boolean;
|
|
2557
|
+
showFeeSection: boolean;
|
|
2558
|
+
isScammer: boolean;
|
|
2559
|
+
allowQuickMultiSign: boolean;
|
|
2560
|
+
isAllSigned: boolean;
|
|
2561
|
+
signedCount: number;
|
|
2562
|
+
multiSignList: {
|
|
2563
|
+
index: number;
|
|
2564
|
+
buttonText: string;
|
|
2565
|
+
buttonPreset: string;
|
|
2566
|
+
psbtInfo: _unisat_wallet_shared.PsbtLocalInfo;
|
|
2567
|
+
onClick: () => void;
|
|
2568
|
+
}[];
|
|
2569
|
+
backButtonText: string;
|
|
2570
|
+
onClickBack: () => void;
|
|
2571
|
+
onClickSign: () => void;
|
|
2572
|
+
onQuickMultiSign: () => Promise<void>;
|
|
2573
|
+
onTryMultiSign: () => Promise<void>;
|
|
2574
|
+
onTrustSite: () => Promise<void>;
|
|
2575
|
+
onKeystoneSigningSuccess: (data: SignedData) => void;
|
|
2576
|
+
onKeystoneSigningBack: () => void;
|
|
2577
|
+
onColdWalletSigningSuccess: (data: {
|
|
2578
|
+
psbtHex: string;
|
|
2579
|
+
rawtx: string;
|
|
2580
|
+
}) => void;
|
|
2581
|
+
onColdWalletSigningBack: () => void;
|
|
2582
|
+
onRiskPopoverConfirm: () => void;
|
|
2583
|
+
onRiskPopoverClose: () => void;
|
|
2584
|
+
onDisclaimerModalClose: () => void;
|
|
2585
|
+
};
|
|
2586
|
+
|
|
2587
|
+
declare function useTxConfirmScreenLogic(): {
|
|
2588
|
+
signPsbtParams: SignPsbtParams;
|
|
2589
|
+
onClickBack: () => void;
|
|
2590
|
+
onClickCancel: () => void;
|
|
2591
|
+
onClickConfirm: (signedDatas: SignPsbtResult) => Promise<void>;
|
|
2592
|
+
};
|
|
2593
|
+
|
|
2594
|
+
declare function useTxFailScreenLogic(): {
|
|
2595
|
+
error: string;
|
|
2596
|
+
onClickBack: () => void;
|
|
2597
|
+
onClickDone: () => void;
|
|
2598
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2599
|
+
};
|
|
2600
|
+
|
|
2601
|
+
declare function useTxSuccessScreenLogic(): {
|
|
2602
|
+
txid: string;
|
|
2603
|
+
onClickExploreTx: () => void;
|
|
2604
|
+
onClickDone: () => void;
|
|
2605
|
+
onClickCopy: () => void;
|
|
2606
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2607
|
+
};
|
|
2608
|
+
|
|
2609
|
+
interface ActionOverviewSectionProps {
|
|
2610
|
+
action: PsbtActionInfo;
|
|
2611
|
+
decodedPsbt: DecodedPsbt;
|
|
2612
|
+
}
|
|
2613
|
+
declare function useActionOverviewSectionLogic({ action, decodedPsbt }: ActionOverviewSectionProps): {
|
|
2614
|
+
decodedPsbt: DecodedPsbt;
|
|
2615
|
+
action: PsbtActionInfo;
|
|
2616
|
+
commonDetails: any[];
|
|
2617
|
+
chain: _unisat_wallet_shared.TypeChain;
|
|
2618
|
+
};
|
|
2619
|
+
|
|
2620
|
+
interface SettingsItemType {
|
|
2621
|
+
key: string;
|
|
2622
|
+
label?: string;
|
|
2623
|
+
value?: string;
|
|
2624
|
+
desc?: string;
|
|
2625
|
+
danger?: boolean;
|
|
2626
|
+
right: boolean;
|
|
2627
|
+
icon?: string;
|
|
2628
|
+
badge?: string;
|
|
2629
|
+
onClick?: () => void;
|
|
2630
|
+
}
|
|
2631
|
+
declare function useSettingsTabScreenLogic(): {
|
|
2632
|
+
settings_connectedSites: SettingsItemType;
|
|
2633
|
+
settings_addressBook: SettingsItemType;
|
|
2634
|
+
settings_addressType: SettingsItemType;
|
|
2635
|
+
settings_advanced: {
|
|
2636
|
+
key: string;
|
|
2637
|
+
label: string;
|
|
2638
|
+
value: string;
|
|
2639
|
+
desc: string;
|
|
2640
|
+
right: boolean;
|
|
2641
|
+
icon: string;
|
|
2642
|
+
onClick: () => void;
|
|
2643
|
+
};
|
|
2644
|
+
settings_feedback: {
|
|
2645
|
+
key: string;
|
|
2646
|
+
label: string;
|
|
2647
|
+
value: string;
|
|
2648
|
+
desc: string;
|
|
2649
|
+
route: string;
|
|
2650
|
+
right: boolean;
|
|
2651
|
+
icon: string;
|
|
2652
|
+
onClick: () => void;
|
|
2653
|
+
};
|
|
2654
|
+
settings_rateus: {
|
|
2655
|
+
key: string;
|
|
2656
|
+
label: string;
|
|
2657
|
+
value: string;
|
|
2658
|
+
desc: string;
|
|
2659
|
+
route: string;
|
|
2660
|
+
right: boolean;
|
|
2661
|
+
icon: string;
|
|
2662
|
+
onClick: () => void;
|
|
2663
|
+
};
|
|
2664
|
+
settings_aboutus: {
|
|
2665
|
+
key: string;
|
|
2666
|
+
label: string;
|
|
2667
|
+
value: string;
|
|
2668
|
+
desc: string;
|
|
2669
|
+
right: boolean;
|
|
2670
|
+
icon: string;
|
|
2671
|
+
badge: string;
|
|
2672
|
+
onClick: () => void;
|
|
2673
|
+
};
|
|
2674
|
+
settings_lockwallet: {
|
|
2675
|
+
key: string;
|
|
2676
|
+
label: string;
|
|
2677
|
+
value: string;
|
|
2678
|
+
desc: string;
|
|
2679
|
+
right: boolean;
|
|
2680
|
+
onClick: () => void;
|
|
2681
|
+
};
|
|
2682
|
+
settings_expandview: {
|
|
2683
|
+
key: string;
|
|
2684
|
+
label: string;
|
|
2685
|
+
value: string;
|
|
2686
|
+
desc: string;
|
|
2687
|
+
right: boolean;
|
|
2688
|
+
onClick: () => void;
|
|
2689
|
+
};
|
|
2690
|
+
};
|
|
2691
|
+
|
|
2692
|
+
declare function useBalanceCardLogic(): {
|
|
2693
|
+
totalBalance: number;
|
|
2694
|
+
availableBalance: number;
|
|
2695
|
+
unavailableBalance: number;
|
|
2696
|
+
totalAmount: string;
|
|
2697
|
+
availableAmount: string;
|
|
2698
|
+
unavailableAmount: string;
|
|
2699
|
+
totalAmountMainPart: string;
|
|
2700
|
+
totalAmountSubPart: string;
|
|
2701
|
+
balanceValue: string;
|
|
2702
|
+
unavailableTipText: string;
|
|
2703
|
+
isCurrentChainBalance: boolean;
|
|
2704
|
+
showUtxoToolButton: boolean;
|
|
2705
|
+
handleUnlock: (e?: React.MouseEvent) => void;
|
|
2706
|
+
isDetailExpanded: boolean;
|
|
2707
|
+
handleExpandToggle: () => void;
|
|
2708
|
+
isBalanceHidden: boolean;
|
|
2709
|
+
handleHiddenToggle: (e?: React.MouseEvent) => void;
|
|
2710
|
+
refreshBalance: (e?: React.MouseEvent) => void;
|
|
2711
|
+
btcUnit: string;
|
|
2712
|
+
isBtcMainnet: boolean;
|
|
2713
|
+
chain: _unisat_wallet_shared.TypeChain;
|
|
2714
|
+
t: (key: string, substitutions?: string | string[] | Record<string, string | number>) => string;
|
|
2715
|
+
};
|
|
2716
|
+
|
|
2717
|
+
declare function useBtcDisplayLogic(balance: string): {
|
|
2718
|
+
totalAmountMainPart: string;
|
|
2719
|
+
totalAmountSubPart: string;
|
|
2720
|
+
};
|
|
2721
|
+
|
|
2722
|
+
type Listener = (params?: any) => void;
|
|
2723
|
+
declare class EventBus {
|
|
2724
|
+
events: Record<string, Listener[]>;
|
|
2725
|
+
emit: (type: string, params?: any) => void;
|
|
2726
|
+
once: (type: string, fn: Listener) => void;
|
|
2727
|
+
addEventListener: (type: string, fn: Listener) => void;
|
|
2728
|
+
removeEventListener: (type: string, fn: Listener) => void;
|
|
2729
|
+
removeAllEventListeners: (type: string) => void;
|
|
2730
|
+
}
|
|
2731
|
+
declare const uiEventBus: EventBus;
|
|
2732
|
+
|
|
2733
|
+
declare function useAsyncEffect(effect: () => Promise<void | (() => void)>, deps?: React.DependencyList): void;
|
|
2734
|
+
|
|
2735
|
+
declare function createAppStore(): _reduxjs_toolkit_dist_configureStore.ToolkitStore<{
|
|
2736
|
+
accounts: AccountsState;
|
|
2737
|
+
transactions: TransactionsState;
|
|
2738
|
+
settings: SettingsState;
|
|
2739
|
+
global: GlobalState;
|
|
2740
|
+
keyrings: KeyringsState;
|
|
2741
|
+
ui: UIState;
|
|
2742
|
+
discovery: DiscoveryState;
|
|
2743
|
+
browser: BrowserState;
|
|
2744
|
+
}, redux.AnyAction, _reduxjs_toolkit.MiddlewareArray<[_reduxjs_toolkit.ThunkMiddleware<{
|
|
2745
|
+
accounts: AccountsState;
|
|
2746
|
+
transactions: TransactionsState;
|
|
2747
|
+
settings: SettingsState;
|
|
2748
|
+
global: GlobalState;
|
|
2749
|
+
keyrings: KeyringsState;
|
|
2750
|
+
ui: UIState;
|
|
2751
|
+
discovery: DiscoveryState;
|
|
2752
|
+
browser: BrowserState;
|
|
2753
|
+
}, redux.AnyAction>, redux.Middleware<{}, any, redux.Dispatch<redux.AnyAction>>]>>;
|
|
2754
|
+
type AppStore = ReturnType<typeof createAppStore>;
|
|
2755
|
+
type AppState = ReturnType<AppStore['getState']>;
|
|
2756
|
+
type AppDispatch = AppStore['dispatch'];
|
|
945
2757
|
|
|
946
|
-
export { AccountUpdater, AlkanesAssetTabKey, AppDispatch, AppState, AssetTabKey, CATAssetTabKey,
|
|
2758
|
+
export { AccountUpdater, ActionOverviewSectionProps, AlkanesAssetTabKey, AlkanesBalanceCardProps, AppDispatch, AppState, AppStore, ApprovalContext, ApprovalContextType, AssetTabKey, BRC20BalanceCardProps, BRC20InscribeTransferParams, BRC20OutWalletBalanceItem, BRC20SendStepParams, BRC20SendTabKey, BRC20SingleStepKey, BRC20TokenScreenTabKey, CAT20BalanceCardProps, CATAssetTabKey, ContextData$2 as ContextData, DeviceContext, DeviceContextType, I18nContext, I18nContextType, NavigationContext, NavigationContextType, NavigationSource, OrdinalsAssetTabKey, PriceProvider, RouteTypes, RunesBalanceCardProps, SendAlkanesNFTScreenStep, SendAlkanesScreenStep, SendCAT20ScreenStep, SendCAT721ScreenStep, SettingsItemType, SignMessageProps, SignPsbtProps, StorageContext, StorageContextType, TabOption, ToolsContext, ToolsContextType, UpdateContextDataParams$2 as UpdateContextDataParams, WalletProvider, WalletTabScreenTabKey, accountActions, browserActions, createAppStore, createStorageProvider, discoveryActions, getSupportedAssets, globalActions, keyringsActions, settingsActions, transactionsActions, uiActions, uiEventBus, useAccountAddress, useAccountBalance, useAccountInscriptions, useAccounts, useAccountsState, useActionOverviewSectionLogic, useAddressExplorerUrl, useAddressInput, useAddressSummary, useAddressTips, useAddressTypeScreenLogic, useAlkanesAssetTabKey, useAlkanesBalanceCardLogic, useAlkanesCollectionListLogic, useAlkanesIconInfo, useAlkanesListLogic, useAlkanesMarketPlaceWebsite, useAlkanesNFTListLogic, useAlkanesNFTScreenLogic, useAlkanesTokenScreenLogic, useAmountInput, useAmountInputLogic, useAnnouncementCardLogic, useAppDispatch, useAppList, useAppSelector, useAppSummary, useApproval, useAssetTabKey, useAssetUtxosRunes, useAsyncEffect, useAutoLockTimeId, useBRC20BalanceCardLogic, useBRC20IconInfo, useBRC20InscribeTransferLogic, useBRC20InscribeTransferLogicStep1, useBRC20InscribeTransferLogicStep2, useBRC20InscribeTransferLogicStep3, useBRC20InscribeTransferLogicStep4, useBRC20ListLogic, useBRC20MarketPlaceWebsite, useBRC20ProgListLogic, useBRC20SendScreenLogic, useBRC20SendScreenLogicStep1, useBRC20SendScreenLogicStep2, useBRC20SendScreenLogicStep3, useBRC20SingleStepScreenLogic, useBRC20TokenHistoryLogic, useBRC20TokenInfoExplorerUrl, useBRC20TokenScreenLogic, useBTCUnit, useBabylonConfig, useBackRefresh, useBalanceCardDetailExpanded, useBalanceCardLogic, useBannerList, useBitcoinTx, useBooted, useBrowserState, useBtcDisplayLogic, useCAT20BalanceCardLogic, useCAT20IconInfo, useCAT20ListLogic, useCAT20MarketPlaceWebsite, useCAT20TokenInfoExplorerUrl, useCAT20TokenScreenLogic, useCAT721ListLogic, useCAT721NFTContentBaseUrl, useCAT721NFTScreenLogic, useCATAssetTabKey, useChain, useChainType, useChangeAddressFlagCallback, useChangeChainTypeCallback, useChangeLocaleCallback, useChangeNetworkTypeCallback, useCreateAccountCallback, useCreateColdWalletCallback, useCreatePasswordScreenLogic, useCreateSplitTxCallback, useCreateWalletLogicImportWordsStep, useCurrentAccount, useCurrentAddress, useCurrentKeyring, useDeveloperMode, useDevice, useDiscoveryState, useEditAccountNameScreenLogic, useEditContactScreenLogic, useEditWalletNameScreenLogic, useExportMnemonicsScreenLogic, useExportPrivateKeyScreenLogic, useFeeRateBar, useFeeRateBarLogic, useFetchAssetUtxosRunesCallback, useFetchBalanceCallback, useFetchUtxosCallback, useGetTxExplorerUrlCallback, useGlobalState, useGoBackRefresh, useHasBiometricsKey, useHasNewBanner, useHistory, useI18n, useIconBaseUrl, useImportAccountCallback, useImportAccountsFromKeystoneCallback, useInfiniteListScrollOffset, useInfiniteListScrollState, useInscriptionListLogic, useInscriptionSummary, useIsBiometricsSupported, useIsInExpandView, useIsKeystoneWallet, useIsMainnetChain, useIsReady, useIsRefresh, useIsScrollViewBot, useIsScrollViewTop, useIsUnlockTimeRefres, useIsUnlocked, useKeyrings, useKeyringsState, useLastFetchInfo, useLayerState, useLocale, useLockCallback, useLockTimePageLogic, useLockedOverlayVisible, useModelPopover, useNavigation, useNetworkType, useNotificationsLogic, useOrdinalsAssetTabKey, useOrdinalsInscriptionScreenLogic, useOrdinalsTx, useOrdinalsWebsite, usePrepareSendAlkanesCallback, usePrepareSendBTCCallback, usePrepareSendBypassHeadOffsetsCallback, usePrepareSendOrdinalsInscriptionCallback, usePrepareSendOrdinalsInscriptionsCallback, usePrepareSendRunesCallback, usePrice, usePushBitcoinTxCallback, usePushOrdinalsTxCallback, useReadApp, useReadTab, useReloadAccounts, useResetAddressInput, useResetAmountInput, useResetFeeRateBar, useResetTxState, useResetUiTxCreateScreen, useRunesBalanceCardLogic, useRunesIconInfo, useRunesInscribeUrl, useRunesListLogic, useRunesMarketUrl, useRunesTokenScreenLogic, useRunesTx, useSafeBalance, useScreenState, useSendAlkanesNFTScreenLogic, useSendAlkanesScreenLogic, useSendCAT20ScreenLogic, useSendCAT721ScreenLogic, useSendOrdinalsInscriptionScreenLogic, useSendRunesScreenLogic, useSetCurrentAccountCallback, useSetDeveloperModeCallback, useSetLockedOverlayVisibleCallback, useSetSpendUnavailableUtxosCallback, useSetTabCallback, useSettingsState, useSettingsTabScreenLogic, useSignMessageLogic, useSignPsbtLogic, useSkipVersionCallback, useSpendUnavailableUtxos, useSplitOrdinalsInscriptionScreenLogic, useStorage, useSupportedAssets, useSwitchChainModalVisible, useTab, useThrottle, useToggleBalanceCardDetailExpanded, useTools, useTransactionsState, useTransferableListLogic, useTxConfirmScreenLogic, useTxCreateScreenLogic, useTxExplorerUrl, useTxFailScreenLogic, useTxSuccessScreenLogic, useUIState, useUiTxCreateScreen, useUnisatWebsite, useUnlockCallback, useUnlockRead, useUnlockRefresh, useUnreadAppSummary, useUnreadNotificationsCount, useUpdateAddressInput, useUpdateAmountInput, useUpdateFeeRateBar, useUpdateScreenStateCallback, useUpdateUiTxCreateScreen, useUtxos, useVersionInfo, useWallRefresh, useWallTabFocusRefresh, useWallTabRefresh, useWallet, useWalletConfig, useWalletTabScreenState, useWalletTopTabScreenState };
|