Post
Topic
Board Announcements (Altcoins)
Re: [ANN] chain2 -- Pure SHA256 PoW coin | Real-Time Targeting
by
dgenr8
on 14/10/2019, 00:20:43 UTC
Is there another way ?

The simplest thing is to restart chain2 with -usecashaddr=0.

Functions to accept multiple formats or translate between formats could be added to the RPC.

Sometimes I've used this python-bitcoinlib script to get a legacy address from a pubkey (you can get the pubkey from chain2 using validateaddress):

python pubkey-to-mainnet-address.py

#!/usr/bin/env python
import sys
import bitcoin
from bitcoin.core import Hash160, x, lx
from bitcoin.wallet import CBitcoinAddress
def main():
    bitcoin.SelectParams('mainnet')
    print(CBitcoinAddress.from_bytes(Hash160(x(sys.argv[1])),0))
if __name__ == '__main__':
    main()