@subwallet/extension-base 0.4.7-0 → 0.4.10-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 +29 -1
- package/background/handlers/State.d.ts +1 -0
- package/cjs/packageInfo.js +1 -1
- package/cjs/page/index.js +0 -7
- package/package.json +20 -20
- package/packageInfo.js +1 -1
- package/page/index.d.ts +0 -1
- package/page/index.js +0 -5
|
@@ -246,6 +246,7 @@ export interface NetworkJson {
|
|
|
246
246
|
decimals?: number;
|
|
247
247
|
coinGeckoKey?: string;
|
|
248
248
|
blockExplorer?: string;
|
|
249
|
+
abiExplorer?: string;
|
|
249
250
|
dependencies?: string[];
|
|
250
251
|
getStakingOnChain?: boolean;
|
|
251
252
|
supportBonding?: boolean;
|
|
@@ -312,6 +313,7 @@ export interface OptionInputAddress {
|
|
|
312
313
|
export interface CurrentAccountInfo {
|
|
313
314
|
address: string;
|
|
314
315
|
currentGenesisHash: string | null;
|
|
316
|
+
allGenesisHash?: string;
|
|
315
317
|
}
|
|
316
318
|
export interface RequestSettingsType {
|
|
317
319
|
isShowBalance: boolean;
|
|
@@ -449,7 +451,7 @@ export declare type RequestSubscribeCrowdloan = null;
|
|
|
449
451
|
export declare type RequestSubscribeNft = null;
|
|
450
452
|
export declare type RequestSubscribeStaking = null;
|
|
451
453
|
export declare type RequestSubscribeStakingReward = null;
|
|
452
|
-
export declare type ThemeTypes = 'light' | 'dark';
|
|
454
|
+
export declare type ThemeTypes = 'light' | 'dark' | 'subspace';
|
|
453
455
|
export declare type RequestNftForceUpdate = {
|
|
454
456
|
collectionId: string;
|
|
455
457
|
nft: NftItem;
|
|
@@ -806,6 +808,31 @@ export interface StakeWithdrawalParams {
|
|
|
806
808
|
networkKey: string;
|
|
807
809
|
password?: string;
|
|
808
810
|
}
|
|
811
|
+
export interface SingleModeJson {
|
|
812
|
+
networkKeys: string[];
|
|
813
|
+
theme: ThemeTypes;
|
|
814
|
+
autoTriggerDomain: string;
|
|
815
|
+
}
|
|
816
|
+
export declare type NestedArray<T> = T | NestedArray<T>[];
|
|
817
|
+
export interface EVMTransactionArg {
|
|
818
|
+
name: string;
|
|
819
|
+
type: string;
|
|
820
|
+
value: string;
|
|
821
|
+
children?: EVMTransactionArg[];
|
|
822
|
+
}
|
|
823
|
+
export interface ParseEVMTransactionData {
|
|
824
|
+
method: string;
|
|
825
|
+
methodName: string;
|
|
826
|
+
args: EVMTransactionArg[];
|
|
827
|
+
}
|
|
828
|
+
export interface RequestParseEVMTransactionInput {
|
|
829
|
+
data: string;
|
|
830
|
+
contract: string;
|
|
831
|
+
chainId: number;
|
|
832
|
+
}
|
|
833
|
+
export interface ResponseParseEVMTransactionInput {
|
|
834
|
+
result: ParseEVMTransactionData | string;
|
|
835
|
+
}
|
|
809
836
|
export interface KoniRequestSignatures {
|
|
810
837
|
'pri(unbonding.submitWithdrawal)': [StakeWithdrawalParams, BasicTxResponse, BasicTxResponse];
|
|
811
838
|
'pri(unbonding.withdrawalTxInfo)': [StakeWithdrawalParams, BasicTxInfo];
|
|
@@ -902,5 +929,6 @@ export interface KoniRequestSignatures {
|
|
|
902
929
|
'evm(events.subscribe)': [RequestEvmEvents, boolean, EvmEvent];
|
|
903
930
|
'evm(request)': [RequestArguments, unknown];
|
|
904
931
|
'evm(provider.send)': [RequestEvmProviderSend, string | number, ResponseEvmProviderSend];
|
|
932
|
+
'pri(evm.transaction.parse.input)': [RequestParseEVMTransactionInput, ResponseParseEVMTransactionInput];
|
|
905
933
|
}
|
|
906
934
|
export {};
|
package/cjs/packageInfo.js
CHANGED
package/cjs/page/index.js
CHANGED
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.enable = enable;
|
|
9
9
|
exports.handleResponse = handleResponse;
|
|
10
|
-
exports.redirectIfPhishing = redirectIfPhishing;
|
|
11
10
|
exports.sendMessage = sendMessage;
|
|
12
11
|
|
|
13
12
|
var _defaults = require("../defaults");
|
|
@@ -45,12 +44,6 @@ async function enable(origin) {
|
|
|
45
44
|
origin
|
|
46
45
|
});
|
|
47
46
|
return new _Injected.default(sendMessage);
|
|
48
|
-
} // redirect users if this page is considered as phishing, otherwise return false
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
async function redirectIfPhishing() {
|
|
52
|
-
const res = await sendMessage('pub(phishing.redirectIfDenied)');
|
|
53
|
-
return res;
|
|
54
47
|
}
|
|
55
48
|
|
|
56
49
|
function handleResponse(data) {
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./cjs/detectPackage.js"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
-
"version": "0.4.
|
|
20
|
+
"version": "0.4.10-0",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -187,26 +187,26 @@
|
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
"dependencies": {
|
|
190
|
-
"@babel/runtime": "^7.
|
|
191
|
-
"@ethereumjs/common": "^2.6.
|
|
192
|
-
"@polkadot/api": "^
|
|
193
|
-
"@polkadot/keyring": "^
|
|
194
|
-
"@polkadot/networks": "^
|
|
195
|
-
"@polkadot/phishing": "^0.
|
|
196
|
-
"@polkadot/rpc-provider": "^
|
|
197
|
-
"@polkadot/types": "^
|
|
198
|
-
"@polkadot/ui-keyring": "^
|
|
199
|
-
"@polkadot/ui-settings": "^
|
|
200
|
-
"@polkadot/util": "^
|
|
201
|
-
"@polkadot/util-crypto": "^
|
|
202
|
-
"@subwallet/extension-chains": "^0.4.
|
|
203
|
-
"@subwallet/extension-dapp": "^0.4.
|
|
204
|
-
"@subwallet/extension-inject": "^0.4.
|
|
190
|
+
"@babel/runtime": "^7.18.6",
|
|
191
|
+
"@ethereumjs/common": "^2.6.5",
|
|
192
|
+
"@polkadot/api": "^8.11.3",
|
|
193
|
+
"@polkadot/keyring": "^9.7.2",
|
|
194
|
+
"@polkadot/networks": "^9.7.2",
|
|
195
|
+
"@polkadot/phishing": "^0.16.2",
|
|
196
|
+
"@polkadot/rpc-provider": "^8.11.3",
|
|
197
|
+
"@polkadot/types": "^8.11.3",
|
|
198
|
+
"@polkadot/ui-keyring": "^2.7.2",
|
|
199
|
+
"@polkadot/ui-settings": "^2.7.2",
|
|
200
|
+
"@polkadot/util": "^9.7.2",
|
|
201
|
+
"@polkadot/util-crypto": "^9.7.2",
|
|
202
|
+
"@subwallet/extension-chains": "^0.4.10-0",
|
|
203
|
+
"@subwallet/extension-dapp": "^0.4.10-0",
|
|
204
|
+
"@subwallet/extension-inject": "^0.4.10-0",
|
|
205
205
|
"ethereumjs-tx": "^2.1.2",
|
|
206
206
|
"eventemitter3": "^4.0.7",
|
|
207
|
-
"rxjs": "^7.5.
|
|
208
|
-
"web3": "^1.7.
|
|
209
|
-
"web3-core": "^1.7.
|
|
210
|
-
"web3-core-helpers": "^1.7.
|
|
207
|
+
"rxjs": "^7.5.5",
|
|
208
|
+
"web3": "^1.7.4",
|
|
209
|
+
"web3-core": "^1.7.4",
|
|
210
|
+
"web3-core-helpers": "^1.7.4"
|
|
211
211
|
}
|
|
212
212
|
}
|
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.4.
|
|
8
|
+
version: '0.4.10-0'
|
|
9
9
|
};
|
package/page/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export declare function sendMessage<TMessageType extends MessageTypesWithNullReq
|
|
|
10
10
|
export declare function sendMessage<TMessageType extends MessageTypesWithNoSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType]): Promise<ResponseTypes[TMessageType]>;
|
|
11
11
|
export declare function sendMessage<TMessageType extends MessageTypesWithSubscriptions>(message: TMessageType, request: RequestTypes[TMessageType], subscriber: (data: SubscriptionMessageTypes[TMessageType]) => void): Promise<ResponseTypes[TMessageType]>;
|
|
12
12
|
export declare function enable(origin: string): Promise<Injected>;
|
|
13
|
-
export declare function redirectIfPhishing(): Promise<boolean>;
|
|
14
13
|
export declare function handleResponse<TMessageType extends MessageTypes>(data: TransportResponseMessage<TMessageType> & {
|
|
15
14
|
subscription?: string;
|
|
16
15
|
}): void;
|
package/page/index.js
CHANGED
|
@@ -35,11 +35,6 @@ export async function enable(origin) {
|
|
|
35
35
|
origin
|
|
36
36
|
});
|
|
37
37
|
return new Injected(sendMessage);
|
|
38
|
-
} // redirect users if this page is considered as phishing, otherwise return false
|
|
39
|
-
|
|
40
|
-
export async function redirectIfPhishing() {
|
|
41
|
-
const res = await sendMessage('pub(phishing.redirectIfDenied)');
|
|
42
|
-
return res;
|
|
43
38
|
}
|
|
44
39
|
export function handleResponse(data) {
|
|
45
40
|
const handler = handlers[data.id];
|