GithubHelp home page GithubHelp logo

nostrapps / bech32m Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 8 KB

bech32m

Home Page: https://nostrapps.github.io/bech32m/

License: MIT License

JavaScript 21.37% HTML 78.63%
bech32 bech32m nostr

bech32m's Introduction

bech32m

bech32m

Documentation


GitHub license npm npm Github Stars

Bech32m Encoding Library

This JavaScript library provides a simple and easy-to-use function to encode Bitcoin public keys into Bech32m addresses, specifically for Taproot addresses.

Usage

To use this library, simply import the encodeBech32mAddress function from the bech32m.js file and provide a public key as an argument. The function will return the Bech32m-encoded Taproot address.

import { encodeBech32mAddress } from './bech32m.js'

const publicKey = '9ecb7085a69535b531c7877662086277804683b598101fe5984c30a371d5aa11'
const taprootAddress = encodeBech32mAddress(publicKey)

console.log(taprootAddress)

Example

An example of how to use the library can be found in the test.html file, which demonstrates encoding a public key into a Bech32m address using a simple web interface.

To try it out, open the test.html file in your web browser and enter a public key into the input field. Click the "Encode Bech32m Address" button, and the corresponding Bech32m-encoded Taproot address will be displayed on the page.

References

License

  • MIT

bech32m's People

Contributors

melvincarvalho avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.