rootcard 0.0.0-stage → 0.0.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 +7 -0
- package/LICENSE +21 -0
- package/README.md +5 -2
- package/package.json +19 -4
- package/src/index.js +22 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hexagon and the rootcard contributors
|
|
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,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# rootcard (npm)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Core library of [rootcard](https://github.com/Hexagon/rootcard) in plain ES modules: a portable, self-certifying identity for
|
|
4
|
+
online logins. Zero dependencies, no build step, runs in browsers and Node (WebCrypto).
|
|
5
|
+
|
|
6
|
+
Status: skeleton. See the repository's `docs/PLAN.md`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rootcard",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "A portable, self-certifying identity for online logins (core library, zero dependencies, WebCrypto)",
|
|
5
|
+
"keywords": ["identity", "authentication", "login", "ed25519", "webcrypto", "self-certifying"],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/Hexagon/rootcard",
|
|
8
|
+
"repository": { "type": "git", "url": "git+https://github.com/Hexagon/rootcard.git", "directory": "packages/rootcard" },
|
|
9
|
+
"bugs": "https://github.com/Hexagon/rootcard/issues",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./src/index.js",
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": ["src/", "README.md", "CHANGELOG.md", "LICENSE"],
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"engines": { "node": ">=20" },
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "node --test"
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// rootcard: a portable, self-certifying identity for online logins.
|
|
2
|
+
//
|
|
3
|
+
// This package mirrors the `rootcard` Rust crate byte for byte. The normative format is spec/SPEC.md in the repository,
|
|
4
|
+
// and spec/vectors/ holds the shared test vectors both implementations must reproduce.
|
|
5
|
+
//
|
|
6
|
+
// Status: skeleton (phase 0). Nothing here is stable.
|
|
7
|
+
|
|
8
|
+
/** Version of the wire and storage format described by the specification. */
|
|
9
|
+
export const FORMAT_VERSION = 1;
|
|
10
|
+
|
|
11
|
+
/** Prefix of every domain-separation label (`rootcard/<purpose>/v<n>`). */
|
|
12
|
+
export const LABEL_PREFIX = "rootcard/";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Build a domain-separation label, e.g. `label("id", 1) === "rootcard/id/v1"`.
|
|
16
|
+
* @param {string} purpose
|
|
17
|
+
* @param {number} version
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
export function label(purpose, version) {
|
|
21
|
+
return `${LABEL_PREFIX}${purpose}/v${version}`;
|
|
22
|
+
}
|