def get_default_coin(private_key):
     decoded_wif = WifDecoder.Decode(wif_str=private_key,
                                     net_addr_ver=CLUB_WIF_NET_VER.Main())
     bip44_mst = Bip44.FromAddressPrivKey(decoded_wif, Bip44Coins.BITCOIN)
     pub_key_bytes = bip44_mst.PublicKey().RawCompressed().ToBytes()
     address = Base58Encoder.CheckEncode(CLUB_P2PKH_NET_VER.Main() +
                                         CryptoUtils.Hash160(pub_key_bytes))
     return CryptoCoin(address, private_key)
 def get_default_coin(private_key):
     decoded_wif = WifDecoder.Decode(
         wif_str=private_key,
         net_addr_ver=BitcoinCashConf.WIF_NET_VER.Main())
     key_pair = Bip44.FromAddressPrivKey(decoded_wif,
                                         Bip44Coins.BITCOIN_CASH)
     address = key_pair.PublicKey().ToAddress().replace('bitcoincash:', '')
     return CryptoCoin(address, private_key)
 def get_uncompressed_coin(private_key):
     print("Warning Uncompressed key")
     decoded_wif = WifDecoder.Decode(wif_str=private_key,
                                     net_addr_ver=CLUB_WIF_NET_VER.Main())
     bip44_mst = Bip44.FromAddressPrivKey(decoded_wif, Bip44Coins.BITCOIN)
     to_hex = bip44_mst.PublicKey().RawUncompressed().ToBytes()
     pub_key_bytes = b'\x04' + to_hex
     address = Base58Encoder.CheckEncode(CLUB_P2PKH_NET_VER.Main() +
                                         CryptoUtils.Hash160(pub_key_bytes))
     return CryptoCoin(address, private_key)
 def get_uncompressed_coin(private_key):
     print("Warning Uncompressed key")
     config_alias = DashConf
     coin_type = Bip44Coins.DASH
     decoded_wif = WifDecoder.Decode(
         wif_str=private_key, net_addr_ver=config_alias.WIF_NET_VER.Main())
     bip44_mst = Bip44.FromAddressPrivKey(decoded_wif, coin_type)
     to_hex = bip44_mst.PublicKey().RawUncompressed().ToBytes()
     pub_key_bytes = b'\x04' + to_hex
     address = Base58Encoder.CheckEncode(config_alias.P2PKH_NET_VER.Main() +
                                         CryptoUtils.Hash160(pub_key_bytes))
     return CryptoCoin(address, private_key)
 def get_uncompressed_coin(private_key):
     print("Warning Uncompressed key")
     config_alias = BitcoinConf
     coin_type = Bip44Coins.BITCOIN
     decodedWif = WifDecoder.Decode(
         wif_str=private_key, net_addr_ver=config_alias.WIF_NET_VER.Main())
     bip44_mst = Bip44.FromAddressPrivKey(decodedWif, coin_type)
     to_hex = bip44_mst.PublicKey().RawUncompressed().ToBytes()
     pub_key_bytes = b'\x04' + to_hex
     legacy_address = Base58Encoder.CheckEncode(
         config_alias.P2PKH_NET_VER.Main() +
         CryptoUtils.Hash160(pub_key_bytes))
     address = convert.to_cash_address(legacy_address).replace(
         'bitcoincash:', '')
     return CryptoCoin(address, private_key)
 def get_default_coin(private_key):
     decoded_wif = WifDecoder.Decode(
         wif_str=private_key, net_addr_ver=DashConf.WIF_NET_VER.Main())
     key_pair = Bip44.FromAddressPrivKey(decoded_wif, Bip44Coins.DASH)
     address = key_pair.PublicKey().ToAddress()
     return CryptoCoin(address, private_key)
Example #7
0
 def get_coin(self, private_key):
     key_pair = Bip44.FromAddressPrivKey(bytes.fromhex(private_key), Bip44Coins.BINANCE_CHAIN)
     address = key_pair.PublicKey().ToAddress()
     return CryptoCoin(address, private_key)