mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00

This is a TS option, not a typedoc option: https://github.com/TypeStrong/typedoc/blob/v0.17.7/src/lib/utils/options/declaration.ts#L36-L84
@cosmjs/encoding
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).