Created
March 4, 2015 15:52
-
-
Save oconnor663/eb90a4100385d6f29ddb to your computer and use it in GitHub Desktop.
Exercise the daemon RPC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpc = require 'framed-msgpack-rpc' | |
assert = require 'assert' | |
x = rpc.createTransport { path: '/run/user/1000/keybased.sock' } | |
await x.connect defer err | |
if err | |
console.log "error connecting" | |
else | |
c = new rpc.Client x, "keybase.1" | |
await c.invoke 'config.getCurrentStatus', [{}], defer err, response | |
if err? then console.log "error in RPC: #{err.toString()}" | |
else console.log response | |
x.close() | |
process.exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment