Bitcoin Forum
May 26, 2024, 08:52:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Python implementation of bs58check?  (Read 310 times)
ptrk (OP)
Member
**
Offline Offline

Activity: 137
Merit: 90


View Profile
February 19, 2019, 07:33:01 AM
 #1

Is there somewhere a bs58check library in Python available? All I could find was a NodeJs implementation. I need to convert Bitcoin addresses to Bitcoin Gold addresses and I read using bs58check is the best way to do so.
 
Pmalek
Legendary
*
Offline Offline

Activity: 2772
Merit: 7158



View Profile
February 19, 2019, 09:34:36 AM
 #2

have you tried this?
https://sopaxorztaker.github.io/gold-address/

It was made by a member of Bitcointalk.
https://bitcointalk.org/index.php?topic=2485083.0

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
darosior
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
February 19, 2019, 11:09:59 AM
Merited by ptrk (1)
 #3

Is there somewhere a bs58check library in Python available? All I could find was a NodeJs implementation. I need to convert Bitcoin addresses to Bitcoin Gold addresses and I read using bs58check is the best way to do so.
 

Hi,

it's not a library but if you are interested in how to implement it I did at https://github.com/darosior/bitcoineasy/blob/995b98f9c440aa4fa3c428750f51b7a59b327fad/bitcoineasy/utils.py#L77
ptrk (OP)
Member
**
Offline Offline

Activity: 137
Merit: 90


View Profile
February 19, 2019, 08:17:07 PM
 #4


Thanks, I know this page and the bitcointalk thread. However, the library it uses is the one (NodeJs lib) I mentioned in my first post.

Hi,
it's not a library but if you are interested in how to implement it I did at https://github.com/darosior/bitcoineasy/blob/995b98f9c440aa4fa3c428750f51b7a59b327fad/bitcoineasy/utils.py#L77

Thanks, this is what I was looking for. I will try it but it looks good so far.
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
February 21, 2019, 10:41:27 PM
 #5

https://github.com/keis/base58 (https://pypi.org/project/base58/) could be what you need.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
bitaps
Member
**
Offline Offline

Activity: 148
Merit: 45

https://bitaps.com/


View Profile WWW
March 08, 2019, 01:05:13 PM
 #6

https://github.com/bitaps-com/pybtc/blob/master/pybtc/functions/encode.py#L79  Check this library

Karen Sloot
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 14, 2019, 08:00:38 AM
 #7

Straight Forward Python Implementation Of bs58check

var bs58check = require('bs58check')

var decoded = bs58check.decode('5Kd3NBUAdUnhyzenEwVLy9pBKxSwXvE9FMPyR4UKZvpe6E3AgLr')

console.log(decoded)
// => <Buffer 80 ed db dc 11 68 f1 da ea db d3 e4 4c 1e 3f 8f 5a 28 4c 20 29 f7 8a d2 6a f9 85 83 a4 99 de 5b 19>

console.log(bs58check.encode(decoded))
// => 5Kd3NBUAdUnhyzenEwVLy9pBKxSwXvE9FMPyR4UKZvpe6E3AgLr
Pmalek
Legendary
*
Offline Offline

Activity: 2772
Merit: 7158



View Profile
March 14, 2019, 09:35:32 AM
 #8

@Karen Sloot
You need to provide the source when you copy/paste something. I assume you took that from here - https://github.com/bitcoinjs/bs58check
You first post could be a reason for getting banned, so be careful with that.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ptrk (OP)
Member
**
Offline Offline

Activity: 137
Merit: 90


View Profile
March 24, 2019, 07:11:53 PM
 #9

@Karen Sloot
You need to provide the source when you copy/paste something. I assume you took that from here - https://github.com/bitcoinjs/bs58check
You first post could be a reason for getting banned, so be careful with that.

It seems to be from the mentioned source.The snippet works if the appropriate library is imported.

My question is solved. I lock this thread.
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!