BitBoss
Install
npm install bitboss -g
CLI 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 -gp
token
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 verify
wallet
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 server
To 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