@subwallet/extension-base 0.7.2-1 → 0.7.2-1wr

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.
@@ -954,7 +954,7 @@ export interface TransakNetwork {
954
954
  }
955
955
  export interface FormattedMethod {
956
956
  args?: ArgInfo[];
957
- method: string;
957
+ methodName: string;
958
958
  }
959
959
  export interface ArgInfo {
960
960
  argName: string;
@@ -967,9 +967,14 @@ export interface EraInfo {
967
967
  export interface ResponseParseTransactionSubstrate {
968
968
  era: EraInfo | string;
969
969
  nonce: number;
970
- method: string;
970
+ method: string | FormattedMethod[];
971
971
  tip: number;
972
972
  specVersion: number;
973
+ message: string;
974
+ }
975
+ export interface RequestParseTransactionSubstrate {
976
+ data: string;
977
+ networkKey: string;
973
978
  }
974
979
  export interface RequestQrParseRLP {
975
980
  data: string;
@@ -983,10 +988,10 @@ export interface ResponseQrParseRLP {
983
988
  gasPrice: number;
984
989
  value: number;
985
990
  }
986
- export interface RequestQRIsLocked {
991
+ export interface RequestAccountIsLocked {
987
992
  address: string;
988
993
  }
989
- export interface ResponseQRIsLocked {
994
+ export interface ResponseAccountIsLocked {
990
995
  isLocked: boolean;
991
996
  remainingTime: number;
992
997
  }
@@ -1142,6 +1147,26 @@ export declare type RequestWithdrawStakeExternal = ExternalRequestSign<StakeWith
1142
1147
  export declare type RequestClaimRewardExternal = ExternalRequestSign<StakeClaimRewardParams>;
1143
1148
  export declare type RequestCreateCompoundStakeExternal = ExternalRequestSign<TuringStakeCompoundParams>;
1144
1149
  export declare type RequestCancelCompoundStakeExternal = ExternalRequestSign<TuringCancelStakeCompoundParams>;
1150
+ export declare type SubscriptionServiceType = 'chainRegistry' | 'balance' | 'crowdloan' | 'staking';
1151
+ export declare type CronServiceType = 'price' | 'nft' | 'staking' | 'history' | 'recoverApi' | 'checkApiStatus';
1152
+ export declare type CronType = 'recoverApiMap' | 'checkApiMapStatus' | 'refreshHistory' | 'refreshNft' | 'refreshPrice' | 'refreshStakeUnlockingInfo' | 'refreshStakingReward' | 'refreshPoolingStakingReward';
1153
+ export interface RequestInitCronAndSubscription {
1154
+ subscription: {
1155
+ activeServices: SubscriptionServiceType[];
1156
+ };
1157
+ cron: {
1158
+ intervalMap: Partial<Record<CronType, number>>;
1159
+ activeServices: CronServiceType[];
1160
+ };
1161
+ }
1162
+ export interface RequestCronAndSubscriptionAction {
1163
+ subscriptionServices: SubscriptionServiceType[];
1164
+ cronServices: CronServiceType[];
1165
+ }
1166
+ export interface ActiveCronAndSubscriptionMap {
1167
+ subscription: Record<SubscriptionServiceType, boolean>;
1168
+ cron: Record<CronServiceType, boolean>;
1169
+ }
1145
1170
  export interface KoniRequestSignatures {
1146
1171
  'pri(staking.submitTuringCancelCompound)': [RequestTuringCancelStakeCompound, BasicTxResponse, BasicTxResponse];
1147
1172
  'pri(staking.turingCancelCompound)': [TuringCancelStakeCompoundParams, BasicTxInfo];
@@ -1253,8 +1278,9 @@ export interface KoniRequestSignatures {
1253
1278
  'pub(utils.getRandom)': [RandomTestRequest, number];
1254
1279
  'pub(accounts.listV2)': [RequestAccountList, InjectedAccount[]];
1255
1280
  'pub(accounts.subscribeV2)': [RequestAccountSubscribe, boolean, InjectedAccount[]];
1281
+ 'pri(account.isLocked)': [RequestAccountIsLocked, ResponseAccountIsLocked];
1282
+ 'pri(qr.transaction.parse.substrate)': [RequestParseTransactionSubstrate, ResponseParseTransactionSubstrate];
1256
1283
  'pri(qr.transaction.parse.evm)': [RequestQrParseRLP, ResponseQrParseRLP];
1257
- 'pri(qr.isLocked)': [RequestQRIsLocked, ResponseQRIsLocked];
1258
1284
  'pri(qr.sign.substrate)': [RequestQrSignSubstrate, ResponseQrSignSubstrate];
1259
1285
  'pri(qr.sign.evm)': [RequestQrSignEVM, ResponseQrSignEVM];
1260
1286
  'pri(account.external.reject)': [RequestRejectExternalRequest, ResponseRejectExternalRequest];
@@ -1283,6 +1309,18 @@ export interface KoniRequestSignatures {
1283
1309
  'pri(createCompound.ledger.create)': [RequestCreateCompoundStakeExternal, BasicTxResponse, BasicTxResponse];
1284
1310
  'pri(cancelCompound.ledger.create)': [RequestCancelCompoundStakeExternal, BasicTxResponse, BasicTxResponse];
1285
1311
  'pri(authorize.subscribe)': [null, AuthUrls, AuthUrls];
1312
+ 'mobile(ping)': [null, string];
1313
+ 'mobile(cronAndSubscription.init)': [RequestInitCronAndSubscription, ActiveCronAndSubscriptionMap];
1314
+ 'mobile(cronAndSubscription.activeService.subscribe)': [null, ActiveCronAndSubscriptionMap, ActiveCronAndSubscriptionMap];
1315
+ 'mobile(cronAndSubscription.start)': [RequestCronAndSubscriptionAction, void];
1316
+ 'mobile(cronAndSubscription.stop)': [RequestCronAndSubscriptionAction, void];
1317
+ 'mobile(cronAndSubscription.restart)': [RequestCronAndSubscriptionAction, void];
1318
+ 'mobile(cron.start)': [CronServiceType[], void];
1319
+ 'mobile(cron.stop)': [CronServiceType[], void];
1320
+ 'mobile(cron.restart)': [CronServiceType[], void];
1321
+ 'mobile(subscription.start)': [SubscriptionServiceType[], void];
1322
+ 'mobile(subscription.stop)': [SubscriptionServiceType[], void];
1323
+ 'mobile(subscription.restart)': [SubscriptionServiceType[], void];
1286
1324
  }
1287
1325
  export interface ApplicationMetadataType {
1288
1326
  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
 
@@ -13,6 +13,8 @@ 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;
16
18
  const PORT_CONTENT = `${EXTENSION_PREFIX}koni-content`;
17
19
  exports.PORT_CONTENT = PORT_CONTENT;
18
20
  const PORT_EXTENSION = `${EXTENSION_PREFIX}koni-extension`;
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
@@ -4,10 +4,11 @@
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`;
7
8
  const PORT_CONTENT = `${EXTENSION_PREFIX}koni-content`;
8
9
  const PORT_EXTENSION = `${EXTENSION_PREFIX}koni-extension`;
9
10
  const MESSAGE_ORIGIN_PAGE = `${EXTENSION_PREFIX}koni-page`;
10
11
  const MESSAGE_ORIGIN_CONTENT = `${EXTENSION_PREFIX}koni-content`;
11
12
  const PASSWORD_EXPIRY_MIN = 15;
12
13
  const PASSWORD_EXPIRY_MS = PASSWORD_EXPIRY_MIN * 60 * 1000;
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 };
14
+ 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.7.2-1",
20
+ "version": "0.7.2-1wr",
21
21
  "main": "./cjs/index.js",
22
22
  "module": "./index.js",
23
23
  "types": "./index.d.ts",
@@ -219,16 +219,16 @@
219
219
  "dependencies": {
220
220
  "@babel/runtime": "^7.19.0",
221
221
  "@ethereumjs/common": "^2.6.5",
222
- "@polkadot/api": "^9.4.3",
223
- "@polkadot/keyring": "^10.1.9",
224
- "@polkadot/networks": "^10.1.9",
225
- "@polkadot/phishing": "^0.18.9",
226
- "@polkadot/rpc-provider": "^9.4.3",
227
- "@polkadot/types": "^9.4.3",
228
- "@polkadot/ui-keyring": "^2.9.10",
229
- "@polkadot/ui-settings": "^2.9.10",
230
- "@polkadot/util": "^10.1.9",
231
- "@polkadot/util-crypto": "^10.1.9",
222
+ "@polkadot/api": "^9.9.1",
223
+ "@polkadot/keyring": "^10.1.13",
224
+ "@polkadot/networks": "^10.1.13",
225
+ "@polkadot/phishing": "^0.18.11",
226
+ "@polkadot/rpc-provider": "^9.9.1",
227
+ "@polkadot/types": "^9.9.1",
228
+ "@polkadot/ui-keyring": "^2.9.13",
229
+ "@polkadot/ui-settings": "^2.9.13",
230
+ "@polkadot/util": "^10.1.13",
231
+ "@polkadot/util-crypto": "^10.1.13",
232
232
  "@subwallet/extension-chains": "^0.7.2-1",
233
233
  "@subwallet/extension-dapp": "^0.7.2-1",
234
234
  "@subwallet/extension-inject": "^0.7.2-1",
@@ -237,7 +237,7 @@
237
237
  "rlp": "^3.0.0",
238
238
  "rxjs": "^7.5.7",
239
239
  "web3": "^1.8.0",
240
- "web3-core": "^1.8.0",
240
+ "web3-core": "^1.8.1",
241
241
  "web3-core-helpers": "^1.8.0"
242
242
  }
243
- }
243
+ }