An open API service indexing awesome lists of open source software.

https://github.com/kentbull/keri-ts

Monorepo for Typescript CESR, KERI, and ACDC
https://github.com/kentbull/keri-ts

acdc cesr cybersecurity decentralized-identity keri

Last synced: 18 days ago
JSON representation

Monorepo for Typescript CESR, KERI, and ACDC

Awesome Lists containing this project

README

          

# keri-ts monorepo

TypeScript packages for KERI and CESR:

- `@keri-ts/tufa`: Trust Utilities for Agents CLI application package
- `keri-ts`: KERI protocol/runtime library
- `cesr-ts`: CESR parsing and annotation library

## Install

```bash
# Global install
npm install -g @keri-ts/tufa
tufa version

# One-off usage without global install
npx @keri-ts/tufa version
```

### Install with NPM

```bash
npm i -g @keri-ts/tufa

tufa -h
```

### Local install

```bash
# from repo root
deno task npm:build:all

cd packages/tufa
TARBALL="$(cd npm && npm pack --silent | tail -n1)"
npm install -g "$PWD/npm/$TARBALL"

tufa -h
```

### Sample command to test with GLEIF production witness

```bash
curl https://gleif-it.github.io/.well-known/keri/oobi/BDkq35LUU63xnFmfhljYYRY0ymkCg7goyeCxN30tsvmS/index.json | tufa annotate
```

## Quick start

### Easiest entrypoints

```bash
# Show the CLI version
tufa version

# Annotate a CESR stream from file
tufa annotate --in samples/cesr-streams/CESR_1_0-oor-auth-vc.cesr

# Annotate from stdin
cat samples/cesr-streams/CESR_1_0-oor-auth-vc.cesr | tufa annotate

# Benchmark CESR parser on any stream
tufa benchmark cesr --in samples/cesr-streams/CESR_1_0-oor-auth-vc.cesr
```

`tufa annotate` supports:

- `--in ` input file (defaults to stdin)
- `--out ` output file (defaults to stdout)
- `--qb2` treat input as qb2 binary
- `--pretty` pretty-print annotation output
- `--colored` colorize annotation output on stdout only (ignored with `--out`)

Color overrides can be provided in `$HOME/.tufa/annot-color.yaml` or
`$HOME/.tufa/annot-color.yml` with keys: `counter`, `group`, `body`,
`signature`, `said`, `opaque`, `comment`. Allowed values: `black`, `red`,
`green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, and bright variants
(`brightBlack` ... `brightWhite`).

## From source (repo)

```bash
# Run CLI from workspace
deno task tufa version
deno task tufa annotate --in ../../samples/cesr-streams/CESR_1_0-oor-auth-vc.cesr

# Run standard CESR parser benchmark baselines
deno task bench:cesr

# Benchmark parser on any stream from source
deno task tephra:bench --in ../../samples/cesr-streams/CESR_1_0-oor-auth-vc.cesr

# Run quality checks
deno task quality
```

## Package docs

- `packages/tufa/README.md`: `@keri-ts/tufa` CLI package
- `packages/keri/README.md`: `keri-ts` library package
- `packages/cesr/README.md`: `cesr-ts` parser/annotator library

## Maintainer docs

Release/versioning and maintainer workflows are documented in:

- `MAINTAINER-README.md`
- `docs/versioning/release-versioning.md`

## License

Licensed under the Apache License, Version 2.0 (`Apache-2.0`). See `LICENSE`.