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