A Prediction Market on the AT Protocol
at main 24 lines 894 B view raw
1import { document, object, record, required, string, ref } from "@atcute/lexicon-doc/builder"; 2 3const data = { 4 description: 'The record containing the Resolution for a Cumulus Market', 5 marketRefDescription: 'The record containing the Cumulus Market for this Resolution' 6} 7 8export default document({ 9 id: 'za.co.ciaran.cumulus.resolution', 10 description: data.description, 11 defs: { 12 main: record({ 13 key: 'tid', 14 description: data.description, 15 record: object({ 16 properties: { 17 market: required(ref({ ref: 'com.atproto.repo.strongRef', description: data.marketRefDescription })), 18 answer: required(string({ enum: ["yes", "no"], minLength: 2, maxLength: 3 })), 19 createdAt: required(string({ format: "datetime" })), 20 } 21 }) 22 }) 23 } 24});