# hns-address

> Convenience `Address` class for HNS addresses.

Latest version **1.0.0** (published 2022-03-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install hns-address
pnpm add hns-address
yarn add hns-address
bun add hns-address
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-03-27 |
| First published | 2022-03-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 56.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | lukeburns |

## Links

- npm: https://www.npmjs.com/package/hns-address
- npm.io page: https://npm.io/package/hns-address

## Dependencies (3)

- [bsert](https://npm.io/package/bsert.md) ^0.0.10
- [bufio](https://npm.io/package/bufio.md) ^1.0.7
- [bcrypto](https://npm.io/package/bcrypto.md) ^5.4.0

## Recent versions

- 1.0.0 (latest) — 2022-03-27

## README

# Handshake Address

Convenience `Address` class for HNS addresses.

## Installation

```
npm i hns-address
```

## Usage

```js
const Address = require('hns-address');

// validate addresses
Address.isValid('hs1qsy0zl3ddmf5ex99pg25jp34uyeey20eyc0gw8m'); // true
Address.isValid('hs1qsy0zl3ddmf5'); // false

// or create an Address instance
const address = new Address('hs1qsy0zl3ddmf5ex99pg25jp34uyeey20eyc0gw8m');
address.isValid(); // true
```

If you're already using [hsd](https://github.com/handshake-org/hsd), then you should just import directly:
```js
const Address = require('hsd/lib/primitives/address');
```

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