예제 #1
0
def test_lengths(configuration):
    wallet = Wallet(configuration)
    wallet.create('eXtR4 EntroPy Str1Ng')

    # check length of private key
    assert len(wallet.get_private_key()) == 32

    # check length of public key
    public_key_bytes = decode_hex(wallet.get_public_key())
    assert len(public_key_bytes) == 64

    # check length of address
    address_bytes = decode_hex(wallet.get_address())
    assert len(address_bytes) == 20
예제 #2
0
def test_addresses(configuration):
    wallet = Wallet(configuration)
    wallet.create('eXtR4 EntroPy Str1Ng')
    assert Web3.isAddress(wallet.get_address())
    assert Web3.isChecksumAddress(wallet.get_address())