@cardanowall/poe-standard 0.1.0 → 0.2.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/README.md CHANGED
@@ -1,25 +1,25 @@
1
- # @cardanowall/poe-standard — the CIP-309 wire-format library
1
+ # @cardanowall/poe-standard — the Label 309 wire-format library
2
2
 
3
- The wire-format library for [CIP-309](https://cips.cardano.org/) Proof-of-Existence records: the
3
+ The wire-format library for [Label 309](https://cips.cardano.org/) Proof-of-Existence records: the
4
4
  record schema, the canonical-CBOR encoder, the pure structural validator, and the canonical
5
5
  error-code catalogue. Pure functions over bytes — no I/O, no network, no clock.
6
6
 
7
7
  ## What it is
8
8
 
9
9
  This package owns the **bytes**. It builds the exact canonical CBOR that goes on chain under Cardano
10
- metadata label 309, and it decides whether an arbitrary byte string is a structurally valid CIP-309
11
- record. It is the **structural validator** of the three CIP-309 verifier roles: a pure function over
10
+ metadata label 309, and it decides whether an arbitrary byte string is a structurally valid Label 309
11
+ record. It is the **structural validator** of the three Label 309 verifier roles: a pure function over
12
12
  CBOR bytes, with no cryptographic signature checks, no chain resolution, and no decryption — those
13
13
  belong to the verifier layer in [`@cardanowall/sdk-ts`](https://www.npmjs.com/package/@cardanowall/sdk-ts)
14
14
  and its byte-parity twins.
15
15
 
16
- Everything here is deterministic and side-effect-free, which is what makes a CIP-309 proof
16
+ Everything here is deterministic and side-effect-free, which is what makes a Label 309 proof
17
17
  independently checkable: the same bytes always encode to the same record and validate to the same
18
18
  result, in any implementation, against shared test vectors.
19
19
 
20
20
  ## Install
21
21
 
22
- The CIP-309 TypeScript packages are pre-1.0 and not yet published to npm. Build from the workspace:
22
+ The Label 309 TypeScript packages are pre-1.0 and not yet published to npm. Build from the workspace:
23
23
 
24
24
  ```sh
25
25
  pnpm install
@@ -83,7 +83,7 @@ import { encodeRecordBodyForSigning, type PoeRecord } from '@cardanowall/poe-sta
83
83
 
84
84
  const record: PoeRecord = { v: 1, items: [{ hashes: { 'sha2-256': digest } }] };
85
85
 
86
- // record_body = the full record map MINUS sigs. Producers prepend the CIP-309
86
+ // record_body = the full record map MINUS sigs. Producers prepend the Label 309
87
87
  // domain-separation prefix and wrap the result in a COSE Sig_structure before
88
88
  // signing with Ed25519 (see @cardanowall/crypto-core for the COSE helper).
89
89
  const body: Uint8Array = encodeRecordBodyForSigning(record);
@@ -91,7 +91,7 @@ const body: Uint8Array = encodeRecordBodyForSigning(record);
91
91
 
92
92
  ## Records on chain: chunk → validate
93
93
 
94
- The Cardano ledger caps every metadata byte string and text string at 64 bytes, so a CIP-309 record
94
+ The Cardano ledger caps every metadata byte string and text string at 64 bytes, so a Label 309 record
95
95
  is stored as an **array of ≤64-byte CBOR-bytes chunks** under label 309, and the metadata map itself
96
96
  is wrapped in the Conway tag-259 form. A verifier reassembles the chunk array (and unwraps tag-259)
97
97
  before calling `validatePoeRecord` — the validator operates on the single reconstructed record byte
@@ -122,7 +122,7 @@ The package root re-exports every group. Subpath imports are available for `./sc
122
122
 
123
123
  - `validatePoeRecord(bytes)` — the structural pipeline: canonical decode → schema parse → cross-field
124
124
  domain checks. Returns a discriminated `ValidateResult`; never throws.
125
- - `validateCidProfile(cid)` — offline IPFS CID-profile parser (CIDv0 and the CIP-309 CIDv1 multibase
125
+ - `validateCidProfile(cid)` — offline IPFS CID-profile parser (CIDv0 and the Label 309 CIDv1 multibase
126
126
  / multicodec / multihash profile).
127
127
  - `type ValidateResult`, `type ValidationIssue`.
128
128
 
@@ -180,13 +180,13 @@ const record: PoeRecord = {
180
180
  };
181
181
  ```
182
182
 
183
- The validator enforces the CIP-309 registries (hash algorithms, AEAD, KEM, Merkle commitment, and
183
+ The validator enforces the Label 309 registries (hash algorithms, AEAD, KEM, Merkle commitment, and
184
184
  passphrase-KDF), rejects unauthenticated ciphers by name, pins each KEM's recipient-slot shape, and
185
185
  guards against publishing private key material on chain.
186
186
 
187
187
  ## Cross-implementation parity
188
188
 
189
- The encoder and validator are byte-identical across the CIP-309 implementations —
189
+ The encoder and validator are byte-identical across the Label 309 implementations —
190
190
  `@cardanowall/poe-standard` (TS), the Python twin, and the Rust crate — validated against the same
191
191
  shared canonical-CBOR known-answer test vectors. Encoding the same record yields byte-identical CBOR
192
192
  in every implementation; validating the same bytes yields the same ordered list of issue codes with
@@ -194,7 +194,7 @@ the same severities. That parity is what lets a proof published by one tool veri
194
194
 
195
195
  ## Standard / service independence
196
196
 
197
- A CIP-309 proof is verifiable from transaction metadata, the optional content bytes, and a public
197
+ A Label 309 proof is verifiable from transaction metadata, the optional content bytes, and a public
198
198
  blockchain explorer — no issuer server is required. This package is the structural half of that
199
199
  guarantee: given the reassembled record bytes, `validatePoeRecord` decides structural validity
200
200
  offline, with no trust in the publisher, the gateway, or any domain. Signature verification, chain
@@ -206,7 +206,7 @@ in the SDKs.
206
206
  - **`@cardanowall/crypto-core`** — closed-catalogue cryptographic primitives (hash, KDF, signature,
207
207
  KEM, AEAD, CBOR, COSE, sealed-PoE, Merkle). Supplies the canonical CBOR codec and COSE decoder this
208
208
  package builds on.
209
- - **`@cardanowall/poe-standard`** — this package: the CIP-309 wire format (schema, encoder, structural
209
+ - **`@cardanowall/poe-standard`** — this package: the Label 309 wire format (schema, encoder, structural
210
210
  validator, error codes).
211
211
  - **`@cardanowall/sdk-ts`** — the browser + Node SDK: the standalone verifier (all three roles), the
212
212
  gateway-agnostic HTTP client, off-host signing, and seed-derived identity helpers.