bitboss
v0.0.2
Published
CLI for BitBoss tools
Readme
BitBoss
Install
npm install bitboss -gCLI Commands
BitBoss includes several commandline tools to help with generating keys, working with self signed JWTs, and running a server to interact with BitBoss via REST.
key
To generate a new private key you can use the key command with the -g option
bitboss key -g
If you need the public key you can use the -p flag
bitboss key -gptoken
To create a signed token you can pipe a key to token sign followed by the payload.
bitboss key -g | bitboss token sign '{"hello": "world"}'or
bitboss key -g > test.key
cat test.key | bitboss token sign '{"hello": "world"}'You can then verify the token with token verify which will return the full payload if given a valid token..
bitboss key -g | bitboss token sign '{"hello": "world"}' | bitboss token verifywallet
Using wallet server will start a REST server that can be used to verify tokens and create transactions. The server currently stubs out the /transactions endpoint but it can be used for testing.
bitboss wallet serverTo verify a token GET /tokens/:token where :token is the JWT and it will return the decoded token payload for valid tokens.
http://localhost:9001/tokens/selfsigned.json.webtoken