Example #1
0
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
Example #2
0
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)
Example #3
0
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
Example #4
0
def create_wallet_key():
    wallet = BIP32Node.from_master_secret(ku.get_entropy())
    wallet_key = wallet.hwif(as_private=True)
    return wallet_key