def new_keypair(): # ku -n DASH create # wif = private key # Dash Address = public address key = BIP32Node.from_master_secret(ku.get_entropy(), 'DASH') pub = key.address(use_uncompressed=False) priv = key.wif(use_uncompressed=False) return pub, priv
def get_chain_secret_pair(netcode='BTC', key='Bitcoin seed', master_secret=None): if master_secret is None: master_secret = get_entropy() I64 = hmac.HMAC(key=key, msg=master_secret, digestmod=hashlib.sha512) chain_code = I64.digest()[32:] secret_exponent = I64.hexdigest()[:64] return (chain_code, secret_exponent)
def create_wallet_key(): """Return new wallet_key based on os entropy""" wallet = BIP32Node.from_master_secret(ku.get_entropy()) wallet_key = wallet.hwif(as_private=True) return wallet_key
def create_wallet_key(): wallet = BIP32Node.from_master_secret(ku.get_entropy()) wallet_key = wallet.hwif(as_private=True) return wallet_key