-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
34 lines (32 loc) · 1.17 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const Validator = require('is-my-ssb-valid')
// NOTE some at v2 (for v1 see ./group/${type}/v1/schema.json)
const groupInitRootSchema = require('./group/initRoot/v2/schema.json')
const groupInitEpochSchema = require('./group/initEpoch/v2/schema.json')
const groupAddMemberSchema = require('./group/add-member/v2/schema.json')
const groupExcludeMemberSchema = require('./group/exclude-member/schema.json')
const groupContentSchema = require('./group/content/schema.json')
module.exports = {
constants: {
directMessages: require('./direct-messages/constants.json'),
poBox: require('./po-box/constants.json')
},
schema: {
group: {
initRoot: groupInitRootSchema,
initEpoch: groupInitEpochSchema,
addMember: groupAddMemberSchema,
excludeMember: groupExcludeMemberSchema,
content: groupContentSchema
}
},
validator: {
group: {
initRoot: Validator(groupInitRootSchema),
initEpoch: Validator(groupInitEpochSchema),
addMember: Validator(groupAddMemberSchema),
excludeMember: Validator(groupExcludeMemberSchema),
content: Validator(groupContentSchema)
}
},
keySchemes: require('./key-schemes.json').scheme
}