Bitcoin Forum
May 28, 2024, 05:54:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: convert 256 bit to WIF - compress  (Read 110 times)
stalker00075 (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
May 10, 2022, 08:33:33 AM
 #1

this code

Code:
import os, binascii, hashlib, base58
fullkey = "80"+"7542FB6685F9FD8F37D56FAF62F0BB4563684A51539E4B26F0840DB361E0027C"
sha256a = hashlib.sha256(binascii.unhexlify(fullkey)).hexdigest()
sha256b = hashlib.sha256(binascii.unhexlify(sha256a)).hexdigest()
WIF = base58.b58encode(binascii.unhexlify(fullkey+sha256b[:8]))
print(WIF)


need "print " compress address pls help....
stanner.austin
Member
**
Offline Offline

Activity: 67
Merit: 53


View Profile
May 10, 2022, 08:36:24 AM
Merited by ABCbits (2), BlackHatCoiner (2)
 #2

@stalker00075
For compressed just add 01 at end.
fullkey = "80"+"7542FB6685F9FD8F37D56FAF62F0BB4563684A51539E4B26F0840DB361E0027C" + "01"
Also i recommend use good python lib to do this not manually.
For example this one
https://ofek.dev/bit/
stalker00075 (OP)
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
May 10, 2022, 08:39:51 AM
 #3

@stalker00075
For compressed just add 01 at end.
fullkey = "80"+"7542FB6685F9FD8F37D56FAF62F0BB4563684A51539E4B26F0840DB361E0027C" + "01"
Also i recommend use good python lib to do this not manually.
For example this one
https://ofek.dev/bit/


thank you very much!
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!