@subwallet/extension-base 0.7.2-0wr → 0.7.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/background/KoniTypes.d.ts +12 -40
- package/cjs/defaults.js +1 -3
- package/cjs/packageInfo.js +1 -1
- package/defaults.d.ts +1 -2
- package/defaults.js +1 -2
- package/package.json +5 -5
- package/packageInfo.js +1 -1
|
@@ -855,29 +855,28 @@ export interface ConfirmationResult<T> {
|
|
|
855
855
|
payload?: T;
|
|
856
856
|
password?: string;
|
|
857
857
|
}
|
|
858
|
-
export interface
|
|
858
|
+
export interface ConfirmationResultExternal<T> extends ConfirmationResult<T> {
|
|
859
859
|
signature: `0x${string}`;
|
|
860
860
|
}
|
|
861
861
|
export interface EvmSendTransactionRequest extends TransactionConfig {
|
|
862
862
|
estimateGas: string;
|
|
863
863
|
}
|
|
864
|
-
export interface
|
|
865
|
-
|
|
864
|
+
export interface EvmRequestExternal {
|
|
865
|
+
hashPayload: string;
|
|
866
866
|
canSign: boolean;
|
|
867
867
|
}
|
|
868
|
-
export interface
|
|
869
|
-
estimateGas: string;
|
|
868
|
+
export interface EvmSendTransactionRequestExternal extends EvmSendTransactionRequest, EvmRequestExternal {
|
|
870
869
|
}
|
|
871
|
-
export interface
|
|
870
|
+
export interface EvmSignatureRequestExternal extends EvmSignatureRequest, EvmRequestExternal {
|
|
872
871
|
}
|
|
873
872
|
export interface ConfirmationDefinitions {
|
|
874
873
|
addNetworkRequest: [ConfirmationsQueueItem<NetworkJson>, ConfirmationResult<NetworkJson>];
|
|
875
874
|
addTokenRequest: [ConfirmationsQueueItem<CustomToken>, ConfirmationResult<boolean>];
|
|
876
875
|
switchNetworkRequest: [ConfirmationsQueueItem<SwitchNetworkRequest>, ConfirmationResult<boolean>];
|
|
877
876
|
evmSignatureRequest: [ConfirmationsQueueItem<EvmSignatureRequest>, ConfirmationResult<string>];
|
|
878
|
-
|
|
877
|
+
evmSignatureRequestExternal: [ConfirmationsQueueItem<EvmSignatureRequestExternal>, ConfirmationResultExternal<string>];
|
|
879
878
|
evmSendTransactionRequest: [ConfirmationsQueueItem<EvmSendTransactionRequest>, ConfirmationResult<boolean>];
|
|
880
|
-
|
|
879
|
+
evmSendTransactionRequestExternal: [ConfirmationsQueueItem<EvmSendTransactionRequestExternal>, ConfirmationResultExternal<boolean>];
|
|
881
880
|
}
|
|
882
881
|
export declare type ConfirmationType = keyof ConfirmationDefinitions;
|
|
883
882
|
export declare type ConfirmationsQueue = {
|
|
@@ -903,6 +902,11 @@ export interface ValidatorInfo {
|
|
|
903
902
|
icon?: string;
|
|
904
903
|
hasScheduledRequest?: boolean;
|
|
905
904
|
}
|
|
905
|
+
export interface ExtraDelegationInfo {
|
|
906
|
+
chain: string;
|
|
907
|
+
address: string;
|
|
908
|
+
collatorAddress: string;
|
|
909
|
+
}
|
|
906
910
|
export interface BasicTxInfo {
|
|
907
911
|
fee: string;
|
|
908
912
|
balanceError: boolean;
|
|
@@ -1138,26 +1142,6 @@ export declare type RequestWithdrawStakeExternal = ExternalRequestSign<StakeWith
|
|
|
1138
1142
|
export declare type RequestClaimRewardExternal = ExternalRequestSign<StakeClaimRewardParams>;
|
|
1139
1143
|
export declare type RequestCreateCompoundStakeExternal = ExternalRequestSign<TuringStakeCompoundParams>;
|
|
1140
1144
|
export declare type RequestCancelCompoundStakeExternal = ExternalRequestSign<TuringCancelStakeCompoundParams>;
|
|
1141
|
-
export declare type SubscriptionServiceType = 'chainRegistry' | 'balance' | 'crowdloan' | 'staking';
|
|
1142
|
-
export declare type CronServiceType = 'price' | 'nft' | 'staking' | 'history' | 'recoverApi' | 'checkApiStatus';
|
|
1143
|
-
export declare type CronType = 'recoverApiMap' | 'checkApiMapStatus' | 'refreshHistory' | 'refreshNft' | 'refreshPrice' | 'refreshStakeUnlockingInfo' | 'refreshStakingReward';
|
|
1144
|
-
export interface RequestInitCronAndSubscription {
|
|
1145
|
-
subscription: {
|
|
1146
|
-
activeServices: SubscriptionServiceType[];
|
|
1147
|
-
};
|
|
1148
|
-
cron: {
|
|
1149
|
-
intervalMap: Partial<Record<CronType, number>>;
|
|
1150
|
-
activeServices: CronServiceType[];
|
|
1151
|
-
};
|
|
1152
|
-
}
|
|
1153
|
-
export interface RequestCronAndSubscriptionAction {
|
|
1154
|
-
subscriptionServices: SubscriptionServiceType[];
|
|
1155
|
-
cronServices: CronServiceType[];
|
|
1156
|
-
}
|
|
1157
|
-
export interface ActiveCronAndSubscriptionMap {
|
|
1158
|
-
subscription: Record<SubscriptionServiceType, boolean>;
|
|
1159
|
-
cron: Record<CronServiceType, boolean>;
|
|
1160
|
-
}
|
|
1161
1145
|
export interface KoniRequestSignatures {
|
|
1162
1146
|
'pri(staking.submitTuringCancelCompound)': [RequestTuringCancelStakeCompound, BasicTxResponse, BasicTxResponse];
|
|
1163
1147
|
'pri(staking.turingCancelCompound)': [TuringCancelStakeCompoundParams, BasicTxInfo];
|
|
@@ -1299,18 +1283,6 @@ export interface KoniRequestSignatures {
|
|
|
1299
1283
|
'pri(createCompound.ledger.create)': [RequestCreateCompoundStakeExternal, BasicTxResponse, BasicTxResponse];
|
|
1300
1284
|
'pri(cancelCompound.ledger.create)': [RequestCancelCompoundStakeExternal, BasicTxResponse, BasicTxResponse];
|
|
1301
1285
|
'pri(authorize.subscribe)': [null, AuthUrls, AuthUrls];
|
|
1302
|
-
'mobile(ping)': [null, string];
|
|
1303
|
-
'mobile(cronAndSubscription.init)': [RequestInitCronAndSubscription, ActiveCronAndSubscriptionMap];
|
|
1304
|
-
'mobile(cronAndSubscription.activeService.subscribe)': [null, ActiveCronAndSubscriptionMap, ActiveCronAndSubscriptionMap];
|
|
1305
|
-
'mobile(cronAndSubscription.start)': [RequestCronAndSubscriptionAction, void];
|
|
1306
|
-
'mobile(cronAndSubscription.stop)': [RequestCronAndSubscriptionAction, void];
|
|
1307
|
-
'mobile(cronAndSubscription.restart)': [RequestCronAndSubscriptionAction, void];
|
|
1308
|
-
'mobile(cron.start)': [CronServiceType[], void];
|
|
1309
|
-
'mobile(cron.stop)': [CronServiceType[], void];
|
|
1310
|
-
'mobile(cron.restart)': [CronServiceType[], void];
|
|
1311
|
-
'mobile(subscription.start)': [SubscriptionServiceType[], void];
|
|
1312
|
-
'mobile(subscription.stop)': [SubscriptionServiceType[], void];
|
|
1313
|
-
'mobile(subscription.restart)': [SubscriptionServiceType[], void];
|
|
1314
1286
|
}
|
|
1315
1287
|
export interface ApplicationMetadataType {
|
|
1316
1288
|
version: string;
|
package/cjs/defaults.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.PORT_EXTENSION = exports.PORT_CONTENT = exports.PHISHING_PAGE_REDIRECT = exports.PASSWORD_EXPIRY_MS = exports.PASSWORD_EXPIRY_MIN = exports.MESSAGE_ORIGIN_PAGE = exports.MESSAGE_ORIGIN_CONTENT = exports.EXTENSION_PREFIX = exports.ALLOWED_PATH = void 0;
|
|
7
7
|
// Copyright 2019-2022 @polkadot/extension-base authors & contributors
|
|
8
8
|
// SPDX-License-Identifier: Apache-2.0
|
|
9
9
|
|
|
@@ -13,8 +13,6 @@ const PHISHING_PAGE_REDIRECT = '/phishing-page-detected';
|
|
|
13
13
|
exports.PHISHING_PAGE_REDIRECT = PHISHING_PAGE_REDIRECT;
|
|
14
14
|
const EXTENSION_PREFIX = process.env.EXTENSION_PREFIX || '';
|
|
15
15
|
exports.EXTENSION_PREFIX = EXTENSION_PREFIX;
|
|
16
|
-
const PORT_MOBILE = `${EXTENSION_PREFIX}mobile`;
|
|
17
|
-
exports.PORT_MOBILE = PORT_MOBILE;
|
|
18
16
|
const PORT_CONTENT = `${EXTENSION_PREFIX}koni-content`;
|
|
19
17
|
exports.PORT_CONTENT = PORT_CONTENT;
|
|
20
18
|
const PORT_EXTENSION = `${EXTENSION_PREFIX}koni-extension`;
|
package/cjs/packageInfo.js
CHANGED
package/defaults.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
declare const ALLOWED_PATH: readonly ["/", "/account/import-ledger", "/account/restore-json", "/account/create", "/account/settings"];
|
|
2
2
|
declare const PHISHING_PAGE_REDIRECT = "/phishing-page-detected";
|
|
3
3
|
declare const EXTENSION_PREFIX: string;
|
|
4
|
-
declare const PORT_MOBILE: string;
|
|
5
4
|
declare const PORT_CONTENT: string;
|
|
6
5
|
declare const PORT_EXTENSION: string;
|
|
7
6
|
declare const MESSAGE_ORIGIN_PAGE: string;
|
|
8
7
|
declare const MESSAGE_ORIGIN_CONTENT: string;
|
|
9
8
|
declare const PASSWORD_EXPIRY_MIN = 15;
|
|
10
9
|
declare const PASSWORD_EXPIRY_MS: number;
|
|
11
|
-
export { ALLOWED_PATH, PASSWORD_EXPIRY_MIN, PASSWORD_EXPIRY_MS, PHISHING_PAGE_REDIRECT, EXTENSION_PREFIX,
|
|
10
|
+
export { ALLOWED_PATH, PASSWORD_EXPIRY_MIN, PASSWORD_EXPIRY_MS, PHISHING_PAGE_REDIRECT, EXTENSION_PREFIX, PORT_CONTENT, PORT_EXTENSION, MESSAGE_ORIGIN_PAGE, MESSAGE_ORIGIN_CONTENT };
|
package/defaults.js
CHANGED
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
const ALLOWED_PATH = ['/', '/account/import-ledger', '/account/restore-json', '/account/create', '/account/settings'];
|
|
5
5
|
const PHISHING_PAGE_REDIRECT = '/phishing-page-detected';
|
|
6
6
|
const EXTENSION_PREFIX = process.env.EXTENSION_PREFIX || '';
|
|
7
|
-
const PORT_MOBILE = `${EXTENSION_PREFIX}mobile`;
|
|
8
7
|
const PORT_CONTENT = `${EXTENSION_PREFIX}koni-content`;
|
|
9
8
|
const PORT_EXTENSION = `${EXTENSION_PREFIX}koni-extension`;
|
|
10
9
|
const MESSAGE_ORIGIN_PAGE = `${EXTENSION_PREFIX}koni-page`;
|
|
11
10
|
const MESSAGE_ORIGIN_CONTENT = `${EXTENSION_PREFIX}koni-content`;
|
|
12
11
|
const PASSWORD_EXPIRY_MIN = 15;
|
|
13
12
|
const PASSWORD_EXPIRY_MS = PASSWORD_EXPIRY_MIN * 60 * 1000;
|
|
14
|
-
export { ALLOWED_PATH, PASSWORD_EXPIRY_MIN, PASSWORD_EXPIRY_MS, PHISHING_PAGE_REDIRECT, EXTENSION_PREFIX,
|
|
13
|
+
export { ALLOWED_PATH, PASSWORD_EXPIRY_MIN, PASSWORD_EXPIRY_MS, PHISHING_PAGE_REDIRECT, EXTENSION_PREFIX, PORT_CONTENT, PORT_EXTENSION, MESSAGE_ORIGIN_PAGE, MESSAGE_ORIGIN_CONTENT };
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./cjs/detectPackage.js"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
-
"version": "0.7.2-
|
|
20
|
+
"version": "0.7.2-1",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -229,9 +229,9 @@
|
|
|
229
229
|
"@polkadot/ui-settings": "^2.9.10",
|
|
230
230
|
"@polkadot/util": "^10.1.9",
|
|
231
231
|
"@polkadot/util-crypto": "^10.1.9",
|
|
232
|
-
"@subwallet/extension-chains": "^0.7.2-
|
|
233
|
-
"@subwallet/extension-dapp": "^0.7.2-
|
|
234
|
-
"@subwallet/extension-inject": "^0.7.2-
|
|
232
|
+
"@subwallet/extension-chains": "^0.7.2-1",
|
|
233
|
+
"@subwallet/extension-dapp": "^0.7.2-1",
|
|
234
|
+
"@subwallet/extension-inject": "^0.7.2-1",
|
|
235
235
|
"ethereumjs-tx": "^2.1.2",
|
|
236
236
|
"eventemitter3": "^4.0.7",
|
|
237
237
|
"rlp": "^3.0.0",
|
|
@@ -240,4 +240,4 @@
|
|
|
240
240
|
"web3-core": "^1.8.0",
|
|
241
241
|
"web3-core-helpers": "^1.8.0"
|
|
242
242
|
}
|
|
243
|
-
}
|
|
243
|
+
}
|
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@subwallet/extension-base',
|
|
8
8
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
9
|
type: 'esm',
|
|
10
|
-
version: '0.7.2-
|
|
10
|
+
version: '0.7.2-1'
|
|
11
11
|
};
|