@subwallet/extension-base 0.6.9-0wr → 0.7.1-wr
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 +28 -21
- package/background/KoniTypes.js +5 -0
- package/cjs/background/KoniTypes.js +7 -1
- package/cjs/packageInfo.js +1 -1
- package/cjs/page/PostMessageProvider.js +1 -0
- package/package.json +4 -4
- package/packageInfo.js +1 -1
- package/page/PostMessageProvider.d.ts +1 -0
- package/page/PostMessageProvider.js +1 -0
|
@@ -68,38 +68,56 @@ export interface RejectResolver {
|
|
|
68
68
|
export interface RequestForgetSite {
|
|
69
69
|
url: string;
|
|
70
70
|
}
|
|
71
|
+
export declare enum StakingType {
|
|
72
|
+
NOMINATED = "nominated",
|
|
73
|
+
POOLED = "pooled"
|
|
74
|
+
}
|
|
71
75
|
export interface StakingRewardItem {
|
|
72
76
|
state: APIItemState;
|
|
73
77
|
name: string;
|
|
74
|
-
|
|
78
|
+
chain: string;
|
|
79
|
+
address: string;
|
|
80
|
+
type: StakingType;
|
|
75
81
|
latestReward?: string;
|
|
76
82
|
totalReward?: string;
|
|
77
83
|
totalSlash?: string;
|
|
78
|
-
smartContract?: string;
|
|
79
84
|
}
|
|
80
|
-
export interface
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
export interface UnlockingStakeInfo {
|
|
86
|
+
chain: string;
|
|
87
|
+
address: string;
|
|
88
|
+
type: StakingType;
|
|
89
|
+
nextWithdrawal: number;
|
|
90
|
+
redeemable: number;
|
|
91
|
+
nextWithdrawalAmount: number;
|
|
92
|
+
nextWithdrawalAction?: string;
|
|
93
|
+
validatorAddress?: string;
|
|
83
94
|
}
|
|
84
95
|
export interface StakingItem {
|
|
85
96
|
name: string;
|
|
86
|
-
|
|
97
|
+
chain: string;
|
|
98
|
+
address: string;
|
|
87
99
|
balance?: string;
|
|
88
100
|
activeBalance?: string;
|
|
89
101
|
unlockingBalance?: string;
|
|
90
102
|
nativeToken: string;
|
|
91
103
|
unit?: string;
|
|
104
|
+
type: StakingType;
|
|
92
105
|
state: APIItemState;
|
|
93
106
|
unlockingInfo?: UnlockingStakeInfo;
|
|
107
|
+
rewardInfo?: StakingRewardItem;
|
|
94
108
|
}
|
|
95
109
|
export interface StakingJson {
|
|
96
110
|
reset?: boolean;
|
|
97
111
|
ready?: boolean;
|
|
98
|
-
details:
|
|
112
|
+
details: StakingItem[];
|
|
99
113
|
}
|
|
100
|
-
export interface
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
export interface StakingRewardJson {
|
|
115
|
+
ready: boolean;
|
|
116
|
+
details: Array<StakingRewardItem>;
|
|
117
|
+
}
|
|
118
|
+
export interface StakeUnlockingJson {
|
|
119
|
+
timestamp: number;
|
|
120
|
+
details: UnlockingStakeInfo[];
|
|
103
121
|
}
|
|
104
122
|
export interface PriceJson {
|
|
105
123
|
ready?: boolean;
|
|
@@ -1011,17 +1029,6 @@ export interface DelegationItem {
|
|
|
1011
1029
|
hasScheduledRequest: boolean;
|
|
1012
1030
|
icon?: string;
|
|
1013
1031
|
}
|
|
1014
|
-
export interface UnlockingStakeInfo {
|
|
1015
|
-
nextWithdrawal: number;
|
|
1016
|
-
redeemable: number;
|
|
1017
|
-
nextWithdrawalAmount: number;
|
|
1018
|
-
nextWithdrawalAction?: string;
|
|
1019
|
-
validatorAddress?: string;
|
|
1020
|
-
}
|
|
1021
|
-
export interface StakeUnlockingJson {
|
|
1022
|
-
timestamp: number;
|
|
1023
|
-
details: Record<string, UnlockingStakeInfo>;
|
|
1024
|
-
}
|
|
1025
1032
|
export interface StakeWithdrawalParams {
|
|
1026
1033
|
address: string;
|
|
1027
1034
|
networkKey: string;
|
package/background/KoniTypes.js
CHANGED
|
@@ -8,6 +8,11 @@ export let ApiInitStatus;
|
|
|
8
8
|
ApiInitStatus[ApiInitStatus["NOT_SUPPORT"] = 2] = "NOT_SUPPORT";
|
|
9
9
|
ApiInitStatus[ApiInitStatus["NOT_EXIST"] = 3] = "NOT_EXIST";
|
|
10
10
|
})(ApiInitStatus || (ApiInitStatus = {}));
|
|
11
|
+
export let StakingType;
|
|
12
|
+
(function (StakingType) {
|
|
13
|
+
StakingType["NOMINATED"] = "nominated";
|
|
14
|
+
StakingType["POOLED"] = "pooled";
|
|
15
|
+
})(StakingType || (StakingType = {}));
|
|
11
16
|
export let APIItemState;
|
|
12
17
|
(function (APIItemState) {
|
|
13
18
|
APIItemState["PENDING"] = "pending";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TransferStep = exports.TransferErrorCode = exports.RMRK_VER = exports.NETWORK_STATUS = exports.NETWORK_ERROR = exports.ExternalRequestPromiseStatus = exports.CustomTokenType = exports.CrowdloanParaState = exports.ContractType = exports.BasicTxErrorCode = exports.BasicTxError = 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.BasicTxErrorCode = exports.BasicTxError = 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;
|
|
@@ -14,6 +14,12 @@ exports.ApiInitStatus = ApiInitStatus;
|
|
|
14
14
|
ApiInitStatus[ApiInitStatus["NOT_SUPPORT"] = 2] = "NOT_SUPPORT";
|
|
15
15
|
ApiInitStatus[ApiInitStatus["NOT_EXIST"] = 3] = "NOT_EXIST";
|
|
16
16
|
})(ApiInitStatus || (exports.ApiInitStatus = ApiInitStatus = {}));
|
|
17
|
+
let StakingType;
|
|
18
|
+
exports.StakingType = StakingType;
|
|
19
|
+
(function (StakingType) {
|
|
20
|
+
StakingType["NOMINATED"] = "nominated";
|
|
21
|
+
StakingType["POOLED"] = "pooled";
|
|
22
|
+
})(StakingType || (exports.StakingType = StakingType = {}));
|
|
17
23
|
let APIItemState;
|
|
18
24
|
exports.APIItemState = APIItemState;
|
|
19
25
|
(function (APIItemState) {
|
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.
|
|
20
|
+
"version": "0.7.1wr",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -224,9 +224,9 @@
|
|
|
224
224
|
"@polkadot/ui-settings": "^2.9.10",
|
|
225
225
|
"@polkadot/util": "^10.1.9",
|
|
226
226
|
"@polkadot/util-crypto": "^10.1.9",
|
|
227
|
-
"@subwallet/extension-chains": "^0.
|
|
228
|
-
"@subwallet/extension-dapp": "^0.
|
|
229
|
-
"@subwallet/extension-inject": "^0.
|
|
227
|
+
"@subwallet/extension-chains": "^0.7.1",
|
|
228
|
+
"@subwallet/extension-dapp": "^0.7.1",
|
|
229
|
+
"@subwallet/extension-inject": "^0.7.1",
|
|
230
230
|
"ethereumjs-tx": "^2.1.2",
|
|
231
231
|
"eventemitter3": "^4.0.7",
|
|
232
232
|
"rlp": "^3.0.0",
|
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.
|
|
10
|
+
version: '0.7.1'
|
|
11
11
|
};
|
|
@@ -14,6 +14,7 @@ interface SubscriptionHandler {
|
|
|
14
14
|
*/
|
|
15
15
|
export default class PostMessageProvider implements InjectedProvider {
|
|
16
16
|
#private;
|
|
17
|
+
isClonable: boolean;
|
|
17
18
|
/**
|
|
18
19
|
* @param {function} sendRequest The function to be called to send requests to the node
|
|
19
20
|
* @param {function} subscriptionNotificationHandler Channel for receiving subscription messages
|