// state-base contract — hyperschema TYPE definitions.
module.exports = function (schema) {
const ns = schema.namespace('state')
ns.register({
name: 'entry',
fields: [
{ name: 'key', type: 'string', required: true },
{ name: 'value', type: 'string' }, // JSON-encoded Variant from the game
{ name: 'ts', type: 'uint' },
// admission proof carried on an OPTIMISTIC write by a not-yet-admitted
// member (D1b). JSON: { identity: <hex>, proof: <hex> }. Absent for normal
// writes by an already-admitted writer.
{ name: 'admit', type: 'string' }
]
})
ns.register({
name: 'entry-key',
fields: [
{ name: 'key', type: 'string', required: true },
{ name: 'ts', type: 'uint' }
]
})
}