// Code generated by seatgen from the seat definitions; DO NOT EDIT. // The contract of the seat "mesh-node-enroller", defined whole (seats/mesh-node-enroller/seat.json): The seat that enrols a new machine on the operator's Approve and a one-time token (ADR 0587). Renamed from mesh-enrolment (ADR 0634 ยง9). export const seat = "mesh-node-enroller"; export const verbs = { issue: "issue", redeem: "redeem", confirm: "confirm", revoke: "revoke", tokens: "tokens", again: "again", }; export const events = { enrolmentIssued: "enrolment-issued", nodeEnrolled: "node-enrolled", enrolmentRefused: "enrolment-refused", enrolmentRevoked: "enrolment-revoked", enrolmentExpired: "enrolment-expired", }; export const family = { name: "mesh-node-enroller.events", maxAgeDays: 7 }; export const enrolmentIssuedSubject = "mesh.seat.mesh-node-enroller.event.enrolment-issued"; export const nodeEnrolledSubject = "mesh.seat.mesh-node-enroller.event.node-enrolled"; export const enrolmentRefusedSubject = "mesh.seat.mesh-node-enroller.event.enrolment-refused"; export const enrolmentRevokedSubject = "mesh.seat.mesh-node-enroller.event.enrolment-revoked"; export const enrolmentExpiredSubject = "mesh.seat.mesh-node-enroller.event.enrolment-expired"; export const states = { enrolments: "enrolments", }; /** The key of one value of the state enrolments under the form "node.". */ export function enrolmentsByNodeNodeKey(node) { return "node." + node; } /** The parts of a key of the form "node.", or undefined for a key of another form. */ export function parseEnrolmentsByNodeNodeKey(_key) { let _rest = _key; if (!_rest.startsWith("node.")) return undefined; _rest = _rest.slice(5); if (_rest === "") return undefined; const node = _rest; _rest = ""; if (_rest !== "") return undefined; return { node }; } /** The key of one value of the state enrolments under the form "address.
". */ export function enrolmentsByAddressAddressKey(address) { return "address." + address; } /** The parts of a key of the form "address.
", or undefined for a key of another form. */ export function parseEnrolmentsByAddressAddressKey(_key) { let _rest = _key; if (!_rest.startsWith("address.")) return undefined; _rest = _rest.slice(8); if (_rest === "") return undefined; const address = _rest; _rest = ""; if (_rest !== "") return undefined; return { address }; }