@cef-ebsi/vcdm1.1-horse-registry-schema
v1.0.0
Published
Horse Registry Credential (VCDM 1.1)
Downloads
52
Keywords
Readme
@cef-ebsi/vcdm1.1-horse-registry-schema
Horse Registry Credential
Schema for a verifiable credential representing the registry and details of a horse.
The schema is published to the Trusted Schemas Registry with the IDs:
0x2229bad5d214bf436bfe4238d86520399ad691d9f248c025562156aa2b12847a(hexadecimal)z3JMmXrayDMgti16nyQkXgfSUXNi7VQyVXeYQLXk12Rh3(multibase base58btc)
Table of Contents
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Horse Registry Credential",
"description": "Schema for a verifiable credential representing the registry and details of a horse.",
"type": "object",
"allOf": [
{
"$ref": "./node_modules/@cef-ebsi/vcdm1.1-attestation-schema/schema.json"
},
{
"properties": {
"type": {
"description": "VC types including domain-specific type.",
"type": "array",
"items": { "type": "string" },
"contains": { "const": "HorseRegistryCredential" }
},
"credentialSchema": {
"description": "Reference to this schema (TSR/canonical URL when published).",
"type": "object",
"properties": {
"id": { "type": "string", "format": "uri" },
"type": { "type": "string" }
},
"required": ["id", "type"],
"additionalProperties": false
},
"credentialSubject": {
"description": "Contains the horse's identification and details.",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uri",
"description": "Stable identifier for the horse (e.g., urn:ueln:123..., or urn:iso11784:chip:...)."
},
"name": {
"type": "string",
"description": "Official name of the horse."
},
"microchip": {
"type": "string",
"pattern": "^[0-9]{15}$",
"description": "ISO 11784/11785 FDX-B microchip number (15 digits)."
},
"ueln": {
"type": "string",
"pattern": "^[0-9]{15}$",
"description": "UELN number (15 digits)."
},
"birthDate": {
"type": "string",
"format": "date",
"description": "Birth date (YYYY-MM-DD)."
},
"sex": {
"type": "string",
"enum": ["M", "F"],
"description": "Sex of the horse."
},
"coatColor": {
"type": "string",
"description": "Coat color of the horse."
},
"breed": {
"type": "string",
"description": "Breed (e.g., PSL)."
},
"breeder": {
"type": "string",
"description": "Breeder name."
},
"paternalLine": {
"type": "object",
"description": "Lineage on the father's side.",
"properties": {
"father": { "type": "string", "description": "Father" },
"paternalGrandfather": {
"type": "string",
"description": "Paternal grandfather (father's father)"
},
"paternalGreatGrandfather": {
"type": "string",
"description": "Great-grandfather (paternal, male branch)"
},
"paternalGreatGrandmother": {
"type": "string",
"description": "Great-grandmother (paternal, female branch)"
},
"paternal2ndGreatGrandfather": {
"type": "string",
"description": "2nd great-grandfather (paternal, male branch)"
},
"paternal2ndGreatGrandmother": {
"type": "string",
"description": "2nd great-grandmother (paternal, female branch)"
}
},
"required": ["father"],
"additionalProperties": false
},
"maternalLine": {
"type": "object",
"description": "Lineage on the mother's side.",
"properties": {
"mother": { "type": "string", "description": "Mother" },
"maternalGrandfather": {
"type": "string",
"description": "Maternal grandfather (mother's father)"
},
"maternalGreatGrandfather": {
"type": "string",
"description": "Great-grandfather (maternal, male branch)"
},
"maternalGreatGrandmother": {
"type": "string",
"description": "Great-grandmother (maternal, female branch)"
},
"maternal2ndGreatGrandfather": {
"type": "string",
"description": "2nd great-grandfather (maternal, male branch)"
},
"maternal2ndGreatGrandmother": {
"type": "string",
"description": "2nd great-grandmother (maternal, female branch)"
}
},
"required": ["mother"],
"additionalProperties": false
}
},
"required": [
"name",
"microchip",
"ueln",
"birthDate",
"sex",
"coatColor",
"breed",
"breeder",
"paternalLine",
"maternalLine"
],
"additionalProperties": false
}
},
"required": ["type", "credentialSubject"]
}
]
}Installation
# with npm
npm add @cef-ebsi/[email protected]
# with Yarn
yarn add @cef-ebsi/[email protected]
# with pnpm
pnpm add @cef-ebsi/[email protected]Usage
The package exports the schema and its metadata as JavaScript objects:
import { schema, metadata } from "@cef-ebsi/vcdm1.1-horse-registry-schema";
// you can now use the schema and metadataIn addition, the package exports a TypeScript type corresponding to the schema:
import type { HorseRegistryCredential } from "@cef-ebsi/vcdm1.1-horse-registry-schema";License
Copyright (C) 2024 European Union
This program is free software: you can redistribute it and/or modify it under the terms of the EUROPEAN UNION PUBLIC LICENCE v. 1.2 as published by the European Union.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the EUROPEAN UNION PUBLIC LICENCE v. 1.2 for further details.
You should have received a copy of the EUROPEAN UNION PUBLIC LICENCE v. 1.2. along with this program. If not, see https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12.
