Ship OpenFleet contracts and the OpenWall draft proposal (#177)

* feat: add OpenFleet membership and CoinPay rental contracts

* Propose OpenWall broadcasts and direct messaging contracts

* release: prepare OpenFleet and OpenWall public contracts

* fix: use tested npm for compatible CLI installs
This commit is contained in:
Anthony Ettinger 2026-09-13 00:57:45 -07:00 • committed by GitHub
parent a333726a1e
commit 45c7629953
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 2021 additions and 12 deletions

View file

@ -3,6 +3,7 @@ import * as addFormatsModule from "ajv-formats";
import type { ErrorObject } from "ajv";
import { parse } from "yaml";
import { isSchemaKind, schemas, type SchemaKind } from "./schemas.js";
import { validateOpenFleetReferences } from "./openfleet.js";
type CompiledSchema = { (data: unknown): boolean; errors?: ErrorObject[] | null };
@ -61,6 +62,10 @@ export function validate(kind: SchemaKind, data: unknown): ValidationResult {
const ok = validateDocument(data);
if (ok) {
if (kind === "openfleet") {
const errors = validateOpenFleetReferences(data);
if (errors.length) return { ok: false, kind, errors };
}
return { ok: true, kind, data };
}