Metadata-Version: 2.4
Name: vc-jwt-decoder
Version: 1.8.1
Summary: decode vc-jwt and vp-jwt from the command line
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: cbor2>=6.1.2
Requires-Dist: httpx>=0.28.1
Requires-Dist: jwcrypto>=1.5.7
Requires-Dist: py-multibase>=2.0.0
Requires-Dist: py-multicodec>=1.0.0
Requires-Dist: rdflib>=7.6.0
Provides-Extra: cli
Requires-Dist: rich>=14.3.3; extra == 'cli'
Description-Content-Type: text/markdown

# VC JWT Decoder (CLI)

[![pipeline status](https://gitlab.com/riphixel/vc-jwt-decoder/badges/main/pipeline.svg)](https://gitlab.com/riphixel/vc-jwt-decoder/-/commits/main)
[![coverage report](https://gitlab.com/riphixel/vc-jwt-decoder/badges/main/coverage.svg)](https://gitlab.com/riphixel/vc-jwt-decoder/-/commits/main)
 [![Latest Release](https://gitlab.com/riphixel/vc-jwt-decoder/-/badges/release.svg)](https://gitlab.com/riphixel/vc-jwt-decoder/-/releases)

Features:

- [X] decode VC JWT
- [X] decode VP JWT
- [X] decode VP JWT with encapsulated VC
- [X] decode COSE JWT
- [X] support did:web signature verification
- [X] support did:wba signature verification
- [X] support did:key signature verification. Supports `ed25519-pub`,  `secp256k1-pub`, `p256-pub`, `p384-pub`
- [ ] support did:jwk signature verification
- [ ] support did:dns signature verification
- [X] support OpenID Connect signature verification
- [ ] support reading attachement from PDFs
- [X] export data as RDF. Supports `.json-ld`, `.xml`, `.trix`, `.ttl`, `.trig`, `.nt`, `.n3`

## Install

```shell
pip install "vc-jwt-decoder[cli]" --index-url https://gitlab.com/api/v4/projects/81099593/packages/pypi/simple
```

`vc-jwt-decoder` can also be installed without the `[cli]` extra and used as a library (decoding, verification, RDF export) without pulling in `rich`.

## Usage

```shell
vc-jwt-decoder <token_file>
```

[![demo](https://asciinema.lab.gronlier.fr/a/bht2YzrV2qYZMSJK.svg)](https://asciinema.lab.gronlier.fr/a/bht2YzrV2qYZMSJK)

Example:

```shell
wget -q https://gitlab.com/cde-public/credentials/-/raw/main/participants/participant_vc_cispe_vc_urn:cde:v5:c92e611f-e97e-40e9-8ee6-31e7c60e6892.jwt -O - | vc-jwt-decoder
```

## Development

### Local testing

```shell
uv build
uv run pytest -v
```

### Local CI

For local CI with [gitlab-ci-local](https://github.com/firecow/gitlab-ci-local) Create the file `.gitlab-ci-local-variables.yml` with this content

```yaml
---
SEMREL_DRY_RUN: true # avoid messing with production
GITLAB_TOKEN: XXX # create a token with those permissions: read_repository, write_repository, api
```
