from libcrypto import Wallet


def main() -> None:
    private_key = "0000000000000000000000000000000000000000000000000000000000000001"
    wallet = Wallet(private_key)

    expected = {
        "bitcoin_p2pkh": "1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH",
        "bitcoin_p2sh_p2wpkh": "3JvL6Ymt8MVWiCNHC7oWU6nLeHNJKLZGLN",
        "bitcoin_p2wpkh": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
        "bitcoin_p2tr": "bc1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5sspknck9",
        "ethereum": "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf",
        "tron": "TMVQGm1qAQYVdetCeGRRkTWYYrLXuHK2HC",
        "tron_hex": "417E5F4552091A69125D5DFCB7B8C2659029395BDF",
    }

    actual = {
        "bitcoin_p2pkh": wallet.get_address("bitcoin", "p2pkh"),
        "bitcoin_p2sh_p2wpkh": wallet.get_address("bitcoin", "p2sh-p2wpkh"),
        "bitcoin_p2wpkh": wallet.get_address("bitcoin", "p2wpkh"),
        "bitcoin_p2tr": wallet.get_address("bitcoin", "p2tr"),
        "ethereum": wallet.get_address("ethereum"),
        "tron": wallet.get_address("tron"),
        "tron_hex": wallet.get_address("tron", "hex"),
    }

    for key, expected_value in expected.items():
        actual_value = actual[key]

        if actual_value != expected_value:
            raise AssertionError(
                f"{key} failed. Expected {expected_value}, got {actual_value}"
            )

        print(f"{key}: OK")

    print("\nAll deterministic address vectors passed.")


if __name__ == "__main__":
    main()