@blockchaincommons/tags 1.0.0-beta.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/LICENSE +21 -0
- package/MIGRATION.md +85 -0
- package/README.md +142 -0
- package/dist/index.cjs +349 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +186 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +186 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +280 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +105 -0
- package/src/index.ts +81 -0
- package/src/register.ts +24 -0
- package/src/tags.ts +314 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Unless otherwise noted (either in /README.md or in the file's header comments) the contents of this repository are released under the following license:
|
|
2
|
+
|
|
3
|
+
BSD-2-Clause Plus Patent License
|
|
4
|
+
|
|
5
|
+
SPDX-License-Identifier: [BSD-2-Clause-Patent](https://spdx.org/licenses/BSD-2-Clause-Patent.html)
|
|
6
|
+
|
|
7
|
+
Copyright © 2019-2026 Blockchain Commons, LLC
|
|
8
|
+
|
|
9
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
10
|
+
|
|
11
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
13
|
+
Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by:
|
|
14
|
+
|
|
15
|
+
(a) their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of contributors, in source or binary form) alone; or
|
|
16
|
+
(b) combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution.
|
|
17
|
+
Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this license, whether expressly, by implication, estoppel or otherwise.
|
|
18
|
+
|
|
19
|
+
DISCLAIMER
|
|
20
|
+
|
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/MIGRATION.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Migrating from `@bcts/tags` to `@blockchaincommons/tags`
|
|
2
|
+
|
|
3
|
+
**Every tag value and name is unchanged.** The 75-entry table and the
|
|
4
|
+
registry `registerTags()` produces are frozen as golden vectors and
|
|
5
|
+
cross-validated against the Rust reference `bc-tags 0.12.0`. What changed is
|
|
6
|
+
the spelling of the constants, their immutability, and the dcbor they build
|
|
7
|
+
on.
|
|
8
|
+
|
|
9
|
+
## TL;DR checklist
|
|
10
|
+
|
|
11
|
+
- [ ] Replace the `@bcts/tags` dependency with `@blockchaincommons/tags`.
|
|
12
|
+
- [ ] Rewrite import specifiers: `@bcts/tags` becomes `@blockchaincommons/tags`.
|
|
13
|
+
- [ ] Every current tag is spelled `TAG_<NAME>`: `ENVELOPE` → `TAG_ENVELOPE`,
|
|
14
|
+
`SEED` → `TAG_SEED`, `JSON` → `TAG_JSON`, … (the Rust reference's and
|
|
15
|
+
dcbor's spelling). Delete any `import { X as TAG_X }` alias.
|
|
16
|
+
- [ ] Every constant, `LEGACY_TAGS` and `ALL_TAGS` are frozen; code that
|
|
17
|
+
mutated one now throws a `TypeError`.
|
|
18
|
+
- [ ] The tags are now canonical `@blockchaincommons/dcbor` `Tag` values, not
|
|
19
|
+
`dcbor-compat` ones. If you build tagged CBOR with them, use dcbor.
|
|
20
|
+
- [ ] `registerTagsIn(store)` → `registerTags(store)`; `registerTags()` is unchanged.
|
|
21
|
+
- [ ] `SEED_V1`, `EC_KEY_V1`, `SSKR_SHARE_V1` and the other `*_V1` tags moved
|
|
22
|
+
under `LEGACY_TAGS` (`LEGACY_TAGS.SEED_V1`).
|
|
23
|
+
- [ ] Import `getGlobalTagsStore` and `TagsStore` from
|
|
24
|
+
`@blockchaincommons/dcbor`; this package no longer re-exports them.
|
|
25
|
+
- [ ] Raise your Node floor to **22.12** and TypeScript to **>= 5.7**.
|
|
26
|
+
|
|
27
|
+
## 1. Package name and imports
|
|
28
|
+
|
|
29
|
+
```diff
|
|
30
|
+
- import { ENVELOPE, registerTags, getGlobalTagsStore } from "@bcts/tags";
|
|
31
|
+
+ import { TAG_ENVELOPE, registerTags } from "@blockchaincommons/tags";
|
|
32
|
+
+ import { getGlobalTagsStore } from "@blockchaincommons/dcbor";
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 2. Renames
|
|
36
|
+
|
|
37
|
+
| `@bcts/tags` | `@blockchaincommons/tags` |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `ENVELOPE`, `LEAF`, `SEED`, `JSON`, `XID`, … (66 current tags) | `TAG_ENVELOPE`, `TAG_LEAF`, `TAG_SEED`, `TAG_JSON`, `TAG_XID`, … — the same name with the `TAG_` prefix, for every one of the 66 |
|
|
40
|
+
| `SEED_V1`, `EC_KEY_V1`, `SSKR_SHARE_V1`, `HDKEY_V1`, `DERIVATION_PATH_V1`, `USE_INFO_V1`, `OUTPUT_DESCRIPTOR_V1`, `PSBT_V1`, `ACCOUNT_V1` | `LEGACY_TAGS.SEED_V1`, … (same names as keys) |
|
|
41
|
+
| `registerTagsIn(store)` | `registerTags(store)` |
|
|
42
|
+
| `registerTags()` | unchanged (registers into the global store) |
|
|
43
|
+
| `getGlobalTagsStore`, `TagsStore` (re-exported) | import from `@blockchaincommons/dcbor` |
|
|
44
|
+
| — | `ALL_TAGS: readonly Tag[]`, every tag in registration order |
|
|
45
|
+
| mutable objects | every constant, `LEGACY_TAGS` and `ALL_TAGS` are `Object.freeze`d |
|
|
46
|
+
|
|
47
|
+
## 3. Legacy tags
|
|
48
|
+
|
|
49
|
+
The nine `*_V1` tags (300–311) are superseded and accepted on decode only.
|
|
50
|
+
They are grouped so that they do not read as peers of the current tags:
|
|
51
|
+
|
|
52
|
+
```diff
|
|
53
|
+
- import { SEED, SEED_V1 } from "@bcts/tags";
|
|
54
|
+
- const tags = [SEED, SEED_V1];
|
|
55
|
+
+ import { TAG_SEED, LEGACY_TAGS } from "@blockchaincommons/tags";
|
|
56
|
+
+ const tags = [TAG_SEED, LEGACY_TAGS.SEED_V1];
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
They are still in `ALL_TAGS` and still registered by `registerTags()`.
|
|
60
|
+
|
|
61
|
+
## 4. Registration semantics
|
|
62
|
+
|
|
63
|
+
`registerTags(store)` calls dcbor's `registerStandardTags(store)` (date and
|
|
64
|
+
bignum tags with their summarizers) and then registers `ALL_TAGS`. It is
|
|
65
|
+
idempotent. Registering a value that is already present under a *different*
|
|
66
|
+
name throws, as dcbor's store does.
|
|
67
|
+
|
|
68
|
+
## 5. Identity and immutability
|
|
69
|
+
|
|
70
|
+
Tags compare by value: `TAG_ENVELOPE === Tag.from(200, "envelope")` is
|
|
71
|
+
`false` (two objects). Write `Tag.equals(a, b)` or `a.value === b.value`.
|
|
72
|
+
|
|
73
|
+
Every constant is frozen. `(TAG_ENVELOPE as any).name = "x"` used to
|
|
74
|
+
succeed in `@bcts/tags` and silently rename the wire tag for every later
|
|
75
|
+
`registerTags()`; it now throws a `TypeError`.
|
|
76
|
+
|
|
77
|
+
## 6. Node and TypeScript floors
|
|
78
|
+
|
|
79
|
+
Node **22.12** and TypeScript **5.7**. The IIFE / global-script build is
|
|
80
|
+
gone; use the ESM or CJS entry.
|
|
81
|
+
|
|
82
|
+
## 7. What did not change
|
|
83
|
+
|
|
84
|
+
- Every tag value and name, and the registration order.
|
|
85
|
+
- `registerTags()` with no argument.
|
package/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Blockchain Commons CBOR Tags Registry
|
|
2
|
+
|
|
3
|
+
### _by Leonardo Custodio_
|
|
4
|
+
|
|
5
|
+
**`bc-tags-ts`** is the registry of CBOR tags used across Blockchain Commons specifications, with their names and assigned values.
|
|
6
|
+
|
|
7
|
+
## Installation Instructions
|
|
8
|
+
|
|
9
|
+
[@blockchaincommons/tags](https://www.npmjs.com/package/@blockchaincommons/tags) is published to npm. Install it with your package manager of choice:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @blockchaincommons/tags
|
|
13
|
+
# or
|
|
14
|
+
pnpm add @blockchaincommons/tags
|
|
15
|
+
# or
|
|
16
|
+
yarn add @blockchaincommons/tags
|
|
17
|
+
# or
|
|
18
|
+
bun add @blockchaincommons/tags
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage Instructions
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { TAG_ENVELOPE, TAG_LEAF, LEGACY_TAGS, ALL_TAGS, registerTags } from "@blockchaincommons/tags";
|
|
25
|
+
import { Tag, TagsStore, getGlobalTagsStore, taggedValue } from "@blockchaincommons/dcbor";
|
|
26
|
+
|
|
27
|
+
// Name every Blockchain Commons tag in the global dcbor store (idempotent).
|
|
28
|
+
registerTags();
|
|
29
|
+
getGlobalTagsStore().nameForValue(TAG_ENVELOPE.value); // "envelope"
|
|
30
|
+
|
|
31
|
+
// Or into a store of your own. A value already registered under a
|
|
32
|
+
// different name throws (dcbor's Error); the same name is a no-op.
|
|
33
|
+
const store = new TagsStore();
|
|
34
|
+
registerTags(store);
|
|
35
|
+
|
|
36
|
+
// A Tag carries the number and the name; use it wherever dcbor takes a tag.
|
|
37
|
+
taggedValue(TAG_ENVELOPE, taggedValue(TAG_LEAF, "Hello.")); // 200(201("Hello."))
|
|
38
|
+
|
|
39
|
+
// Tags compare by value, never by reference.
|
|
40
|
+
Tag.equals(TAG_ENVELOPE, Tag.from(200, "envelope")); // true
|
|
41
|
+
TAG_ENVELOPE === Tag.from(200, "envelope"); // false — two objects
|
|
42
|
+
|
|
43
|
+
// Every constant is frozen: a wire name cannot be rewritten by mistake.
|
|
44
|
+
Object.isFrozen(TAG_ENVELOPE); // true
|
|
45
|
+
|
|
46
|
+
// Legacy (decode-only) tags are grouped; everything is iterable via ALL_TAGS.
|
|
47
|
+
LEGACY_TAGS.SEED_V1.value; // 300
|
|
48
|
+
ALL_TAGS.length; // 75
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Runnable examples live in the [`examples/`](https://github.com/BlockchainCommons/bc-tags-ts/tree/master/examples) directory.
|
|
52
|
+
|
|
53
|
+
## Status - Beta
|
|
54
|
+
|
|
55
|
+
`bc-tags-ts` is currently under active development and in beta testing. It should not be used for production tasks until it has had further testing and auditing. See [Blockchain Commons' Development Phases](https://github.com/BlockchainCommons/Community/blob/master/release-path.md).
|
|
56
|
+
|
|
57
|
+
### Version History
|
|
58
|
+
|
|
59
|
+
- **1.0.0-beta.1 (September 9, 2026)** - Initial beta implementation.
|
|
60
|
+
|
|
61
|
+
### Roadmap
|
|
62
|
+
|
|
63
|
+
- Continued testing and auditing on the path from beta to a stable **1.0.0** release.
|
|
64
|
+
- Continued parity with the Rust reference implementation as it evolves (see [`RUST_DIVERGENCES.md`](./RUST_DIVERGENCES.md)).
|
|
65
|
+
|
|
66
|
+
### Dependencies
|
|
67
|
+
|
|
68
|
+
`@blockchaincommons/tags` depends on `@blockchaincommons/dcbor` at runtime.
|
|
69
|
+
|
|
70
|
+
To build and work on this library, you'll need the following tools:
|
|
71
|
+
|
|
72
|
+
- [Node.js](https://nodejs.org/) >= 22.12 - JavaScript runtime.
|
|
73
|
+
- [Bun](https://bun.sh/) - used to install dependencies and run scripts (any node package manager works).
|
|
74
|
+
- [TypeScript](https://www.typescriptlang.org/) >= 5.7 - language and type checker.
|
|
75
|
+
|
|
76
|
+
### Derived from ...
|
|
77
|
+
|
|
78
|
+
This `bc-tags-ts` project is either derived from or was inspired by:
|
|
79
|
+
|
|
80
|
+
- [BlockchainCommons/bc-tags-rust](https://github.com/BlockchainCommons/bc-tags-rust) - The reference Rust implementation, by [Wolf McNally](https://github.com/wolfmcnally).
|
|
81
|
+
- [paritytech/bcts](https://github.com/paritytech/bcts) - A TypeScript port of many Blockchain Commons' specs, by [Parity Technologies](https://github.com/paritytech).
|
|
82
|
+
|
|
83
|
+
## Financial Support
|
|
84
|
+
|
|
85
|
+
`bc-tags-ts` is a project of [Blockchain Commons](https://www.blockchaincommons.com/). We are proudly a "not-for-profit" social benefit corporation committed to open source & open development. Our work is funded entirely by donations and collaborative partnerships with people like you. Every contribution will be spent on building open tools, technologies, and techniques that sustain and advance blockchain and internet security infrastructure and promote an open web.
|
|
86
|
+
|
|
87
|
+
To financially support further development of `bc-tags-ts` and other projects, please consider becoming a Patron of Blockchain Commons through ongoing monthly patronage as a [GitHub Sponsor](https://github.com/sponsors/BlockchainCommons). You can also support Blockchain Commons with bitcoins at our [BTCPay Server](https://btcpay.blockchaincommons.com/).
|
|
88
|
+
|
|
89
|
+
## Contributing
|
|
90
|
+
|
|
91
|
+
We encourage public contributions through issues and pull requests! Please review [CONTRIBUTING.md](./CONTRIBUTING.md) for details on our development process. All contributions to this repository require a GPG signed [Contributor License Agreement](./CLA.md).
|
|
92
|
+
|
|
93
|
+
### Discussions
|
|
94
|
+
|
|
95
|
+
The best place to talk about Blockchain Commons and its projects is in our GitHub Discussions areas.
|
|
96
|
+
|
|
97
|
+
[**Gordian Developer Community**](https://github.com/BlockchainCommons/Gordian-Developer-Community/discussions). For standards and open-source developers who want to talk about interoperable wallet specifications, please use the Discussions area of the [Gordian Developer Community repo](https://github.com/BlockchainCommons/Gordian-Developer-Community/discussions). This is where you talk about Gordian specifications such as [Gordian Envelope](https://github.com/BlockchainCommons/Gordian/tree/master/Envelope#articles), [bc-shamir](https://github.com/BlockchainCommons/bc-shamir), [Sharded Secret Key Reconstruction](https://github.com/BlockchainCommons/bc-sskr), and [bc-ur](https://github.com/BlockchainCommons/bc-ur) as well as the larger [Gordian Architecture](https://github.com/BlockchainCommons/Gordian/blob/master/Docs/Overview-Architecture.md), its [Principles](https://github.com/BlockchainCommons/Gordian#gordian-principles) of independence, privacy, resilience, and openness, and its macro-architectural ideas such as functional partition (including airgapping, the original name of this community).
|
|
98
|
+
|
|
99
|
+
[**Gordian User Community**](https://github.com/BlockchainCommons/Gordian/discussions). For users of the Gordian reference apps, including [Gordian Coordinator](https://github.com/BlockchainCommons/iOS-GordianCoordinator), [Gordian Seed Tool](https://github.com/BlockchainCommons/GordianSeedTool-iOS), [Gordian Server](https://github.com/BlockchainCommons/GordianServer-macOS), [Gordian Wallet](https://github.com/BlockchainCommons/GordianWallet-iOS), and [SpotBit](https://github.com/BlockchainCommons/spotbit) as well as our whole series of [CLI apps](https://github.com/BlockchainCommons/Gordian/blob/master/Docs/Overview-Apps.md#cli-apps). This is a place to talk about bug reports and feature requests as well as to explore how our reference apps embody the [Gordian Principles](https://github.com/BlockchainCommons/Gordian#gordian-principles).
|
|
100
|
+
|
|
101
|
+
[**Blockchain Commons Discussions**](https://github.com/BlockchainCommons/Community/discussions). For developers, interns, and patrons of Blockchain Commons, please use the discussions area of the [Community repo](https://github.com/BlockchainCommons/Community) to talk about general Blockchain Commons issues, the intern program, or topics other than those covered by the [Gordian Developer Community](https://github.com/BlockchainCommons/Gordian-Developer-Community/discussions) or the
|
|
102
|
+
[Gordian User Community](https://github.com/BlockchainCommons/Gordian/discussions).
|
|
103
|
+
|
|
104
|
+
### Other Questions & Problems
|
|
105
|
+
|
|
106
|
+
As an open-source, open-development community, Blockchain Commons does not have the resources to provide direct support of our projects. Please consider the discussions area as a locale where you might get answers to questions. Alternatively, please use this repository's [issues](https://github.com/BlockchainCommons/bc-tags-ts/issues) feature. Unfortunately, we can not make any promises on response time.
|
|
107
|
+
|
|
108
|
+
If your company requires support to use our projects, please feel free to contact us directly about options. We may be able to offer you a contract for support from one of our contributors, or we might be able to point you to another entity who can offer the contractual support that you need.
|
|
109
|
+
|
|
110
|
+
### Credits
|
|
111
|
+
|
|
112
|
+
The following people directly contributed to this repository. You can add your name here by getting involved. The first step is learning how to contribute from our [CONTRIBUTING.md](./CONTRIBUTING.md) documentation.
|
|
113
|
+
|
|
114
|
+
| Name | Role | Github | Email | GPG Fingerprint |
|
|
115
|
+
| ----------------- | ------------------- | ------------------------------------------------- | ------------------------------------- | -------------------------------------------------- |
|
|
116
|
+
| Christopher Allen | Principal Architect | [@ChristopherA](https://github.com/ChristopherA) | \<ChristopherA@LifeWithAlacrity.com\> | FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED |
|
|
117
|
+
| Wolf McNally | Lead Researcher/Engineer | [@wolfmcnally](https://github.com/wolfmcnally) | \<Wolf@WolfMcNally.com\> | 9436 52EE 3844 1760 C3DC 3536 4B6C 2FCF 8947 80AE |
|
|
118
|
+
| Leonardo Custodio | Software Engineer | [@leonardocustodio](https://github.com/leonardocustodio) | \<leonardo@snowpine.io\> | 59DA D997 67EF 3BAB 2B90 D057 5384 DEF3 B582 450D |
|
|
119
|
+
|
|
120
|
+
### Contributing Sponsor
|
|
121
|
+
|
|
122
|
+
**Blockchain Commons CBOR Tags Registry for TypeScript** was produced as a collaboration between Blockchain Commons and one of our patrons, [Parity Technologies](https://parity.io): Parity wrote the wrappers based on Blockchain Commons' specifications and reference libraries. Blockchain Commons is dedicated to not just creating open infrastructure on our own, but also coordinating the work of other companies in benefiting the Commons. Thanks to Parity for working directly with us in this manner.
|
|
123
|
+
|
|
124
|
+

|
|
125
|
+
|
|
126
|
+
## Responsible Disclosure
|
|
127
|
+
|
|
128
|
+
We want to keep all of our software safe for everyone. If you have discovered a security vulnerability, we appreciate your help in disclosing it to us in a responsible manner. We are unfortunately not able to offer bug bounties at this time.
|
|
129
|
+
|
|
130
|
+
We do ask that you offer us good faith and use best efforts not to leak information or harm any user, their data, or our developer community. Please give us a reasonable amount of time to fix the issue before you publish it. Do not defraud our users or us in the process of discovery. We promise not to bring legal action against researchers who point out a problem provided they do their best to follow the these guidelines.
|
|
131
|
+
|
|
132
|
+
### Reporting a Vulnerability
|
|
133
|
+
|
|
134
|
+
Please report suspected security vulnerabilities in private via email to ChristopherA@BlockchainCommons.com (do not use this email for support). Please do NOT create publicly viewable issues for suspected security vulnerabilities.
|
|
135
|
+
|
|
136
|
+
The following keys may be used to communicate sensitive information to developers:
|
|
137
|
+
|
|
138
|
+
| Name | Fingerprint |
|
|
139
|
+
| ----------------- | -------------------------------------------------- |
|
|
140
|
+
| Christopher Allen | FDFE 14A5 4ECB 30FC 5D22 74EF F8D3 6C91 3574 05ED |
|
|
141
|
+
|
|
142
|
+
You can import a key by running the following command with that individual’s fingerprint: `gpg --recv-keys "<fingerprint>"` Ensure that you put quotes around fingerprints that contain spaces.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _blockchaincommons_dcbor = require("@blockchaincommons/dcbor");
|
|
3
|
+
//#region src/tags.ts
|
|
4
|
+
/**
|
|
5
|
+
* The Blockchain Commons CBOR tag registry.
|
|
6
|
+
*
|
|
7
|
+
* Values are the CBOR tag numbers on the wire; names are wire too, since
|
|
8
|
+
* `uniform-resources` derives UR types from them (`ur:envelope`). Neither
|
|
9
|
+
* may change without a specification change. Every constant is frozen.
|
|
10
|
+
*
|
|
11
|
+
* Tags compare by value: `TAG_ENVELOPE === Tag.from(200, "envelope")` is
|
|
12
|
+
* `false` (two objects), `Tag.equals(a, b)` and `a.value === b.value` are
|
|
13
|
+
* the comparisons to write.
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md
|
|
16
|
+
* @module tags
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* One immutable tag. dcbor's `Tag.from` returns a plain object whose
|
|
20
|
+
* `readonly` is a compile-time promise only; the names here are wire,
|
|
21
|
+
* so nothing may rewrite them process-wide.
|
|
22
|
+
*/
|
|
23
|
+
const tag = (value, name) => Object.freeze(_blockchaincommons_dcbor.Tag.from(value, name));
|
|
24
|
+
/** #6.32: URI (RFC 8949 §3.4.5.3), named `url` in this stack. */
|
|
25
|
+
const TAG_URI = tag(_blockchaincommons_dcbor.TAG_URI, "url");
|
|
26
|
+
/** #6.37: binary UUID (RFC 4122). */
|
|
27
|
+
const TAG_UUID = tag(_blockchaincommons_dcbor.TAG_UUID, "uuid");
|
|
28
|
+
/** #6.24: encoded CBOR data item; the pre-#6.201 Envelope leaf header, accepted on decode only. */
|
|
29
|
+
const TAG_ENCODED_CBOR = tag(_blockchaincommons_dcbor.TAG_ENCODED_CBOR, "encoded-cbor");
|
|
30
|
+
/** #6.200: Gordian Envelope. */
|
|
31
|
+
const TAG_ENVELOPE = tag(200, "envelope");
|
|
32
|
+
/** #6.201: dCBOR data item; the Envelope leaf case. */
|
|
33
|
+
const TAG_LEAF = tag(201, "leaf");
|
|
34
|
+
/** #6.262: byte string holding UTF-8 JSON text. */
|
|
35
|
+
const TAG_JSON = tag(262, "json");
|
|
36
|
+
/** #6.40000: known value, a registered unsigned integer with a fixed meaning. */
|
|
37
|
+
const TAG_KNOWN_VALUE = tag(4e4, "known-value");
|
|
38
|
+
/** #6.40001: SHA-256 digest. */
|
|
39
|
+
const TAG_DIGEST = tag(40001, "digest");
|
|
40
|
+
/** #6.40002: encrypted message (IETF ChaCha20-Poly1305). */
|
|
41
|
+
const TAG_ENCRYPTED = tag(40002, "encrypted");
|
|
42
|
+
/** #6.40003: DEFLATE-compressed data with the digest of the original. */
|
|
43
|
+
const TAG_COMPRESSED = tag(40003, "compressed");
|
|
44
|
+
/** #6.40004: request. */
|
|
45
|
+
const TAG_REQUEST = tag(40004, "request");
|
|
46
|
+
/** #6.40005: response. */
|
|
47
|
+
const TAG_RESPONSE = tag(40005, "response");
|
|
48
|
+
/** #6.40006: function identifier. */
|
|
49
|
+
const TAG_FUNCTION = tag(40006, "function");
|
|
50
|
+
/** #6.40007: parameter identifier. */
|
|
51
|
+
const TAG_PARAMETER = tag(40007, "parameter");
|
|
52
|
+
/** #6.40008: placeholder. */
|
|
53
|
+
const TAG_PLACEHOLDER = tag(40008, "placeholder");
|
|
54
|
+
/** #6.40009: replacement. */
|
|
55
|
+
const TAG_REPLACEMENT = tag(40009, "replacement");
|
|
56
|
+
/** #6.40010: X25519 key-agreement private key. */
|
|
57
|
+
const TAG_X25519_PRIVATE_KEY = tag(40010, "agreement-private-key");
|
|
58
|
+
/** #6.40011: X25519 key-agreement public key. */
|
|
59
|
+
const TAG_X25519_PUBLIC_KEY = tag(40011, "agreement-public-key");
|
|
60
|
+
/** #6.40012: apparently random identifier (32 bytes). */
|
|
61
|
+
const TAG_ARID = tag(40012, "arid");
|
|
62
|
+
/** #6.40013: a signing and an encapsulation private key together. */
|
|
63
|
+
const TAG_PRIVATE_KEYS = tag(40013, "crypto-prvkeys");
|
|
64
|
+
/** #6.40014: nonce. */
|
|
65
|
+
const TAG_NONCE = tag(40014, "nonce");
|
|
66
|
+
/** #6.40015: password. */
|
|
67
|
+
const TAG_PASSWORD = tag(40015, "password");
|
|
68
|
+
/** #6.40016: private key base, the material every other key derives from. */
|
|
69
|
+
const TAG_PRIVATE_KEY_BASE = tag(40016, "crypto-prvkey-base");
|
|
70
|
+
/** #6.40017: a signing and an encapsulation public key together. */
|
|
71
|
+
const TAG_PUBLIC_KEYS = tag(40017, "crypto-pubkeys");
|
|
72
|
+
/** #6.40018: salt. */
|
|
73
|
+
const TAG_SALT = tag(40018, "salt");
|
|
74
|
+
/** #6.40019: sealed message, encrypted to a recipient's public keys. */
|
|
75
|
+
const TAG_SEALED_MESSAGE = tag(40019, "crypto-sealed");
|
|
76
|
+
/** #6.40020: signature. */
|
|
77
|
+
const TAG_SIGNATURE = tag(40020, "signature");
|
|
78
|
+
/** #6.40021: signing private key. */
|
|
79
|
+
const TAG_SIGNING_PRIVATE_KEY = tag(40021, "signing-private-key");
|
|
80
|
+
/** #6.40022: signing public key. */
|
|
81
|
+
const TAG_SIGNING_PUBLIC_KEY = tag(40022, "signing-public-key");
|
|
82
|
+
/** #6.40023: symmetric encryption key. */
|
|
83
|
+
const TAG_SYMMETRIC_KEY = tag(40023, "crypto-key");
|
|
84
|
+
/** #6.40024: extensible identifier (XID). */
|
|
85
|
+
const TAG_XID = tag(40024, "xid");
|
|
86
|
+
/** #6.40025: reference to an identifier by a prefix of it. */
|
|
87
|
+
const TAG_REFERENCE = tag(40025, "reference");
|
|
88
|
+
/** #6.40026: distributed function call event. */
|
|
89
|
+
const TAG_EVENT = tag(40026, "event");
|
|
90
|
+
/** #6.40027: symmetric key wrapped for a recipient. */
|
|
91
|
+
const TAG_ENCRYPTED_KEY = tag(40027, "encrypted-key");
|
|
92
|
+
/** #6.40100: ML-KEM (FIPS 203) private key. */
|
|
93
|
+
const TAG_MLKEM_PRIVATE_KEY = tag(40100, "mlkem-private-key");
|
|
94
|
+
/** #6.40101: ML-KEM (FIPS 203) public key. */
|
|
95
|
+
const TAG_MLKEM_PUBLIC_KEY = tag(40101, "mlkem-public-key");
|
|
96
|
+
/** #6.40102: ML-KEM (FIPS 203) encapsulated ciphertext. */
|
|
97
|
+
const TAG_MLKEM_CIPHERTEXT = tag(40102, "mlkem-ciphertext");
|
|
98
|
+
/** #6.40103: ML-DSA (FIPS 204) private key. */
|
|
99
|
+
const TAG_MLDSA_PRIVATE_KEY = tag(40103, "mldsa-private-key");
|
|
100
|
+
/** #6.40104: ML-DSA (FIPS 204) public key. */
|
|
101
|
+
const TAG_MLDSA_PUBLIC_KEY = tag(40104, "mldsa-public-key");
|
|
102
|
+
/** #6.40105: ML-DSA (FIPS 204) signature. */
|
|
103
|
+
const TAG_MLDSA_SIGNATURE = tag(40105, "mldsa-signature");
|
|
104
|
+
/** #6.40300: cryptographic seed. */
|
|
105
|
+
const TAG_SEED = tag(40300, "seed");
|
|
106
|
+
/** #6.40303: BIP-32 hierarchical deterministic key. */
|
|
107
|
+
const TAG_HDKEY = tag(40303, "hdkey");
|
|
108
|
+
/** #6.40304: BIP-32 derivation path. */
|
|
109
|
+
const TAG_DERIVATION_PATH = tag(40304, "keypath");
|
|
110
|
+
/** #6.40305: coin type and network (`coin-info`). */
|
|
111
|
+
const TAG_USE_INFO = tag(40305, "coin-info");
|
|
112
|
+
/** #6.40306: elliptic-curve key. */
|
|
113
|
+
const TAG_EC_KEY = tag(40306, "eckey");
|
|
114
|
+
/** #6.40307: address. */
|
|
115
|
+
const TAG_ADDRESS = tag(40307, "address");
|
|
116
|
+
/** #6.40308: output descriptor. */
|
|
117
|
+
const TAG_OUTPUT_DESCRIPTOR = tag(40308, "output-descriptor");
|
|
118
|
+
/** #6.40309: SSKR share. */
|
|
119
|
+
const TAG_SSKR_SHARE = tag(40309, "sskr");
|
|
120
|
+
/** #6.40310: partially signed Bitcoin transaction. */
|
|
121
|
+
const TAG_PSBT = tag(40310, "psbt");
|
|
122
|
+
/** #6.40311: account descriptor. */
|
|
123
|
+
const TAG_ACCOUNT_DESCRIPTOR = tag(40311, "account-descriptor");
|
|
124
|
+
/** #6.40800: OpenSSH text-format private key. */
|
|
125
|
+
const TAG_SSH_TEXT_PRIVATE_KEY = tag(40800, "ssh-private");
|
|
126
|
+
/** #6.40801: OpenSSH text-format public key. */
|
|
127
|
+
const TAG_SSH_TEXT_PUBLIC_KEY = tag(40801, "ssh-public");
|
|
128
|
+
/** #6.40802: OpenSSH text-format signature. */
|
|
129
|
+
const TAG_SSH_TEXT_SIGNATURE = tag(40802, "ssh-signature");
|
|
130
|
+
/** #6.40803: OpenSSH text-format certificate. */
|
|
131
|
+
const TAG_SSH_TEXT_CERTIFICATE = tag(40803, "ssh-certificate");
|
|
132
|
+
/** #6.1347571542: provenance mark. */
|
|
133
|
+
const TAG_PROVENANCE_MARK = tag(1347571542, "provenance");
|
|
134
|
+
/** #6.400: output descriptor `sh` (script hash). */
|
|
135
|
+
const TAG_OUTPUT_SCRIPT_HASH = tag(400, "output-script-hash");
|
|
136
|
+
/** #6.401: output descriptor `wsh` (witness script hash). */
|
|
137
|
+
const TAG_OUTPUT_WITNESS_SCRIPT_HASH = tag(401, "output-witness-script-hash");
|
|
138
|
+
/** #6.402: output descriptor `pk` (public key). */
|
|
139
|
+
const TAG_OUTPUT_PUBLIC_KEY = tag(402, "output-public-key");
|
|
140
|
+
/** #6.403: output descriptor `pkh` (public key hash). */
|
|
141
|
+
const TAG_OUTPUT_PUBLIC_KEY_HASH = tag(403, "output-public-key-hash");
|
|
142
|
+
/** #6.404: output descriptor `wpkh` (witness public key hash). */
|
|
143
|
+
const TAG_OUTPUT_WITNESS_PUBLIC_KEY_HASH = tag(404, "output-witness-public-key-hash");
|
|
144
|
+
/** #6.405: output descriptor `combo`. */
|
|
145
|
+
const TAG_OUTPUT_COMBO = tag(405, "output-combo");
|
|
146
|
+
/** #6.406: output descriptor `multi` (multisig). */
|
|
147
|
+
const TAG_OUTPUT_MULTISIG = tag(406, "output-multisig");
|
|
148
|
+
/** #6.407: output descriptor `sortedmulti` (sorted multisig). */
|
|
149
|
+
const TAG_OUTPUT_SORTED_MULTISIG = tag(407, "output-sorted-multisig");
|
|
150
|
+
/** #6.408: output descriptor `raw` (raw script). */
|
|
151
|
+
const TAG_OUTPUT_RAW_SCRIPT = tag(408, "output-raw-script");
|
|
152
|
+
/** #6.409: output descriptor `tr` (taproot). */
|
|
153
|
+
const TAG_OUTPUT_TAPROOT = tag(409, "output-taproot");
|
|
154
|
+
/** #6.410: output descriptor cosigner. */
|
|
155
|
+
const TAG_OUTPUT_COSIGNER = tag(410, "output-cosigner");
|
|
156
|
+
/**
|
|
157
|
+
* Superseded tags, accepted on decode only. They sit in IANA's
|
|
158
|
+
* "Specification Required" range (300–311) and were replaced by the
|
|
159
|
+
* first-come-first-served 40300+ tags above; existing data still uses them.
|
|
160
|
+
* Never emit these for new data. Frozen, like every entry in it.
|
|
161
|
+
*/
|
|
162
|
+
const LEGACY_TAGS = Object.freeze({
|
|
163
|
+
SEED_V1: tag(300, "crypto-seed"),
|
|
164
|
+
EC_KEY_V1: tag(306, "crypto-eckey"),
|
|
165
|
+
SSKR_SHARE_V1: tag(309, "crypto-sskr"),
|
|
166
|
+
HDKEY_V1: tag(303, "crypto-hdkey"),
|
|
167
|
+
DERIVATION_PATH_V1: tag(304, "crypto-keypath"),
|
|
168
|
+
USE_INFO_V1: tag(305, "crypto-coin-info"),
|
|
169
|
+
OUTPUT_DESCRIPTOR_V1: tag(307, "crypto-output"),
|
|
170
|
+
PSBT_V1: tag(310, "crypto-psbt"),
|
|
171
|
+
ACCOUNT_V1: tag(311, "crypto-account")
|
|
172
|
+
});
|
|
173
|
+
/**
|
|
174
|
+
* Every tag this package defines, in registration order (the order the
|
|
175
|
+
* Rust reference registers them). Iterate this rather than the constants.
|
|
176
|
+
* Frozen, like every entry in it.
|
|
177
|
+
*/
|
|
178
|
+
const ALL_TAGS = Object.freeze([
|
|
179
|
+
TAG_URI,
|
|
180
|
+
TAG_UUID,
|
|
181
|
+
TAG_ENCODED_CBOR,
|
|
182
|
+
TAG_ENVELOPE,
|
|
183
|
+
TAG_LEAF,
|
|
184
|
+
TAG_JSON,
|
|
185
|
+
TAG_KNOWN_VALUE,
|
|
186
|
+
TAG_DIGEST,
|
|
187
|
+
TAG_ENCRYPTED,
|
|
188
|
+
TAG_COMPRESSED,
|
|
189
|
+
TAG_REQUEST,
|
|
190
|
+
TAG_RESPONSE,
|
|
191
|
+
TAG_FUNCTION,
|
|
192
|
+
TAG_PARAMETER,
|
|
193
|
+
TAG_PLACEHOLDER,
|
|
194
|
+
TAG_REPLACEMENT,
|
|
195
|
+
TAG_EVENT,
|
|
196
|
+
LEGACY_TAGS.SEED_V1,
|
|
197
|
+
LEGACY_TAGS.EC_KEY_V1,
|
|
198
|
+
LEGACY_TAGS.SSKR_SHARE_V1,
|
|
199
|
+
TAG_SEED,
|
|
200
|
+
TAG_EC_KEY,
|
|
201
|
+
TAG_SSKR_SHARE,
|
|
202
|
+
TAG_X25519_PRIVATE_KEY,
|
|
203
|
+
TAG_X25519_PUBLIC_KEY,
|
|
204
|
+
TAG_ARID,
|
|
205
|
+
TAG_PRIVATE_KEYS,
|
|
206
|
+
TAG_NONCE,
|
|
207
|
+
TAG_PASSWORD,
|
|
208
|
+
TAG_PRIVATE_KEY_BASE,
|
|
209
|
+
TAG_PUBLIC_KEYS,
|
|
210
|
+
TAG_SALT,
|
|
211
|
+
TAG_SEALED_MESSAGE,
|
|
212
|
+
TAG_SIGNATURE,
|
|
213
|
+
TAG_SIGNING_PRIVATE_KEY,
|
|
214
|
+
TAG_SIGNING_PUBLIC_KEY,
|
|
215
|
+
TAG_SYMMETRIC_KEY,
|
|
216
|
+
TAG_XID,
|
|
217
|
+
TAG_REFERENCE,
|
|
218
|
+
TAG_ENCRYPTED_KEY,
|
|
219
|
+
TAG_MLKEM_PRIVATE_KEY,
|
|
220
|
+
TAG_MLKEM_PUBLIC_KEY,
|
|
221
|
+
TAG_MLKEM_CIPHERTEXT,
|
|
222
|
+
TAG_MLDSA_PRIVATE_KEY,
|
|
223
|
+
TAG_MLDSA_PUBLIC_KEY,
|
|
224
|
+
TAG_MLDSA_SIGNATURE,
|
|
225
|
+
LEGACY_TAGS.HDKEY_V1,
|
|
226
|
+
LEGACY_TAGS.DERIVATION_PATH_V1,
|
|
227
|
+
LEGACY_TAGS.USE_INFO_V1,
|
|
228
|
+
LEGACY_TAGS.OUTPUT_DESCRIPTOR_V1,
|
|
229
|
+
LEGACY_TAGS.PSBT_V1,
|
|
230
|
+
LEGACY_TAGS.ACCOUNT_V1,
|
|
231
|
+
TAG_HDKEY,
|
|
232
|
+
TAG_DERIVATION_PATH,
|
|
233
|
+
TAG_USE_INFO,
|
|
234
|
+
TAG_ADDRESS,
|
|
235
|
+
TAG_OUTPUT_DESCRIPTOR,
|
|
236
|
+
TAG_PSBT,
|
|
237
|
+
TAG_ACCOUNT_DESCRIPTOR,
|
|
238
|
+
TAG_SSH_TEXT_PRIVATE_KEY,
|
|
239
|
+
TAG_SSH_TEXT_PUBLIC_KEY,
|
|
240
|
+
TAG_SSH_TEXT_SIGNATURE,
|
|
241
|
+
TAG_SSH_TEXT_CERTIFICATE,
|
|
242
|
+
TAG_OUTPUT_SCRIPT_HASH,
|
|
243
|
+
TAG_OUTPUT_WITNESS_SCRIPT_HASH,
|
|
244
|
+
TAG_OUTPUT_PUBLIC_KEY,
|
|
245
|
+
TAG_OUTPUT_PUBLIC_KEY_HASH,
|
|
246
|
+
TAG_OUTPUT_WITNESS_PUBLIC_KEY_HASH,
|
|
247
|
+
TAG_OUTPUT_COMBO,
|
|
248
|
+
TAG_OUTPUT_MULTISIG,
|
|
249
|
+
TAG_OUTPUT_SORTED_MULTISIG,
|
|
250
|
+
TAG_OUTPUT_RAW_SCRIPT,
|
|
251
|
+
TAG_OUTPUT_TAPROOT,
|
|
252
|
+
TAG_OUTPUT_COSIGNER,
|
|
253
|
+
TAG_PROVENANCE_MARK
|
|
254
|
+
]);
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region src/register.ts
|
|
257
|
+
/**
|
|
258
|
+
* Registration into a dCBOR tags store.
|
|
259
|
+
*
|
|
260
|
+
* @module register
|
|
261
|
+
*/
|
|
262
|
+
/**
|
|
263
|
+
* Register dcbor's standard tags and every tag in {@link ALL_TAGS} into
|
|
264
|
+
* `store` (default: the global store).
|
|
265
|
+
*
|
|
266
|
+
* Idempotent: the store compares names, so a value already registered under
|
|
267
|
+
* the same name is a no-op, which is what makes repeated calls safe.
|
|
268
|
+
*
|
|
269
|
+
* @param store - The store to register into; defaults to dcbor's global store.
|
|
270
|
+
* @throws {Error} dcbor's store throws a bare `Error` when a value is
|
|
271
|
+
* already registered under a *different* name
|
|
272
|
+
* (`Attempt to register tag: 200 'foo' with different name: 'envelope'`).
|
|
273
|
+
*/
|
|
274
|
+
function registerTags(store = (0, _blockchaincommons_dcbor.getGlobalTagsStore)()) {
|
|
275
|
+
(0, _blockchaincommons_dcbor.registerStandardTags)(store);
|
|
276
|
+
store.registerAll([...ALL_TAGS]);
|
|
277
|
+
}
|
|
278
|
+
//#endregion
|
|
279
|
+
exports.ALL_TAGS = ALL_TAGS;
|
|
280
|
+
exports.LEGACY_TAGS = LEGACY_TAGS;
|
|
281
|
+
exports.TAG_ACCOUNT_DESCRIPTOR = TAG_ACCOUNT_DESCRIPTOR;
|
|
282
|
+
exports.TAG_ADDRESS = TAG_ADDRESS;
|
|
283
|
+
exports.TAG_ARID = TAG_ARID;
|
|
284
|
+
exports.TAG_COMPRESSED = TAG_COMPRESSED;
|
|
285
|
+
exports.TAG_DERIVATION_PATH = TAG_DERIVATION_PATH;
|
|
286
|
+
exports.TAG_DIGEST = TAG_DIGEST;
|
|
287
|
+
exports.TAG_EC_KEY = TAG_EC_KEY;
|
|
288
|
+
exports.TAG_ENCODED_CBOR = TAG_ENCODED_CBOR;
|
|
289
|
+
exports.TAG_ENCRYPTED = TAG_ENCRYPTED;
|
|
290
|
+
exports.TAG_ENCRYPTED_KEY = TAG_ENCRYPTED_KEY;
|
|
291
|
+
exports.TAG_ENVELOPE = TAG_ENVELOPE;
|
|
292
|
+
exports.TAG_EVENT = TAG_EVENT;
|
|
293
|
+
exports.TAG_FUNCTION = TAG_FUNCTION;
|
|
294
|
+
exports.TAG_HDKEY = TAG_HDKEY;
|
|
295
|
+
exports.TAG_JSON = TAG_JSON;
|
|
296
|
+
exports.TAG_KNOWN_VALUE = TAG_KNOWN_VALUE;
|
|
297
|
+
exports.TAG_LEAF = TAG_LEAF;
|
|
298
|
+
exports.TAG_MLDSA_PRIVATE_KEY = TAG_MLDSA_PRIVATE_KEY;
|
|
299
|
+
exports.TAG_MLDSA_PUBLIC_KEY = TAG_MLDSA_PUBLIC_KEY;
|
|
300
|
+
exports.TAG_MLDSA_SIGNATURE = TAG_MLDSA_SIGNATURE;
|
|
301
|
+
exports.TAG_MLKEM_CIPHERTEXT = TAG_MLKEM_CIPHERTEXT;
|
|
302
|
+
exports.TAG_MLKEM_PRIVATE_KEY = TAG_MLKEM_PRIVATE_KEY;
|
|
303
|
+
exports.TAG_MLKEM_PUBLIC_KEY = TAG_MLKEM_PUBLIC_KEY;
|
|
304
|
+
exports.TAG_NONCE = TAG_NONCE;
|
|
305
|
+
exports.TAG_OUTPUT_COMBO = TAG_OUTPUT_COMBO;
|
|
306
|
+
exports.TAG_OUTPUT_COSIGNER = TAG_OUTPUT_COSIGNER;
|
|
307
|
+
exports.TAG_OUTPUT_DESCRIPTOR = TAG_OUTPUT_DESCRIPTOR;
|
|
308
|
+
exports.TAG_OUTPUT_MULTISIG = TAG_OUTPUT_MULTISIG;
|
|
309
|
+
exports.TAG_OUTPUT_PUBLIC_KEY = TAG_OUTPUT_PUBLIC_KEY;
|
|
310
|
+
exports.TAG_OUTPUT_PUBLIC_KEY_HASH = TAG_OUTPUT_PUBLIC_KEY_HASH;
|
|
311
|
+
exports.TAG_OUTPUT_RAW_SCRIPT = TAG_OUTPUT_RAW_SCRIPT;
|
|
312
|
+
exports.TAG_OUTPUT_SCRIPT_HASH = TAG_OUTPUT_SCRIPT_HASH;
|
|
313
|
+
exports.TAG_OUTPUT_SORTED_MULTISIG = TAG_OUTPUT_SORTED_MULTISIG;
|
|
314
|
+
exports.TAG_OUTPUT_TAPROOT = TAG_OUTPUT_TAPROOT;
|
|
315
|
+
exports.TAG_OUTPUT_WITNESS_PUBLIC_KEY_HASH = TAG_OUTPUT_WITNESS_PUBLIC_KEY_HASH;
|
|
316
|
+
exports.TAG_OUTPUT_WITNESS_SCRIPT_HASH = TAG_OUTPUT_WITNESS_SCRIPT_HASH;
|
|
317
|
+
exports.TAG_PARAMETER = TAG_PARAMETER;
|
|
318
|
+
exports.TAG_PASSWORD = TAG_PASSWORD;
|
|
319
|
+
exports.TAG_PLACEHOLDER = TAG_PLACEHOLDER;
|
|
320
|
+
exports.TAG_PRIVATE_KEYS = TAG_PRIVATE_KEYS;
|
|
321
|
+
exports.TAG_PRIVATE_KEY_BASE = TAG_PRIVATE_KEY_BASE;
|
|
322
|
+
exports.TAG_PROVENANCE_MARK = TAG_PROVENANCE_MARK;
|
|
323
|
+
exports.TAG_PSBT = TAG_PSBT;
|
|
324
|
+
exports.TAG_PUBLIC_KEYS = TAG_PUBLIC_KEYS;
|
|
325
|
+
exports.TAG_REFERENCE = TAG_REFERENCE;
|
|
326
|
+
exports.TAG_REPLACEMENT = TAG_REPLACEMENT;
|
|
327
|
+
exports.TAG_REQUEST = TAG_REQUEST;
|
|
328
|
+
exports.TAG_RESPONSE = TAG_RESPONSE;
|
|
329
|
+
exports.TAG_SALT = TAG_SALT;
|
|
330
|
+
exports.TAG_SEALED_MESSAGE = TAG_SEALED_MESSAGE;
|
|
331
|
+
exports.TAG_SEED = TAG_SEED;
|
|
332
|
+
exports.TAG_SIGNATURE = TAG_SIGNATURE;
|
|
333
|
+
exports.TAG_SIGNING_PRIVATE_KEY = TAG_SIGNING_PRIVATE_KEY;
|
|
334
|
+
exports.TAG_SIGNING_PUBLIC_KEY = TAG_SIGNING_PUBLIC_KEY;
|
|
335
|
+
exports.TAG_SSH_TEXT_CERTIFICATE = TAG_SSH_TEXT_CERTIFICATE;
|
|
336
|
+
exports.TAG_SSH_TEXT_PRIVATE_KEY = TAG_SSH_TEXT_PRIVATE_KEY;
|
|
337
|
+
exports.TAG_SSH_TEXT_PUBLIC_KEY = TAG_SSH_TEXT_PUBLIC_KEY;
|
|
338
|
+
exports.TAG_SSH_TEXT_SIGNATURE = TAG_SSH_TEXT_SIGNATURE;
|
|
339
|
+
exports.TAG_SSKR_SHARE = TAG_SSKR_SHARE;
|
|
340
|
+
exports.TAG_SYMMETRIC_KEY = TAG_SYMMETRIC_KEY;
|
|
341
|
+
exports.TAG_URI = TAG_URI;
|
|
342
|
+
exports.TAG_USE_INFO = TAG_USE_INFO;
|
|
343
|
+
exports.TAG_UUID = TAG_UUID;
|
|
344
|
+
exports.TAG_X25519_PRIVATE_KEY = TAG_X25519_PRIVATE_KEY;
|
|
345
|
+
exports.TAG_X25519_PUBLIC_KEY = TAG_X25519_PUBLIC_KEY;
|
|
346
|
+
exports.TAG_XID = TAG_XID;
|
|
347
|
+
exports.registerTags = registerTags;
|
|
348
|
+
|
|
349
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Tag","IANA_URI","IANA_UUID","IANA_ENCODED_CBOR","getGlobalTagsStore"],"sources":["../src/tags.ts","../src/register.ts"],"sourcesContent":["/**\n * The Blockchain Commons CBOR tag registry.\n *\n * Values are the CBOR tag numbers on the wire; names are wire too, since\n * `uniform-resources` derives UR types from them (`ur:envelope`). Neither\n * may change without a specification change. Every constant is frozen.\n *\n * Tags compare by value: `TAG_ENVELOPE === Tag.from(200, \"envelope\")` is\n * `false` (two objects), `Tag.equals(a, b)` and `a.value === b.value` are\n * the comparisons to write.\n *\n * @see https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md\n * @module tags\n */\nimport {\n Tag,\n TAG_ENCODED_CBOR as IANA_ENCODED_CBOR,\n TAG_URI as IANA_URI,\n TAG_UUID as IANA_UUID,\n} from \"@blockchaincommons/dcbor\";\n\n/**\n * One immutable tag. dcbor's `Tag.from` returns a plain object whose\n * `readonly` is a compile-time promise only; the names here are wire,\n * so nothing may rewrite them process-wide.\n */\nconst tag = (value: number, name: string): Tag => Object.freeze(Tag.from(value, name));\n\n// IANA standard tags this stack uses. dcbor owns the numbers (it defines\n// them unnamed); this registry owns the names.\n\n/** #6.32: URI (RFC 8949 §3.4.5.3), named `url` in this stack. */\nexport const TAG_URI: Tag = tag(IANA_URI, \"url\");\n/** #6.37: binary UUID (RFC 4122). */\nexport const TAG_UUID: Tag = tag(IANA_UUID, \"uuid\");\n\n// Core Envelope tags. #6.24 was used as the leaf header by an earlier spec\n// (incorrectly: RFC 8949 §3.4.5.1 requires a byte string); #6.201 replaced\n// it and #6.24 is still recognised on decode. #6.200 and #6.201 are the only\n// Blockchain Commons tags in IANA's \"Specification Required\" range.\n\n/** #6.24: encoded CBOR data item; the pre-#6.201 Envelope leaf header, accepted on decode only. */\nexport const TAG_ENCODED_CBOR: Tag = tag(IANA_ENCODED_CBOR, \"encoded-cbor\");\n/** #6.200: Gordian Envelope. */\nexport const TAG_ENVELOPE: Tag = tag(200, \"envelope\");\n/** #6.201: dCBOR data item; the Envelope leaf case. */\nexport const TAG_LEAF: Tag = tag(201, \"leaf\");\n/** #6.262: byte string holding UTF-8 JSON text. */\nexport const TAG_JSON: Tag = tag(262, \"json\");\n\n// Envelope extensions.\n\n/** #6.40000: known value, a registered unsigned integer with a fixed meaning. */\nexport const TAG_KNOWN_VALUE: Tag = tag(40000, \"known-value\");\n/** #6.40001: SHA-256 digest. */\nexport const TAG_DIGEST: Tag = tag(40001, \"digest\");\n/** #6.40002: encrypted message (IETF ChaCha20-Poly1305). */\nexport const TAG_ENCRYPTED: Tag = tag(40002, \"encrypted\");\n/** #6.40003: DEFLATE-compressed data with the digest of the original. */\nexport const TAG_COMPRESSED: Tag = tag(40003, \"compressed\");\n\n// Distributed function calls.\n\n/** #6.40004: request. */\nexport const TAG_REQUEST: Tag = tag(40004, \"request\");\n/** #6.40005: response. */\nexport const TAG_RESPONSE: Tag = tag(40005, \"response\");\n/** #6.40006: function identifier. */\nexport const TAG_FUNCTION: Tag = tag(40006, \"function\");\n/** #6.40007: parameter identifier. */\nexport const TAG_PARAMETER: Tag = tag(40007, \"parameter\");\n/** #6.40008: placeholder. */\nexport const TAG_PLACEHOLDER: Tag = tag(40008, \"placeholder\");\n/** #6.40009: replacement. */\nexport const TAG_REPLACEMENT: Tag = tag(40009, \"replacement\");\n\n// Cryptographic components.\n\n/** #6.40010: X25519 key-agreement private key. */\nexport const TAG_X25519_PRIVATE_KEY: Tag = tag(40010, \"agreement-private-key\");\n/** #6.40011: X25519 key-agreement public key. */\nexport const TAG_X25519_PUBLIC_KEY: Tag = tag(40011, \"agreement-public-key\");\n/** #6.40012: apparently random identifier (32 bytes). */\nexport const TAG_ARID: Tag = tag(40012, \"arid\");\n/** #6.40013: a signing and an encapsulation private key together. */\nexport const TAG_PRIVATE_KEYS: Tag = tag(40013, \"crypto-prvkeys\");\n/** #6.40014: nonce. */\nexport const TAG_NONCE: Tag = tag(40014, \"nonce\");\n/** #6.40015: password. */\nexport const TAG_PASSWORD: Tag = tag(40015, \"password\");\n/** #6.40016: private key base, the material every other key derives from. */\nexport const TAG_PRIVATE_KEY_BASE: Tag = tag(40016, \"crypto-prvkey-base\");\n/** #6.40017: a signing and an encapsulation public key together. */\nexport const TAG_PUBLIC_KEYS: Tag = tag(40017, \"crypto-pubkeys\");\n/** #6.40018: salt. */\nexport const TAG_SALT: Tag = tag(40018, \"salt\");\n/** #6.40019: sealed message, encrypted to a recipient's public keys. */\nexport const TAG_SEALED_MESSAGE: Tag = tag(40019, \"crypto-sealed\");\n/** #6.40020: signature. */\nexport const TAG_SIGNATURE: Tag = tag(40020, \"signature\");\n/** #6.40021: signing private key. */\nexport const TAG_SIGNING_PRIVATE_KEY: Tag = tag(40021, \"signing-private-key\");\n/** #6.40022: signing public key. */\nexport const TAG_SIGNING_PUBLIC_KEY: Tag = tag(40022, \"signing-public-key\");\n/** #6.40023: symmetric encryption key. */\nexport const TAG_SYMMETRIC_KEY: Tag = tag(40023, \"crypto-key\");\n/** #6.40024: extensible identifier (XID). */\nexport const TAG_XID: Tag = tag(40024, \"xid\");\n/** #6.40025: reference to an identifier by a prefix of it. */\nexport const TAG_REFERENCE: Tag = tag(40025, \"reference\");\n/** #6.40026: distributed function call event. */\nexport const TAG_EVENT: Tag = tag(40026, \"event\");\n/** #6.40027: symmetric key wrapped for a recipient. */\nexport const TAG_ENCRYPTED_KEY: Tag = tag(40027, \"encrypted-key\");\n\n// Post-quantum.\n\n/** #6.40100: ML-KEM (FIPS 203) private key. */\nexport const TAG_MLKEM_PRIVATE_KEY: Tag = tag(40100, \"mlkem-private-key\");\n/** #6.40101: ML-KEM (FIPS 203) public key. */\nexport const TAG_MLKEM_PUBLIC_KEY: Tag = tag(40101, \"mlkem-public-key\");\n/** #6.40102: ML-KEM (FIPS 203) encapsulated ciphertext. */\nexport const TAG_MLKEM_CIPHERTEXT: Tag = tag(40102, \"mlkem-ciphertext\");\n/** #6.40103: ML-DSA (FIPS 204) private key. */\nexport const TAG_MLDSA_PRIVATE_KEY: Tag = tag(40103, \"mldsa-private-key\");\n/** #6.40104: ML-DSA (FIPS 204) public key. */\nexport const TAG_MLDSA_PUBLIC_KEY: Tag = tag(40104, \"mldsa-public-key\");\n/** #6.40105: ML-DSA (FIPS 204) signature. */\nexport const TAG_MLDSA_SIGNATURE: Tag = tag(40105, \"mldsa-signature\");\n\n// Seeds, keys and wallets.\n\n/** #6.40300: cryptographic seed. */\nexport const TAG_SEED: Tag = tag(40300, \"seed\");\n/** #6.40303: BIP-32 hierarchical deterministic key. */\nexport const TAG_HDKEY: Tag = tag(40303, \"hdkey\");\n/** #6.40304: BIP-32 derivation path. */\nexport const TAG_DERIVATION_PATH: Tag = tag(40304, \"keypath\");\n/** #6.40305: coin type and network (`coin-info`). */\nexport const TAG_USE_INFO: Tag = tag(40305, \"coin-info\");\n/** #6.40306: elliptic-curve key. */\nexport const TAG_EC_KEY: Tag = tag(40306, \"eckey\");\n/** #6.40307: address. */\nexport const TAG_ADDRESS: Tag = tag(40307, \"address\");\n/** #6.40308: output descriptor. */\nexport const TAG_OUTPUT_DESCRIPTOR: Tag = tag(40308, \"output-descriptor\");\n/** #6.40309: SSKR share. */\nexport const TAG_SSKR_SHARE: Tag = tag(40309, \"sskr\");\n/** #6.40310: partially signed Bitcoin transaction. */\nexport const TAG_PSBT: Tag = tag(40310, \"psbt\");\n/** #6.40311: account descriptor. */\nexport const TAG_ACCOUNT_DESCRIPTOR: Tag = tag(40311, \"account-descriptor\");\n\n// SSH.\n\n/** #6.40800: OpenSSH text-format private key. */\nexport const TAG_SSH_TEXT_PRIVATE_KEY: Tag = tag(40800, \"ssh-private\");\n/** #6.40801: OpenSSH text-format public key. */\nexport const TAG_SSH_TEXT_PUBLIC_KEY: Tag = tag(40801, \"ssh-public\");\n/** #6.40802: OpenSSH text-format signature. */\nexport const TAG_SSH_TEXT_SIGNATURE: Tag = tag(40802, \"ssh-signature\");\n/** #6.40803: OpenSSH text-format certificate. */\nexport const TAG_SSH_TEXT_CERTIFICATE: Tag = tag(40803, \"ssh-certificate\");\n\n/** #6.1347571542: provenance mark. */\nexport const TAG_PROVENANCE_MARK: Tag = tag(1347571542, \"provenance\");\n\n// Output descriptor script types (subtypes of `crypto-output`).\n\n/** #6.400: output descriptor `sh` (script hash). */\nexport const TAG_OUTPUT_SCRIPT_HASH: Tag = tag(400, \"output-script-hash\");\n/** #6.401: output descriptor `wsh` (witness script hash). */\nexport const TAG_OUTPUT_WITNESS_SCRIPT_HASH: Tag = tag(401, \"output-witness-script-hash\");\n/** #6.402: output descriptor `pk` (public key). */\nexport const TAG_OUTPUT_PUBLIC_KEY: Tag = tag(402, \"output-public-key\");\n/** #6.403: output descriptor `pkh` (public key hash). */\nexport const TAG_OUTPUT_PUBLIC_KEY_HASH: Tag = tag(403, \"output-public-key-hash\");\n/** #6.404: output descriptor `wpkh` (witness public key hash). */\nexport const TAG_OUTPUT_WITNESS_PUBLIC_KEY_HASH: Tag = tag(404, \"output-witness-public-key-hash\");\n/** #6.405: output descriptor `combo`. */\nexport const TAG_OUTPUT_COMBO: Tag = tag(405, \"output-combo\");\n/** #6.406: output descriptor `multi` (multisig). */\nexport const TAG_OUTPUT_MULTISIG: Tag = tag(406, \"output-multisig\");\n/** #6.407: output descriptor `sortedmulti` (sorted multisig). */\nexport const TAG_OUTPUT_SORTED_MULTISIG: Tag = tag(407, \"output-sorted-multisig\");\n/** #6.408: output descriptor `raw` (raw script). */\nexport const TAG_OUTPUT_RAW_SCRIPT: Tag = tag(408, \"output-raw-script\");\n/** #6.409: output descriptor `tr` (taproot). */\nexport const TAG_OUTPUT_TAPROOT: Tag = tag(409, \"output-taproot\");\n/** #6.410: output descriptor cosigner. */\nexport const TAG_OUTPUT_COSIGNER: Tag = tag(410, \"output-cosigner\");\n\n/** The legacy tag set; see {@link LEGACY_TAGS}. */\nexport interface LegacyTags {\n /** #6.300: `crypto-seed`, superseded by {@link TAG_SEED}. */\n readonly SEED_V1: Tag;\n /** #6.306: `crypto-eckey`, superseded by {@link TAG_EC_KEY}. */\n readonly EC_KEY_V1: Tag;\n /** #6.309: `crypto-sskr`, superseded by {@link TAG_SSKR_SHARE}. */\n readonly SSKR_SHARE_V1: Tag;\n /** #6.303: `crypto-hdkey`, superseded by {@link TAG_HDKEY}. */\n readonly HDKEY_V1: Tag;\n /** #6.304: `crypto-keypath`, superseded by {@link TAG_DERIVATION_PATH}. */\n readonly DERIVATION_PATH_V1: Tag;\n /** #6.305: `crypto-coin-info`, superseded by {@link TAG_USE_INFO}. */\n readonly USE_INFO_V1: Tag;\n /** #6.307: `crypto-output`, superseded by {@link TAG_OUTPUT_DESCRIPTOR}. */\n readonly OUTPUT_DESCRIPTOR_V1: Tag;\n /** #6.310: `crypto-psbt`, superseded by {@link TAG_PSBT}. */\n readonly PSBT_V1: Tag;\n /** #6.311: `crypto-account`, superseded by {@link TAG_ACCOUNT_DESCRIPTOR}. */\n readonly ACCOUNT_V1: Tag;\n}\n\n/**\n * Superseded tags, accepted on decode only. They sit in IANA's\n * \"Specification Required\" range (300–311) and were replaced by the\n * first-come-first-served 40300+ tags above; existing data still uses them.\n * Never emit these for new data. Frozen, like every entry in it.\n */\nexport const LEGACY_TAGS: LegacyTags = Object.freeze({\n SEED_V1: tag(300, \"crypto-seed\"),\n EC_KEY_V1: tag(306, \"crypto-eckey\"),\n SSKR_SHARE_V1: tag(309, \"crypto-sskr\"),\n HDKEY_V1: tag(303, \"crypto-hdkey\"),\n DERIVATION_PATH_V1: tag(304, \"crypto-keypath\"),\n USE_INFO_V1: tag(305, \"crypto-coin-info\"),\n OUTPUT_DESCRIPTOR_V1: tag(307, \"crypto-output\"),\n PSBT_V1: tag(310, \"crypto-psbt\"),\n ACCOUNT_V1: tag(311, \"crypto-account\"),\n});\n\n/**\n * Every tag this package defines, in registration order (the order the\n * Rust reference registers them). Iterate this rather than the constants.\n * Frozen, like every entry in it.\n */\nexport const ALL_TAGS: readonly Tag[] = Object.freeze([\n TAG_URI,\n TAG_UUID,\n TAG_ENCODED_CBOR,\n TAG_ENVELOPE,\n TAG_LEAF,\n TAG_JSON,\n TAG_KNOWN_VALUE,\n TAG_DIGEST,\n TAG_ENCRYPTED,\n TAG_COMPRESSED,\n TAG_REQUEST,\n TAG_RESPONSE,\n TAG_FUNCTION,\n TAG_PARAMETER,\n TAG_PLACEHOLDER,\n TAG_REPLACEMENT,\n TAG_EVENT,\n LEGACY_TAGS.SEED_V1,\n LEGACY_TAGS.EC_KEY_V1,\n LEGACY_TAGS.SSKR_SHARE_V1,\n TAG_SEED,\n TAG_EC_KEY,\n TAG_SSKR_SHARE,\n TAG_X25519_PRIVATE_KEY,\n TAG_X25519_PUBLIC_KEY,\n TAG_ARID,\n TAG_PRIVATE_KEYS,\n TAG_NONCE,\n TAG_PASSWORD,\n TAG_PRIVATE_KEY_BASE,\n TAG_PUBLIC_KEYS,\n TAG_SALT,\n TAG_SEALED_MESSAGE,\n TAG_SIGNATURE,\n TAG_SIGNING_PRIVATE_KEY,\n TAG_SIGNING_PUBLIC_KEY,\n TAG_SYMMETRIC_KEY,\n TAG_XID,\n TAG_REFERENCE,\n TAG_ENCRYPTED_KEY,\n TAG_MLKEM_PRIVATE_KEY,\n TAG_MLKEM_PUBLIC_KEY,\n TAG_MLKEM_CIPHERTEXT,\n TAG_MLDSA_PRIVATE_KEY,\n TAG_MLDSA_PUBLIC_KEY,\n TAG_MLDSA_SIGNATURE,\n LEGACY_TAGS.HDKEY_V1,\n LEGACY_TAGS.DERIVATION_PATH_V1,\n LEGACY_TAGS.USE_INFO_V1,\n LEGACY_TAGS.OUTPUT_DESCRIPTOR_V1,\n LEGACY_TAGS.PSBT_V1,\n LEGACY_TAGS.ACCOUNT_V1,\n TAG_HDKEY,\n TAG_DERIVATION_PATH,\n TAG_USE_INFO,\n TAG_ADDRESS,\n TAG_OUTPUT_DESCRIPTOR,\n TAG_PSBT,\n TAG_ACCOUNT_DESCRIPTOR,\n TAG_SSH_TEXT_PRIVATE_KEY,\n TAG_SSH_TEXT_PUBLIC_KEY,\n TAG_SSH_TEXT_SIGNATURE,\n TAG_SSH_TEXT_CERTIFICATE,\n TAG_OUTPUT_SCRIPT_HASH,\n TAG_OUTPUT_WITNESS_SCRIPT_HASH,\n TAG_OUTPUT_PUBLIC_KEY,\n TAG_OUTPUT_PUBLIC_KEY_HASH,\n TAG_OUTPUT_WITNESS_PUBLIC_KEY_HASH,\n TAG_OUTPUT_COMBO,\n TAG_OUTPUT_MULTISIG,\n TAG_OUTPUT_SORTED_MULTISIG,\n TAG_OUTPUT_RAW_SCRIPT,\n TAG_OUTPUT_TAPROOT,\n TAG_OUTPUT_COSIGNER,\n TAG_PROVENANCE_MARK,\n]);\n","/**\n * Registration into a dCBOR tags store.\n *\n * @module register\n */\nimport { type TagsStore, getGlobalTagsStore, registerStandardTags } from \"@blockchaincommons/dcbor\";\nimport { ALL_TAGS } from \"./tags.js\";\n\n/**\n * Register dcbor's standard tags and every tag in {@link ALL_TAGS} into\n * `store` (default: the global store).\n *\n * Idempotent: the store compares names, so a value already registered under\n * the same name is a no-op, which is what makes repeated calls safe.\n *\n * @param store - The store to register into; defaults to dcbor's global store.\n * @throws {Error} dcbor's store throws a bare `Error` when a value is\n * already registered under a *different* name\n * (`Attempt to register tag: 200 'foo' with different name: 'envelope'`).\n */\nexport function registerTags(store: TagsStore = getGlobalTagsStore()): void {\n registerStandardTags(store);\n store.registerAll([...ALL_TAGS]);\n}\n"],"mappings":"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"}
|