package catalogue import contractseats "git.novox.be/novox/mesh-contracts/go/seats" // EngineSeat is the node seat every node's engine holds. const EngineSeat = contractseats.NodeEngine // EngineVerbs are the node-engine seat's verbs, in the order ADR 0563 §1 names them: its definition's, read from the // generated seat list (design 26). func EngineVerbs() []Verb { s, _ := seatIn(defaultSeats, EngineSeat) return append([]Verb(nil), s.Serves...) } // EngineEvents are what the seat says of an act, each naming the act, the path or access, the caller as the runtime // proved it and the ask (ADR 0563 §1). var EngineEvents = func() []string { s, _ := seatIn(defaultSeats, EngineSeat) return append([]string(nil), s.Emits...) }() // seatIn is the seat of that name in a list. func seatIn(list []Seat, name string) (Seat, bool) { for _, s := range list { if s.Name == name { return s, true } } return Seat{}, false }