Bitcoin Forum
May 14, 2024, 05:11:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need commandline tool generate bech32  (Read 206 times)
bitdaric (OP)
Copper Member
Member
**
Offline Offline

Activity: 236
Merit: 17


View Profile WWW
April 29, 2019, 10:42:32 AM
 #1

I need a tool that generates bech32 from public key. Would be great if it's in c++ or python
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
April 29, 2019, 11:20:12 AM
 #2

I need a tool that generates bech32 from public key. Would be great if it's in c++ or python

One (among multiple) option would be to use btcpy (https://github.com/chainside/btcpy).

It might be kind of an overkill because it handle much more, but it definitely is able to do what you need.

RHavar
Legendary
*
Offline Offline

Activity: 2557
Merit: 1886



View Profile
April 30, 2019, 08:07:49 AM
 #3

If you're a programmer, generating a bech32 bitcoin address might be a bit easier than you expect if you can import a few libs.

Basically you get the public key in compressed format, SHA256 it. Then RMD160 that. Now you kinda have to do this weird prepend of the 0 byte (for version) and bech32 encode with a prefix of 'bc' (for bitcoin).

Obviously you'll need to use the BIP for a deeper understanding than my description, but it's not nearly as hard as it sounds if you have access to a few libs.

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
Thirdspace
Hero Member
*****
Offline Offline

Activity: 1232
Merit: 738


Mixing reinvented for your privacy | chipmixer.com


View Profile
April 30, 2019, 10:35:35 PM
 #4

I need a tool that generates bech32 from public key. Would be great if it's in c++ or python
you can use https://coinb.in/#verify to generate 3 different format addresses from a pubkey
it's not commandline and based on javascript, but you can check its source code https://github.com/OutCast3k/coinbin/
that should give you some ideas if you want to write your own code in c++ or python

HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
April 30, 2019, 11:26:50 PM
 #5

I need a tool that generates bech32 from public key. Would be great if it's in c++ or python
Go check out nullius' old "bech32" utility... https://bitcointalk.org/index.php?topic=2664728.0 written in C

Github repo here: https://github.com/nym-zone/bech32

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
danda
Full Member
***
Offline Offline

Activity: 201
Merit: 157


View Profile WWW
May 01, 2019, 03:01:40 PM
 #6

https://github.com/dan-da/hd-wallet-derive

mybitprices.info - wallet auditing   |  hd-wallet-derive - derive keys locally |  hd-wallet-addrs - find used addrs
lightning-nodes - list of LN nodes  |  coinparams - params for 300+ alts  |  jsonrpc-cli - cli jsonrpc client
subaddress-derive-xmr - monero offline wallet tool
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!