Markdown To Create Verifiable Credential Type Metadata
A tool to generate VCTM (Verifiable Credential Type Metadata) files from markdown, as specified in Section 6 of draft-ietf-oauth-sd-jwt-vc-11.
mtcvctm allows you to author Verifiable Credential Type definitions using familiar markdown syntax and automatically converts them to valid VCTM JSON files. The tool is designed to be used in CI/CD pipelines, particularly as a GitHub Action, to maintain a registry of credential type definitions.
go install github.com/sirosfoundation/mtcvctm/cmd/mtcvctm@latestdocker pull ghcr.io/sirosfoundation/mtcvctm:latestmtcvctm generate credential.md
mtcvctm gen credential.md -o output.vctm
mtcvctm generate credential.md --base-url https://registry.example.comProcess all markdown files in a directory:
mtcvctm batch --input ./credentials --output ./vctm --base-url https://registry.example.commtcvctm batch --github-action --vctm-branch vctm --commit-message "Update VCTM files"---
vct: https://example.com/credentials/identity
background_color: "#1a365d"
text_color: "#ffffff"
---
# Identity Credential
A verifiable credential for identity verification.
## Claims
- `given_name` (string): The given name of the holder [mandatory]
- `family_name` (string): The family name of the holder [mandatory]
- `birth_date` (date): Date of birth [sd=always]
- `nationality` (string): Nationality of the holder
## Images
The optional YAML front matter supports:
| Key | Description |
|---|---|
vct |
Verifiable Credential Type identifier |
background_color |
Background color for credential display |
text_color |
Text color for credential display |
extends |
Comma-separated list of VCT identifiers this type extends |
Claims are defined in list items with the following format:
- `claim_name` (type): Description [mandatory] [sd=always|never]
- claim_name: The claim identifier (required)
- type: The value type -
string,date,number, etc. (default:string) - Description: Human-readable description
- [mandatory]: Mark the claim as mandatory
- [sd=always|never]: Selective disclosure setting
Images referenced in the markdown become:
- The first image becomes the credential logo
- SVG files become SVG templates for rendering
When --base-url is specified, URLs and SRI integrity hashes are generated for all images.
Configuration can be provided via:
- YAML configuration file
- Command line arguments (take priority)
input: credential.md
output: credential.vctm
base_url: https://registry.example.com
language: en-US
vctm_branch: vctmUse mtcvctm as a GitHub Action to automatically generate VCTM files:
name: Update VCTM
on:
push:
branches: [main]
paths:
- 'credentials/**/*.md'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sirosfoundation/mtcvctm@v1
with:
input-dir: ./credentials
output-dir: ./vctm
base-url: https://registry.example.com
vctm-branch: vctm| Input | Description | Default |
|---|---|---|
input-dir |
Directory containing markdown files | . |
output-dir |
Output directory for VCTM files | . |
base-url |
Base URL for generating image URLs | `` |
vctm-branch |
Branch name for VCTM files | vctm |
commit-message |
Commit message for updates | Update VCTM files [skip ci] |
| Output | Description |
|---|---|
registry-path |
Path to the generated registry file |
credential-count |
Number of credentials processed |
The tool generates a .well-known/vctm-registry.json file:
{
"version": "1.0",
"generated": "2024-01-15T10:00:00Z",
"repository": {
"url": "https://github.com/org/repo",
"owner": "org",
"name": "repo",
"branch": "main",
"commit": "abc123"
},
"credentials": [
{
"vct": "https://example.com/credentials/identity",
"name": "Identity Credential",
"source_file": "identity.md",
"vctm_file": "identity.vctm",
"last_modified": "2024-01-15T10:00:00Z",
"commit_history": [...]
}
]
}make buildmake testmake coveragemake docker-buildBSD 2-Clause License - Copyright (c) 2026 Siros Foundation. See LICENSE for details.