Go data package for Nostr protocol JSON schemas. Embeds compiled JSON schema files from nostrability/schemata and provides a registry lookup.
import schemata "github.com/nostrability/schemata-go"
schema, ok := schemata.Get("kind1Schema")
if ok {
// schema is a json.RawMessage
}
keys := schemata.Keys() // all available schema keys, sorted| Function | Description |
|---|---|
Get(key) (json.RawMessage, bool) |
Look up a schema by registry key |
Keys() []string |
List all available schema keys |
GPL-3.0-or-later