# @abcpros/xaddress

> Lotus xaddress format support for node.js and browsers

Latest version **0.0.9** (published 2021-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @abcpros/xaddress
pnpm add @abcpros/xaddress
yarn add @abcpros/xaddress
bun add @abcpros/xaddress
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2021-08-12 |
| First published | 2021-08-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 63.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1743 |
| Maintainers | ngocviet |
| Keywords | cash, address, format, lotus, xaddress |

## Links

- npm: https://www.npmjs.com/package/@abcpros/xaddress
- Repository: https://github.com/fullstack-build/tslog
- Homepage: https://github.com/fullstack-build/tslog#readme
- Issues: https://github.com/fullstack-build/tslog/issues
- npm.io page: https://npm.io/package/@abcpros/xaddress

## Dependencies (1)

- [bs58](https://npm.io/package/bs58.md) ^4.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.9 (latest) — 2021-08-12
- 0.0.8 — 2021-08-10
- 0.0.7 — 2021-08-10
- 0.0.6 — 2021-08-10
- 0.0.5 — 2021-08-10
- 0.0.4 — 2021-08-10
- 0.0.3 — 2021-08-10
- 0.0.2 — 2021-08-10
- 0.0.1 — 2021-08-04

## README

# xaddress: The Lotus address format for Node.js and web browsers.

[![NPM](https://nodei.co/npm/cashaddrjs.png?downloads=true)](https://nodei.co/npm/cashaddrjs/)

JavaScript implementation for the new XAddr address format for Lotus.

Compliant with the xaddress [specification](https://givelotus.org/docs/specs/lotus/addresses)

## Installation

### Using NPM

```bsh
$ npm install --save @abcpros/xaddress
```

## Usage

### In Node.js

```javascript
const xaddress = require('xaddress');
const address = 'lotus_16PSJLk9W86KAZp26x3uM176w6N9vUU8YNQQnQTHN';
const { prefix, type, payload, network } = XAddress.decode(address);
console.log(prefix); // 'lotus'
console.log(network); // MAIN
console.log(type); // ScriptPubKey (0)
console.log(payload); // Buffer [ 118, 160, ..., 115 ] (full script payload)
```

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