@@ -1,12 +1,12 @@
|
||||
// This file is autogenerated by the hyperschema compiler
|
||||
// Schema Version: 1
|
||||
// Schema Version: 2
|
||||
/* eslint-disable camelcase */
|
||||
/* eslint-disable quotes */
|
||||
/* eslint-disable space-before-function-paren */
|
||||
|
||||
const { c } = require('hyperschema/runtime')
|
||||
|
||||
const VERSION = 1
|
||||
const VERSION = 2
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let version = VERSION
|
||||
@@ -236,6 +236,52 @@ const encoding8 = {
|
||||
}
|
||||
}
|
||||
|
||||
// @bridgeswarm/record
|
||||
const encoding9 = {
|
||||
preencode(state, m) {
|
||||
c.string.preencode(state, m.id)
|
||||
c.string.preencode(state, m.value)
|
||||
},
|
||||
encode(state, m) {
|
||||
c.string.encode(state, m.id)
|
||||
c.string.encode(state, m.value)
|
||||
},
|
||||
decode(state) {
|
||||
const r0 = c.string.decode(state)
|
||||
const r1 = c.string.decode(state)
|
||||
|
||||
return {
|
||||
id: r0,
|
||||
value: r1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @bridgeswarm/note
|
||||
const encoding10 = {
|
||||
preencode(state, m) {
|
||||
c.string.preencode(state, m.id)
|
||||
c.string.preencode(state, m.title)
|
||||
c.string.preencode(state, m.body)
|
||||
},
|
||||
encode(state, m) {
|
||||
c.string.encode(state, m.id)
|
||||
c.string.encode(state, m.title)
|
||||
c.string.encode(state, m.body)
|
||||
},
|
||||
decode(state) {
|
||||
const r0 = c.string.decode(state)
|
||||
const r1 = c.string.decode(state)
|
||||
const r2 = c.string.decode(state)
|
||||
|
||||
return {
|
||||
id: r0,
|
||||
title: r1,
|
||||
body: r2
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setVersion(v) {
|
||||
version = v
|
||||
}
|
||||
@@ -277,6 +323,10 @@ function getEncoding(name) {
|
||||
return encoding7
|
||||
case '@bridgeswarm/notify-request':
|
||||
return encoding8
|
||||
case '@bridgeswarm/record':
|
||||
return encoding9
|
||||
case '@bridgeswarm/note':
|
||||
return encoding10
|
||||
default:
|
||||
throw new Error('Encoder not found ' + name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user