@subwallet/extension-base 0.7.6-0 → 0.7.7-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 +13 -2
- package/background/KoniTypes.js +5 -0
- package/cjs/background/KoniTypes.js +7 -1
- package/cjs/packageInfo.js +1 -1
- package/package.json +19 -19
- package/packageInfo.js +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="bn.js" />
|
|
1
2
|
import { AuthUrls, Resolver } from '@subwallet/extension-base/background/handlers/State';
|
|
2
3
|
import { AccountAuthType, AccountJson, AuthorizeRequest, RequestAccountList, RequestAccountSubscribe, RequestAuthorizeCancel, RequestAuthorizeReject, RequestAuthorizeSubscribe, RequestAuthorizeTab, RequestCurrentAccountAddress, ResponseAuthorizeList, ResponseJsonGetAccountInfo, SeedLengths } from '@subwallet/extension-base/background/types';
|
|
3
4
|
import { ExternalState, LedgerState, QrState } from '@subwallet/extension-base/signers/types';
|
|
@@ -228,8 +229,8 @@ export interface DefaultFormatBalance {
|
|
|
228
229
|
export interface ApiState {
|
|
229
230
|
apiDefaultTx: SubmittableExtrinsicFunction;
|
|
230
231
|
apiDefaultTxSudo: SubmittableExtrinsicFunction;
|
|
232
|
+
isApiInitialized: boolean;
|
|
231
233
|
isApiReady: boolean;
|
|
232
|
-
isApiReadyOnce: boolean;
|
|
233
234
|
isDevelopment?: boolean;
|
|
234
235
|
isEthereum?: boolean;
|
|
235
236
|
specName: string;
|
|
@@ -245,7 +246,6 @@ export interface ApiProps extends ApiState {
|
|
|
245
246
|
apiError?: string;
|
|
246
247
|
apiUrl: string;
|
|
247
248
|
isNotSupport?: boolean;
|
|
248
|
-
isApiReadyOnce: boolean;
|
|
249
249
|
isApiConnected: boolean;
|
|
250
250
|
isEthereum: boolean;
|
|
251
251
|
isEthereumOnly: boolean;
|
|
@@ -587,6 +587,7 @@ export declare enum NETWORK_STATUS {
|
|
|
587
587
|
}
|
|
588
588
|
export declare enum TransferErrorCode {
|
|
589
589
|
NOT_ENOUGH_VALUE = "notEnoughValue",
|
|
590
|
+
NOT_ENOUGH_FEE = "notEnoughValue",
|
|
590
591
|
INVALID_VALUE = "invalidValue",
|
|
591
592
|
INVALID_TOKEN = "invalidToken",
|
|
592
593
|
TRANSFER_ERROR = "transferError",
|
|
@@ -605,12 +606,21 @@ export declare enum BasicTxErrorCode {
|
|
|
605
606
|
BALANCE_TO_LOW = "balanceTooLow1",
|
|
606
607
|
UNKNOWN_ERROR = "unknownError"
|
|
607
608
|
}
|
|
609
|
+
export declare enum BasicTxWarningCode {
|
|
610
|
+
NOT_ENOUGH_EXISTENTIAL_DEPOSIT = "notEnoughExistentialDeposit"
|
|
611
|
+
}
|
|
608
612
|
export declare type TxErrorCode = TransferErrorCode | BasicTxErrorCode;
|
|
613
|
+
export declare type TxWarningCode = BasicTxWarningCode;
|
|
609
614
|
export declare type BasicTxError = {
|
|
610
615
|
code: TxErrorCode;
|
|
611
616
|
data?: object;
|
|
612
617
|
message: string;
|
|
613
618
|
};
|
|
619
|
+
export declare type BasicTxWarning = {
|
|
620
|
+
code: TxWarningCode;
|
|
621
|
+
data?: object;
|
|
622
|
+
message: string;
|
|
623
|
+
};
|
|
614
624
|
export interface BasicTxResponse {
|
|
615
625
|
passwordError?: string | null;
|
|
616
626
|
callHash?: string;
|
|
@@ -1027,6 +1037,7 @@ export interface RequestCheckTransfer extends BaseRequestSign {
|
|
|
1027
1037
|
}
|
|
1028
1038
|
export interface ResponseCheckTransfer {
|
|
1029
1039
|
errors?: Array<BasicTxError>;
|
|
1040
|
+
warnings?: Array<BasicTxWarning>;
|
|
1030
1041
|
fromAccountFree: string;
|
|
1031
1042
|
toAccountFree: string;
|
|
1032
1043
|
estimateFee?: string;
|
package/background/KoniTypes.js
CHANGED
|
@@ -83,6 +83,7 @@ export let NETWORK_STATUS;
|
|
|
83
83
|
export let TransferErrorCode;
|
|
84
84
|
(function (TransferErrorCode) {
|
|
85
85
|
TransferErrorCode["NOT_ENOUGH_VALUE"] = "notEnoughValue";
|
|
86
|
+
TransferErrorCode["NOT_ENOUGH_FEE"] = "notEnoughValue";
|
|
86
87
|
TransferErrorCode["INVALID_VALUE"] = "invalidValue";
|
|
87
88
|
TransferErrorCode["INVALID_TOKEN"] = "invalidToken";
|
|
88
89
|
TransferErrorCode["TRANSFER_ERROR"] = "transferError";
|
|
@@ -102,6 +103,10 @@ export let BasicTxErrorCode;
|
|
|
102
103
|
BasicTxErrorCode["BALANCE_TO_LOW"] = "balanceTooLow1";
|
|
103
104
|
BasicTxErrorCode["UNKNOWN_ERROR"] = "unknownError";
|
|
104
105
|
})(BasicTxErrorCode || (BasicTxErrorCode = {}));
|
|
106
|
+
export let BasicTxWarningCode;
|
|
107
|
+
(function (BasicTxWarningCode) {
|
|
108
|
+
BasicTxWarningCode["NOT_ENOUGH_EXISTENTIAL_DEPOSIT"] = "notEnoughExistentialDeposit";
|
|
109
|
+
})(BasicTxWarningCode || (BasicTxWarningCode = {}));
|
|
105
110
|
export let TransferStep;
|
|
106
111
|
(function (TransferStep) {
|
|
107
112
|
TransferStep["READY"] = "ready";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TransferStep = exports.TransferErrorCode = exports.StakingType = exports.RMRK_VER = exports.NETWORK_STATUS = exports.NETWORK_ERROR = exports.ExternalRequestPromiseStatus = exports.CustomTokenType = exports.CrowdloanParaState = exports.ContractType = exports.BasicTxErrorCode = exports.ApiInitStatus = exports.AccountExternalErrorCode = exports.APIItemState = void 0;
|
|
6
|
+
exports.TransferStep = exports.TransferErrorCode = exports.StakingType = exports.RMRK_VER = exports.NETWORK_STATUS = exports.NETWORK_ERROR = exports.ExternalRequestPromiseStatus = exports.CustomTokenType = exports.CrowdloanParaState = exports.ContractType = exports.BasicTxWarningCode = exports.BasicTxErrorCode = exports.ApiInitStatus = exports.AccountExternalErrorCode = exports.APIItemState = void 0;
|
|
7
7
|
// Copyright 2019-2022 @polkadot/extension-koni authors & contributors
|
|
8
8
|
// SPDX-License-Identifier: Apache-2.0
|
|
9
9
|
let ApiInitStatus; /// Request Auth
|
|
@@ -91,6 +91,7 @@ let TransferErrorCode;
|
|
|
91
91
|
exports.TransferErrorCode = TransferErrorCode;
|
|
92
92
|
(function (TransferErrorCode) {
|
|
93
93
|
TransferErrorCode["NOT_ENOUGH_VALUE"] = "notEnoughValue";
|
|
94
|
+
TransferErrorCode["NOT_ENOUGH_FEE"] = "notEnoughValue";
|
|
94
95
|
TransferErrorCode["INVALID_VALUE"] = "invalidValue";
|
|
95
96
|
TransferErrorCode["INVALID_TOKEN"] = "invalidToken";
|
|
96
97
|
TransferErrorCode["TRANSFER_ERROR"] = "transferError";
|
|
@@ -111,6 +112,11 @@ exports.BasicTxErrorCode = BasicTxErrorCode;
|
|
|
111
112
|
BasicTxErrorCode["BALANCE_TO_LOW"] = "balanceTooLow1";
|
|
112
113
|
BasicTxErrorCode["UNKNOWN_ERROR"] = "unknownError";
|
|
113
114
|
})(BasicTxErrorCode || (exports.BasicTxErrorCode = BasicTxErrorCode = {}));
|
|
115
|
+
let BasicTxWarningCode;
|
|
116
|
+
exports.BasicTxWarningCode = BasicTxWarningCode;
|
|
117
|
+
(function (BasicTxWarningCode) {
|
|
118
|
+
BasicTxWarningCode["NOT_ENOUGH_EXISTENTIAL_DEPOSIT"] = "notEnoughExistentialDeposit";
|
|
119
|
+
})(BasicTxWarningCode || (exports.BasicTxWarningCode = BasicTxWarningCode = {}));
|
|
114
120
|
let TransferStep;
|
|
115
121
|
exports.TransferStep = TransferStep;
|
|
116
122
|
(function (TransferStep) {
|
package/cjs/packageInfo.js
CHANGED
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./cjs/detectPackage.js"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
-
"version": "0.7.
|
|
20
|
+
"version": "0.7.7-0",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -217,27 +217,27 @@
|
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
"dependencies": {
|
|
220
|
-
"@babel/runtime": "^7.
|
|
220
|
+
"@babel/runtime": "^7.20.6",
|
|
221
221
|
"@ethereumjs/common": "^2.6.5",
|
|
222
|
-
"@polkadot/api": "^9.
|
|
223
|
-
"@polkadot/keyring": "^10.1
|
|
224
|
-
"@polkadot/networks": "^10.1
|
|
225
|
-
"@polkadot/phishing": "^0.18.
|
|
226
|
-
"@polkadot/rpc-provider": "^9.
|
|
227
|
-
"@polkadot/types": "^9.
|
|
228
|
-
"@polkadot/ui-keyring": "^2.9.
|
|
229
|
-
"@polkadot/ui-settings": "^2.9.
|
|
230
|
-
"@polkadot/util": "^10.1
|
|
231
|
-
"@polkadot/util-crypto": "^10.1
|
|
232
|
-
"@subwallet/extension-chains": "^0.7.
|
|
233
|
-
"@subwallet/extension-dapp": "^0.7.
|
|
234
|
-
"@subwallet/extension-inject": "^0.7.
|
|
222
|
+
"@polkadot/api": "^9.10.3",
|
|
223
|
+
"@polkadot/keyring": "^10.2.1",
|
|
224
|
+
"@polkadot/networks": "^10.2.1",
|
|
225
|
+
"@polkadot/phishing": "^0.18.12",
|
|
226
|
+
"@polkadot/rpc-provider": "^9.10.3",
|
|
227
|
+
"@polkadot/types": "^9.10.3",
|
|
228
|
+
"@polkadot/ui-keyring": "^2.9.14",
|
|
229
|
+
"@polkadot/ui-settings": "^2.9.14",
|
|
230
|
+
"@polkadot/util": "^10.2.1",
|
|
231
|
+
"@polkadot/util-crypto": "^10.2.1",
|
|
232
|
+
"@subwallet/extension-chains": "^0.7.7-0",
|
|
233
|
+
"@subwallet/extension-dapp": "^0.7.7-0",
|
|
234
|
+
"@subwallet/extension-inject": "^0.7.7-0",
|
|
235
235
|
"ethereumjs-tx": "^2.1.2",
|
|
236
|
-
"eventemitter3": "^
|
|
236
|
+
"eventemitter3": "^5.0.0",
|
|
237
237
|
"rlp": "^3.0.0",
|
|
238
|
-
"rxjs": "^7.
|
|
239
|
-
"web3": "^1.8.
|
|
238
|
+
"rxjs": "^7.8.0",
|
|
239
|
+
"web3": "^1.8.1",
|
|
240
240
|
"web3-core": "^1.8.1",
|
|
241
|
-
"web3-core-helpers": "^1.8.
|
|
241
|
+
"web3-core-helpers": "^1.8.1"
|
|
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.
|
|
10
|
+
version: '0.7.7-0'
|
|
11
11
|
};
|