@subwallet/extension-base 0.6.6-0 → 0.6.7-0wr
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 +29 -1
- package/cjs/defaults.js +3 -1
- package/cjs/packageInfo.js +1 -1
- package/defaults.d.ts +2 -1
- package/defaults.js +2 -1
- package/package.json +20 -20
- package/packageInfo.js +1 -1
|
@@ -367,6 +367,10 @@ export interface TransactionHistoryItemType {
|
|
|
367
367
|
origin?: 'app' | 'network';
|
|
368
368
|
eventIdx?: number | null;
|
|
369
369
|
}
|
|
370
|
+
export interface TransactionHistoryItemJson {
|
|
371
|
+
items: TransactionHistoryItemType[];
|
|
372
|
+
total: number;
|
|
373
|
+
}
|
|
370
374
|
export interface RequestTransactionHistoryGet {
|
|
371
375
|
address: string;
|
|
372
376
|
networkKey: string;
|
|
@@ -1109,6 +1113,22 @@ export interface TuringCancelStakeCompoundParams {
|
|
|
1109
1113
|
address: string;
|
|
1110
1114
|
password?: string;
|
|
1111
1115
|
}
|
|
1116
|
+
export declare type SubscriptionServiceType = 'chainRegistry' | 'balance' | 'crowdloan' | 'staking';
|
|
1117
|
+
export declare type CronServiceType = 'price' | 'nft' | 'staking' | 'history' | 'recoverApi' | 'checkApiStatus';
|
|
1118
|
+
export declare type CronType = 'recoverApiMap' | 'checkApiMapStatus' | 'refreshHistory' | 'refreshNft' | 'refreshPrice' | 'refreshStakeUnlockingInfo' | 'refreshStakingReward';
|
|
1119
|
+
export interface RequestInitCronAndSubscription {
|
|
1120
|
+
subscription: {
|
|
1121
|
+
activeServices: SubscriptionServiceType[];
|
|
1122
|
+
};
|
|
1123
|
+
cron: {
|
|
1124
|
+
intervalMap: Partial<Record<CronType, number>>;
|
|
1125
|
+
activeServices: CronServiceType[];
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
export interface ActiveCronAndSubscriptionMap {
|
|
1129
|
+
subscription: Record<SubscriptionServiceType, boolean>;
|
|
1130
|
+
cron: Record<CronServiceType, boolean>;
|
|
1131
|
+
}
|
|
1112
1132
|
export interface KoniRequestSignatures {
|
|
1113
1133
|
'pri(staking.submitTuringCancelCompound)': [TuringCancelStakeCompoundParams, BasicTxResponse, BasicTxResponse];
|
|
1114
1134
|
'pri(staking.turingCancelCompound)': [TuringCancelStakeCompoundParams, BasicTxInfo];
|
|
@@ -1160,7 +1180,7 @@ export interface KoniRequestSignatures {
|
|
|
1160
1180
|
'pri(nft.getNft)': [null, NftJson];
|
|
1161
1181
|
'pri(nft.getSubscription)': [RequestSubscribeNft, NftJson, NftJson];
|
|
1162
1182
|
'pri(nftCollection.getNftCollection)': [null, NftCollectionJson];
|
|
1163
|
-
'pri(nftCollection.getSubscription)': [null,
|
|
1183
|
+
'pri(nftCollection.getSubscription)': [null, NftCollection[], NftCollection[]];
|
|
1164
1184
|
'pri(price.getPrice)': [RequestPrice, PriceJson];
|
|
1165
1185
|
'pri(price.getSubscription)': [RequestSubscribePrice, PriceJson, PriceJson];
|
|
1166
1186
|
'pri(balance.getBalance)': [RequestBalance, BalanceJson];
|
|
@@ -1241,6 +1261,14 @@ export interface KoniRequestSignatures {
|
|
|
1241
1261
|
'pri(unStake.ledger.create)': [RequestUnStakeExternal, Array<BaseTxError>, ResponseUnStakeLedger];
|
|
1242
1262
|
'pri(withdrawStake.ledger.create)': [RequestWithdrawStakeExternal, Array<BaseTxError>, ResponseWithdrawStakeLedger];
|
|
1243
1263
|
'pri(authorize.subscribe)': [null, AuthUrls, AuthUrls];
|
|
1264
|
+
'mobile(cronAndSubscription.init)': [RequestInitCronAndSubscription, ActiveCronAndSubscriptionMap];
|
|
1265
|
+
'mobile(cronAndSubscription.activeService.subscribe)': [null, ActiveCronAndSubscriptionMap, ActiveCronAndSubscriptionMap];
|
|
1266
|
+
'mobile(cron.start)': [CronServiceType[], void];
|
|
1267
|
+
'mobile(cron.stop)': [CronServiceType[], void];
|
|
1268
|
+
'mobile(cron.restart)': [CronServiceType[], void];
|
|
1269
|
+
'mobile(subscription.start)': [SubscriptionServiceType[], void];
|
|
1270
|
+
'mobile(subscription.stop)': [SubscriptionServiceType[], void];
|
|
1271
|
+
'mobile(subscription.restart)': [SubscriptionServiceType[], void];
|
|
1244
1272
|
}
|
|
1245
1273
|
export interface ApplicationMetadataType {
|
|
1246
1274
|
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.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;
|
|
6
|
+
exports.PORT_MOBILE = 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
|
const ALLOWED_PATH = ['/', '/account/import-ledger', '/account/restore-json', '/account/create', '/account/settings'];
|
|
@@ -12,6 +12,8 @@ const PHISHING_PAGE_REDIRECT = '/phishing-page-detected';
|
|
|
12
12
|
exports.PHISHING_PAGE_REDIRECT = PHISHING_PAGE_REDIRECT;
|
|
13
13
|
const EXTENSION_PREFIX = process.env.EXTENSION_PREFIX || '';
|
|
14
14
|
exports.EXTENSION_PREFIX = EXTENSION_PREFIX;
|
|
15
|
+
const PORT_MOBILE = `${EXTENSION_PREFIX}mobile`;
|
|
16
|
+
exports.PORT_MOBILE = PORT_MOBILE;
|
|
15
17
|
const PORT_CONTENT = `${EXTENSION_PREFIX}koni-content`;
|
|
16
18
|
exports.PORT_CONTENT = PORT_CONTENT;
|
|
17
19
|
const PORT_EXTENSION = `${EXTENSION_PREFIX}koni-extension`;
|
package/cjs/packageInfo.js
CHANGED
package/defaults.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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;
|
|
4
5
|
declare const PORT_CONTENT: string;
|
|
5
6
|
declare const PORT_EXTENSION: string;
|
|
6
7
|
declare const MESSAGE_ORIGIN_PAGE: string;
|
|
7
8
|
declare const MESSAGE_ORIGIN_CONTENT: string;
|
|
8
9
|
declare const PASSWORD_EXPIRY_MIN = 15;
|
|
9
10
|
declare const PASSWORD_EXPIRY_MS: number;
|
|
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 };
|
|
11
|
+
export { ALLOWED_PATH, PASSWORD_EXPIRY_MIN, PASSWORD_EXPIRY_MS, PHISHING_PAGE_REDIRECT, EXTENSION_PREFIX, PORT_MOBILE, PORT_CONTENT, PORT_EXTENSION, MESSAGE_ORIGIN_PAGE, MESSAGE_ORIGIN_CONTENT };
|
package/defaults.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
const ALLOWED_PATH = ['/', '/account/import-ledger', '/account/restore-json', '/account/create', '/account/settings'];
|
|
4
4
|
const PHISHING_PAGE_REDIRECT = '/phishing-page-detected';
|
|
5
5
|
const EXTENSION_PREFIX = process.env.EXTENSION_PREFIX || '';
|
|
6
|
+
const PORT_MOBILE = `${EXTENSION_PREFIX}mobile`;
|
|
6
7
|
const PORT_CONTENT = `${EXTENSION_PREFIX}koni-content`;
|
|
7
8
|
const PORT_EXTENSION = `${EXTENSION_PREFIX}koni-extension`;
|
|
8
9
|
const MESSAGE_ORIGIN_PAGE = `${EXTENSION_PREFIX}koni-page`;
|
|
9
10
|
const MESSAGE_ORIGIN_CONTENT = `${EXTENSION_PREFIX}koni-content`;
|
|
10
11
|
const PASSWORD_EXPIRY_MIN = 15;
|
|
11
12
|
const PASSWORD_EXPIRY_MS = PASSWORD_EXPIRY_MIN * 60 * 1000;
|
|
12
|
-
export { ALLOWED_PATH, PASSWORD_EXPIRY_MIN, PASSWORD_EXPIRY_MS, PHISHING_PAGE_REDIRECT, EXTENSION_PREFIX, PORT_CONTENT, PORT_EXTENSION, MESSAGE_ORIGIN_PAGE, MESSAGE_ORIGIN_CONTENT };
|
|
13
|
+
export { ALLOWED_PATH, PASSWORD_EXPIRY_MIN, PASSWORD_EXPIRY_MS, PHISHING_PAGE_REDIRECT, EXTENSION_PREFIX, PORT_MOBILE, 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.6.
|
|
20
|
+
"version": "0.6.7-0wr",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -212,27 +212,27 @@
|
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
214
|
"dependencies": {
|
|
215
|
-
"@babel/runtime": "^7.
|
|
215
|
+
"@babel/runtime": "^7.19.0",
|
|
216
216
|
"@ethereumjs/common": "^2.6.5",
|
|
217
|
-
"@polkadot/api": "^
|
|
218
|
-
"@polkadot/keyring": "^
|
|
219
|
-
"@polkadot/networks": "^
|
|
220
|
-
"@polkadot/phishing": "^0.18.
|
|
221
|
-
"@polkadot/rpc-provider": "^
|
|
222
|
-
"@polkadot/types": "^
|
|
223
|
-
"@polkadot/ui-keyring": "^2.
|
|
224
|
-
"@polkadot/ui-settings": "^2.
|
|
225
|
-
"@polkadot/util": "^
|
|
226
|
-
"@polkadot/util-crypto": "^
|
|
227
|
-
"@subwallet/extension-chains": "^0.6.
|
|
228
|
-
"@subwallet/extension-dapp": "^0.6.
|
|
229
|
-
"@subwallet/extension-inject": "^0.6.
|
|
217
|
+
"@polkadot/api": "^9.4.3",
|
|
218
|
+
"@polkadot/keyring": "^10.1.9",
|
|
219
|
+
"@polkadot/networks": "^10.1.9",
|
|
220
|
+
"@polkadot/phishing": "^0.18.9",
|
|
221
|
+
"@polkadot/rpc-provider": "^9.4.3",
|
|
222
|
+
"@polkadot/types": "^9.4.3",
|
|
223
|
+
"@polkadot/ui-keyring": "^2.9.10",
|
|
224
|
+
"@polkadot/ui-settings": "^2.9.10",
|
|
225
|
+
"@polkadot/util": "^10.1.9",
|
|
226
|
+
"@polkadot/util-crypto": "^10.1.9",
|
|
227
|
+
"@subwallet/extension-chains": "^0.6.7-0",
|
|
228
|
+
"@subwallet/extension-dapp": "^0.6.7-0",
|
|
229
|
+
"@subwallet/extension-inject": "^0.6.7-0",
|
|
230
230
|
"ethereumjs-tx": "^2.1.2",
|
|
231
231
|
"eventemitter3": "^4.0.7",
|
|
232
232
|
"rlp": "^3.0.0",
|
|
233
|
-
"rxjs": "^7.5.
|
|
234
|
-
"web3": "^1.
|
|
235
|
-
"web3-core": "^1.
|
|
236
|
-
"web3-core-helpers": "^1.
|
|
233
|
+
"rxjs": "^7.5.7",
|
|
234
|
+
"web3": "^1.8.0",
|
|
235
|
+
"web3-core": "^1.8.0",
|
|
236
|
+
"web3-core-helpers": "^1.8.0"
|
|
237
237
|
}
|
|
238
|
-
}
|
|
238
|
+
}
|
package/packageInfo.js
CHANGED
|
@@ -5,5 +5,5 @@ export const packageInfo = {
|
|
|
5
5
|
name: '@subwallet/extension-base',
|
|
6
6
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
7
7
|
type: 'esm',
|
|
8
|
-
version: '0.6.
|
|
8
|
+
version: '0.6.7-0'
|
|
9
9
|
};
|