@metamask/keyring-api 0.2.0 → 0.2.1
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/CHANGELOG.md +6 -1
- package/dist/internal/types.d.ts +15 -12
- package/dist/internal/types.js +4 -3
- package/dist/internal/types.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.2.1]
|
10
|
+
### Changed
|
11
|
+
- Set `snap` object keys to be mandatory and move `name` to `metadata` ([#87](https://github.com/MetaMask/keyring-api/pull/87))
|
12
|
+
|
9
13
|
## [0.2.0]
|
10
14
|
### Added
|
11
15
|
- Add `InternalAccount` type and create submodule `internal` ([#65](https://github.com/MetaMask/keyring-api/pull/65))
|
@@ -48,7 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
48
52
|
- SnapController keyring client. It is intended to be used by MetaMask to talk to the snap.
|
49
53
|
- Helper functions to create keyring handler in the snap.
|
50
54
|
|
51
|
-
[Unreleased]: https://github.com/MetaMask/keyring-api/compare/v0.2.
|
55
|
+
[Unreleased]: https://github.com/MetaMask/keyring-api/compare/v0.2.1...HEAD
|
56
|
+
[0.2.1]: https://github.com/MetaMask/keyring-api/compare/v0.2.0...v0.2.1
|
52
57
|
[0.2.0]: https://github.com/MetaMask/keyring-api/compare/v0.1.3...v0.2.0
|
53
58
|
[0.1.3]: https://github.com/MetaMask/keyring-api/compare/v0.1.2...v0.1.3
|
54
59
|
[0.1.2]: https://github.com/MetaMask/keyring-api/compare/v0.1.1...v0.1.2
|
package/dist/internal/types.d.ts
CHANGED
@@ -6,35 +6,38 @@ export declare const InternalAccountStruct: import("superstruct").Struct<{
|
|
6
6
|
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
7
7
|
type: "eip155:eoa" | "eip155:eip4337";
|
8
8
|
metadata: {
|
9
|
+
name: string;
|
9
10
|
keyring: {
|
10
11
|
type: string;
|
11
12
|
};
|
12
13
|
snap?: {
|
13
|
-
id
|
14
|
-
|
15
|
-
|
14
|
+
id: string;
|
15
|
+
enabled: boolean;
|
16
|
+
name: string;
|
16
17
|
} | undefined;
|
17
18
|
};
|
18
19
|
}, {
|
19
20
|
metadata: import("superstruct").Struct<{
|
21
|
+
name: string;
|
20
22
|
keyring: {
|
21
23
|
type: string;
|
22
24
|
};
|
23
25
|
snap?: {
|
24
|
-
id
|
25
|
-
|
26
|
-
|
26
|
+
id: string;
|
27
|
+
enabled: boolean;
|
28
|
+
name: string;
|
27
29
|
} | undefined;
|
28
30
|
}, {
|
29
31
|
snap: import("superstruct").Struct<{
|
30
|
-
id
|
31
|
-
|
32
|
-
|
32
|
+
id: string;
|
33
|
+
enabled: boolean;
|
34
|
+
name: string;
|
33
35
|
} | undefined, {
|
34
|
-
id: import("superstruct").Struct<string
|
35
|
-
|
36
|
-
|
36
|
+
id: import("superstruct").Struct<string, null>;
|
37
|
+
enabled: import("superstruct").Struct<boolean, null>;
|
38
|
+
name: import("superstruct").Struct<string, null>;
|
37
39
|
}>;
|
40
|
+
name: import("superstruct").Struct<string, null>;
|
38
41
|
keyring: import("superstruct").Struct<{
|
39
42
|
type: string;
|
40
43
|
}, {
|
package/dist/internal/types.js
CHANGED
@@ -7,10 +7,11 @@ exports.InternalAccountStruct = (0, superstruct_1.object)({
|
|
7
7
|
...api_1.KeyringAccountStruct.schema,
|
8
8
|
metadata: (0, superstruct_1.object)({
|
9
9
|
snap: (0, superstruct_1.optional)((0, superstruct_1.object)({
|
10
|
-
id: (0, superstruct_1.
|
11
|
-
|
12
|
-
|
10
|
+
id: (0, superstruct_1.string)(),
|
11
|
+
enabled: (0, superstruct_1.boolean)(),
|
12
|
+
name: (0, superstruct_1.string)(),
|
13
13
|
})),
|
14
|
+
name: (0, superstruct_1.string)(),
|
14
15
|
keyring: (0, superstruct_1.object)({
|
15
16
|
type: (0, superstruct_1.string)(),
|
16
17
|
}),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/internal/types.ts"],"names":[],"mappings":";;;AAAA,6CAA4E;AAE5E,gCAA8C;AAEjC,QAAA,qBAAqB,GAAG,IAAA,oBAAM,EAAC;IAC1C,GAAG,0BAAoB,CAAC,MAAM;IAC9B,QAAQ,EAAE,IAAA,oBAAM,EAAC;QACf,IAAI,EAAE,IAAA,sBAAQ,EACZ,IAAA,oBAAM,EAAC;YACL,EAAE,EAAE,IAAA,
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/internal/types.ts"],"names":[],"mappings":";;;AAAA,6CAA4E;AAE5E,gCAA8C;AAEjC,QAAA,qBAAqB,GAAG,IAAA,oBAAM,EAAC;IAC1C,GAAG,0BAAoB,CAAC,MAAM;IAC9B,QAAQ,EAAE,IAAA,oBAAM,EAAC;QACf,IAAI,EAAE,IAAA,sBAAQ,EACZ,IAAA,oBAAM,EAAC;YACL,EAAE,EAAE,IAAA,oBAAM,GAAE;YACZ,OAAO,EAAE,IAAA,qBAAO,GAAE;YAClB,IAAI,EAAE,IAAA,oBAAM,GAAE;SACf,CAAC,CACH;QACD,IAAI,EAAE,IAAA,oBAAM,GAAE;QACd,OAAO,EAAE,IAAA,oBAAM,EAAC;YACd,IAAI,EAAE,IAAA,oBAAM,GAAE;SACf,CAAC;KACH,CAAC;CACH,CAAC,CAAC","sourcesContent":["import { boolean, object, optional, string, type Infer } from 'superstruct';\n\nimport { KeyringAccountStruct } from '../api';\n\nexport const InternalAccountStruct = object({\n ...KeyringAccountStruct.schema,\n metadata: object({\n snap: optional(\n object({\n id: string(),\n enabled: boolean(),\n name: string(),\n }),\n ),\n name: string(),\n keyring: object({\n type: string(),\n }),\n }),\n});\n\n/**\n * Internal account representation.\n *\n * This type is used internally by MetaMask to add additional metadata to the\n * account object. It's should not be used by external applications.\n */\nexport type InternalAccount = Infer<typeof InternalAccountStruct>;\n"]}
|