cosmjs-util/packages/encoding
2020-09-17 15:07:15 +02:00
..
nonces Add nonces 2020-09-15 10:23:02 +02:00
src encoding: Add limit parameters to Bech32.encode and .decode 2020-08-04 17:35:56 +02:00
types encoding: Add limit parameters to Bech32.encode and .decode 2020-08-04 17:35:56 +02:00
.eslintignore Add @cosmjs/encoding and @cosmjs/math 2020-06-09 17:46:03 +02:00
.gitignore Add @cosmjs/encoding and @cosmjs/math 2020-06-09 17:46:03 +02:00
.nycrc.yml Setup code coverage for utils/encoding/crypto 2020-06-25 12:32:12 +02:00
jasmine-testrunner.js eslint: Update file-based rule overrides 2020-07-15 13:29:21 +02:00
karma.conf.js Add @cosmjs/encoding and @cosmjs/math 2020-06-09 17:46:03 +02:00
package.json Merge branch '0.22' 2020-09-17 15:07:15 +02:00
README.md Format other .mds 2020-06-18 11:52:00 +02:00
tsconfig.json Add @cosmjs/encoding and @cosmjs/math 2020-06-09 17:46:03 +02:00
typedoc.js Remove unnecessary target config 2020-07-02 10:37:41 +02:00
webpack.web.config.js Add @cosmjs/encoding and @cosmjs/math 2020-06-09 17:46:03 +02:00

@cosmjs/encoding

npm version

This package is an extension to the JavaScript standard library that is not bound to blockchain products. It provides basic hex/base64/ascii 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'

License

This package is part of the cosmjs repository, licensed under the Apache License 2.0 (see NOTICE and LICENSE).