@metamask/key-derivation-purposes 0.0.0-stage → 0.1.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/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/README.md +53 -2
- package/dist/index.cjs +18 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/purposes.cjs +18 -0
- package/dist/purposes.cjs.map +1 -0
- package/dist/purposes.d.cts +20 -0
- package/dist/purposes.d.cts.map +1 -0
- package/dist/purposes.d.mts +20 -0
- package/dist/purposes.d.mts.map +1 -0
- package/dist/purposes.mjs +15 -0
- package/dist/purposes.mjs.map +1 -0
- package/dist/types.cjs +3 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +7 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +7 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +2 -0
- package/dist/types.mjs.map +1 -0
- package/package.json +82 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add the shared purpose registry ([#711](https://github.com/MetaMask/accounts/pull/711), [#706](https://github.com/MetaMask/accounts/pull/706))
|
|
15
|
+
- Add `KeyDerivationPurpose` type.
|
|
16
|
+
- Add `Purpose` const object and type.
|
|
17
|
+
|
|
18
|
+
[Unreleased]: https://github.com/MetaMask/accounts/compare/@metamask/key-derivation-purposes@0.1.0...HEAD
|
|
19
|
+
[0.1.0]: https://github.com/MetaMask/accounts/releases/tag/@metamask/key-derivation-purposes@0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MetaMask
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Key Derivation Purposes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A shared registry of immutable purpose constants and the `KeyDerivationPurpose`
|
|
4
|
+
format type. This package has no runtime dependencies or cryptographic code.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
yarn add @metamask/key-derivation-purposes
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
or
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @metamask/key-derivation-purposes
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { Purpose } from '@metamask/key-derivation-purposes';
|
|
22
|
+
|
|
23
|
+
const purpose = Purpose.MoneyAccountMpcDeviceShareWrappingKey;
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`Purpose` is also a type representing the union of registered purpose values.
|
|
27
|
+
Use `KeyDerivationPurpose` when accepting consumer-defined purposes as well.
|
|
28
|
+
|
|
29
|
+
## Registry
|
|
30
|
+
|
|
31
|
+
| Constant | Owner | Intended use | Key type |
|
|
32
|
+
| ----------------------------------------------- | -------------- | ------------------------------------------------------------ | ------------------------------ |
|
|
33
|
+
| `Purpose.MoneyAccountMpcDeviceShareWrappingKey` | Money Accounts | Wrap MPC device-share backups for MFA recovery using AES-GCM | 32-byte symmetric wrapping key |
|
|
34
|
+
|
|
35
|
+
The device-share constant's value is `metamask:money-account:mpc:device-share:wrapping-key:v1`.
|
|
36
|
+
Wrapping means AES-256-GCM encryption of serialized device-share backups, not AES-KW or AES-KWP. Use a fresh 96-bit IV for each backup and reject authentication failures.
|
|
37
|
+
|
|
38
|
+
## Allocation rules
|
|
39
|
+
|
|
40
|
+
- Use a unique, stable purpose matching `metamask:<scope>:v<version>`, with a
|
|
41
|
+
non-empty scope and non-negative integer version.
|
|
42
|
+
- Document each entry's owner, intended use, and key type.
|
|
43
|
+
- Published strings are immutable: changing a purpose changes the derived key.
|
|
44
|
+
Introduce a new constant and purpose version for a new use rather than editing
|
|
45
|
+
an existing value.
|
|
46
|
+
- A purpose version identifies the consumer-specific use, not the derivation
|
|
47
|
+
scheme version.
|
|
48
|
+
- This registry is not an allowlist. SDK helpers also accept correctly formatted
|
|
49
|
+
consumer-defined purposes without requiring a registry or SDK release.
|
|
50
|
+
- Callers are responsible for the purpose format; the TypeScript type cannot
|
|
51
|
+
enforce every constraint, and SDK helpers do not validate it at runtime.
|
|
52
|
+
|
|
53
|
+
Keep this package limited to constants, types, and documentation. It has no
|
|
54
|
+
runtime registration framework, secrets, or per-user state.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./purposes.cjs"), exports);
|
|
18
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA2B","sourcesContent":["export * from './purposes';\nexport type { KeyDerivationPurpose } from './types';\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA2B;AAC3B,YAAY,EAAE,oBAAoB,EAAE,oBAAgB"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA2B;AAC3B,YAAY,EAAE,oBAAoB,EAAE,oBAAgB"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+BAA2B","sourcesContent":["export * from './purposes';\nexport type { KeyDerivationPurpose } from './types';\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Purpose = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Registered purposes for domain-separated secret derivation.
|
|
6
|
+
*/
|
|
7
|
+
exports.Purpose = {
|
|
8
|
+
/**
|
|
9
|
+
* Owner: Money Accounts.
|
|
10
|
+
* Intended use: wrap MPC device-share backups for MFA recovery using AES-GCM.
|
|
11
|
+
* Key type: 32-byte symmetric wrapping key (not AES-KW or AES-KWP).
|
|
12
|
+
* Scheme: BIP-85 at `m/83696968'/META'/MASK'/index'`, then
|
|
13
|
+
* HKDF-SHA256 via `KeyRoot.deriveSecret` with length 32 in `@metamask/keyring-sdk`.
|
|
14
|
+
* This purpose string is immutable; a new use/version requires a new member.
|
|
15
|
+
*/
|
|
16
|
+
MoneyAccountMpcDeviceShareWrappingKey: 'metamask:money-account:mpc:device-share:wrapping-key:v1',
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=purposes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purposes.cjs","sourceRoot":"","sources":["../src/purposes.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,OAAO,GAAG;IACrB;;;;;;;OAOG;IACH,qCAAqC,EACnC,yDAAyD;CACJ,CAAC","sourcesContent":["import type { KeyDerivationPurpose } from './types';\n\n/**\n * Registered purposes for domain-separated secret derivation.\n */\nexport const Purpose = {\n /**\n * Owner: Money Accounts.\n * Intended use: wrap MPC device-share backups for MFA recovery using AES-GCM.\n * Key type: 32-byte symmetric wrapping key (not AES-KW or AES-KWP).\n * Scheme: BIP-85 at `m/83696968'/META'/MASK'/index'`, then\n * HKDF-SHA256 via `KeyRoot.deriveSecret` with length 32 in `@metamask/keyring-sdk`.\n * This purpose string is immutable; a new use/version requires a new member.\n */\n MoneyAccountMpcDeviceShareWrappingKey:\n 'metamask:money-account:mpc:device-share:wrapping-key:v1',\n} as const satisfies Record<string, KeyDerivationPurpose>;\n\n/**\n * A registered purpose value. Use `KeyDerivationPurpose` to also accept\n * consumer-defined purposes.\n */\nexport type Purpose = (typeof Purpose)[keyof typeof Purpose];\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registered purposes for domain-separated secret derivation.
|
|
3
|
+
*/
|
|
4
|
+
export declare const Purpose: {
|
|
5
|
+
/**
|
|
6
|
+
* Owner: Money Accounts.
|
|
7
|
+
* Intended use: wrap MPC device-share backups for MFA recovery using AES-GCM.
|
|
8
|
+
* Key type: 32-byte symmetric wrapping key (not AES-KW or AES-KWP).
|
|
9
|
+
* Scheme: BIP-85 at `m/83696968'/META'/MASK'/index'`, then
|
|
10
|
+
* HKDF-SHA256 via `KeyRoot.deriveSecret` with length 32 in `@metamask/keyring-sdk`.
|
|
11
|
+
* This purpose string is immutable; a new use/version requires a new member.
|
|
12
|
+
*/
|
|
13
|
+
readonly MoneyAccountMpcDeviceShareWrappingKey: "metamask:money-account:mpc:device-share:wrapping-key:v1";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A registered purpose value. Use `KeyDerivationPurpose` to also accept
|
|
17
|
+
* consumer-defined purposes.
|
|
18
|
+
*/
|
|
19
|
+
export type Purpose = (typeof Purpose)[keyof typeof Purpose];
|
|
20
|
+
//# sourceMappingURL=purposes.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purposes.d.cts","sourceRoot":"","sources":["../src/purposes.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,OAAO;IAClB;;;;;;;OAOG;;CAGoD,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registered purposes for domain-separated secret derivation.
|
|
3
|
+
*/
|
|
4
|
+
export declare const Purpose: {
|
|
5
|
+
/**
|
|
6
|
+
* Owner: Money Accounts.
|
|
7
|
+
* Intended use: wrap MPC device-share backups for MFA recovery using AES-GCM.
|
|
8
|
+
* Key type: 32-byte symmetric wrapping key (not AES-KW or AES-KWP).
|
|
9
|
+
* Scheme: BIP-85 at `m/83696968'/META'/MASK'/index'`, then
|
|
10
|
+
* HKDF-SHA256 via `KeyRoot.deriveSecret` with length 32 in `@metamask/keyring-sdk`.
|
|
11
|
+
* This purpose string is immutable; a new use/version requires a new member.
|
|
12
|
+
*/
|
|
13
|
+
readonly MoneyAccountMpcDeviceShareWrappingKey: "metamask:money-account:mpc:device-share:wrapping-key:v1";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A registered purpose value. Use `KeyDerivationPurpose` to also accept
|
|
17
|
+
* consumer-defined purposes.
|
|
18
|
+
*/
|
|
19
|
+
export type Purpose = (typeof Purpose)[keyof typeof Purpose];
|
|
20
|
+
//# sourceMappingURL=purposes.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purposes.d.mts","sourceRoot":"","sources":["../src/purposes.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,OAAO;IAClB;;;;;;;OAOG;;CAGoD,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registered purposes for domain-separated secret derivation.
|
|
3
|
+
*/
|
|
4
|
+
export const Purpose = {
|
|
5
|
+
/**
|
|
6
|
+
* Owner: Money Accounts.
|
|
7
|
+
* Intended use: wrap MPC device-share backups for MFA recovery using AES-GCM.
|
|
8
|
+
* Key type: 32-byte symmetric wrapping key (not AES-KW or AES-KWP).
|
|
9
|
+
* Scheme: BIP-85 at `m/83696968'/META'/MASK'/index'`, then
|
|
10
|
+
* HKDF-SHA256 via `KeyRoot.deriveSecret` with length 32 in `@metamask/keyring-sdk`.
|
|
11
|
+
* This purpose string is immutable; a new use/version requires a new member.
|
|
12
|
+
*/
|
|
13
|
+
MoneyAccountMpcDeviceShareWrappingKey: 'metamask:money-account:mpc:device-share:wrapping-key:v1',
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=purposes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purposes.mjs","sourceRoot":"","sources":["../src/purposes.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB;;;;;;;OAOG;IACH,qCAAqC,EACnC,yDAAyD;CACJ,CAAC","sourcesContent":["import type { KeyDerivationPurpose } from './types';\n\n/**\n * Registered purposes for domain-separated secret derivation.\n */\nexport const Purpose = {\n /**\n * Owner: Money Accounts.\n * Intended use: wrap MPC device-share backups for MFA recovery using AES-GCM.\n * Key type: 32-byte symmetric wrapping key (not AES-KW or AES-KWP).\n * Scheme: BIP-85 at `m/83696968'/META'/MASK'/index'`, then\n * HKDF-SHA256 via `KeyRoot.deriveSecret` with length 32 in `@metamask/keyring-sdk`.\n * This purpose string is immutable; a new use/version requires a new member.\n */\n MoneyAccountMpcDeviceShareWrappingKey:\n 'metamask:money-account:mpc:device-share:wrapping-key:v1',\n} as const satisfies Record<string, KeyDerivationPurpose>;\n\n/**\n * A registered purpose value. Use `KeyDerivationPurpose` to also accept\n * consumer-defined purposes.\n */\nexport type Purpose = (typeof Purpose)[keyof typeof Purpose];\n"]}
|
package/dist/types.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A namespaced key-derivation purpose with a stable, non-empty scope and a\n * non-negative integer version. Callers are responsible for these constraints;\n * the template type alone cannot enforce all of them.\n */\nexport type KeyDerivationPurpose = `metamask:${string}:v${number}`;\n"]}
|
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A namespaced key-derivation purpose with a stable, non-empty scope and a
|
|
3
|
+
* non-negative integer version. Callers are responsible for these constraints;
|
|
4
|
+
* the template type alone cannot enforce all of them.
|
|
5
|
+
*/
|
|
6
|
+
export type KeyDerivationPurpose = `metamask:${string}:v${number}`;
|
|
7
|
+
//# sourceMappingURL=types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,YAAY,MAAM,KAAK,MAAM,EAAE,CAAC"}
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A namespaced key-derivation purpose with a stable, non-empty scope and a
|
|
3
|
+
* non-negative integer version. Callers are responsible for these constraints;
|
|
4
|
+
* the template type alone cannot enforce all of them.
|
|
5
|
+
*/
|
|
6
|
+
export type KeyDerivationPurpose = `metamask:${string}:v${number}`;
|
|
7
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,YAAY,MAAM,KAAK,MAAM,EAAE,CAAC"}
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A namespaced key-derivation purpose with a stable, non-empty scope and a\n * non-negative integer version. Callers are responsible for these constraints;\n * the template type alone cannot enforce all of them.\n */\nexport type KeyDerivationPurpose = `metamask:${string}:v${number}`;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,85 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/key-derivation-purposes",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared registry of MetaMask key-derivation purposes",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"key-derivation",
|
|
7
|
+
"metamask"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/MetaMask/accounts/tree/main/packages/key-derivation-purposes#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/MetaMask/accounts/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/MetaMask/accounts.git"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"main": "./dist/index.cjs",
|
|
23
|
+
"types": "./dist/index.d.cts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"import": {
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
28
|
+
"default": "./dist/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"require": {
|
|
31
|
+
"types": "./dist/index.d.cts",
|
|
32
|
+
"default": "./dist/index.cjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public",
|
|
39
|
+
"registry": "https://registry.npmjs.org/"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
|
|
43
|
+
"build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
|
|
44
|
+
"build:clean": "yarn build --clean",
|
|
45
|
+
"build:docs": "typedoc",
|
|
46
|
+
"changelog:update": "../../scripts/update-changelog.sh @metamask/key-derivation-purposes",
|
|
47
|
+
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/key-derivation-purposes",
|
|
48
|
+
"since-latest-release": "../../scripts/since-latest-release.sh",
|
|
49
|
+
"test": "yarn test:source && yarn test:types",
|
|
50
|
+
"test:clean": "jest --clearCache",
|
|
51
|
+
"test:source": "jest --reporters=jest-silent-reporter",
|
|
52
|
+
"test:types": "../../scripts/tsd-test.sh ./src",
|
|
53
|
+
"test:verbose": "jest --verbose",
|
|
54
|
+
"test:watch": "jest --watch"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@lavamoat/allow-scripts": "^5.1.0",
|
|
58
|
+
"@lavamoat/preinstall-always-fail": "^3.0.1",
|
|
59
|
+
"@metamask/auto-changelog": "^6.1.0",
|
|
60
|
+
"@ts-bridge/cli": "^0.6.3",
|
|
61
|
+
"@types/jest": "^29.5.12",
|
|
62
|
+
"@types/node": "^20.19.0",
|
|
63
|
+
"depcheck": "^1.4.7",
|
|
64
|
+
"jest": "^29.5.0",
|
|
65
|
+
"ts-jest": "^29.0.5",
|
|
66
|
+
"ts-node": "^10.9.2",
|
|
67
|
+
"tsd": "^0.31.0",
|
|
68
|
+
"typedoc": "^0.25.13",
|
|
69
|
+
"typescript": "~5.8.3"
|
|
70
|
+
},
|
|
71
|
+
"tsd": {
|
|
72
|
+
"compilerOptions": {
|
|
73
|
+
"composite": "false"
|
|
74
|
+
},
|
|
75
|
+
"directory": "src"
|
|
76
|
+
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=22"
|
|
79
|
+
},
|
|
80
|
+
"lavamoat": {
|
|
81
|
+
"allowScripts": {
|
|
82
|
+
"@lavamoat/preinstall-always-fail": false
|
|
83
|
+
}
|
|
84
|
+
}
|
|
6
85
|
}
|