Files: 610dca323ebed504839ca715b11cf37b356ccacf / test.js
559 bytesRaw
1 | |
2 | var spawnBot = require('./bot') |
3 | |
4 | var mom = spawnBot() |
5 | var friend = spawnBot() |
6 | |
7 | |
8 | |
9 | friend.do.bonjour() |
10 | friend.do.onConnect(function(peer){ |
11 | peer.dexbot.greeting(friend.name, function(err, address){ |
12 | console.log(err, address) |
13 | peer.dexbot.sign(`${friend.name} says ${peer.id} is all right with ${friend.keys.id}`, function(err, msg){ |
14 | console.log(err, msg) |
15 | }) |
16 | //friend.do.greeting(friend.name, console.log) |
17 | }) |
18 | }) |
19 | mom.do.bonjour() |
20 | mom.do.greet(function(bot){ |
21 | //console.log(bot) |
22 | mom.do.connect(bot, function(rpc){ |
23 | |
24 | }) |
25 | }) |
26 |
Built with git-ssb-web