JSPM

  • Created
  • Published
  • Downloads 396
  • Score
    100M100P100Q97083F
  • License BSD-2-Clause-Patent

Blockchain Commons Deterministic CBOR (dCBOR) for TypeScript

Package Exports

  • @bcts/dcbor

Readme

Blockchain Commons Deterministic CBOR ("dCBOR") for TypeScript

Disclaimer: This package is under active development and APIs may change.

dcbor is a CBOR codec that focuses on writing and parsing "deterministic" CBOR per §4.2 of RFC-8949. It does not support parts of the spec forbidden by deterministic CBOR (such as indefinite length arrays and maps). It is strict in both what it writes and reads: in particular it will return decoding errors if variable-length integers are not encoded in their minimal form, or CBOR map keys are not in lexicographic order, or there is extra data past the end of the decoded CBOR item.

Specification

The current specification of the norms and practices guiding the creation of this implementation are currently found in this IETF Internet Draft: draft-mcnally-deterministic-cbor.

Rust Reference Implementation

This TypeScript implementation is based on bc-dcbor-rust v0.25.1 (commit).