<commit_before># Blockchain Auth

[![CircleCI](https://img.shields.io/circleci/project/blockstack/blockchain-auth-js.svg)](https://circleci.com/gh/blockstack/blockchain-auth-js/tree/master)
[![npm](https://img.shields.io/npm/v/blockchain-auth.svg)](https://www.npmjs.com/package/blockchain-auth)
[![npm](https://img.shields.io/npm/dm/blockchain-auth.svg)](https://www.npmjs.com/package/blockchain-auth)
[![npm](https://img.shields.io/npm/l/blockchain-auth.svg)](https://www.npmjs.com/package/blockchain-auth)
[![Slack](http://slack.blockstack.org/badge.svg)](http://slack.blockstack.org/)

A Blockchain ID authentication library written in node.js that supports generating, decoding and verifying auth request and auth response tokens.

[![Read the Wiki](https://raw.githubusercontent.com/blockstack/blockchain-id/master/images/read-the-wiki.png)](https://github.com/blockstack/blockchain-id/wiki/Blockchain-Auth)

## Getting Started

```
$ npm install blockchain-auth
```

```js
var blockchainAuth = require('blockchain-auth'),
    AuthRequest = blockchainAuth.AuthRequest,
    AuthResponse = blockchainAuth.AuthResponse
```

## Auth Requests

### Request Format<commit_msg>add large npm badge<commit_after># Blockchain Auth

[![CircleCI](https://img.shields.io/circleci/project/blockstack/blockchain-auth-js.svg)](https://circleci.com/gh/blockstack/blockchain-auth-js/tree/master)
[![npm](https://img.shields.io/npm/l/blockchain-auth.svg)](https://www.npmjs.com/package/blockchain-auth)
[![Slack](http://slack.blockstack.org/badge.svg)](http://slack.blockstack.org/)

[![](https://nodei.co/npm/blockchain-auth.png)](https://www.npmjs.com/package/blockchain-auth)

A Blockchain ID authentication library written in node.js that supports generating, decoding and verifying auth request and auth response tokens.

[![Read the Wiki](https://raw.githubusercontent.com/blockstack/blockchain-id/master/images/read-the-wiki.png)](https://github.com/blockstack/blockchain-id/wiki/Blockchain-Auth)

## Getting Started

```
$ npm install blockchain-auth
```

```js
var blockchainAuth = require('blockchain-auth'),
    AuthRequest = blockchainAuth.AuthRequest,
    AuthResponse = blockchainAuth.AuthResponse
```

## Auth Requests

### Request Format
{'fraction_non_alphanumeric': 0.17284502009825814, 'fraction_numerical': 0.0, 'mean_word_length': 5.436781609195402, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 18, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6374603', 'n_tokens_mistral': 771, 'n_tokens_neox': 702, 'n_words': 97}