git ssb

2+

Dominic / ssb-client



Commit 37dd79180ddcb9c8d358a3461b4ab27d7cc27e4f

tweak readme

Paul Frazee committed on 3/10/2015, 9:09:30 PM
Parent: 0a0f0519d65854f70324178bc08739658ca3a62e

Files changed

README.mdchanged
README.mdView
@@ -4,26 +4,28 @@
44
55 ```js
66
77 var Client = require('ssb-client')
8-var ssbKeys = require('ssb-keys')
8 +var Keys = require('ssb-keys')
99
1010 // desktop app:
11-var keys = ssbKeys.loadOrCreateSync('./app-private.key')
11 +var keys = Keys.loadOrCreateSync('./app-private.key')
1212
1313 // web app:
1414 var keys
1515 try {
1616 keys = JSON.parse(localStorage.keys)
1717 } catch (e) {
18- keys = ssbKeys.generate()
18 + keys = Keys.generate()
1919 localStorage.keys = JSON.stringify(keys)
2020 }
2121
22 +// connect:
2223 var client = Client(keys, config)
2324 .connect(abortIf)
24- .auth(ssbKeys.createAuth(keys), abortIf)
25 + .auth(Keys.createAuth(keys), abortIf)
2526
27 +// post to feed:
2628 var feed = client.createFeed(keys)
2729 feed.add({
2830 type: 'post', text: 'hello, world!'
2931 }, function (err, msg) {

Built with git-ssb-web