@metamask-previews/eth-simple-keyring 6.0.2-preview-b6fc9fc → 6.0.2-preview-8d6e44e
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/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/simple-keyring.d.ts +35 -0
- package/dist/simple-keyring.d.ts.map +1 -0
- package/package.json +1 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TypedTransaction } from '@ethereumjs/tx';
|
|
2
|
+
import { SignTypedDataVersion } from '@metamask/eth-sig-util';
|
|
3
|
+
import { Eip1024EncryptedData, Hex, Keyring } from '@metamask/utils';
|
|
4
|
+
declare type KeyringOpt = {
|
|
5
|
+
withAppKeyOrigin?: string;
|
|
6
|
+
version?: SignTypedDataVersion | string;
|
|
7
|
+
};
|
|
8
|
+
export default class SimpleKeyring implements Keyring<string[]> {
|
|
9
|
+
#private;
|
|
10
|
+
readonly type: string;
|
|
11
|
+
static type: string;
|
|
12
|
+
constructor(privateKeys?: string[]);
|
|
13
|
+
serialize(): Promise<string[]>;
|
|
14
|
+
deserialize(privateKeys?: string[]): Promise<void>;
|
|
15
|
+
addAccounts(numAccounts?: number): Promise<`0x${string}`[]>;
|
|
16
|
+
getAccounts(): Promise<`0x${string}`[]>;
|
|
17
|
+
signTransaction(address: Hex, transaction: TypedTransaction, opts?: KeyringOpt): Promise<TypedTransaction>;
|
|
18
|
+
signMessage(address: Hex, data: string, opts?: {
|
|
19
|
+
withAppKeyOrigin: string;
|
|
20
|
+
validateMessage: boolean;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
signPersonalMessage(address: Hex, msgHex: Hex, opts?: {
|
|
23
|
+
withAppKeyOrigin: string;
|
|
24
|
+
}): Promise<string>;
|
|
25
|
+
decryptMessage(withAccount: Hex, encryptedData: Eip1024EncryptedData): Promise<string>;
|
|
26
|
+
signTypedData(address: Hex, typedData: any, opts?: KeyringOpt): Promise<string>;
|
|
27
|
+
getEncryptionPublicKey(withAccount: Hex, opts?: KeyringOpt): Promise<string>;
|
|
28
|
+
getAppKeyAddress(address: Hex, origin: string): Promise<`0x${string}`>;
|
|
29
|
+
exportAccount(address: Hex, opts?: {
|
|
30
|
+
withAppKeyOrigin: string;
|
|
31
|
+
}): Promise<string>;
|
|
32
|
+
removeAccount(address: string): void;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=simple-keyring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-keyring.d.ts","sourceRoot":"","sources":["../src/simple-keyring.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAWlD,OAAO,EAOL,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAS,oBAAoB,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI5E,aAAK,UAAU,GAAG;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;CACzC,CAAC;AAIF,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,OAAO,CAAC,MAAM,EAAE,CAAC;;IAG7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAQ;IAE7B,MAAM,CAAC,IAAI,EAAE,MAAM,CAAQ;gBAEf,WAAW,GAAE,MAAM,EAAO;IAUhC,SAAS;IAIT,WAAW,CAAC,WAAW,GAAE,MAAM,EAAO;IAStC,WAAW,CAAC,WAAW,SAAI;IAc3B,WAAW;IAMX,eAAe,CACnB,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,gBAAgB,EAC7B,IAAI,GAAE,UAAe,GACpB,OAAO,CAAC,gBAAgB,CAAC;IAQtB,WAAW,CACf,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI;;;KAAkD;IAgBlD,mBAAmB,CACvB,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,GAAG,EACX,IAAI;;KAA2B;IAO3B,cAAc,CAAC,WAAW,EAAE,GAAG,EAAE,aAAa,EAAE,oBAAoB;IAOpE,aAAa,CACjB,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE,GAAG,EACd,IAAI,GAAE,UAAiD;IAcnD,sBAAsB,CAAC,WAAW,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,UAAU;IAe1D,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM;IAY7C,aAAa,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI;;KAA2B;IAKjE,aAAa,CAAC,OAAO,EAAE,MAAM;CAsC9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/eth-simple-keyring",
|
|
3
|
-
"version": "6.0.2-preview-
|
|
3
|
+
"version": "6.0.2-preview-8d6e44e",
|
|
4
4
|
"description": "A simple standard interface for a series of Ethereum private keys.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ethereum",
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"build:force": "tsc --build tsconfig.build.json --force",
|
|
27
27
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/eth-simple-keyring",
|
|
28
28
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/eth-simple-keyring",
|
|
29
|
-
"prepack": "./scripts/prepack.sh",
|
|
30
29
|
"publish:preview": "yarn npm publish --tag preview",
|
|
31
30
|
"sample": "ts-node src/sample.ts",
|
|
32
31
|
"test": "jest",
|