feat: initial commit

This commit is contained in:
l.weber 2025-12-05 12:20:05 +01:00
commit a161b86c9a
705 changed files with 288162 additions and 0 deletions

View file

@ -0,0 +1,37 @@
// Package credv1 contains terms for the W3ID Credentials namespace.
package credv1
import (
_ "embed"
)
//go:embed context.jsonld
var ContextDocument []byte
// IRI is the remote context IRI.
const IRI = "https://w3id.org/credentials/v1"
// Namespace is the IRI prefix used for terms defined in this namespace.
const Namespace = "https://w3id.org/credentials#"
const (
// Claim is an IRI, either as a string or as an object with an
// id property.
Claim = Namespace + "claim"
// Credential is an IRI, either as a string or as an object with an
// id property.
Credential = Namespace + "credential"
// Issued is an xml:dateTime, equivalent to a time.Date in RFC3339Nano.
Issued = Namespace + "issued"
// Issuer is an IRI, either as a string or as an object with an
// id property.
Issuer = Namespace + "issuer"
// Recipient is an IRI, either as a string or as an object with an
// id property.
Recipient = Namespace + "recipient"
// ReferenceID is a string.
ReferenceID = Namespace + "referenceId"
TypeCredential = Namespace + "Credential"
// TypeCryptographicKeyCredential is a possible value for the type property.
TypeCryptographicKeyCredential = Namespace + "CryptographicKeyCredential"
)

View file

@ -0,0 +1,78 @@
{
"@context": {
"id": "@id",
"type": "@type",
"cred": "https://w3id.org/credentials#",
"dc": "http://purl.org/dc/terms/",
"sec": "https://w3id.org/security#",
"schema": "http://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"Identity": "https://w3id.org/identity#Identity",
"claim": {
"@id": "cred:claim",
"@type": "@id"
},
"credential": {
"@id": "cred:credential",
"@type": "@id"
},
"issued": {
"@id": "cred:issued",
"@type": "xsd:dateTime"
},
"issuer": {
"@id": "cred:issuer",
"@type": "@id"
},
"recipient": {
"@id": "cred:recipient",
"@type": "@id"
},
"referenceId": "cred:referenceId",
"Credential": "cred:Credential",
"CryptographicKeyCredential": "cred:CryptographicKeyCredential",
"created": {
"@id": "dc:created",
"@type": "xsd:dateTime"
},
"creator": {
"@id": "dc:creator",
"@type": "@id"
},
"domain": "sec:domain",
"expires": {
"@id": "sec:expiration",
"@type": "xsd:dateTime"
},
"nonce": "sec:nonce",
"normalizationAlgorithm": "sec:normalizationAlgorithm",
"owner": {
"@id": "sec:owner",
"@type": "@id"
},
"privateKey": {
"@id": "sec:privateKey",
"@type": "@id"
},
"privateKeyPem": "sec:privateKeyPem",
"publicKey": {
"@id": "sec:publicKey",
"@type": "@id"
},
"publicKeyPem": "sec:publicKeyPem",
"publicKeyService": {
"@id": "sec:publicKeyService",
"@type": "@id"
},
"revoked": {
"@id": "sec:revoked",
"@type": "xsd:dateTime"
},
"signature": "sec:signature",
"signatureAlgorithm": "sec:signatureAlgorithm",
"signatureValue": "sec:signatureValue",
"CryptographicKey": "sec:Key",
"GraphSignature2012": "sec:GraphSignature2012",
"LinkedDataSignature2015": "sec:LinkedDataSignature2015"
}
}