@unisat/wallet-state 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.mts +946 -0
- package/lib/index.d.ts +946 -0
- package/lib/index.js +2407 -0
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +2273 -0
- package/lib/index.mjs.map +1 -0
- package/lib/types/index.d.mts +30 -0
- package/lib/types/index.d.ts +30 -0
- package/lib/types/index.js +42 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/index.mjs +36 -0
- package/lib/types/index.mjs.map +1 -0
- package/package.json +17 -10
- package/src/hooks/global.ts +2 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/ui.ts +8 -2
- package/src/index.ts +4 -1
- package/src/reducers/global.ts +1 -2
- package/src/reducers/index.ts +7 -0
- package/src/reducers/ui.ts +7 -31
- package/src/types/index.ts +3 -0
- package/src/types/ui.ts +30 -0
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1,946 @@
|
|
|
1
|
+
import * as _reduxjs_toolkit_dist_configureStore from '@reduxjs/toolkit/dist/configureStore';
|
|
2
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
3
|
+
import * as _unisat_wallet_types from '@unisat/wallet-types';
|
|
4
|
+
import { ChainType, NetworkType, AddressType } from '@unisat/wallet-types';
|
|
5
|
+
import * as _unisat_wallet_shared from '@unisat/wallet-shared';
|
|
6
|
+
import { AppInfo, Inscription, WalletKeyring, WalletConfig, UnspentOutput, Account, BitcoinBalanceV2, TxHistoryItem, AppSummary, InscriptionSummary, AddressSummary, BitcoinBalance, ToSignInput, ConnectedSite, FeeSummary, CoinPrice, TickPriceItem, InscribeOrder, TokenTransfer, DecodedPsbt, TokenBalance, AddressTokenSummary, UTXO_Detail, UTXO, WebsiteResult, SignPsbtOptions, AddressFlagType, VersionDetail, CosmosSignDataType, RuneBalance, AddressRunesTokenSummary, CAT20Balance, AddressCAT20TokenSummary, AddressCAT20UtxoSummary, UserToSignInput, CAT20MergeOrder, CAT721Balance, AddressCAT721CollectionSummary, BtcChannelItem, BabylonAddressSummary, CosmosBalance, AlkanesBalance, AddressAlkanesTokenSummary, AlkanesCollection, AlkanesInfo, BRC20HistoryItem, CAT_VERSION, ToAddressInfo, RawTxInfo, TypeChain } from '@unisat/wallet-shared';
|
|
7
|
+
import { AssetTabKey, OrdinalsAssetTabKey, CATAssetTabKey, AlkanesAssetTabKey, NavigationSource, TabOption } from './types/index.mjs';
|
|
8
|
+
import React, { ReactNode } from 'react';
|
|
9
|
+
import * as _unisat_babylon_service_types from '@unisat/babylon-service/types';
|
|
10
|
+
import { BabylonConfigV2 } from '@unisat/babylon-service/types';
|
|
11
|
+
import { TypedUseSelectorHook } from 'react-redux';
|
|
12
|
+
|
|
13
|
+
interface DiscoveryState {
|
|
14
|
+
bannerList: {
|
|
15
|
+
id: string;
|
|
16
|
+
img: string;
|
|
17
|
+
link: string;
|
|
18
|
+
}[];
|
|
19
|
+
appList: {
|
|
20
|
+
tab: string;
|
|
21
|
+
items: AppInfo[];
|
|
22
|
+
}[];
|
|
23
|
+
lastFetchTime: number;
|
|
24
|
+
lastFetchChainType: ChainType;
|
|
25
|
+
cachedBannerIds: string[];
|
|
26
|
+
hasNewBanner: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare const discoveryActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<DiscoveryState>, string>;
|
|
29
|
+
|
|
30
|
+
interface UIState {
|
|
31
|
+
assetTabKey: AssetTabKey;
|
|
32
|
+
ordinalsAssetTabKey: OrdinalsAssetTabKey;
|
|
33
|
+
catAssetTabKey: CATAssetTabKey;
|
|
34
|
+
alkanesAssetTabKey: AlkanesAssetTabKey;
|
|
35
|
+
uiTxCreateScreen: {
|
|
36
|
+
toInfo: {
|
|
37
|
+
address: string;
|
|
38
|
+
domain: string;
|
|
39
|
+
inscription?: Inscription;
|
|
40
|
+
};
|
|
41
|
+
inputAmount: string;
|
|
42
|
+
enableRBF: boolean;
|
|
43
|
+
feeRate: number;
|
|
44
|
+
};
|
|
45
|
+
babylonSendScreen: {
|
|
46
|
+
inputAmount: string;
|
|
47
|
+
memo: string;
|
|
48
|
+
};
|
|
49
|
+
navigationSource: NavigationSource;
|
|
50
|
+
isBalanceHidden: boolean;
|
|
51
|
+
}
|
|
52
|
+
declare const uiActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<UIState>, string>;
|
|
53
|
+
|
|
54
|
+
interface KeyringsState {
|
|
55
|
+
keyrings: WalletKeyring[];
|
|
56
|
+
current: WalletKeyring;
|
|
57
|
+
}
|
|
58
|
+
declare const keyringsActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<KeyringsState>, string>;
|
|
59
|
+
|
|
60
|
+
interface GlobalState {
|
|
61
|
+
tab: TabOption;
|
|
62
|
+
isUnlocked: boolean;
|
|
63
|
+
isReady: boolean;
|
|
64
|
+
isBooted: boolean;
|
|
65
|
+
}
|
|
66
|
+
declare const globalActions: any;
|
|
67
|
+
|
|
68
|
+
interface SettingsState {
|
|
69
|
+
locale: string;
|
|
70
|
+
networkType: NetworkType;
|
|
71
|
+
chainType: ChainType;
|
|
72
|
+
walletConfig: WalletConfig;
|
|
73
|
+
skippedVersion: string;
|
|
74
|
+
autoLockTimeId: number;
|
|
75
|
+
developerMode: boolean;
|
|
76
|
+
}
|
|
77
|
+
declare const settingsActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<SettingsState>, string>;
|
|
78
|
+
|
|
79
|
+
interface BitcoinTx {
|
|
80
|
+
fromAddress: string;
|
|
81
|
+
toAddress: string;
|
|
82
|
+
toSatoshis: number;
|
|
83
|
+
rawtx: string;
|
|
84
|
+
txid: string;
|
|
85
|
+
fee: number;
|
|
86
|
+
estimateFee: number;
|
|
87
|
+
changeSatoshis: number;
|
|
88
|
+
sending: boolean;
|
|
89
|
+
autoAdjust: boolean;
|
|
90
|
+
psbtHex: string;
|
|
91
|
+
feeRate: number;
|
|
92
|
+
toDomain: string;
|
|
93
|
+
enableRBF: boolean;
|
|
94
|
+
}
|
|
95
|
+
interface OrdinalsTx {
|
|
96
|
+
fromAddress: string;
|
|
97
|
+
toAddress: string;
|
|
98
|
+
inscription: Inscription;
|
|
99
|
+
rawtx: string;
|
|
100
|
+
txid: string;
|
|
101
|
+
fee: number;
|
|
102
|
+
estimateFee: number;
|
|
103
|
+
changeSatoshis: number;
|
|
104
|
+
sending: boolean;
|
|
105
|
+
psbtHex: string;
|
|
106
|
+
feeRate: number;
|
|
107
|
+
toDomain: string;
|
|
108
|
+
outputValue: number;
|
|
109
|
+
enableRBF: boolean;
|
|
110
|
+
}
|
|
111
|
+
interface RunesTx {
|
|
112
|
+
fromAddress: string;
|
|
113
|
+
toAddress: string;
|
|
114
|
+
rawtx: string;
|
|
115
|
+
txid: string;
|
|
116
|
+
fee: number;
|
|
117
|
+
estimateFee: number;
|
|
118
|
+
changeSatoshis: number;
|
|
119
|
+
sending: boolean;
|
|
120
|
+
psbtHex: string;
|
|
121
|
+
feeRate: number;
|
|
122
|
+
toDomain: string;
|
|
123
|
+
outputValue: number;
|
|
124
|
+
enableRBF: boolean;
|
|
125
|
+
runeid?: string;
|
|
126
|
+
runeAmount?: string;
|
|
127
|
+
}
|
|
128
|
+
interface TransactionsState {
|
|
129
|
+
bitcoinTx: BitcoinTx;
|
|
130
|
+
ordinalsTx: OrdinalsTx;
|
|
131
|
+
runesTx: RunesTx;
|
|
132
|
+
utxos: UnspentOutput[];
|
|
133
|
+
spendUnavailableUtxos: UnspentOutput[];
|
|
134
|
+
assetUtxos_inscriptions: UnspentOutput[];
|
|
135
|
+
assetUtxos_runes: UnspentOutput[];
|
|
136
|
+
}
|
|
137
|
+
declare const transactionsActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<TransactionsState>, string>;
|
|
138
|
+
|
|
139
|
+
interface AccountsState {
|
|
140
|
+
accounts: Account[];
|
|
141
|
+
current: Account;
|
|
142
|
+
loading: boolean;
|
|
143
|
+
balanceMap: {
|
|
144
|
+
[key: string]: {
|
|
145
|
+
amount: string;
|
|
146
|
+
btc_amount: string;
|
|
147
|
+
confirm_btc_amount: string;
|
|
148
|
+
pending_btc_amount: string;
|
|
149
|
+
inscription_amount: string;
|
|
150
|
+
expired: boolean;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
balanceV2Map: {
|
|
154
|
+
[key: string]: BitcoinBalanceV2;
|
|
155
|
+
};
|
|
156
|
+
historyMap: {
|
|
157
|
+
[key: string]: {
|
|
158
|
+
list: TxHistoryItem[];
|
|
159
|
+
expired: boolean;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
inscriptionsMap: {
|
|
163
|
+
[key: string]: {
|
|
164
|
+
list: Inscription[];
|
|
165
|
+
expired: boolean;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
appSummary: AppSummary;
|
|
169
|
+
inscriptionSummary: InscriptionSummary;
|
|
170
|
+
addressSummary: AddressSummary;
|
|
171
|
+
}
|
|
172
|
+
declare const accountActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<AccountsState>, string>;
|
|
173
|
+
|
|
174
|
+
declare const I18nProvider: React.FC<{
|
|
175
|
+
children: React.ReactNode;
|
|
176
|
+
}>;
|
|
177
|
+
|
|
178
|
+
interface ContactBookItem {
|
|
179
|
+
name: string;
|
|
180
|
+
address: string;
|
|
181
|
+
chain: ChainType;
|
|
182
|
+
isAlias: boolean;
|
|
183
|
+
isContact: boolean;
|
|
184
|
+
sortIndex?: number;
|
|
185
|
+
}
|
|
186
|
+
type ContactBookStore = Record<string, ContactBookItem | undefined>;
|
|
187
|
+
interface WalletController {
|
|
188
|
+
openapi: {
|
|
189
|
+
[key: string]: (...params: any) => Promise<any>;
|
|
190
|
+
};
|
|
191
|
+
boot(password: string): Promise<void>;
|
|
192
|
+
isBooted(): Promise<boolean>;
|
|
193
|
+
getApproval(): Promise<any>;
|
|
194
|
+
resolveApproval(data?: any, data2?: any): Promise<void>;
|
|
195
|
+
rejectApproval(data?: any, data2?: any, data3?: any): Promise<void>;
|
|
196
|
+
hasVault(): Promise<boolean>;
|
|
197
|
+
verifyPassword(password: string): Promise<void>;
|
|
198
|
+
changePassword: (password: string, newPassword: string) => Promise<void>;
|
|
199
|
+
unlock(password: string): Promise<void>;
|
|
200
|
+
isUnlocked(): Promise<boolean>;
|
|
201
|
+
lockWallet(): Promise<void>;
|
|
202
|
+
setPopupOpen(isOpen: boolean): void;
|
|
203
|
+
isReady(): Promise<boolean>;
|
|
204
|
+
getIsFirstOpen(): Promise<boolean>;
|
|
205
|
+
updateIsFirstOpen(): Promise<void>;
|
|
206
|
+
getAddressBalanceV2(address: string): Promise<BitcoinBalanceV2>;
|
|
207
|
+
getAddressBalance(address: string): Promise<BitcoinBalance>;
|
|
208
|
+
getAddressCacheBalance(address: string): Promise<BitcoinBalance>;
|
|
209
|
+
getMultiAddressAssets(addresses: string): Promise<AddressSummary[]>;
|
|
210
|
+
findGroupAssets(groups: {
|
|
211
|
+
type: number;
|
|
212
|
+
address_arr: string[];
|
|
213
|
+
pubkey_arr: string[];
|
|
214
|
+
}[]): Promise<{
|
|
215
|
+
type: number;
|
|
216
|
+
address_arr: string[];
|
|
217
|
+
pubkey_arr: string[];
|
|
218
|
+
satoshis_arr: number[];
|
|
219
|
+
}[]>;
|
|
220
|
+
getAddressInscriptions(address: string, cursor: number, size: number): Promise<{
|
|
221
|
+
list: Inscription[];
|
|
222
|
+
total: number;
|
|
223
|
+
}>;
|
|
224
|
+
getAddressHistory: (params: {
|
|
225
|
+
address: string;
|
|
226
|
+
start: number;
|
|
227
|
+
limit: number;
|
|
228
|
+
}) => Promise<{
|
|
229
|
+
start: number;
|
|
230
|
+
total: number;
|
|
231
|
+
detail: TxHistoryItem[];
|
|
232
|
+
}>;
|
|
233
|
+
getAddressCacheHistory: (address: string) => Promise<TxHistoryItem[]>;
|
|
234
|
+
getLocale(): Promise<string>;
|
|
235
|
+
setLocale(locale: string): Promise<void>;
|
|
236
|
+
getCurrency(): Promise<string>;
|
|
237
|
+
setCurrency(currency: string): Promise<void>;
|
|
238
|
+
clearKeyrings(): Promise<void>;
|
|
239
|
+
getPrivateKey(password: string, account: {
|
|
240
|
+
address: string;
|
|
241
|
+
type: string;
|
|
242
|
+
}): Promise<{
|
|
243
|
+
hex: string;
|
|
244
|
+
wif: string;
|
|
245
|
+
}>;
|
|
246
|
+
getMnemonics(password: string, keyring: WalletKeyring): Promise<{
|
|
247
|
+
hdPath: string;
|
|
248
|
+
mnemonic: string;
|
|
249
|
+
passphrase: string;
|
|
250
|
+
}>;
|
|
251
|
+
createKeyringWithPrivateKey(data: string, addressType: AddressType, alianName?: string): Promise<Account[]>;
|
|
252
|
+
getPreMnemonics(): Promise<any>;
|
|
253
|
+
generatePreMnemonic(): Promise<string>;
|
|
254
|
+
removePreMnemonics(): void;
|
|
255
|
+
createKeyringWithMnemonics(mnemonic: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount: number): Promise<{
|
|
256
|
+
address: string;
|
|
257
|
+
type: string;
|
|
258
|
+
}[]>;
|
|
259
|
+
createKeyringWithKeystone(urType: string, urCbor: string, addressType: AddressType, hdPath: string, accountCount: number, filterPubkey?: string[], connectionType?: 'USB' | 'QR'): Promise<{
|
|
260
|
+
address: string;
|
|
261
|
+
type: string;
|
|
262
|
+
}[]>;
|
|
263
|
+
createTmpKeyringWithPrivateKey(privateKey: string, addressType: AddressType): Promise<WalletKeyring>;
|
|
264
|
+
createTmpKeyringWithKeystone(urType: string, urCbor: string, addressType: AddressType, hdPath: string, accountCount?: number): Promise<WalletKeyring>;
|
|
265
|
+
createKeyringWithColdWallet(xpub: string, addressType: AddressType, alianName?: string, hdPath?: string, accountCount?: number): Promise<WalletKeyring>;
|
|
266
|
+
deriveAccountsFromXpub(xpub: string, addressType: AddressType, hdPath?: string, accountCount?: number): Promise<{
|
|
267
|
+
pubkey: string;
|
|
268
|
+
address: string;
|
|
269
|
+
}[]>;
|
|
270
|
+
createTmpKeyringWithMnemonics(mnemonic: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount?: number): Promise<WalletKeyring>;
|
|
271
|
+
removeKeyring(keyring: WalletKeyring): Promise<WalletKeyring>;
|
|
272
|
+
deriveNewAccountFromMnemonic(keyring: WalletKeyring, alianName?: string): Promise<string[]>;
|
|
273
|
+
getAccountsCount(): Promise<number>;
|
|
274
|
+
getAllAlianName: () => (ContactBookItem | undefined)[];
|
|
275
|
+
getContactsByMap: () => ContactBookStore;
|
|
276
|
+
getCurrentAccount(): Promise<Account>;
|
|
277
|
+
getAccounts(): Promise<Account[]>;
|
|
278
|
+
getNextAlianName: (keyring: WalletKeyring) => Promise<string>;
|
|
279
|
+
getCurrentKeyringAccounts(): Promise<Account[]>;
|
|
280
|
+
signPsbtWithHex(psbtHex: string, toSignInputs: ToSignInput[], autoFinalized: boolean): Promise<string>;
|
|
281
|
+
sendBTC(data: {
|
|
282
|
+
to: string;
|
|
283
|
+
amount: number;
|
|
284
|
+
btcUtxos: UnspentOutput[];
|
|
285
|
+
feeRate: number;
|
|
286
|
+
enableRBF: boolean;
|
|
287
|
+
memo?: string;
|
|
288
|
+
memos?: string[];
|
|
289
|
+
}): Promise<{
|
|
290
|
+
psbtHex: string;
|
|
291
|
+
rawtx: string;
|
|
292
|
+
fee: number;
|
|
293
|
+
}>;
|
|
294
|
+
sendAllBTC(data: {
|
|
295
|
+
to: string;
|
|
296
|
+
btcUtxos: UnspentOutput[];
|
|
297
|
+
feeRate: number;
|
|
298
|
+
enableRBF: boolean;
|
|
299
|
+
}): Promise<{
|
|
300
|
+
psbtHex: string;
|
|
301
|
+
rawtx: string;
|
|
302
|
+
fee: number;
|
|
303
|
+
}>;
|
|
304
|
+
sendOrdinalsInscription(data: {
|
|
305
|
+
to: string;
|
|
306
|
+
inscriptionId: string;
|
|
307
|
+
feeRate: number;
|
|
308
|
+
outputValue?: number;
|
|
309
|
+
enableRBF: boolean;
|
|
310
|
+
btcUtxos: UnspentOutput[];
|
|
311
|
+
}): Promise<{
|
|
312
|
+
psbtHex: string;
|
|
313
|
+
rawtx: string;
|
|
314
|
+
fee: number;
|
|
315
|
+
}>;
|
|
316
|
+
sendOrdinalsInscriptions(data: {
|
|
317
|
+
to: string;
|
|
318
|
+
inscriptionIds: string[];
|
|
319
|
+
feeRate: number;
|
|
320
|
+
enableRBF: boolean;
|
|
321
|
+
btcUtxos: UnspentOutput[];
|
|
322
|
+
}): Promise<{
|
|
323
|
+
psbtHex: string;
|
|
324
|
+
rawtx: string;
|
|
325
|
+
fee: number;
|
|
326
|
+
}>;
|
|
327
|
+
splitOrdinalsInscription(data: {
|
|
328
|
+
inscriptionId: string;
|
|
329
|
+
feeRate: number;
|
|
330
|
+
outputValue: number;
|
|
331
|
+
enableRBF: boolean;
|
|
332
|
+
btcUtxos: UnspentOutput[];
|
|
333
|
+
}): Promise<{
|
|
334
|
+
psbtHex: string;
|
|
335
|
+
rawtx: string;
|
|
336
|
+
fee: number;
|
|
337
|
+
splitedCount: number;
|
|
338
|
+
}>;
|
|
339
|
+
pushTx(rawtx: string): Promise<string>;
|
|
340
|
+
queryDomainInfo(domain: string): Promise<Inscription>;
|
|
341
|
+
getInscriptionSummary(): Promise<InscriptionSummary>;
|
|
342
|
+
getAppSummary(): Promise<AppSummary>;
|
|
343
|
+
getBTCUtxos(): Promise<UnspentOutput[]>;
|
|
344
|
+
getAssetUtxosInscriptions(inscriptionId: string): Promise<UnspentOutput[]>;
|
|
345
|
+
getNetworkType(): Promise<NetworkType>;
|
|
346
|
+
setNetworkType(type: NetworkType): Promise<void>;
|
|
347
|
+
getChainType(): Promise<ChainType>;
|
|
348
|
+
setChainType(type: ChainType): Promise<void>;
|
|
349
|
+
getConnectedSites(): Promise<ConnectedSite[]>;
|
|
350
|
+
removeConnectedSite(origin: string): Promise<void>;
|
|
351
|
+
getCurrentConnectedSite(id: string): Promise<ConnectedSite>;
|
|
352
|
+
getCurrentKeyring(): Promise<WalletKeyring>;
|
|
353
|
+
getKeyrings(): Promise<WalletKeyring[]>;
|
|
354
|
+
changeKeyring(keyring: WalletKeyring, accountIndex?: number): Promise<void>;
|
|
355
|
+
getAllAddresses(keyring: WalletKeyring, index: number): Promise<string[]>;
|
|
356
|
+
setKeyringAlianName(keyring: WalletKeyring, name: string): Promise<WalletKeyring>;
|
|
357
|
+
changeAddressType(addressType: AddressType): Promise<void>;
|
|
358
|
+
setAccountAlianName(account: Account, name: string): Promise<Account>;
|
|
359
|
+
getFeeSummary(): Promise<FeeSummary>;
|
|
360
|
+
getCoinPrice(): Promise<CoinPrice>;
|
|
361
|
+
getBrc20sPrice(ticks: string[]): Promise<{
|
|
362
|
+
[tick: string]: TickPriceItem;
|
|
363
|
+
}>;
|
|
364
|
+
getRunesPrice(ticks: string[]): Promise<{
|
|
365
|
+
[tick: string]: TickPriceItem;
|
|
366
|
+
}>;
|
|
367
|
+
getCAT20sPrice(tokenIds: string[]): Promise<{
|
|
368
|
+
[tokenId: string]: TickPriceItem;
|
|
369
|
+
}>;
|
|
370
|
+
getAlkanesPrice(alkaneid: string[]): Promise<{
|
|
371
|
+
[tick: string]: TickPriceItem;
|
|
372
|
+
}>;
|
|
373
|
+
setEditingKeyring(keyringIndex: number): Promise<void>;
|
|
374
|
+
getEditingKeyring(): Promise<WalletKeyring>;
|
|
375
|
+
setEditingAccount(account: Account): Promise<void>;
|
|
376
|
+
getEditingAccount(): Promise<Account>;
|
|
377
|
+
inscribeBRC20Transfer(address: string, tick: string, amount: string, feeRate: number, outputValue: number): Promise<InscribeOrder>;
|
|
378
|
+
getInscribeResult(orderId: string): Promise<TokenTransfer>;
|
|
379
|
+
decodePsbt(psbtHex: string, website: string): Promise<DecodedPsbt>;
|
|
380
|
+
decodeContracts(contracts: any[], account: any): Promise<any[]>;
|
|
381
|
+
getAllInscriptionList(address: string, currentPage: number, pageSize: number): Promise<{
|
|
382
|
+
currentPage: number;
|
|
383
|
+
pageSize: number;
|
|
384
|
+
total: number;
|
|
385
|
+
list: Inscription[];
|
|
386
|
+
}>;
|
|
387
|
+
getBRC20List(address: string, currentPage: number, pageSize: number): Promise<{
|
|
388
|
+
currentPage: number;
|
|
389
|
+
pageSize: number;
|
|
390
|
+
total: number;
|
|
391
|
+
list: TokenBalance[];
|
|
392
|
+
}>;
|
|
393
|
+
getBRC20ProgList(address: string, currentPage: number, pageSize: number): Promise<{
|
|
394
|
+
currentPage: number;
|
|
395
|
+
pageSize: number;
|
|
396
|
+
total: number;
|
|
397
|
+
list: TokenBalance[];
|
|
398
|
+
}>;
|
|
399
|
+
getBRC20TransferableList(address: string, ticker: string, currentPage: number, pageSize: number): Promise<{
|
|
400
|
+
currentPage: number;
|
|
401
|
+
pageSize: number;
|
|
402
|
+
total: number;
|
|
403
|
+
list: TokenTransfer[];
|
|
404
|
+
}>;
|
|
405
|
+
getOrdinalsInscriptions(address: string, currentPage: number, pageSize: number): Promise<{
|
|
406
|
+
currentPage: number;
|
|
407
|
+
pageSize: number;
|
|
408
|
+
total: number;
|
|
409
|
+
list: Inscription[];
|
|
410
|
+
}>;
|
|
411
|
+
getBRC20Summary(address: string, ticker: string): Promise<AddressTokenSummary>;
|
|
412
|
+
expireUICachedData(address: string): Promise<void>;
|
|
413
|
+
getWalletConfig(): Promise<WalletConfig>;
|
|
414
|
+
getSkippedVersion(): Promise<string>;
|
|
415
|
+
setSkippedVersion(version: string): Promise<void>;
|
|
416
|
+
getInscriptionUtxoDetail(inscriptionId: string): Promise<UTXO_Detail>;
|
|
417
|
+
getUtxoByInscriptionId(inscriptionId: string): Promise<UTXO>;
|
|
418
|
+
getInscriptionInfo(inscriptionId: string): Promise<Inscription>;
|
|
419
|
+
checkWebsite(website: string): Promise<WebsiteResult>;
|
|
420
|
+
readTab(tabName: string): Promise<void>;
|
|
421
|
+
readApp(appid: number): Promise<void>;
|
|
422
|
+
formatOptionsToSignInputs(psbtHex: string, options?: SignPsbtOptions): Promise<ToSignInput[]>;
|
|
423
|
+
getAddressSummary(address: string): Promise<AddressSummary>;
|
|
424
|
+
getShowSafeNotice(): Promise<boolean>;
|
|
425
|
+
setShowSafeNotice(show: boolean): Promise<void>;
|
|
426
|
+
addAddressFlag(account: Account, flag: AddressFlagType): Promise<Account>;
|
|
427
|
+
removeAddressFlag(account: Account, flag: AddressFlagType): Promise<Account>;
|
|
428
|
+
getVersionDetail(version: string): Promise<VersionDetail>;
|
|
429
|
+
genSignPsbtUr(psbtHex: string): Promise<{
|
|
430
|
+
type: string;
|
|
431
|
+
cbor: string;
|
|
432
|
+
}>;
|
|
433
|
+
parseSignPsbtUr(type: string, cbor: string, isFinalize?: boolean): Promise<{
|
|
434
|
+
psbtHex: string;
|
|
435
|
+
rawtx?: string;
|
|
436
|
+
}>;
|
|
437
|
+
genSignMsgUr(text: string, msgType?: string): Promise<{
|
|
438
|
+
type: string;
|
|
439
|
+
cbor: string;
|
|
440
|
+
requestId: string;
|
|
441
|
+
}>;
|
|
442
|
+
parseSignMsgUr(type: string, cbor: string, msgType: string): Promise<{
|
|
443
|
+
signature: string;
|
|
444
|
+
}>;
|
|
445
|
+
getKeystoneConnectionType(): Promise<'USB' | 'QR'>;
|
|
446
|
+
genSignCosmosUr(cosmosSignRequest: {
|
|
447
|
+
requestId?: string;
|
|
448
|
+
signData: string;
|
|
449
|
+
dataType: CosmosSignDataType;
|
|
450
|
+
path: string;
|
|
451
|
+
chainId?: string;
|
|
452
|
+
accountNumber?: string;
|
|
453
|
+
address?: string;
|
|
454
|
+
}): Promise<{
|
|
455
|
+
type: string;
|
|
456
|
+
cbor: string;
|
|
457
|
+
requestId: string;
|
|
458
|
+
}>;
|
|
459
|
+
parseCosmosSignUr(type: string, cbor: string): Promise<any>;
|
|
460
|
+
cosmosSignData(chainId: string, signBytesHex: string): Promise<{
|
|
461
|
+
publicKey: string;
|
|
462
|
+
signature: string;
|
|
463
|
+
}>;
|
|
464
|
+
getEnableSignData(): Promise<boolean>;
|
|
465
|
+
setEnableSignData(enable: boolean): Promise<void>;
|
|
466
|
+
getRunesList(address: string, currentPage: number, pageSize: number): Promise<{
|
|
467
|
+
currentPage: number;
|
|
468
|
+
pageSize: number;
|
|
469
|
+
total: number;
|
|
470
|
+
list: RuneBalance[];
|
|
471
|
+
}>;
|
|
472
|
+
getAssetUtxosRunes(rune: string): Promise<UnspentOutput[]>;
|
|
473
|
+
getAddressRunesTokenSummary(address: string, runeid: string): Promise<AddressRunesTokenSummary>;
|
|
474
|
+
sendRunes(data: {
|
|
475
|
+
to: string;
|
|
476
|
+
runeid: string;
|
|
477
|
+
runeAmount: string;
|
|
478
|
+
feeRate: number;
|
|
479
|
+
enableRBF: boolean;
|
|
480
|
+
btcUtxos?: UnspentOutput[];
|
|
481
|
+
assetUtxos?: UnspentOutput[];
|
|
482
|
+
outputValue?: number;
|
|
483
|
+
}): Promise<{
|
|
484
|
+
psbtHex: string;
|
|
485
|
+
rawtx: string;
|
|
486
|
+
fee: number;
|
|
487
|
+
}>;
|
|
488
|
+
setAutoLockTimeId(timeId: number): Promise<void>;
|
|
489
|
+
getAutoLockTimeId(): Promise<number>;
|
|
490
|
+
getDeveloperMode(): Promise<boolean>;
|
|
491
|
+
setDeveloperMode(developerMode: boolean): Promise<void>;
|
|
492
|
+
getCAT20List(version: 'v1' | 'v2', address: string, currentPage: number, pageSize: number): Promise<{
|
|
493
|
+
currentPage: number;
|
|
494
|
+
pageSize: number;
|
|
495
|
+
total: number;
|
|
496
|
+
list: CAT20Balance[];
|
|
497
|
+
}>;
|
|
498
|
+
getAddressCAT20TokenSummary(version: 'v1' | 'v2', address: string, tokenId: string): Promise<AddressCAT20TokenSummary>;
|
|
499
|
+
getAddressCAT20UtxoSummary(version: 'v1' | 'v2', address: string, tokenId: string): Promise<AddressCAT20UtxoSummary>;
|
|
500
|
+
transferCAT20Step1(version: 'v1' | 'v2', to: string, tokenId: string, tokenAmount: string, feeRate: number): Promise<{
|
|
501
|
+
id: string;
|
|
502
|
+
commitTx: string;
|
|
503
|
+
toSignInputs: UserToSignInput[];
|
|
504
|
+
feeRate: number;
|
|
505
|
+
}>;
|
|
506
|
+
transferCAT20Step2(version: 'v1' | 'v2', transferId: string, commitTx: string, toSignInputs: UserToSignInput[]): Promise<{
|
|
507
|
+
revealTx: string;
|
|
508
|
+
toSignInputs: UserToSignInput[];
|
|
509
|
+
}>;
|
|
510
|
+
transferCAT20Step3(version: 'v1' | 'v2', transferId: string, revealTx: string, toSignInputs: UserToSignInput[]): Promise<{
|
|
511
|
+
txid: string;
|
|
512
|
+
}>;
|
|
513
|
+
mergeCAT20Prepare(version: 'v1' | 'v2', tokenId: string, utxoCount: number, feeRate: number): Promise<CAT20MergeOrder>;
|
|
514
|
+
transferCAT20Step1ByMerge(version: 'v1' | 'v2', mergeId: string): Promise<{
|
|
515
|
+
id: string;
|
|
516
|
+
commitTx: string;
|
|
517
|
+
toSignInputs: UserToSignInput[];
|
|
518
|
+
feeRate: number;
|
|
519
|
+
}>;
|
|
520
|
+
getMergeCAT20Status(version: 'v1' | 'v2', mergeId: string): Promise<any>;
|
|
521
|
+
getAppList(): Promise<{
|
|
522
|
+
tab: string;
|
|
523
|
+
items: AppInfo[];
|
|
524
|
+
}[]>;
|
|
525
|
+
getBannerList(): Promise<{
|
|
526
|
+
id: string;
|
|
527
|
+
img: string;
|
|
528
|
+
link: string;
|
|
529
|
+
}[]>;
|
|
530
|
+
getBlockActiveInfo(): Promise<{
|
|
531
|
+
allTransactions: number;
|
|
532
|
+
allAddrs: number;
|
|
533
|
+
}>;
|
|
534
|
+
getCAT721List(version: 'v1' | 'v2', address: string, currentPage: number, pageSize: number): Promise<{
|
|
535
|
+
currentPage: number;
|
|
536
|
+
pageSize: number;
|
|
537
|
+
total: number;
|
|
538
|
+
list: CAT721Balance[];
|
|
539
|
+
}>;
|
|
540
|
+
getAddressCAT721CollectionSummary(version: 'v1' | 'v2', address: string, collectionId: string): Promise<AddressCAT721CollectionSummary>;
|
|
541
|
+
transferCAT721Step1(version: 'v1' | 'v2', to: string, collectionId: string, localId: string, feeRate: number): Promise<{
|
|
542
|
+
id: string;
|
|
543
|
+
commitTx: string;
|
|
544
|
+
toSignInputs: UserToSignInput[];
|
|
545
|
+
feeRate: number;
|
|
546
|
+
}>;
|
|
547
|
+
transferCAT721Step2(version: 'v1' | 'v2', transferId: string, commitTx: string, toSignInputs: UserToSignInput[]): Promise<{
|
|
548
|
+
revealTx: string;
|
|
549
|
+
toSignInputs: UserToSignInput[];
|
|
550
|
+
}>;
|
|
551
|
+
transferCAT721Step3(version: 'v1' | 'v2', transferId: string, revealTx: string, toSignInputs: UserToSignInput[]): Promise<{
|
|
552
|
+
txid: string;
|
|
553
|
+
}>;
|
|
554
|
+
getBuyCoinChannelList(coin: string): Promise<BtcChannelItem[]>;
|
|
555
|
+
createBuyCoinPaymentUrl(coin: string, address: string, channel: string): Promise<string>;
|
|
556
|
+
getBabylonAddress(address: string): Promise<string>;
|
|
557
|
+
getBabylonAddressSummary(chainId: string, babylonConfig?: BabylonConfigV2): Promise<BabylonAddressSummary>;
|
|
558
|
+
createSendTokenStep1(chainId: string, tokenBalance: CosmosBalance, to: string, memo: string, { gasLimit, gasPrice, gasAdjustment, }: {
|
|
559
|
+
gasLimit: number;
|
|
560
|
+
gasPrice: string;
|
|
561
|
+
gasAdjustment?: number;
|
|
562
|
+
}): Promise<string>;
|
|
563
|
+
createSendTokenStep2(chainId: string, signature: string): Promise<string>;
|
|
564
|
+
simulateBabylonGas(chainId: string, recipient: string, amount: {
|
|
565
|
+
denom: string;
|
|
566
|
+
amount: string;
|
|
567
|
+
}, memo: string): Promise<number>;
|
|
568
|
+
getBabylonConfig(): Promise<BabylonConfigV2>;
|
|
569
|
+
getContactByAddress(address: string): Promise<ContactBookItem | undefined>;
|
|
570
|
+
getContactByAddressAndChain(address: string, chain: ChainType): Promise<ContactBookItem | undefined>;
|
|
571
|
+
updateContact(data: ContactBookItem): Promise<void>;
|
|
572
|
+
removeContact(address: string, chain?: ChainType): Promise<void>;
|
|
573
|
+
listContacts(): Promise<ContactBookItem[]>;
|
|
574
|
+
saveContactsOrder(contacts: ContactBookItem[]): Promise<void>;
|
|
575
|
+
singleStepTransferBRC20Step1(params: {
|
|
576
|
+
userAddress: string;
|
|
577
|
+
userPubkey: string;
|
|
578
|
+
receiver: string;
|
|
579
|
+
ticker: string;
|
|
580
|
+
amount: string;
|
|
581
|
+
feeRate: number;
|
|
582
|
+
}): Promise<{
|
|
583
|
+
orderId: string;
|
|
584
|
+
psbtHex: string;
|
|
585
|
+
toSignInputs: UserToSignInput[];
|
|
586
|
+
}>;
|
|
587
|
+
singleStepTransferBRC20Step2(params: {
|
|
588
|
+
orderId: string;
|
|
589
|
+
commitTx: string;
|
|
590
|
+
toSignInputs: UserToSignInput[];
|
|
591
|
+
}): Promise<{
|
|
592
|
+
psbtHex: string;
|
|
593
|
+
toSignInputs: UserToSignInput[];
|
|
594
|
+
}>;
|
|
595
|
+
singleStepTransferBRC20Step3(params: {
|
|
596
|
+
orderId: string;
|
|
597
|
+
revealTx: string;
|
|
598
|
+
toSignInputs: UserToSignInput[];
|
|
599
|
+
}): Promise<{
|
|
600
|
+
txid: string;
|
|
601
|
+
}>;
|
|
602
|
+
setLastActiveTime(): void;
|
|
603
|
+
getOpenInSidePanel(): Promise<boolean>;
|
|
604
|
+
setOpenInSidePanel(openInSidePanel: boolean): Promise<void>;
|
|
605
|
+
sendCoinBypassHeadOffsets(tos: {
|
|
606
|
+
address: string;
|
|
607
|
+
satoshis: number;
|
|
608
|
+
}[], feeRate: number): Promise<{
|
|
609
|
+
psbtHex: string;
|
|
610
|
+
rawtx: string;
|
|
611
|
+
fee: number;
|
|
612
|
+
}>;
|
|
613
|
+
getAlkanesList(address: string, currentPage: number, pageSize: number): Promise<{
|
|
614
|
+
currentPage: number;
|
|
615
|
+
pageSize: number;
|
|
616
|
+
total: number;
|
|
617
|
+
list: AlkanesBalance[];
|
|
618
|
+
}>;
|
|
619
|
+
getAssetUtxosAlkanes(rune: string): Promise<UnspentOutput[]>;
|
|
620
|
+
getAddressAlkanesTokenSummary(address: string, alkaneid: string, fetchAvailable: boolean): Promise<AddressAlkanesTokenSummary>;
|
|
621
|
+
createAlkanesSendTx(params: {
|
|
622
|
+
userAddress: string;
|
|
623
|
+
userPubkey: string;
|
|
624
|
+
receiver: string;
|
|
625
|
+
alkaneid: string;
|
|
626
|
+
amount: string;
|
|
627
|
+
feeRate: number;
|
|
628
|
+
}): Promise<{
|
|
629
|
+
psbtHex: string;
|
|
630
|
+
toSignInputs: UserToSignInput[];
|
|
631
|
+
}>;
|
|
632
|
+
signAlkanesSendTx(params: {
|
|
633
|
+
commitTx: string;
|
|
634
|
+
toSignInputs: ToSignInput[];
|
|
635
|
+
}): Promise<{
|
|
636
|
+
txid: string;
|
|
637
|
+
}>;
|
|
638
|
+
sendAlkanes(params: {
|
|
639
|
+
to: string;
|
|
640
|
+
alkaneid: string;
|
|
641
|
+
amount: string;
|
|
642
|
+
feeRate: number;
|
|
643
|
+
enableRBF: boolean;
|
|
644
|
+
}): Promise<string>;
|
|
645
|
+
getAlkanesCollectionList(address: string, currentPage: number, pageSize: number): Promise<{
|
|
646
|
+
list: AlkanesCollection[];
|
|
647
|
+
total: number;
|
|
648
|
+
}>;
|
|
649
|
+
getAlkanesCollectionItems(address: string, collectionId: string, currentPage: number, pageSize: number): Promise<{
|
|
650
|
+
currentPage: number;
|
|
651
|
+
pageSize: number;
|
|
652
|
+
list: AlkanesInfo[];
|
|
653
|
+
total: number;
|
|
654
|
+
}>;
|
|
655
|
+
getBRC20RecentHistory(address: string, ticker: string): Promise<BRC20HistoryItem[]>;
|
|
656
|
+
}
|
|
657
|
+
declare const WalletProvider: ({ children, wallet, }: {
|
|
658
|
+
children?: ReactNode;
|
|
659
|
+
wallet: WalletController;
|
|
660
|
+
}) => JSX.Element;
|
|
661
|
+
declare const useWallet: () => WalletController;
|
|
662
|
+
|
|
663
|
+
interface PriceContextType {
|
|
664
|
+
isLoadingCoinPrice: boolean;
|
|
665
|
+
coinPrice: CoinPrice;
|
|
666
|
+
refreshCoinPrice: () => void;
|
|
667
|
+
}
|
|
668
|
+
declare function usePrice(): PriceContextType;
|
|
669
|
+
declare function PriceProvider({ children }: {
|
|
670
|
+
children: ReactNode;
|
|
671
|
+
}): JSX.Element;
|
|
672
|
+
|
|
673
|
+
declare function useAccountsState(): AppState['accounts'];
|
|
674
|
+
declare function useCurrentAccount(): Account;
|
|
675
|
+
declare function useCurrentAddress(): string;
|
|
676
|
+
declare function useAccounts(): Account[];
|
|
677
|
+
declare function useAccountBalance(): _unisat_wallet_shared.BitcoinBalanceV2;
|
|
678
|
+
declare function useAddressSummary(): _unisat_wallet_shared.AddressSummary;
|
|
679
|
+
declare function useAccountInscriptions(): {
|
|
680
|
+
list: _unisat_wallet_shared.Inscription[];
|
|
681
|
+
expired: boolean;
|
|
682
|
+
};
|
|
683
|
+
declare function useInscriptionSummary(): _unisat_wallet_shared.InscriptionSummary;
|
|
684
|
+
declare function useAppSummary(): _unisat_wallet_shared.AppSummary;
|
|
685
|
+
declare function useUnreadAppSummary(): _unisat_wallet_shared.AppInfo;
|
|
686
|
+
declare function useReadTab(): (name: 'app' | 'home' | 'settings') => Promise<void>;
|
|
687
|
+
declare function useReadApp(): (id: number) => Promise<void>;
|
|
688
|
+
declare function useHistory(): {
|
|
689
|
+
list: _unisat_wallet_shared.TxHistoryItem[];
|
|
690
|
+
expired: boolean;
|
|
691
|
+
};
|
|
692
|
+
declare function useAccountAddress(): string;
|
|
693
|
+
declare function useSetCurrentAccountCallback(): (account: Account) => void;
|
|
694
|
+
declare function useImportAccountCallback(): (privateKey: string, addressType: AddressType) => Promise<{
|
|
695
|
+
success: boolean;
|
|
696
|
+
error: any;
|
|
697
|
+
}>;
|
|
698
|
+
declare function useChangeAddressFlagCallback(): (isAdd: boolean, flag: number) => Promise<void>;
|
|
699
|
+
declare function useFetchBalanceCallback(): () => Promise<void>;
|
|
700
|
+
declare function useReloadAccounts(): () => Promise<void>;
|
|
701
|
+
declare function useIsKeystoneWallet(): boolean;
|
|
702
|
+
|
|
703
|
+
type UiTypeCheck = {
|
|
704
|
+
isTab: boolean;
|
|
705
|
+
isNotification: boolean;
|
|
706
|
+
isPop: boolean;
|
|
707
|
+
isSidePanel: boolean;
|
|
708
|
+
};
|
|
709
|
+
declare const getUiType: () => UiTypeCheck;
|
|
710
|
+
declare const useApproval: () => readonly [() => Promise<any>, (data?: any, stay?: boolean, forceReject?: boolean) => Promise<void>, (err: any, stay?: boolean, isInternal?: boolean) => Promise<void>];
|
|
711
|
+
|
|
712
|
+
declare const useAppDispatch: () => _reduxjs_toolkit.ThunkDispatch<{
|
|
713
|
+
accounts: AccountsState;
|
|
714
|
+
transactions: TransactionsState;
|
|
715
|
+
settings: SettingsState;
|
|
716
|
+
global: GlobalState;
|
|
717
|
+
keyrings: KeyringsState;
|
|
718
|
+
ui: UIState;
|
|
719
|
+
discovery: DiscoveryState;
|
|
720
|
+
}, undefined, _reduxjs_toolkit.AnyAction> & _reduxjs_toolkit.Dispatch<_reduxjs_toolkit.AnyAction>;
|
|
721
|
+
declare const useAppSelector: TypedUseSelectorHook<AppState>;
|
|
722
|
+
|
|
723
|
+
declare function useDiscoveryState(): AppState['discovery'];
|
|
724
|
+
declare function useAppList(): {
|
|
725
|
+
tab: string;
|
|
726
|
+
items: _unisat_wallet_shared.AppInfo[];
|
|
727
|
+
}[];
|
|
728
|
+
declare function useBannerList(): {
|
|
729
|
+
id: string;
|
|
730
|
+
img: string;
|
|
731
|
+
link: string;
|
|
732
|
+
}[];
|
|
733
|
+
declare function useLastFetchInfo(): {
|
|
734
|
+
lastFetchTime: number;
|
|
735
|
+
lasfFetchChainType: _unisat_wallet_types.ChainType;
|
|
736
|
+
};
|
|
737
|
+
declare function useHasNewBanner(): boolean;
|
|
738
|
+
|
|
739
|
+
declare function useGlobalState(): AppState['global'];
|
|
740
|
+
declare function useTab(): TabOption;
|
|
741
|
+
declare function useSetTabCallback(): (tab: TabOption) => void;
|
|
742
|
+
declare function useBooted(): boolean;
|
|
743
|
+
declare function useIsUnlocked(): boolean;
|
|
744
|
+
declare function useIsReady(): boolean;
|
|
745
|
+
declare function useUnlockCallback(): (password: string) => Promise<void>;
|
|
746
|
+
declare function useCreateAccountCallback(): (mnemonics: string, hdPath: string, passphrase: string, addressType: AddressType, accountCount: number) => Promise<void>;
|
|
747
|
+
declare function useImportAccountsFromKeystoneCallback(): (urType: string, urCbor: string, addressType: AddressType, accountCount: number, hdPath: string, filterPubkey?: string[], connectionType?: 'USB' | 'QR') => Promise<void>;
|
|
748
|
+
declare function useCreateColdWalletCallback(): (xpub: string, addressType: AddressType, alianName?: string, hdPath?: string, accountCount?: number) => Promise<void>;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Use i18n Hook
|
|
752
|
+
* @returns i18n context
|
|
753
|
+
*/
|
|
754
|
+
declare const useI18n: () => any;
|
|
755
|
+
/**
|
|
756
|
+
* Get current language
|
|
757
|
+
* @returns current language code
|
|
758
|
+
*/
|
|
759
|
+
declare const getCurrentLocale: () => Promise<string>;
|
|
760
|
+
/**
|
|
761
|
+
* Select special languages for style adaptation
|
|
762
|
+
* @returns { currentLocale: string, isSpecialLocale: boolean }
|
|
763
|
+
*/
|
|
764
|
+
declare const getSpecialLocale: () => Promise<{
|
|
765
|
+
currentLocale: string;
|
|
766
|
+
isSpecialLocale: boolean;
|
|
767
|
+
}>;
|
|
768
|
+
|
|
769
|
+
declare function useKeyringsState(): AppState['keyrings'];
|
|
770
|
+
declare function useKeyrings(): _unisat_wallet_shared.WalletKeyring[];
|
|
771
|
+
declare function useCurrentKeyring(): _unisat_wallet_shared.WalletKeyring;
|
|
772
|
+
|
|
773
|
+
declare function useSettingsState(): AppState['settings'];
|
|
774
|
+
declare function useLocale(): string;
|
|
775
|
+
declare function useChangeLocaleCallback(): (locale: string) => Promise<void>;
|
|
776
|
+
declare function useNetworkType(): NetworkType;
|
|
777
|
+
declare function useChangeNetworkTypeCallback(): (type: NetworkType) => Promise<void>;
|
|
778
|
+
declare function useChainType(): ChainType;
|
|
779
|
+
declare function useChain(): _unisat_wallet_shared.TypeChain;
|
|
780
|
+
declare function useChangeChainTypeCallback(): (type: ChainType) => Promise<void>;
|
|
781
|
+
declare function useBTCUnit(): string;
|
|
782
|
+
declare function useTxExplorerUrl(txid: string): string;
|
|
783
|
+
declare function useGetTxExplorerUrlCallback(): (txid: string) => string;
|
|
784
|
+
declare function useAddressExplorerUrl(address: string): string;
|
|
785
|
+
declare function useCAT20TokenInfoExplorerUrl(version: CAT_VERSION, tokenId: string): string;
|
|
786
|
+
declare function useUnisatWebsite(): string;
|
|
787
|
+
declare function useOrdinalsWebsite(): string;
|
|
788
|
+
declare function useWalletConfig(): _unisat_wallet_shared.WalletConfig;
|
|
789
|
+
declare function useVersionInfo(): {
|
|
790
|
+
currentVesion: string;
|
|
791
|
+
newVersion: string;
|
|
792
|
+
latestVersion: string;
|
|
793
|
+
skipped: boolean;
|
|
794
|
+
};
|
|
795
|
+
declare function useSkipVersionCallback(): (version: string) => void;
|
|
796
|
+
declare function useAutoLockTimeId(): number;
|
|
797
|
+
declare function getAddressTips(address: string, chanEnum: ChainType): {
|
|
798
|
+
homeTip: string;
|
|
799
|
+
sendTip: string;
|
|
800
|
+
};
|
|
801
|
+
declare function useAddressTips(): {
|
|
802
|
+
homeTip: string;
|
|
803
|
+
sendTip: string;
|
|
804
|
+
};
|
|
805
|
+
declare function useCAT721NFTContentBaseUrl(version: CAT_VERSION): "" | "https://tracker-fractal-mainnet.catprotocol.org" | "https://tracker2-fractal-mainnet.catprotocol.org" | "https://tracker-fractal-testnet.catprotocol.org";
|
|
806
|
+
declare function useBRC20MarketPlaceWebsite(ticker: string): string;
|
|
807
|
+
declare function useRunesMarketPlaceWebsite(ticker: string): string;
|
|
808
|
+
declare function useCAT20MarketPlaceWebsite(tokenId: string): string;
|
|
809
|
+
declare function useBabylonConfig(): _unisat_babylon_service_types.BabylonConfig;
|
|
810
|
+
declare function useIsMainnetChain(): boolean;
|
|
811
|
+
declare function useDeveloperMode(): boolean;
|
|
812
|
+
declare function useSetDeveloperModeCallback(): (developerMode: boolean) => Promise<void>;
|
|
813
|
+
|
|
814
|
+
declare function useTransactionsState(): AppState['transactions'];
|
|
815
|
+
declare function useBitcoinTx(): BitcoinTx;
|
|
816
|
+
declare function usePrepareSendBTCCallback(): ({ toAddressInfo, toAmount, feeRate, enableRBF, memo, memos, disableAutoAdjust, }: {
|
|
817
|
+
toAddressInfo: ToAddressInfo;
|
|
818
|
+
toAmount: number;
|
|
819
|
+
feeRate?: number;
|
|
820
|
+
enableRBF: boolean;
|
|
821
|
+
memo?: string;
|
|
822
|
+
memos?: string[];
|
|
823
|
+
disableAutoAdjust?: boolean;
|
|
824
|
+
}) => Promise<RawTxInfo>;
|
|
825
|
+
declare function usePrepareSendBypassHeadOffsetsCallback(): ({ toAddressInfo, toAmount, feeRate, }: {
|
|
826
|
+
toAddressInfo: ToAddressInfo;
|
|
827
|
+
toAmount: number;
|
|
828
|
+
feeRate: number;
|
|
829
|
+
}) => Promise<RawTxInfo>;
|
|
830
|
+
declare function usePushBitcoinTxCallback(): (rawtx: string) => Promise<{
|
|
831
|
+
success: boolean;
|
|
832
|
+
txid: string;
|
|
833
|
+
error: string;
|
|
834
|
+
}>;
|
|
835
|
+
declare function useOrdinalsTx(): OrdinalsTx;
|
|
836
|
+
declare function usePrepareSendOrdinalsInscriptionCallback(): ({ toAddressInfo, inscriptionId, feeRate, outputValue, enableRBF, }: {
|
|
837
|
+
toAddressInfo: ToAddressInfo;
|
|
838
|
+
inscriptionId: string;
|
|
839
|
+
feeRate?: number;
|
|
840
|
+
outputValue?: number;
|
|
841
|
+
enableRBF: boolean;
|
|
842
|
+
}) => Promise<RawTxInfo>;
|
|
843
|
+
declare function usePrepareSendOrdinalsInscriptionsCallback(): ({ toAddressInfo, inscriptionIds, feeRate, enableRBF, }: {
|
|
844
|
+
toAddressInfo: ToAddressInfo;
|
|
845
|
+
inscriptionIds: string[];
|
|
846
|
+
feeRate?: number;
|
|
847
|
+
enableRBF: boolean;
|
|
848
|
+
}) => Promise<RawTxInfo>;
|
|
849
|
+
declare function useCreateSplitTxCallback(): ({ inscriptionId, feeRate, outputValue, enableRBF, }: {
|
|
850
|
+
inscriptionId: string;
|
|
851
|
+
feeRate: number;
|
|
852
|
+
outputValue: number;
|
|
853
|
+
enableRBF: boolean;
|
|
854
|
+
}) => Promise<{
|
|
855
|
+
rawTxInfo: RawTxInfo;
|
|
856
|
+
splitedCount: number;
|
|
857
|
+
}>;
|
|
858
|
+
declare function usePushOrdinalsTxCallback(): (rawtx: string) => Promise<{
|
|
859
|
+
success: boolean;
|
|
860
|
+
txid: string;
|
|
861
|
+
error: string;
|
|
862
|
+
}>;
|
|
863
|
+
declare function useUtxos(): UnspentOutput[];
|
|
864
|
+
declare function useFetchUtxosCallback(): () => Promise<UnspentOutput[]>;
|
|
865
|
+
declare function useSpendUnavailableUtxos(): UnspentOutput[];
|
|
866
|
+
declare function useSetSpendUnavailableUtxosCallback(): (utxos: UnspentOutput[]) => void;
|
|
867
|
+
declare function useSafeBalance(): string;
|
|
868
|
+
declare function useAssetUtxosRunes(): UnspentOutput[];
|
|
869
|
+
declare function useFetchAssetUtxosRunesCallback(): (rune: string) => Promise<UnspentOutput[]>;
|
|
870
|
+
declare function usePrepareSendRunesCallback(): ({ toAddressInfo, runeid, runeAmount, outputValue, feeRate, enableRBF, }: {
|
|
871
|
+
toAddressInfo: ToAddressInfo;
|
|
872
|
+
runeid: string;
|
|
873
|
+
runeAmount: string;
|
|
874
|
+
outputValue?: number;
|
|
875
|
+
feeRate: number;
|
|
876
|
+
enableRBF: boolean;
|
|
877
|
+
}) => Promise<RawTxInfo>;
|
|
878
|
+
declare function useRunesTx(): RunesTx;
|
|
879
|
+
declare function usePrepareSendAlkanesCallback(): (toAddressInfo: ToAddressInfo, alkaneid: string, amount: string, feeRate: number, enableRBF?: boolean) => Promise<string>;
|
|
880
|
+
|
|
881
|
+
declare function useUIState(): AppState['ui'];
|
|
882
|
+
declare function useAssetTabKey(): AssetTabKey;
|
|
883
|
+
declare function useOrdinalsAssetTabKey(): OrdinalsAssetTabKey;
|
|
884
|
+
declare function useCATAssetTabKey(): CATAssetTabKey;
|
|
885
|
+
declare function useAlkanesAssetTabKey(): AlkanesAssetTabKey;
|
|
886
|
+
declare function useUiTxCreateScreen(): {
|
|
887
|
+
toInfo: {
|
|
888
|
+
address: string;
|
|
889
|
+
domain: string;
|
|
890
|
+
inscription?: Inscription;
|
|
891
|
+
};
|
|
892
|
+
inputAmount: string;
|
|
893
|
+
enableRBF: boolean;
|
|
894
|
+
feeRate: number;
|
|
895
|
+
};
|
|
896
|
+
declare function useUpdateUiTxCreateScreen(): ({ toInfo, inputAmount, enableRBF, feeRate, }: {
|
|
897
|
+
toInfo?: {
|
|
898
|
+
address: string;
|
|
899
|
+
domain: string;
|
|
900
|
+
inscription?: Inscription;
|
|
901
|
+
};
|
|
902
|
+
inputAmount?: string;
|
|
903
|
+
enableRBF?: boolean;
|
|
904
|
+
feeRate?: number;
|
|
905
|
+
}) => void;
|
|
906
|
+
declare function useResetUiTxCreateScreen(): () => void;
|
|
907
|
+
declare function useSupportedAssets(): {
|
|
908
|
+
tabKeys: AssetTabKey[];
|
|
909
|
+
assets: {
|
|
910
|
+
ordinals: boolean;
|
|
911
|
+
runes: boolean;
|
|
912
|
+
CAT20: boolean;
|
|
913
|
+
alkanes: boolean;
|
|
914
|
+
};
|
|
915
|
+
key: string;
|
|
916
|
+
};
|
|
917
|
+
declare const useIsInExpandView: () => boolean;
|
|
918
|
+
declare const useUtxoTools: (chain: TypeChain) => {
|
|
919
|
+
openUtxoTools: () => void;
|
|
920
|
+
};
|
|
921
|
+
declare function useLocationState<T>(): T;
|
|
922
|
+
|
|
923
|
+
declare function AccountUpdater(): any;
|
|
924
|
+
|
|
925
|
+
declare const store: _reduxjs_toolkit_dist_configureStore.ToolkitStore<{
|
|
926
|
+
accounts: AccountsState;
|
|
927
|
+
transactions: TransactionsState;
|
|
928
|
+
settings: SettingsState;
|
|
929
|
+
global: GlobalState;
|
|
930
|
+
keyrings: KeyringsState;
|
|
931
|
+
ui: UIState;
|
|
932
|
+
discovery: DiscoveryState;
|
|
933
|
+
}, _reduxjs_toolkit.AnyAction, _reduxjs_toolkit.MiddlewareArray<[_reduxjs_toolkit.ThunkMiddleware<{
|
|
934
|
+
accounts: AccountsState;
|
|
935
|
+
transactions: TransactionsState;
|
|
936
|
+
settings: SettingsState;
|
|
937
|
+
global: GlobalState;
|
|
938
|
+
keyrings: KeyringsState;
|
|
939
|
+
ui: UIState;
|
|
940
|
+
discovery: DiscoveryState;
|
|
941
|
+
}, _reduxjs_toolkit.AnyAction>, _reduxjs_toolkit.Middleware<{}, any, _reduxjs_toolkit.Dispatch<_reduxjs_toolkit.AnyAction>>]>>;
|
|
942
|
+
|
|
943
|
+
type AppState = ReturnType<typeof store.getState>;
|
|
944
|
+
type AppDispatch = typeof store.dispatch;
|
|
945
|
+
|
|
946
|
+
export { AccountUpdater, AlkanesAssetTabKey, AppDispatch, AppState, AssetTabKey, CATAssetTabKey, I18nProvider, NavigationSource, OrdinalsAssetTabKey, PriceProvider, TabOption, WalletProvider, accountActions, store as default, discoveryActions, getAddressTips, getCurrentLocale, getSpecialLocale, getUiType, globalActions, keyringsActions, settingsActions, transactionsActions, uiActions, useAccountAddress, useAccountBalance, useAccountInscriptions, useAccounts, useAccountsState, useAddressExplorerUrl, useAddressSummary, useAddressTips, useAlkanesAssetTabKey, useAppDispatch, useAppList, useAppSelector, useAppSummary, useApproval, useAssetTabKey, useAssetUtxosRunes, useAutoLockTimeId, useBRC20MarketPlaceWebsite, useBTCUnit, useBabylonConfig, useBannerList, useBitcoinTx, useBooted, useCAT20MarketPlaceWebsite, useCAT20TokenInfoExplorerUrl, useCAT721NFTContentBaseUrl, useCATAssetTabKey, useChain, useChainType, useChangeAddressFlagCallback, useChangeChainTypeCallback, useChangeLocaleCallback, useChangeNetworkTypeCallback, useCreateAccountCallback, useCreateColdWalletCallback, useCreateSplitTxCallback, useCurrentAccount, useCurrentAddress, useCurrentKeyring, useDeveloperMode, useDiscoveryState, useFetchAssetUtxosRunesCallback, useFetchBalanceCallback, useFetchUtxosCallback, useGetTxExplorerUrlCallback, useGlobalState, useHasNewBanner, useHistory, useI18n, useImportAccountCallback, useImportAccountsFromKeystoneCallback, useInscriptionSummary, useIsInExpandView, useIsKeystoneWallet, useIsMainnetChain, useIsReady, useIsUnlocked, useKeyrings, useKeyringsState, useLastFetchInfo, useLocale, useLocationState, useNetworkType, useOrdinalsAssetTabKey, useOrdinalsTx, useOrdinalsWebsite, usePrepareSendAlkanesCallback, usePrepareSendBTCCallback, usePrepareSendBypassHeadOffsetsCallback, usePrepareSendOrdinalsInscriptionCallback, usePrepareSendOrdinalsInscriptionsCallback, usePrepareSendRunesCallback, usePrice, usePushBitcoinTxCallback, usePushOrdinalsTxCallback, useReadApp, useReadTab, useReloadAccounts, useResetUiTxCreateScreen, useRunesMarketPlaceWebsite, useRunesTx, useSafeBalance, useSetCurrentAccountCallback, useSetDeveloperModeCallback, useSetSpendUnavailableUtxosCallback, useSetTabCallback, useSettingsState, useSkipVersionCallback, useSpendUnavailableUtxos, useSupportedAssets, useTab, useTransactionsState, useTxExplorerUrl, useUIState, useUiTxCreateScreen, useUnisatWebsite, useUnlockCallback, useUnreadAppSummary, useUpdateUiTxCreateScreen, useUtxoTools, useUtxos, useVersionInfo, useWallet, useWalletConfig };
|