git ssb

2+

ev / minsbot



Tree: f1a984b03058530d675879e478d5f867b012af1a

Files: f1a984b03058530d675879e478d5f867b012af1a / test / util.js

532 bytesRaw
1var ref = require('ssb-ref')
2
3exports.follow = function (id) {
4 return {
5 type: 'contact', contact: id, following: true
6 }
7}
8exports.unfollow = function (id) {
9 return {
10 type: 'contact', contact: id, following: false
11 }
12}
13exports.block = function unfollow(id) {
14 return {
15 type: 'contact', contact: id, flagged: true
16 }
17}
18
19exports.pub = function (address) {
20 return {
21 type: 'pub',
22 address: ref.parseAddress(address)
23 }
24}
25
26exports.file = function (hash) {
27 return {
28 type: 'file',
29 file: hash
30 }
31}
32
33

Built with git-ssb-web