コード例 #1
0
ファイル: views.py プロジェクト: level09/bitferno
def api_generate():
    k = Key()
    address = {
        'address': k.address,
        'segwit_address': k.segwit_address,
        'pem': k.to_hex()

    }
    session['pem']= k.to_hex()

    return Response(json.dumps(address), mimetype='application/json'), 200
コード例 #2
0
# Status: generates private key

from bit import Key, PrivateKey, PrivateKeyTestnet
key = Key()

# Print PrivateKey
print(key)
# Print public point using one way Elliptic key Function
print(key.public_point)
# Print public Key
print(key.public_key)
# Print Sharable Bitcoin address
print(key.address)
# Print export Wallet Import Format Private key
print(key.to_wif())
# Print export private key in hex format
print(key.to_hex())
# Print to be exported private key in integer Format
print(key.to_int())
# Print to be exported private key
print(key.to_pem())
コード例 #3
0
ファイル: _btc.py プロジェクト: goddess5321/EC-CMD-Wallet
def btc_new():
    nk = Key()
    privKey = nk.to_hex()
    addr = nk.address
    return {"privateKey": privKey, "address": addr}