# @iov/encoding

> Encoding helpers for IOV projects

Latest version **2.5.0** (published 2020-06-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @iov/encoding
pnpm add @iov/encoding
yarn add @iov/encoding
bun add @iov/encoding
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.5.0 |
| Published | 2020-06-17 |
| First published | 2018-08-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 30.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 198 |
| Author | IOV SAS |
| Maintainers | abefernan, albert.andrejev, iovantoine, iovdave |

## Links

- npm: https://www.npmjs.com/package/@iov/encoding
- Repository: https://github.com/iov-one/iov-core/tree/master/packages/iov-encoding
- npm.io page: https://npm.io/package/@iov/encoding

## Dependencies (4)

- [@cosmjs/math](https://npm.io/package/@cosmjs/math.md) ^0.20.0
- [@cosmjs/utils](https://npm.io/package/@cosmjs/utils.md) ^0.20.0
- [readonly-date](https://npm.io/package/readonly-date.md) ^1.0.0
- [@cosmjs/encoding](https://npm.io/package/@cosmjs/encoding.md) ^0.20.0

## Recent versions

- 2.5.0 (latest) — 2020-06-17
- 2.3.2 — 2020-06-04
- 2.2.0 — 2020-03-12
- 2.1.0 — 2020-02-21
- 2.0.2 — 2020-02-14
- 2.0.1 — 2020-02-13
- 2.0.0 — 2020-02-13
- 2.0.0-alpha.7 — 2020-01-14
- 2.0.0-alpha.5 — 2019-12-19
- 2.0.0-alpha.4 — 2019-12-19
- 2.0.0-alpha.3 — 2019-12-19
- 2.0.0-alpha.2 — 2019-12-18
- 2.0.0-alpha.1 — 2019-12-17
- 2.0.0-alpha.0 — 2019-12-17
- 1.2.0 — 2019-11-27
- … 62 more at https://npm.io/package/@iov/encoding/versions

## README

# @iov/encoding

[![npm version](https://img.shields.io/npm/v/@iov/encoding.svg)](https://www.npmjs.com/package/@iov/encoding)

This package is an extension to the JavaScript standard library that is not
bound to IOV products. It provides basic hex/base64/ascii/integer encoding to
Uint8Array that doesn't rely on Buffer and also provides better error messages
on invalid input.

## Convert between bech32 and hex addresses

```
>> Bech32.encode("tiov", fromHex("1234ABCD0000AA0000FFFF0000AA00001234ABCD"))
'tiov1zg62hngqqz4qqq8lluqqp2sqqqfrf27dzrrmea'
>> toHex(Bech32.decode("tiov1zg62hngqqz4qqq8lluqqp2sqqqfrf27dzrrmea").data)
'1234abcd0000aa0000ffff0000aa00001234abcd'
```

## API Documentation

[https://iov-one.github.io/iov-core-docs/latest/iov-encoding/](https://iov-one.github.io/iov-core-docs/latest/iov-encoding/)

## License

This package is part of the IOV-Core repository, licensed under the Apache License 2.0
(see [NOTICE](https://github.com/iov-one/iov-core/blob/master/NOTICE) and [LICENSE](https://github.com/iov-one/iov-core/blob/master/LICENSE)).

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