provenance

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

nbrain-c2pa-didweb-go

Zero-dependency Go 1.22+ SDK generating W3C did:web documents, RFC 7033 webfinger JRDs, W3C tdmrep.json AI training permissions, and RFC 9116 security.txt.

Documentation

Overview

Package provenance builds standards-compliant W3C did:web DID Documents, RFC 7033 WebFinger JRDs, W3C TDM Reservation Protocol (tdmrep.json) AI policy manifests, and RFC 9116 security.txt files. Built by Eng. Nadeem Mohamed Badr El-Din (https://nadeembadr.com/about/) & NBrain (https://nbra.in/).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDIDWeb

func BuildDIDWeb(domain string, alsoKnownAs []string) ([]byte, error)

BuildDIDWeb constructs a W3C did:web document for domain and alsoKnownAs URIs.

func BuildTDMRep

func BuildTDMRep(location string, reservation int) ([]byte, error)

BuildTDMRep generates a W3C TDM Reservation Protocol JSON array (reservation=0 grants open AI/research mining).

func BuildWebFinger

func BuildWebFinger(subject string, aliases []string, profileURL string) ([]byte, error)

BuildWebFinger generates an RFC 7033 JSON Resource Descriptor for /.well-known/webfinger.

func FormatSecurityTxt

func FormatSecurityTxt(contact, canonical, expires string) string

FormatSecurityTxt builds an RFC 9116 /.well-known/security.txt document.

Types

type DIDDocument

type DIDDocument struct {
	Context     []string         `json:"@context"`
	ID          string           `json:"id"`
	AlsoKnownAs []string         `json:"alsoKnownAs,omitempty"`
	Service     []map[string]any `json:"service,omitempty"`
}

DIDDocument models a W3C DID Core 1.0 document for did:web.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL