cosmjs-util/packages/encoding
2023-12-19 11:32:05 +01:00
..
src fix: simplify rfc339 function 2023-11-30 20:32:20 +02:00
.eslintignore
.eslintrc.js Adjust eslint config to make it work again 2023-03-01 15:32:06 +01:00
.gitignore
.nycrc.yml
jasmine-testrunner.js Remove executable flag from jasmine testrunners 2021-06-01 10:50:02 +02:00
karma.conf.js
package.json Set version 0.32.1 2023-12-19 11:32:05 +01:00
README.md Create toBech32 and fromBech32 in @cosmjs/encoding (#1058) 2022-02-22 14:05:34 +01:00
tsconfig.eslint.json
tsconfig.json
typedoc.js
webpack.web.config.js

@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

>> toBech32("tiov", fromHex("1234ABCD0000AA0000FFFF0000AA00001234ABCD"))
'tiov1zg62hngqqz4qqq8lluqqp2sqqqfrf27dzrrmea'
>> toHex(fromBech32("tiov1zg62hngqqz4qqq8lluqqp2sqqqfrf27dzrrmea").data)
'1234abcd0000aa0000ffff0000aa00001234abcd'

License

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