Socket
Socket
Sign inDemoInstall

@cosmjs/encoding

Package Overview
Dependencies
3
Maintainers
2
Versions
105
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cosmjs/encoding

Encoding helpers for blockchain projects


Version published
Maintainers
2
Weekly downloads
167,014
increased by1.29%
Install size
54.6 kB

Weekly downloads

Readme

Source

@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).

FAQs

Last updated on 08 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc