/blockstack.js

The Blockstack JS library for identity and auth

Primary LanguageHTMLMIT LicenseMIT

blockstack.js CircleCI npm npm npm Slack

Note: If you're looking for the Blockstack CLI repo it was merged with Blockstack Core.

Installation

$ npm install blockstack

About

Blockstack JS is a library for profiles/identity and authentication.

The authentication portion of this library can be used to:

  1. create an authentication request
  2. create an authentication response

The profiles/identity portion of this library can be used to:

  1. transform a JSON profile into cryptographically-signed signed tokens
  2. recover a JSON profile from signed tokens
  3. validate signed profile tokens

Note: this document uses ES6 in its examples but it is compiled down to Javascript (ES5) and is perfectly compatible with it. If you're using the latter, just make a few adjustments to the examples below (e.g. use "let" instead of "var").

Auth

Documentation

Profiles

Documentation

Testing

$ npm run test

Testing in a browser

This test will only work with your browser's Cross-Origin Restrictions disabled.

Run npm run compile; npm run browserify before opening the file test.html in your browser.