Sunday, December 22, 2024

deal with – Tips on how to generate these bitcoin addresses?

from bitcoinlib.keys import *

priv_key = '0000000000000000000000000000000000000000000000000000000000000237'

U_pub_key = Key(import_key=priv_key, community='bitcoin', compressed=False)
C_pub_key = Key(import_key=priv_key, community='bitcoin', compressed=True)
C_hex = C_pub_key.public_hex

U_wif = U_pub_key.wif()
C_wif = C_pub_key.wif()

add_U = U_pub_key.deal with()
add_C = C_pub_key.deal with()

p2sh_segwit = Tackle(C_hex, encoding='base58', script_type="p2sh", witness_type="p2sh-segwit").deal with
p2wpkh = Tackle(C_hex, encoding='bech32', script_type="p2wpkh").deal with
p2wsh = Tackle(C_hex, encoding='bech32', script_type="p2wsh").deal with

print(add_U)
print(add_C)
print(p2sh_segwit)
print(p2wpkh)
print(p2wsh)
print(U_wif)
print(C_wif)
print(priv_key)
print(U_pub_key)
print(C_pub_key)
13sjRRtRsDD3gQVW2XDXHM8ahBEBzVNyrK
1KCvMjHxAKv7pdzCFLhhKrQNpVWN1eyeAb
32MAGHunMfYDb1cCC1hDxiovYCUg6oNxhU
bc1qc7ekz48gzmds2sedh9vm59j3yezg33d392fzj3
bc1qu4t4gt4dpzjhr357yxmnjjsqaakuc75vt8qhct9kgraq7pd7xgys8hw8eg
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsrfGd4hTb9
KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFUBuithWYeP
0000000000000000000000000000000000000000000000000000000000000237
0455faaaee59a20b9a3784d1719ea529cc1b7ab3a329f26dfaa3b11bd667ba15c1a9f8939b52ac53e35ed4771d8e47065c0d7f2805a7e5475c37353ddf182f4a65
0355faaaee59a20b9a3784d1719ea529cc1b7ab3a329f26dfaa3b11bd667ba15c1

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles