# blockstack

> The Blockstack Javascript library for authentication, identity, and storage.

Latest version **21.1.1** (published 2020-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install blockstack
pnpm add blockstack
yarn add blockstack
bun add blockstack
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 21.1.1 |
| Published | 2020-08-24 |
| First published | 2016-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 22 |
| Unpacked size | 11.7 MB |
| Known vulnerabilities | 0 (+6 in 5 direct dependencies) |
| Install scripts | no |
| GitHub stars | 975 |
| Author | Blockstack PBC |
| Maintainers | ablankstein, hstove, larrysalibra, reedrosenbluth, shea256, yknl, zone117x |
| Keywords | blockchain, id, auth, authentication, bitcoin, blockchain auth, blockchain authentication, blockchainid, blockchain id, bitcoin auth, bitcoin authentication, bitcoin login, blockchain login, authorization, login, signin, sso, crypto, cryptography, token, blockstack, blockstack auth, profile, identity, ethereum |

## Links

- npm: https://www.npmjs.com/package/blockstack
- Repository: https://github.com/blockstack/blockstack.js
- Homepage: https://blockstack.org
- Issues: https://github.com/blockstack/blockstack.js/issues
- npm.io page: https://npm.io/package/blockstack

## Dependencies (22)

- [ajv](https://npm.io/package/ajv.md) ^4.11.5
- [uuid](https://npm.io/package/uuid.md) ^3.3.3
- [bip39](https://npm.io/package/bip39.md) ^3.0.2
- [bn.js](https://npm.io/package/bn.js.md) ^4.11.8
- [tslib](https://npm.io/package/tslib.md) ^1.10.0
- [sha.js](https://npm.io/package/sha.js.md) ^2.4.11
- [request](https://npm.io/package/request.md) ^2.88.0
- [elliptic](https://npm.io/package/elliptic.md) ^6.5.1
- [form-data](https://npm.io/package/form-data.md) ^2.5.1
- [zone-file](https://npm.io/package/zone-file.md) ^1.0.0
- [jsontokens](https://npm.io/package/jsontokens.md) 3.0.0
- [@types/node](https://npm.io/package/@types/node.md) ^12.7.12
- [cross-fetch](https://npm.io/package/cross-fetch.md) ^3.0.4
- [randombytes](https://npm.io/package/randombytes.md) ^2.1.0
- [@types/bn.js](https://npm.io/package/@types/bn.js.md) ^4.11.6
- [query-string](https://npm.io/package/query-string.md) ^6.8.3
- [bitcoinjs-lib](https://npm.io/package/bitcoinjs-lib.md) ^5.1.6
- [ripemd160-min](https://npm.io/package/ripemd160-min.md) 0.0.5
- [@types/cheerio](https://npm.io/package/@types/cheerio.md) ^0.22.13
- [@types/elliptic](https://npm.io/package/@types/elliptic.md) ^6.4.10
- [schema-inspector](https://npm.io/package/schema-inspector.md) ^1.6.8
- [@types/randombytes](https://npm.io/package/@types/randombytes.md) ^2.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 21.1.1 (latest) — 2020-08-24
- 18.1.6 (v18-support) — 2023-03-21
- 19.2.9 (v19-support) — 2021-06-23
- 21.1.0-beta.1 (beta) — 2020-05-20
- 21.0.0-alpha.4 (alpha) — 2019-11-18
- 19.2.2-beta.1 (prerelease) — 2019-06-24
- 18.1.5 — 2021-01-19
- 18.1.4 — 2021-01-19
- 18.1.3 — 2021-01-15
- 18.1.2 — 2021-01-15
- 19.2.8 — 2020-12-30
- 19.2.7 — 2020-11-16
- 19.2.6 — 2020-11-13
- 18.1.1 — 2020-09-24
- 21.1.0 — 2020-06-05
- … 123 more at https://npm.io/package/blockstack/versions

## README

# blockstack.js [![CircleCI](https://img.shields.io/circleci/project/blockstack/blockstack.js/master.svg)](https://circleci.com/gh/blockstack/blockstack.js/tree/master) [![npm](https://img.shields.io/npm/v/blockstack.svg)](https://www.npmjs.com/package/blockstack) [![npm](https://img.shields.io/npm/dm/blockstack.svg)](https://www.npmjs.com/package/blockstack) [![npm](https://img.shields.io/npm/l/blockstack.svg)](https://www.npmjs.com/package/blockstack) [![Slack](https://img.shields.io/badge/join-slack-e32072.svg?style=flat)](http://slack.blockstack.org/)

Note: If you're looking for the Blockstack CLI repo it was merged with [Blockstack Core](https://github.com/blockstack/blockstack-core).

  - [Installation](#installation)
  - [About](#about)
  - [Documentation](#documentation)
  - [Compatibility](#compatibility)
  - [Contributing](#contributing)
  - [Maintainer](#maintainer)
  - [Testing](#testing)
    - [Testing in a browser](#testing-in-a-browser)
  - [Releasing](#releasing)

## Installation

```
$ npm install blockstack
```

### Using blockstack.js with a CDN

You can import `blockstack.js` as a script without using a package manager. 
To securely use the latest distribution of blockstack.js from a CDN, use the following script in your application:

<!-- cdn -->
```html
<script src="https://unpkg.com/blockstack@21.1.1/dist/blockstack.js" integrity="sha384-QsRlJlLKvr/Vq4iv1MPwTqoMx5hd0StlnCBCTdwbb0ituqCGaTxjNIkdahGHlnwb" crossorigin="anonymous"></script>
```
<!-- cdnstop -->

_Note: this is script is bundled as standalone (UMD) lib, targeting ES6 (ECMAScript 2015)._



## About

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

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 tokens
2.  recover a JSON profile from signed tokens
3.  validate signed profile tokens

The storage portion of this library can be used to:

1. store and retrieve your app's data in storage that is controlled by the user

_Note:_ this lib is written in Typescript and is compiled to ES6 (ECMAScript 2015)
syntax and uses CommonJS modules. The NPM package works out of the box within the 
Node.js runtime, and within browsers when using a common bundler (e.g. Webpack, 
Browserify, Rollup, etc).


## Documentation

[![Documentation](/docs-button.png)](http://blockstack.github.io/blockstack.js/index.html)

## Compatibility

_Note:_ blockstack.js 0.14.0 and newer versions use a new on-disk format that is not backward compatible with prior versions.

## Contributing

This repository uses the [git flow branching mode](http://nvie.com/posts/a-successful-git-branching-model/).

The latest released code as deployed to npm is in `master` and the latest delivered development
changes for the next release are in `develop`.

We use the [git-flow-avh](https://github.com/petervanderdoes/gitflow-avh) plugin.

Please send pull requests against `develop`. Pull requests should include tests,
[flow static type annotations](https://flow.org) and be lint free. Open your pull request using the template in  `PULL_REQUEST_TEMPLATE.md`

Github issues marked [help-wanted](https://github.com/blockstack/blockstack.js/labels/help-wanted)
are great places to start. Please ask in a github issue or slack before embarking
on larger issues that aren't labeled as help wanted or adding additional
functionality so that we can make sure your contribution can be included!

## Maintainer

This repository is maintained by [yukan.id](https://explorer.blockstack.org/name/yukan.id).

## Testing

    $ npm run test

    We test on the "Active LTS" version of Node.

### 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.

## Releasing
See `release-checklist.md`

---
_Source: https://npm.io/package/blockstack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
