@subwallet/extension-base 1.3.22-0 → 1.3.24-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/background/KoniTypes.d.ts +77 -4
- package/background/KoniTypes.js +2 -0
- package/cjs/background/KoniTypes.js +2 -0
- package/cjs/constants/environment.js +4 -2
- package/cjs/constants/index.js +21 -4
- package/cjs/constants/signing.js +6 -2
- package/cjs/core/logic-validation/recipientAddress.js +9 -1
- package/cjs/core/logic-validation/transfer.js +57 -36
- package/cjs/core/types.js +1 -0
- package/cjs/core/utils.js +12 -1
- package/cjs/defaults.js +1 -1
- package/cjs/koni/api/dotsama/crowdloan.js +1 -1
- package/cjs/koni/api/nft/index.js +9 -16
- package/cjs/koni/api/staking/index.js +3 -4
- package/cjs/koni/background/handlers/Extension.js +343 -185
- package/cjs/koni/background/handlers/State.js +17 -2
- package/cjs/koni/background/handlers/Tabs.js +1 -1
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/balance-service/helpers/subscribe/cardano/consts.js +11 -0
- package/cjs/services/balance-service/helpers/subscribe/cardano/index.js +63 -0
- package/cjs/services/balance-service/helpers/subscribe/cardano/types.js +1 -0
- package/cjs/services/balance-service/helpers/subscribe/cardano/utils.js +74 -0
- package/cjs/services/balance-service/helpers/subscribe/index.js +21 -7
- package/cjs/services/balance-service/helpers/subscribe/ton/utils.js +2 -2
- package/cjs/services/balance-service/index.js +4 -2
- package/cjs/services/balance-service/transfer/cardano-transfer.js +122 -0
- package/cjs/services/balance-service/transfer/smart-contract.js +24 -3
- package/cjs/services/balance-service/transfer/token.js +4 -4
- package/cjs/services/chain-service/handler/CardanoApi.js +176 -0
- package/cjs/services/chain-service/handler/CardanoChainHandler.js +83 -0
- package/cjs/services/chain-service/handler/TonApi.js +2 -5
- package/cjs/services/chain-service/index.js +40 -7
- package/cjs/services/chain-service/utils/index.js +40 -11
- package/cjs/services/chain-service/utils/patch.js +1 -1
- package/cjs/services/earning-service/handlers/liquid-staking/bifrost-manta.js +1 -1
- package/cjs/services/earning-service/handlers/liquid-staking/bifrost.js +1 -1
- package/cjs/services/earning-service/service.js +6 -12
- package/cjs/services/fee-service/service.js +19 -8
- package/cjs/services/fee-service/utils/tokenPayFee.js +151 -0
- package/cjs/services/history-service/index.js +4 -6
- package/cjs/services/inapp-notification-service/index.js +12 -4
- package/cjs/services/keyring-service/context/account-context.js +17 -2
- package/cjs/services/keyring-service/context/handlers/Derive.js +10 -7
- package/cjs/services/keyring-service/context/handlers/Migration.js +268 -0
- package/cjs/services/keyring-service/context/handlers/Mnemonic.js +2 -2
- package/cjs/services/keyring-service/context/handlers/Secret.js +1 -1
- package/cjs/services/keyring-service/utils.js +18 -0
- package/cjs/services/request-service/handler/CardanoRequestHandler.js +172 -0
- package/cjs/services/request-service/handler/EvmRequestHandler.js +1 -1
- package/cjs/services/request-service/handler/MetadataRequestHandler.js +5 -13
- package/cjs/services/request-service/index.js +22 -4
- package/cjs/services/setting-service/constants.js +10 -1
- package/cjs/services/storage-service/DatabaseService.js +3 -0
- package/cjs/services/storage-service/db-stores/InappNotification.js +6 -0
- package/cjs/services/swap-service/handler/asset-hub/handler.js +0 -59
- package/cjs/services/swap-service/handler/chainflip-handler.js +33 -281
- package/cjs/services/swap-service/handler/hydradx-handler.js +23 -190
- package/cjs/services/swap-service/handler/simpleswap-handler.js +1 -222
- package/cjs/services/swap-service/handler/uniswap-handler.js +331 -0
- package/cjs/services/swap-service/index.js +31 -22
- package/cjs/services/swap-service/utils.js +21 -38
- package/cjs/services/transaction-service/helpers/index.js +6 -1
- package/cjs/services/transaction-service/index.js +286 -26
- package/cjs/services/transaction-service/utils.js +5 -1
- package/cjs/types/account/info/keyring.js +12 -1
- package/cjs/types/fee/cardano.js +1 -0
- package/cjs/types/swap/index.js +7 -2
- package/cjs/utils/account/analyze.js +2 -1
- package/cjs/utils/account/common.js +29 -20
- package/cjs/utils/account/derive/info/solo.js +9 -4
- package/cjs/utils/account/derive/validate.js +36 -2
- package/cjs/utils/account/transform.js +38 -13
- package/cjs/utils/fee/transfer.js +87 -21
- package/cjs/utils/index.js +2 -2
- package/cjs/utils/staticData/index.js +7 -2
- package/constants/environment.d.ts +1 -0
- package/constants/environment.js +2 -1
- package/constants/index.d.ts +6 -1
- package/constants/index.js +14 -1
- package/constants/signing.js +6 -2
- package/core/logic-validation/recipientAddress.js +11 -3
- package/core/logic-validation/transfer.d.ts +1 -1
- package/core/logic-validation/transfer.js +33 -12
- package/core/substrate/xcm-parser.d.ts +1 -1
- package/core/types.d.ts +1 -0
- package/core/types.js +1 -0
- package/core/utils.d.ts +1 -0
- package/core/utils.js +13 -3
- package/defaults.d.ts +1 -1
- package/defaults.js +1 -1
- package/koni/api/dotsama/crowdloan.js +3 -3
- package/koni/api/nft/index.js +10 -16
- package/koni/api/nft/story_odyssey_nft/index.d.ts +1 -1
- package/koni/api/staking/index.js +4 -5
- package/koni/background/handlers/Extension.d.ts +9 -0
- package/koni/background/handlers/Extension.js +225 -69
- package/koni/background/handlers/State.d.ts +6 -2
- package/koni/background/handlers/State.js +18 -3
- package/koni/background/handlers/Tabs.js +1 -1
- package/package.json +76 -9
- package/packageInfo.js +1 -1
- package/services/balance-service/helpers/subscribe/cardano/consts.d.ts +1 -0
- package/services/balance-service/helpers/subscribe/cardano/consts.js +4 -0
- package/services/balance-service/helpers/subscribe/cardano/index.d.ts +2 -0
- package/services/balance-service/helpers/subscribe/cardano/index.js +57 -0
- package/services/balance-service/helpers/subscribe/cardano/types.d.ts +34 -0
- package/services/balance-service/helpers/subscribe/cardano/types.js +1 -0
- package/services/balance-service/helpers/subscribe/cardano/utils.d.ts +15 -0
- package/services/balance-service/helpers/subscribe/cardano/utils.js +62 -0
- package/services/balance-service/helpers/subscribe/index.d.ts +2 -2
- package/services/balance-service/helpers/subscribe/index.js +23 -9
- package/services/balance-service/helpers/subscribe/ton/utils.d.ts +1 -1
- package/services/balance-service/helpers/subscribe/ton/utils.js +1 -1
- package/services/balance-service/index.js +4 -2
- package/services/balance-service/transfer/cardano-transfer.d.ts +24 -0
- package/services/balance-service/transfer/cardano-transfer.js +114 -0
- package/services/balance-service/transfer/smart-contract.d.ts +4 -2
- package/services/balance-service/transfer/smart-contract.js +24 -3
- package/services/balance-service/transfer/token.d.ts +1 -1
- package/services/balance-service/transfer/token.js +2 -2
- package/services/chain-service/handler/CardanoApi.d.ts +38 -0
- package/services/chain-service/handler/CardanoApi.js +167 -0
- package/services/chain-service/handler/CardanoChainHandler.d.ts +17 -0
- package/services/chain-service/handler/CardanoChainHandler.js +75 -0
- package/services/chain-service/handler/TonApi.js +3 -6
- package/services/chain-service/handler/types.d.ts +1 -0
- package/services/chain-service/index.d.ts +4 -1
- package/services/chain-service/index.js +41 -8
- package/services/chain-service/types.d.ts +9 -1
- package/services/chain-service/utils/index.d.ts +4 -0
- package/services/chain-service/utils/index.js +32 -11
- package/services/chain-service/utils/patch.js +1 -1
- package/services/earning-service/handlers/liquid-staking/bifrost-manta.js +1 -1
- package/services/earning-service/handlers/liquid-staking/bifrost.js +1 -1
- package/services/earning-service/service.js +8 -14
- package/services/fee-service/interfaces.d.ts +25 -0
- package/services/fee-service/service.js +19 -8
- package/services/fee-service/utils/tokenPayFee.d.ts +8 -0
- package/services/fee-service/utils/tokenPayFee.js +141 -0
- package/services/history-service/index.js +6 -8
- package/services/inapp-notification-service/index.d.ts +3 -4
- package/services/inapp-notification-service/index.js +14 -6
- package/services/keyring-service/context/account-context.d.ts +6 -2
- package/services/keyring-service/context/account-context.js +17 -2
- package/services/keyring-service/context/handlers/Derive.d.ts +1 -1
- package/services/keyring-service/context/handlers/Derive.js +10 -8
- package/services/keyring-service/context/handlers/Migration.d.ts +17 -0
- package/services/keyring-service/context/handlers/Migration.js +258 -0
- package/services/keyring-service/context/handlers/Mnemonic.js +2 -2
- package/services/keyring-service/context/handlers/Secret.js +2 -2
- package/services/keyring-service/utils.d.ts +2 -0
- package/services/keyring-service/utils.js +11 -0
- package/services/request-service/handler/CardanoRequestHandler.d.ts +16 -0
- package/services/request-service/handler/CardanoRequestHandler.js +163 -0
- package/services/request-service/handler/EvmRequestHandler.js +1 -1
- package/services/request-service/handler/MetadataRequestHandler.d.ts +1 -1
- package/services/request-service/handler/MetadataRequestHandler.js +5 -13
- package/services/request-service/index.d.ts +7 -4
- package/services/request-service/index.js +21 -7
- package/services/setting-service/constants.d.ts +3 -0
- package/services/setting-service/constants.js +6 -0
- package/services/storage-service/DatabaseService.d.ts +1 -0
- package/services/storage-service/DatabaseService.js +3 -0
- package/services/storage-service/db-stores/InappNotification.d.ts +1 -0
- package/services/storage-service/db-stores/InappNotification.js +6 -0
- package/services/swap-service/handler/asset-hub/handler.d.ts +1 -4
- package/services/swap-service/handler/asset-hub/handler.js +2 -61
- package/services/swap-service/handler/base-handler.d.ts +1 -4
- package/services/swap-service/handler/chainflip-handler.d.ts +2 -9
- package/services/swap-service/handler/chainflip-handler.js +31 -280
- package/services/swap-service/handler/hydradx-handler.d.ts +1 -6
- package/services/swap-service/handler/hydradx-handler.js +13 -180
- package/services/swap-service/handler/simpleswap-handler.d.ts +1 -4
- package/services/swap-service/handler/simpleswap-handler.js +5 -226
- package/services/swap-service/handler/uniswap-handler.d.ts +41 -0
- package/services/swap-service/handler/uniswap-handler.js +323 -0
- package/services/swap-service/index.js +30 -22
- package/services/swap-service/utils.d.ts +1 -5
- package/services/swap-service/utils.js +7 -21
- package/services/transaction-service/helpers/index.d.ts +2 -0
- package/services/transaction-service/helpers/index.js +4 -0
- package/services/transaction-service/index.d.ts +8 -2
- package/services/transaction-service/index.js +273 -17
- package/services/transaction-service/types.d.ts +7 -0
- package/services/transaction-service/utils.js +7 -2
- package/types/account/info/keyring.d.ts +4 -1
- package/types/account/info/keyring.js +9 -0
- package/types/account/info/proxy.d.ts +2 -0
- package/types/balance/index.d.ts +4 -1
- package/types/fee/base.d.ts +1 -1
- package/types/fee/cardano.d.ts +18 -0
- package/types/fee/cardano.js +1 -0
- package/types/fee/option.d.ts +1 -1
- package/types/fee/subscription.d.ts +4 -3
- package/types/swap/index.d.ts +11 -3
- package/types/swap/index.js +7 -2
- package/utils/account/analyze.js +2 -1
- package/utils/account/common.d.ts +11 -6
- package/utils/account/common.js +28 -19
- package/utils/account/derive/info/solo.js +10 -5
- package/utils/account/derive/validate.d.ts +1 -0
- package/utils/account/derive/validate.js +34 -1
- package/utils/account/transform.d.ts +2 -1
- package/utils/account/transform.js +37 -13
- package/utils/fee/transfer.d.ts +3 -2
- package/utils/fee/transfer.js +90 -24
- package/utils/index.js +4 -4
- package/utils/staticData/index.d.ts +4 -1
- package/utils/staticData/index.js +5 -1
- package/utils/staticData/oldChainPrefix.json +1 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChainType, ExtrinsicDataTypeMap, ExtrinsicStatus, ExtrinsicType, FeeData, ValidateTransactionResponse } from '@subwallet/extension-base/background/KoniTypes';
|
|
2
|
+
import { SignTypedDataMessageV3V4 } from '@subwallet/extension-base/core/logic-validation';
|
|
2
3
|
import { TonTransactionConfig } from '@subwallet/extension-base/services/balance-service/transfer/ton-transfer';
|
|
3
4
|
import { BaseRequestSign, BriefProcessStep, ProcessTransactionData, TransactionFee } from '@subwallet/extension-base/types';
|
|
4
5
|
import EventEmitter from 'eventemitter3';
|
|
@@ -27,6 +28,9 @@ export interface SWTransaction extends ValidateTransactionResponse, Partial<Pick
|
|
|
27
28
|
signAfterCreate?: (id: string) => void;
|
|
28
29
|
step?: BriefProcessStep;
|
|
29
30
|
}
|
|
31
|
+
export interface SWPermitTransaction extends Omit<SWTransaction, 'transaction'> {
|
|
32
|
+
transaction: SignTypedDataMessageV3V4;
|
|
33
|
+
}
|
|
30
34
|
export interface SWTransactionResult extends Omit<SWTransaction, 'transaction' | 'additionalValidator' | 'eventsHandler' | 'process'> {
|
|
31
35
|
process?: ProcessTransactionData;
|
|
32
36
|
}
|
|
@@ -42,6 +46,9 @@ export interface SWTransactionInput extends SwInputBase, Partial<Pick<SWTransact
|
|
|
42
46
|
resolveOnDone?: boolean;
|
|
43
47
|
skipFeeValidation?: boolean;
|
|
44
48
|
}
|
|
49
|
+
export interface SWPermitTransactionInput extends Omit<SWTransactionInput, 'transaction'> {
|
|
50
|
+
transaction?: SWPermitTransaction['transaction'] | null;
|
|
51
|
+
}
|
|
45
52
|
export declare type SWTransactionResponse = SwInputBase & Pick<SWTransaction, 'warnings' | 'errors'> & Partial<Pick<SWTransaction, 'id' | 'extrinsicHash' | 'status' | 'estimateFee'>> & TransactionFee & {
|
|
46
53
|
processId?: string;
|
|
47
54
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Copyright 2019-2022 @subwallet/extension-base authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { _getBlockExplorerFromChain, _isChainTestNet, _isPureEvmChain } from '@subwallet/extension-base/services/chain-service/utils';
|
|
4
|
+
import { _getBlockExplorerFromChain, _isChainTestNet, _isPureCardanoChain, _isPureEvmChain } from '@subwallet/extension-base/services/chain-service/utils';
|
|
5
5
|
import { CHAIN_FLIP_MAINNET_EXPLORER, CHAIN_FLIP_TESTNET_EXPLORER, SIMPLE_SWAP_EXPLORER } from '@subwallet/extension-base/services/swap-service/utils';
|
|
6
|
+
import { hexAddPrefix, isHex } from '@polkadot/util';
|
|
7
|
+
|
|
6
8
|
// @ts-ignore
|
|
7
9
|
export function parseTransactionData(data) {
|
|
8
10
|
// @ts-ignore
|
|
@@ -46,6 +48,9 @@ function getBlockExplorerTxRoute(chainInfo) {
|
|
|
46
48
|
if (_isPureEvmChain(chainInfo)) {
|
|
47
49
|
return 'tx';
|
|
48
50
|
}
|
|
51
|
+
if (_isPureCardanoChain(chainInfo)) {
|
|
52
|
+
return 'transaction';
|
|
53
|
+
}
|
|
49
54
|
if (['aventus', 'deeper_network'].includes(chainInfo.slug)) {
|
|
50
55
|
return 'transaction';
|
|
51
56
|
}
|
|
@@ -60,7 +65,7 @@ export function getExplorerLink(chainInfo, value, type) {
|
|
|
60
65
|
const route = getBlockExplorerAccountRoute(explorerLink);
|
|
61
66
|
return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${value}`;
|
|
62
67
|
}
|
|
63
|
-
if (explorerLink && value
|
|
68
|
+
if (explorerLink && isHex(hexAddPrefix(value))) {
|
|
64
69
|
if (chainInfo.slug === 'bittensor') {
|
|
65
70
|
return undefined;
|
|
66
71
|
}
|
|
@@ -112,8 +112,11 @@ export declare enum AccountChainType {
|
|
|
112
112
|
SUBSTRATE = "substrate",
|
|
113
113
|
ETHEREUM = "ethereum",
|
|
114
114
|
BITCOIN = "bitcoin",
|
|
115
|
-
TON = "ton"
|
|
115
|
+
TON = "ton",
|
|
116
|
+
CARDANO = "cardano"
|
|
116
117
|
}
|
|
118
|
+
export declare const ACCOUNT_CHAIN_TYPE_ORDINAL_MAP: Record<string, number>;
|
|
119
|
+
export declare const SUPPORTED_ACCOUNT_CHAIN_TYPES: string[];
|
|
117
120
|
export declare enum AccountActions {
|
|
118
121
|
DERIVE = "DERIVE",
|
|
119
122
|
EXPORT_MNEMONIC = "EXPORT_MNEMONIC",
|
|
@@ -65,7 +65,16 @@ export let AccountChainType;
|
|
|
65
65
|
AccountChainType["ETHEREUM"] = "ethereum";
|
|
66
66
|
AccountChainType["BITCOIN"] = "bitcoin";
|
|
67
67
|
AccountChainType["TON"] = "ton";
|
|
68
|
+
AccountChainType["CARDANO"] = "cardano";
|
|
68
69
|
})(AccountChainType || (AccountChainType = {}));
|
|
70
|
+
export const ACCOUNT_CHAIN_TYPE_ORDINAL_MAP = {
|
|
71
|
+
[AccountChainType.SUBSTRATE]: 1,
|
|
72
|
+
[AccountChainType.ETHEREUM]: 2,
|
|
73
|
+
[AccountChainType.TON]: 3,
|
|
74
|
+
[AccountChainType.CARDANO]: 4,
|
|
75
|
+
[AccountChainType.BITCOIN]: 5
|
|
76
|
+
};
|
|
77
|
+
export const SUPPORTED_ACCOUNT_CHAIN_TYPES = ['substrate', 'ethereum', 'ton', 'cardano'];
|
|
69
78
|
export let AccountActions;
|
|
70
79
|
|
|
71
80
|
/**
|
|
@@ -15,6 +15,7 @@ export interface AccountProxyData {
|
|
|
15
15
|
name: string;
|
|
16
16
|
parentId?: string;
|
|
17
17
|
suri?: string;
|
|
18
|
+
isMigrationDone?: boolean;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* Represents a mapping of unique identifiers to account proxy data.
|
|
@@ -55,6 +56,7 @@ export interface AccountProxy extends AccountProxyData {
|
|
|
55
56
|
children?: string[];
|
|
56
57
|
tokenTypes: _AssetType[];
|
|
57
58
|
accountActions: AccountActions[];
|
|
59
|
+
isNeedMigrateUnifiedAccount?: boolean;
|
|
58
60
|
}
|
|
59
61
|
export declare type AccountProxyMap = Record<string, AccountProxy>;
|
|
60
62
|
export interface AccountProxyExtra extends AccountProxy {
|
package/types/balance/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="bn.js" />
|
|
2
2
|
import { _ChainAsset, _ChainInfo } from '@subwallet/chain-list/types';
|
|
3
3
|
import { _BalanceMetadata, APIItemState, ExtrinsicType } from '@subwallet/extension-base/background/KoniTypes';
|
|
4
|
-
import { _EvmApi, _SubstrateApi, _TonApi } from '@subwallet/extension-base/services/chain-service/types';
|
|
4
|
+
import { _CardanoApi, _EvmApi, _SubstrateApi, _TonApi } from '@subwallet/extension-base/services/chain-service/types';
|
|
5
5
|
import { BN } from '@polkadot/util';
|
|
6
6
|
export interface TokenBalanceRaw {
|
|
7
7
|
reserved: BN;
|
|
@@ -52,3 +52,6 @@ export interface SubscribeEvmPalletBalance extends SubscribeBasePalletBalance {
|
|
|
52
52
|
export interface SubscribeTonPalletBalance extends SubscribeBasePalletBalance {
|
|
53
53
|
tonApi: _TonApi;
|
|
54
54
|
}
|
|
55
|
+
export interface SusbcribeCardanoPalletBalance extends SubscribeBasePalletBalance {
|
|
56
|
+
cardanoApi: _CardanoApi;
|
|
57
|
+
}
|
package/types/fee/base.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseFeeDetail, BaseFeeInfo } from './base';
|
|
2
|
+
import { FeeDefaultOption } from './option';
|
|
3
|
+
/** @deprecated */
|
|
4
|
+
export interface CardanoTipInfo {
|
|
5
|
+
tip: string;
|
|
6
|
+
}
|
|
7
|
+
/** @deprecated */
|
|
8
|
+
export interface CardanoFeeInfo extends BaseFeeInfo {
|
|
9
|
+
type: 'ton';
|
|
10
|
+
options: {
|
|
11
|
+
slow: CardanoTipInfo;
|
|
12
|
+
average: CardanoTipInfo;
|
|
13
|
+
fast: CardanoTipInfo;
|
|
14
|
+
default: FeeDefaultOption;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** @deprecated */
|
|
18
|
+
export declare type CardanoFeeDetail = CardanoFeeInfo & BaseFeeDetail;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/fee/option.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { CardanoFeeDetail, CardanoFeeInfo, CardanoTipInfo } from './cardano';
|
|
2
3
|
import { EvmEIP1559FeeOption, EvmFeeDetail, EvmFeeInfo } from './evm';
|
|
3
4
|
import { SubstrateFeeDetail, SubstrateFeeInfo, SubstrateTipInfo } from './substrate';
|
|
4
5
|
import { TonFeeDetail, TonFeeInfo, TonTipInfo } from './ton';
|
|
5
|
-
export declare type FeeInfo = EvmFeeInfo | SubstrateFeeInfo | TonFeeInfo;
|
|
6
|
-
export declare type FeeDetail = EvmFeeDetail | SubstrateFeeDetail | TonFeeDetail;
|
|
7
|
-
export declare type FeeCustom = EvmEIP1559FeeOption | SubstrateTipInfo | TonTipInfo;
|
|
6
|
+
export declare type FeeInfo = EvmFeeInfo | SubstrateFeeInfo | TonFeeInfo | CardanoFeeInfo;
|
|
7
|
+
export declare type FeeDetail = EvmFeeDetail | SubstrateFeeDetail | TonFeeDetail | CardanoFeeDetail;
|
|
8
|
+
export declare type FeeCustom = EvmEIP1559FeeOption | SubstrateTipInfo | TonTipInfo | CardanoTipInfo;
|
|
8
9
|
export interface FeeSubscription {
|
|
9
10
|
observer: BehaviorSubject<FeeInfo | undefined>;
|
|
10
11
|
subscription: Record<string, VoidFunction>;
|
package/types/swap/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ChainInfo } from '@subwallet/chain-list/types';
|
|
2
2
|
import { SwapError } from '@subwallet/extension-base/background/errors/SwapError';
|
|
3
3
|
import { AmountData, ChainType, ExtrinsicType } from '@subwallet/extension-base/background/KoniTypes';
|
|
4
|
-
import { BaseStepDetail, CommonOptimalPath, CommonStepFeeInfo } from '@subwallet/extension-base/types/service-base';
|
|
4
|
+
import { BaseStepDetail, BaseStepType, CommonOptimalPath, CommonStepFeeInfo } from '@subwallet/extension-base/types/service-base';
|
|
5
5
|
import BigN from 'bignumber.js';
|
|
6
6
|
import { BaseProcessRequestSign, TransactionData } from '../transaction';
|
|
7
7
|
export declare type SwapRate = number;
|
|
@@ -44,7 +44,8 @@ export declare enum SwapErrorType {
|
|
|
44
44
|
NOT_MEET_MIN_EXPECTED = "NOT_MEET_MIN_EXPECTED"
|
|
45
45
|
}
|
|
46
46
|
export declare enum SwapStepType {
|
|
47
|
-
SWAP = "SWAP"
|
|
47
|
+
SWAP = "SWAP",
|
|
48
|
+
PERMIT = "PERMIT"
|
|
48
49
|
}
|
|
49
50
|
export declare enum SwapProviderId {
|
|
50
51
|
CHAIN_FLIP_TESTNET = "CHAIN_FLIP_TESTNET",
|
|
@@ -55,7 +56,8 @@ export declare enum SwapProviderId {
|
|
|
55
56
|
KUSAMA_ASSET_HUB = "KUSAMA_ASSET_HUB",
|
|
56
57
|
ROCOCO_ASSET_HUB = "ROCOCO_ASSET_HUB",
|
|
57
58
|
WESTEND_ASSET_HUB = "WESTEND_ASSET_HUB",
|
|
58
|
-
SIMPLE_SWAP = "SIMPLE_SWAP"
|
|
59
|
+
SIMPLE_SWAP = "SIMPLE_SWAP",
|
|
60
|
+
UNISWAP = "UNISWAP"
|
|
59
61
|
}
|
|
60
62
|
export declare const _SUPPORTED_SWAP_PROVIDERS: SwapProviderId[];
|
|
61
63
|
export interface SwapProvider {
|
|
@@ -139,6 +141,7 @@ export interface SwapSubmitParams extends BaseProcessRequestSign {
|
|
|
139
141
|
address: string;
|
|
140
142
|
slippage: number;
|
|
141
143
|
recipient?: string;
|
|
144
|
+
cacheProcessId: string;
|
|
142
145
|
}
|
|
143
146
|
export interface SwapSubmitStepData {
|
|
144
147
|
txChain: string;
|
|
@@ -147,6 +150,7 @@ export interface SwapSubmitStepData {
|
|
|
147
150
|
transferNativeAmount: string;
|
|
148
151
|
extrinsicType: ExtrinsicType;
|
|
149
152
|
chainType: ChainType;
|
|
153
|
+
isPermit?: boolean;
|
|
150
154
|
}
|
|
151
155
|
export interface OptimalSwapPathParams {
|
|
152
156
|
request: SwapRequest;
|
|
@@ -169,5 +173,9 @@ export interface SlippageType {
|
|
|
169
173
|
slippage: BigN;
|
|
170
174
|
isCustomType: boolean;
|
|
171
175
|
}
|
|
176
|
+
export interface PermitSwapData {
|
|
177
|
+
processId: string;
|
|
178
|
+
step: BaseStepType;
|
|
179
|
+
}
|
|
172
180
|
export declare const CHAINFLIP_SLIPPAGE = 0.02;
|
|
173
181
|
export declare const SIMPLE_SWAP_SLIPPAGE = 0.05;
|
package/types/swap/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export let SwapErrorType;
|
|
|
21
21
|
export let SwapStepType;
|
|
22
22
|
(function (SwapStepType) {
|
|
23
23
|
SwapStepType["SWAP"] = "SWAP";
|
|
24
|
+
SwapStepType["PERMIT"] = "PERMIT";
|
|
24
25
|
})(SwapStepType || (SwapStepType = {}));
|
|
25
26
|
export let SwapProviderId;
|
|
26
27
|
(function (SwapProviderId) {
|
|
@@ -33,10 +34,14 @@ export let SwapProviderId;
|
|
|
33
34
|
SwapProviderId["ROCOCO_ASSET_HUB"] = "ROCOCO_ASSET_HUB";
|
|
34
35
|
SwapProviderId["WESTEND_ASSET_HUB"] = "WESTEND_ASSET_HUB";
|
|
35
36
|
SwapProviderId["SIMPLE_SWAP"] = "SIMPLE_SWAP";
|
|
37
|
+
SwapProviderId["UNISWAP"] = "UNISWAP";
|
|
36
38
|
})(SwapProviderId || (SwapProviderId = {}));
|
|
37
|
-
export const _SUPPORTED_SWAP_PROVIDERS = [SwapProviderId.CHAIN_FLIP_TESTNET, SwapProviderId.CHAIN_FLIP_MAINNET, SwapProviderId.HYDRADX_MAINNET,
|
|
39
|
+
export const _SUPPORTED_SWAP_PROVIDERS = [SwapProviderId.CHAIN_FLIP_TESTNET, SwapProviderId.CHAIN_FLIP_MAINNET, SwapProviderId.HYDRADX_MAINNET,
|
|
40
|
+
// SwapProviderId.HYDRADX_TESTNET,
|
|
41
|
+
SwapProviderId.POLKADOT_ASSET_HUB, SwapProviderId.KUSAMA_ASSET_HUB,
|
|
42
|
+
// SwapProviderId.ROCOCO_ASSET_HUB,
|
|
38
43
|
// SwapProviderId.WESTEND_ASSET_HUB,
|
|
39
|
-
SwapProviderId.SIMPLE_SWAP];
|
|
44
|
+
SwapProviderId.SIMPLE_SWAP, SwapProviderId.UNISWAP];
|
|
40
45
|
// process handling
|
|
41
46
|
export let SwapFeeType;
|
|
42
47
|
(function (SwapFeeType) {
|
package/utils/account/analyze.js
CHANGED
|
@@ -15,7 +15,8 @@ const isStrValidWithAddress = (str, account, chainInfo) => {
|
|
|
15
15
|
} else if (account.address.toLowerCase().includes(str) || reformated.toLowerCase().includes(str)) {
|
|
16
16
|
return 'valid';
|
|
17
17
|
}
|
|
18
|
-
} else if (account.chainType === AccountChainType.TON) {
|
|
18
|
+
} else if (account.chainType === AccountChainType.TON || account.chainType === AccountChainType.CARDANO) {
|
|
19
|
+
// todo: recheck for Cardano
|
|
19
20
|
const isTestnet = chainInfo.isTestnet;
|
|
20
21
|
const reformated = reformatAddress(account.address, isTestnet ? 0 : 1);
|
|
21
22
|
if (account.address.toLowerCase() === str || reformated.toLowerCase() === str) {
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { _ChainInfo } from '@subwallet/chain-list/types';
|
|
2
|
+
import { ChainType } from '@subwallet/extension-base/background/KoniTypes';
|
|
2
3
|
import { AccountChainType } from '@subwallet/extension-base/types';
|
|
3
4
|
import { KeypairType } from '@subwallet/keyring/types';
|
|
4
5
|
export declare function isAccountAll(address?: string): boolean;
|
|
5
6
|
export declare function reformatAddress(address: string, networkPrefix?: number, isEthereum?: boolean): string;
|
|
6
7
|
export declare const _reformatAddressWithChain: (address: string, chainInfo: _ChainInfo) => string;
|
|
7
8
|
export declare const getAccountChainTypeForAddress: (address: string) => AccountChainType;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
interface AddressesByChainType {
|
|
10
|
+
[ChainType.SUBSTRATE]: string[];
|
|
11
|
+
[ChainType.EVM]: string[];
|
|
12
|
+
[ChainType.BITCOIN]: string[];
|
|
13
|
+
[ChainType.TON]: string[];
|
|
14
|
+
[ChainType.CARDANO]: string[];
|
|
15
|
+
}
|
|
16
|
+
export declare function getAddressesByChainType(addresses: string[], chainTypes: ChainType[]): string[];
|
|
17
|
+
export declare function getAddressesByChainTypeMap(addresses: string[]): AddressesByChainType;
|
|
14
18
|
export declare function quickFormatAddressToCompare(address?: string): string | undefined;
|
|
15
19
|
/** @deprecated */
|
|
16
20
|
export declare const modifyAccountName: (type: KeypairType, name: string, modify: boolean) => string;
|
|
21
|
+
export {};
|
package/utils/account/common.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Copyright 2019-2022 @subwallet/extension-base authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import { ChainType } from '@subwallet/extension-base/background/KoniTypes';
|
|
4
5
|
import { ALL_ACCOUNT_KEY } from '@subwallet/extension-base/constants';
|
|
5
6
|
import { _chainInfoToChainType, _getChainSubstrateAddressPrefix } from '@subwallet/extension-base/services/chain-service/utils';
|
|
6
7
|
import { AccountChainType } from '@subwallet/extension-base/types';
|
|
7
|
-
import {
|
|
8
|
-
import { decodeAddress, encodeAddress, getKeypairTypeByAddress, isAddress, isBitcoinAddress, isTonAddress } from '@subwallet/keyring';
|
|
8
|
+
import { getAccountChainTypeFromKeypairType } from '@subwallet/extension-base/utils';
|
|
9
|
+
import { decodeAddress, encodeAddress, getKeypairTypeByAddress, isAddress, isBitcoinAddress, isCardanoAddress, isTonAddress } from '@subwallet/keyring';
|
|
9
10
|
import { ethereumEncode, isEthereumAddress } from '@polkadot/util-crypto';
|
|
10
11
|
export function isAccountAll(address) {
|
|
11
12
|
return address === ALL_ACCOUNT_KEY;
|
|
@@ -36,10 +37,11 @@ export function reformatAddress(address, networkPrefix = 42, isEthereum = false)
|
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
export const _reformatAddressWithChain = (address, chainInfo) => {
|
|
40
|
+
// todo: check for cardano
|
|
39
41
|
const chainType = _chainInfoToChainType(chainInfo);
|
|
40
42
|
if (chainType === AccountChainType.SUBSTRATE) {
|
|
41
43
|
return reformatAddress(address, _getChainSubstrateAddressPrefix(chainInfo));
|
|
42
|
-
} else if (chainType === AccountChainType.TON) {
|
|
44
|
+
} else if (chainType === AccountChainType.TON || chainType === AccountChainType.CARDANO) {
|
|
43
45
|
const isTestnet = chainInfo.isTestnet;
|
|
44
46
|
return reformatAddress(address, isTestnet ? 0 : 1);
|
|
45
47
|
} else {
|
|
@@ -48,30 +50,37 @@ export const _reformatAddressWithChain = (address, chainInfo) => {
|
|
|
48
50
|
};
|
|
49
51
|
export const getAccountChainTypeForAddress = address => {
|
|
50
52
|
const type = getKeypairTypeByAddress(address);
|
|
51
|
-
return
|
|
53
|
+
return getAccountChainTypeFromKeypairType(type);
|
|
52
54
|
};
|
|
53
|
-
export function
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
export function getAddressesByChainType(addresses, chainTypes) {
|
|
56
|
+
const addressByChainTypeMap = getAddressesByChainTypeMap(addresses);
|
|
57
|
+
return chainTypes.map(chainType => {
|
|
58
|
+
return addressByChainTypeMap[chainType];
|
|
59
|
+
}).flat(); // todo: recheck
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function getAddressesByChainTypeMap(addresses) {
|
|
63
|
+
const addressByChainType = {
|
|
64
|
+
substrate: [],
|
|
65
|
+
evm: [],
|
|
66
|
+
bitcoin: [],
|
|
67
|
+
ton: [],
|
|
68
|
+
cardano: []
|
|
69
|
+
};
|
|
58
70
|
addresses.forEach(address => {
|
|
59
71
|
if (isEthereumAddress(address)) {
|
|
60
|
-
evm.push(address);
|
|
72
|
+
addressByChainType.evm.push(address);
|
|
61
73
|
} else if (isTonAddress(address)) {
|
|
62
|
-
ton.push(address);
|
|
74
|
+
addressByChainType.ton.push(address);
|
|
63
75
|
} else if (isBitcoinAddress(address)) {
|
|
64
|
-
bitcoin.push(address);
|
|
76
|
+
addressByChainType.bitcoin.push(address);
|
|
77
|
+
} else if (isCardanoAddress(address)) {
|
|
78
|
+
addressByChainType.cardano.push(address);
|
|
65
79
|
} else {
|
|
66
|
-
substrate.push(address);
|
|
80
|
+
addressByChainType.substrate.push(address);
|
|
67
81
|
}
|
|
68
82
|
});
|
|
69
|
-
return
|
|
70
|
-
bitcoin,
|
|
71
|
-
evm,
|
|
72
|
-
substrate,
|
|
73
|
-
ton
|
|
74
|
-
};
|
|
83
|
+
return addressByChainType;
|
|
75
84
|
}
|
|
76
85
|
export function quickFormatAddressToCompare(address) {
|
|
77
86
|
if (!isAddress(address)) {
|
|
@@ -6,7 +6,7 @@ import { EthereumKeypairTypes, SubstrateKeypairTypes } from '@subwallet/keyring/
|
|
|
6
6
|
import { keyring } from '@subwallet/ui-keyring';
|
|
7
7
|
import { t } from 'i18next';
|
|
8
8
|
import { assert } from '@polkadot/util';
|
|
9
|
-
import { validateEvmDerivationPath, validateOtherSubstrateDerivationPath, validateSr25519DerivationPath, validateTonDerivationPath, validateUnifiedDerivationPath } from "../validate.js";
|
|
9
|
+
import { validateCardanoDerivationPath, validateEvmDerivationPath, validateOtherSubstrateDerivationPath, validateSr25519DerivationPath, validateTonDerivationPath, validateUnifiedDerivationPath } from "../validate.js";
|
|
10
10
|
export const parseUnifiedSuriToDerivationPath = (suri, type) => {
|
|
11
11
|
const reg = /^\/\/(\d+)(\/\/\d+)?$/;
|
|
12
12
|
if (suri.match(reg)) {
|
|
@@ -18,12 +18,16 @@ export const parseUnifiedSuriToDerivationPath = (suri, type) => {
|
|
|
18
18
|
return `m/44'/60'/0'/0/${first}/${secondIndex}`;
|
|
19
19
|
} else if (type === 'ton') {
|
|
20
20
|
return `m/44'/607'/${first}'/${secondIndex}'`;
|
|
21
|
+
} else if (type === 'cardano') {
|
|
22
|
+
return `m/1852'/1815'/${first}'/${secondIndex}'`;
|
|
21
23
|
}
|
|
22
24
|
} else {
|
|
23
25
|
if (type === 'ethereum') {
|
|
24
26
|
return `m/44'/60'/0'/0/${first}`;
|
|
25
27
|
} else if (type === 'ton') {
|
|
26
28
|
return `m/44'/607'/${first}'`;
|
|
29
|
+
} else if (type === 'cardano') {
|
|
30
|
+
return `m/1852'/1815'/${first}'`;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
33
|
if (SubstrateKeypairTypes.includes(type)) {
|
|
@@ -40,7 +44,7 @@ export const getSoloDerivationInfo = (type, metadata = {}) => {
|
|
|
40
44
|
} = metadata;
|
|
41
45
|
if (suri) {
|
|
42
46
|
if (derivePath) {
|
|
43
|
-
const validateTypeFunc = type === 'ethereum' ? validateEvmDerivationPath : type === 'ton' ? validateTonDerivationPath : () => undefined;
|
|
47
|
+
const validateTypeFunc = type === 'ethereum' ? validateEvmDerivationPath : type === 'ton' ? validateTonDerivationPath : type === 'cardano' ? validateCardanoDerivationPath : () => undefined;
|
|
44
48
|
const validateTypeRs = validateTypeFunc(derivePath);
|
|
45
49
|
if (validateTypeRs) {
|
|
46
50
|
return {
|
|
@@ -97,7 +101,7 @@ export const getSoloDerivationInfo = (type, metadata = {}) => {
|
|
|
97
101
|
}
|
|
98
102
|
} else {
|
|
99
103
|
if (derivePath) {
|
|
100
|
-
const validateTypeFunc = type === 'ethereum' ? validateEvmDerivationPath : type === 'ton' ? validateTonDerivationPath : () => undefined;
|
|
104
|
+
const validateTypeFunc = type === 'ethereum' ? validateEvmDerivationPath : type === 'ton' ? validateTonDerivationPath : type === 'cardano' ? validateCardanoDerivationPath : () => undefined;
|
|
101
105
|
const validateTypeRs = validateTypeFunc(derivePath);
|
|
102
106
|
if (validateTypeRs) {
|
|
103
107
|
return {
|
|
@@ -210,6 +214,7 @@ export const derivePair = (parentPair, name, suri, derivationPath) => {
|
|
|
210
214
|
}
|
|
211
215
|
const isEvm = EthereumKeypairTypes.includes(parentPair.type);
|
|
212
216
|
const isTon = parentPair.type === 'ton';
|
|
217
|
+
const isCardano = parentPair.type === 'cardano';
|
|
213
218
|
const meta = {
|
|
214
219
|
name,
|
|
215
220
|
parentAddress: parentPair.address,
|
|
@@ -220,8 +225,8 @@ export const derivePair = (parentPair, name, suri, derivationPath) => {
|
|
|
220
225
|
if (isTon && (_parentPair$ton = parentPair.ton) !== null && _parentPair$ton !== void 0 && _parentPair$ton.contractVersion) {
|
|
221
226
|
meta.tonContractVersion = parentPair.ton.contractVersion;
|
|
222
227
|
}
|
|
223
|
-
if (derivationPath && (isEvm || isTon)) {
|
|
224
|
-
return isEvm ? parentPair.evm.deriveCustom(derivationPath, meta) : parentPair.ton.deriveCustom(derivationPath, meta);
|
|
228
|
+
if (derivationPath && (isEvm || isTon || isCardano)) {
|
|
229
|
+
return isEvm ? parentPair.evm.deriveCustom(derivationPath, meta) : isTon ? parentPair.ton.deriveCustom(derivationPath, meta) : parentPair.cardano.deriveCustom(derivationPath, meta);
|
|
225
230
|
} else {
|
|
226
231
|
return parentPair.substrate.derive(suri, meta);
|
|
227
232
|
}
|
|
@@ -3,6 +3,7 @@ import { KeypairType, SubstrateKeypairType } from '@subwallet/keyring/types';
|
|
|
3
3
|
export declare const validateUnifiedDerivationPath: (raw: string) => DerivePathInfo | undefined;
|
|
4
4
|
export declare const validateEvmDerivationPath: (raw: string) => IDerivePathInfo_ | undefined;
|
|
5
5
|
export declare const validateTonDerivationPath: (raw: string) => IDerivePathInfo_ | undefined;
|
|
6
|
+
export declare const validateCardanoDerivationPath: (raw: string) => IDerivePathInfo_ | undefined;
|
|
6
7
|
export declare const validateSr25519DerivationPath: (raw: string) => IDerivePathInfo_ | undefined;
|
|
7
8
|
export declare const validateOtherSubstrateDerivationPath: (raw: string, type: Exclude<SubstrateKeypairType, 'sr25519'>) => IDerivePathInfo_ | undefined;
|
|
8
9
|
export declare const validateDerivationPath: (raw: string, type?: KeypairType) => DerivePathInfo | undefined;
|
|
@@ -96,6 +96,37 @@ export const validateTonDerivationPath = raw => {
|
|
|
96
96
|
return undefined;
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
+
export const validateCardanoDerivationPath = raw => {
|
|
100
|
+
const reg = /^m\/1852'\/1815'\/(\d+)'(\/\d+')?$/;
|
|
101
|
+
if (raw.match(reg)) {
|
|
102
|
+
const [, firstIndex, secondData] = raw.match(reg);
|
|
103
|
+
const first = parseInt(firstIndex, 10);
|
|
104
|
+
const autoIndexes = [first];
|
|
105
|
+
let depth;
|
|
106
|
+
let suri = `//${first}`;
|
|
107
|
+
if (first === 0) {
|
|
108
|
+
depth = 0;
|
|
109
|
+
} else {
|
|
110
|
+
depth = 1;
|
|
111
|
+
}
|
|
112
|
+
if (secondData) {
|
|
113
|
+
const [, secondIndex] = secondData.match(/\/(\d+)/);
|
|
114
|
+
const second = parseInt(secondIndex, 10);
|
|
115
|
+
autoIndexes.push(second);
|
|
116
|
+
depth = 2;
|
|
117
|
+
suri += `//${second}`;
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
depth,
|
|
121
|
+
type: 'cardano',
|
|
122
|
+
suri,
|
|
123
|
+
derivationPath: raw,
|
|
124
|
+
autoIndexes
|
|
125
|
+
};
|
|
126
|
+
} else {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
99
130
|
export const validateSr25519DerivationPath = raw => {
|
|
100
131
|
const reg = /\/(\/?)([^/]+)/g;
|
|
101
132
|
const parts = raw.match(reg);
|
|
@@ -156,10 +187,12 @@ export const validateDerivationPath = (raw, type) => {
|
|
|
156
187
|
return validateSr25519DerivationPath(raw);
|
|
157
188
|
} else if (type === 'ed25519' || type === 'ecdsa') {
|
|
158
189
|
return validateOtherSubstrateDerivationPath(raw, type);
|
|
190
|
+
} else if (type === 'cardano') {
|
|
191
|
+
return validateCardanoDerivationPath(raw);
|
|
159
192
|
} else {
|
|
160
193
|
return undefined;
|
|
161
194
|
}
|
|
162
195
|
} else {
|
|
163
|
-
return validateUnifiedDerivationPath(raw) || validateEvmDerivationPath(raw) || validateTonDerivationPath(raw) || validateSr25519DerivationPath(raw);
|
|
196
|
+
return validateUnifiedDerivationPath(raw) || validateEvmDerivationPath(raw) || validateTonDerivationPath(raw) || validateSr25519DerivationPath(raw) || validateCardanoDerivationPath(raw);
|
|
164
197
|
}
|
|
165
198
|
};
|
|
@@ -4,7 +4,8 @@ import { AccountActions, AccountChainType, AccountJson, AccountProxy, AccountPro
|
|
|
4
4
|
import { KeypairType, KeyringPair, KeyringPair$Meta } from '@subwallet/keyring/types';
|
|
5
5
|
import { SingleAddress, SubjectInfo } from '@subwallet/ui-keyring/observable/types';
|
|
6
6
|
export declare const createAccountProxyId: (_suri: string, derivationPath?: string) => `0x${string}`;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const getAccountChainTypeFromKeypairType: (type: KeypairType) => AccountChainType;
|
|
8
|
+
export declare const getDefaultKeypairTypeFromAccountChainType: (type: AccountChainType) => KeypairType;
|
|
8
9
|
export declare const getAccountSignMode: (address: string, _meta?: KeyringPair$Meta) => AccountSignMode;
|
|
9
10
|
export declare const getAccountActions: (signMode: AccountSignMode, networkType: AccountChainType, type: KeypairType, _meta?: KeyringPair$Meta, parentAccount?: AccountJson) => AccountActions[];
|
|
10
11
|
export declare const getAccountTransactionActions: (signMode: AccountSignMode, networkType: AccountChainType, type?: KeypairType, _meta?: KeyringPair$Meta, _specialNetwork?: string) => ExtrinsicType[];
|