Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust/Bitcoin/Utxo] Great Migration towards tw_bitcoin and tw_utxo #3382

Merged
merged 371 commits into from
Sep 19, 2023

complete handling todos in utils.rs

776f266
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

[Rust/Bitcoin/Utxo] Great Migration towards tw_bitcoin and tw_utxo #3382

complete handling todos in utils.rs
776f266
Select commit
Loading
Failed to load commit list.
GitHub Actions / Rust Tests succeeded Sep 19, 2023 in 1s

Rust Tests ✅

Tests passed successfully

✅ rust/target/nextest/ci/junit.xml

253 tests were completed in 20s with 253 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
tw_any_coin::tw_any_address_ffi_tests 5✅ NaNms
tw_any_coin::tw_any_signer_ffi_tests 2✅ NaNms
tw_any_coin::tw_transaction_compiler_ffi_tests 2✅ NaNms
tw_bitcoin 1✅ NaNms
tw_bitcoin::brc20 1✅ NaNms
tw_bitcoin::free_estimate 4✅ NaNms
tw_bitcoin::legacy_build_sign 4✅ NaNms
tw_bitcoin::legacy_scripts 5✅ NaNms
tw_bitcoin::ordinal_nft 1✅ NaNms
tw_bitcoin::p2pkh 2✅ NaNms
tw_bitcoin::p2sh 1✅ NaNms
tw_bitcoin::p2tr_key_path 1✅ NaNms
tw_bitcoin::p2tr_script_path 1✅ NaNms
tw_bitcoin::p2wpkh 1✅ NaNms
tw_bitcoin::p2wsh 1✅ NaNms
tw_bitcoin::plan_builder 1✅ NaNms
tw_bitcoin::send_to_address 5✅ NaNms
tw_coin_entry 1✅ NaNms
tw_encoding 11✅ NaNms
tw_encoding::base32_ffi_tests 2✅ NaNms
tw_encoding::base58_ffi_tests 2✅ NaNms
tw_encoding::base64_ffi_tests 5✅ NaNms
tw_encoding::hex_ffi_tests 4✅ NaNms
tw_ethereum::compiler 1✅ NaNms
tw_ethereum::signer 1✅ NaNms
tw_evm 12✅ NaNms
tw_evm::barz 3✅ NaNms
tw_evm::rlp 8✅ NaNms
tw_evm::signer 13✅ NaNms
tw_hash 13✅ NaNms
tw_hash::hash_ffi_tests 15✅ NaNms
tw_keypair 45✅ NaNms
tw_keypair::asn_parser_ffi_tests 2✅ NaNms
tw_keypair::ed25519_blake2b_tests 1✅ NaNms
tw_keypair::ed25519_extended_cardano_tests 2✅ NaNms
tw_keypair::ed25519_tests 2✅ NaNms
tw_keypair::ed25519_waves_tests 2✅ NaNms
tw_keypair::nist256p1_tests 3✅ NaNms
tw_keypair::private_key_ffi_tests 13✅ NaNms
tw_keypair::public_key_ffi_tests 8✅ NaNms
tw_keypair::secp256k1_tests 1✅ NaNms
tw_keypair::tw_keypair_starkex_tests 2✅ NaNms
tw_memory::c_byte_array_ffi_tests 3✅ NaNms
tw_memory::c_result_ffi_tests 4✅ NaNms
tw_memory::string_ffi_tests 1✅ NaNms
tw_move_parser::move_parser_ffi_tests 3✅ NaNms
tw_number::u256 6✅ NaNms
tw_proto::proto_ffi_tests 2✅ NaNms
tw_proto::proto_tests 5✅ NaNms
tw_ronin::address 2✅ NaNms
tw_ronin::compiler 1✅ NaNms
tw_ronin::rlp 1✅ NaNms
tw_ronin::signer 2✅ NaNms
tw_utxo::input_selection 8✅ NaNms
tw_utxo::p2pkh 1✅ NaNms
tw_utxo::p2tr 1✅ NaNms
tw_utxo::p2wpkh 2✅ NaNms
wallet-core-rs::ethereum_rlp 1✅ NaNms

✅ tw_any_coin::tw_any_address_ffi_tests

✅ test_any_address_get_data_eth
✅ test_any_address_is_valid_coin
✅ test_any_address_is_valid_coin_invalid
✅ test_any_address_normalize_eth
✅ test_any_address_derive

✅ tw_any_coin::tw_any_signer_ffi_tests

✅ test_any_signer_sign_eth
✅ test_any_signer_sign_unknown_coin

✅ tw_any_coin::tw_transaction_compiler_ffi_tests

✅ test_transaction_compiler_eth
✅ test_transaction_compiler_plan_not_supported

✅ tw_bitcoin

✅ modules::transactions::brc20::tests::brc20_ticker_validity

✅ tw_bitcoin::brc20

✅ coin_entry_sign_brc20_commit_reveal_transfer

✅ tw_bitcoin::free_estimate

✅ brc20_inscribe_fee_estimate
✅ p2pkh_fee_estimate
✅ p2tr_key_path_fee_estimate
✅ p2wpkh_fee_estimate

✅ tw_bitcoin::legacy_build_sign

✅ ffi_proto_sign_input_p2pkh_output_p2pkh
✅ ffi_proto_sign_input_p2pkh_output_p2wpkh
✅ ffi_proto_sign_input_p2pkh_output_p2tr_key_path
✅ ffi_proto_sign_input_p2wpkh_output_brc20

✅ tw_bitcoin::legacy_scripts

✅ ffi_tw_bitcoin_legacy_build_brc20_transfer_inscription
✅ ffi_tw_bitcoin_legacy_build_p2pkh_script
✅ ffi_tw_bitcoin_legacy_build_nft_inscription
✅ ffi_tw_bitcoin_legacy_build_p2tr_key_path_script
✅ ffi_tw_bitcoin_legacy_build_p2wpkh_script

✅ tw_bitcoin::ordinal_nft

✅ coin_entry_sign_ordinal_nft_commit_reveal_transfer

✅ tw_bitcoin::p2pkh

✅ coin_entry_emtpy
✅ coin_entry_sign_input_p2pkh_output_p2pkh

✅ tw_bitcoin::p2sh

✅ coin_entry_sign_input_p2pkh_output_p2sh

✅ tw_bitcoin::p2tr_key_path

✅ coin_entry_sign_input_p2pkh_output_p2tr_key_path

✅ tw_bitcoin::p2tr_script_path

✅ coin_entry_custom_script_path

✅ tw_bitcoin::p2wpkh

✅ coin_entry_sign_input_p2pkh_output_p2wpkh

✅ tw_bitcoin::p2wsh

✅ coin_entry_sign_input_p2pkh_output_p2wsh

✅ tw_bitcoin::plan_builder

✅ transaction_plan_compose_brc20

✅ tw_bitcoin::send_to_address

✅ send_to_p2pkh_address
✅ send_to_p2sh_address
✅ send_to_p2tr_key_path_address
✅ send_to_p2wpkh_address
✅ send_to_p2wsh_address

✅ tw_coin_entry

✅ prefix::tests::test_no_prefix

✅ tw_encoding

✅ base32::tests::test_base32_decode
✅ base32::tests::test_base32_decode_filecoin
✅ base32::tests::test_base32_decode_padding
✅ base32::tests::test_base32_encode
✅ base32::tests::test_base32_encode_filecoin
✅ base32::tests::test_base32_encode_padding
✅ base32::tests::test_decode_invalid
✅ base58::tests::test_base58_decode
✅ base58::tests::test_base58_encode
✅ hex::tests::test_vec_decode_prefixed
✅ hex::tests::test_vec_encode_prefixed

✅ tw_encoding::base32_ffi_tests

✅ test_base32_decode
✅ test_base32_encode

✅ tw_encoding::base58_ffi_tests

✅ test_base58_decode
✅ test_base58_encode

✅ tw_encoding::base64_ffi_tests

✅ test_decode_base64
✅ test_decode_base64_url
✅ test_decode_base64_invalid
✅ test_encode_base64
✅ test_encode_base64_url

✅ tw_encoding::hex_ffi_tests

✅ test_decode_hex
✅ test_decode_hex_with_prefix
✅ test_encode_hex_with_prefix
✅ test_encode_hex_without_prefix

✅ tw_ethereum::compiler

✅ test_external_signature_sign

✅ tw_ethereum::signer

✅ test_sign_json

✅ tw_evm

✅ address::tests::test_from_public_key
✅ address::tests::test_from_string_invalid
✅ address::tests::test_to_from_string
✅ transaction::signature::tests::test_signature_eip155_legacy
✅ transaction::signature::tests::test_signature_eip155_v0
✅ transaction::signature::tests::test_signature_eip155_v1
✅ transaction::signature::tests::test_signature_no_eip155
✅ transaction::transaction_eip1559::tests::test_encode_transaction_eip1559
✅ transaction::transaction_non_typed::tests::test_encode_unsigned_non_typed
✅ transaction::transaction_non_typed::tests::test_encode_unsigned_non_typed_pre_hash
✅ transaction::transaction_non_typed::tests::test_encode_unsigned_non_typed_zero
✅ transaction::user_operation::tests::test_encode_user_operation

✅ tw_evm::barz

✅ test_barz_batched_account_deployed
✅ test_barz_transfer_account_deployed
✅ test_barz_transfer_account_not_deployed

✅ tw_evm::rlp

✅ test_encode_number_u64
✅ test_encode_string
✅ test_ethereum_rlp_list_eip1559
✅ test_ethereum_rlp_nested_list
✅ test_ethereum_rlp_list
✅ test_ethereum_rlp_nested_list_recursion_limit
✅ test_ethereum_rlp_number_u256
✅ test_ethereum_rlp_raw_encoded

✅ tw_evm::signer

✅ test_sign_transaction_eip1559_erc1155_transfer
✅ test_sign_transaction_eip1559_erc20_transfer
✅ test_sign_transaction_eip1559_erc20_approve
✅ test_sign_transaction_eip1559_erc721_transfer
✅ test_sign_transaction_eip1559_native_transfer
✅ test_sign_transaction_non_typed_contract_generic
✅ test_sign_transaction_non_typed_erc1155_transfer
✅ test_sign_transaction_non_typed_erc20_approve
✅ test_sign_transaction_non_typed_erc20_transfer
✅ test_sign_transaction_non_typed_erc20_transfer_invalid_address
✅ test_sign_transaction_non_typed_erc20_transfer_as_contract_generic
✅ test_sign_transaction_non_typed_erc721_transfer
✅ test_sign_transaction_non_typed_native

✅ tw_hash

✅ blake2::tests::test_blake2_b_invalid_hash_size
✅ blake2::tests::test_blake2_b_personal_invalid_hash_size
✅ blake2::tests::test_blake2_b_personal_invalid_personal_data
✅ hash_array::serde_tests::test_hash_deserialize
✅ hash_array::serde_tests::test_hash_deserialize_error
✅ hash_array::serde_tests::test_hash_serialize
✅ hash_array::tests::test_from_hex_invalid
✅ hash_array::tests::test_from_hex_invalid_len
✅ hash_array::tests::test_from_hex_literal_invalid
✅ hash_array::tests::test_hash_concat
✅ hash_array::tests::test_hash_display
✅ hash_array::tests::test_hash_from_str
✅ hash_array::tests::test_hash_split_at

✅ tw_hash::hash_ffi_tests

✅ test_blake2b
✅ test_blake2b_personal
✅ test_blake_256
✅ test_c_hashing_error_convert
✅ test_groestl_512
✅ test_hmac_sha256
✅ test_keccak256
✅ test_keccak512
✅ test_ripemd160
✅ test_sha1
✅ test_sha256
✅ test_sha3_256
✅ test_sha3_512
✅ test_sha512
✅ test_sha512_256

✅ tw_keypair

✅ ecdsa::der::tests::test_parse_ecdsa_signature
✅ ecdsa::der::tests::test_parse_ecdsa_signature_invalid
✅ ecdsa::canonical::tests::test_sign_canonical
✅ ecdsa::nist256p1::tests::test_key_pair
✅ ecdsa::nist256p1::tests::test_private_key_from
✅ ecdsa::nist256p1::tests::test_public_key_from
✅ ecdsa::nist256p1::tests::test_private_key_sign_verify
✅ ecdsa::secp256k1::tests::test_key_pair
✅ ecdsa::nist256p1::tests::test_public_key_recover
✅ ecdsa::secp256k1::tests::test_key_pair_sign
✅ ecdsa::secp256k1::tests::test_private_key_from
✅ ecdsa::secp256k1::tests::test_public_key_from
✅ ecdsa::secp256k1::tests::test_private_key_sign_verify
✅ ecdsa::secp256k1::tests::test_shared_key_hash
✅ ecdsa::secp256k1::tests::test_public_key_recover
✅ ecdsa::signature::tests::test_signature
✅ ecdsa::signature::tests::test_signature_from_invalid_bytes
✅ ed25519::secret::tests::test_ed25519_expanded_secret_from_extended_key
✅ ed25519::tests::test_debug
✅ ecdsa::secp256k1::tests::test_verify_invalid
✅ ed25519::tests::test_keypair_from_invalid_bytes
✅ ed25519::tests::test_keypair_sign_verify
✅ ed25519::tests::test_keypair_sign_verify_blake2b
✅ ed25519::tests::test_keypair_sign_verify_extended_cardano
✅ ed25519::tests::test_private_from_bytes
✅ ed25519::tests::test_keypair_sign_verify_waves
✅ ed25519::tests::test_private_from_bytes_cardano
✅ ed25519::tests::test_private_to_public
✅ ed25519::tests::test_private_to_public_blake2b
✅ ed25519::tests::test_private_to_public_extended_cardano
✅ ed25519::tests::test_private_to_public_waves
✅ ed25519::tests::test_public_key_from_bytes_extended_cardano
✅ ed25519::tests::test_public_verify_invalid_waves
✅ ed25519::tests::test_signature_from_bytes
✅ ed25519::tests::test_signature_malleability
✅ starkex::tests::test_field_element_from_bytes_be_invalid
✅ ed25519::tests::test_waves_signature_from_bytes
✅ starkex::tests::test_key_pair_get_private_public
✅ starkex::tests::test_private_key_to_from_bytes
✅ starkex::tests::test_public_key_to_from_bytes
✅ starkex::tests::test_signature_to_from_bytes
✅ starkex::tests::test_verify_panic
✅ tw::tests::test_curve_from_raw
✅ starkex::tests::test_key_pair_sign_verify
✅ tw::tests::test_public_key_type_from_raw

✅ tw_keypair::asn_parser_ffi_tests

✅ test_ecdsa_signature_from_asn_der_invalid
✅ test_ecdsa_signature_from_asn_der

✅ tw_keypair::ed25519_blake2b_tests

✅ test_ed25519_blake2b_sign_verify

✅ tw_keypair::ed25519_extended_cardano_tests

✅ test_ed25519_extended_cardano_priv_to_pub
✅ test_ed25519_extended_cardano_sign

✅ tw_keypair::ed25519_tests

✅ test_ed25519_priv_to_pub
✅ test_ed25519_sign_verify

✅ tw_keypair::ed25519_waves_tests

✅ test_ed25519_waves_priv_to_pub
✅ test_ed25519_waves_sign

✅ tw_keypair::nist256p1_tests

✅ test_nist256p1_priv_to_pub
✅ test_nist256p1_verify
✅ test_nist256p1_sign_verify_ring

✅ tw_keypair::private_key_ffi_tests

✅ test_tw_private_key_create
✅ test_tw_private_key_delete_null
✅ test_tw_private_key_get_public_key_by_type
✅ test_tw_private_key_is_valid
✅ test_tw_private_key_sign_curve25519_waves
✅ test_tw_private_key_sign_ed25519
✅ test_tw_private_key_sign_ed25519_blake2b
✅ test_tw_private_key_sign_ed25519_extended_cardano
✅ test_tw_private_key_sign_invalid_hash
✅ test_tw_private_key_sign_nist256p1
✅ test_tw_private_key_sign_null_hash
✅ test_tw_private_key_sign_secp256k1
✅ test_tw_private_key_sign_starkex

✅ tw_keypair::public_key_ffi_tests

✅ test_tw_public_key_create_by_type
✅ test_tw_public_key_delete_null
✅ test_tw_public_key_verify_curve25519_waves
✅ test_tw_public_key_verify_ed25519
✅ test_tw_public_key_verify_ed25519_blake2b
✅ test_tw_public_key_verify_ed25519_extended_cardano
✅ test_tw_public_key_verify_nist256p1
✅ test_tw_public_key_verify_secp256k1

✅ tw_keypair::secp256k1_tests

✅ test_secp256k1_sign_verify

✅ tw_keypair::tw_keypair_starkex_tests

✅ test_starkex_tw_private_key
✅ test_starkex_tw_private_key_sign

✅ tw_memory::c_byte_array_ffi_tests

✅ test_c_byte_array_into_vec
✅ test_drop_c_byte_array
✅ test_free_c_byte_array

✅ tw_memory::c_result_ffi_tests

✅ test_c_result_error_with_ok_code
✅ test_c_result_into_result
✅ test_c_result_unwrap
✅ test_c_result_unwrap_error

✅ tw_memory::string_ffi_tests

✅ tests_ffi_string

✅ tw_move_parser::move_parser_ffi_tests

✅ tests_function_argument_to_bcs
✅ tests_function_argument_to_bcs_another
✅ tests_type_tag

✅ tw_number::u256

✅ test_u256_big_endian
✅ test_u256_big_endian_compact
✅ test_u256_big_endian_min_len
✅ test_u256_from_str
✅ test_u256_little_endian
✅ test_u256_little_endian_compact

✅ tw_proto::proto_ffi_tests

✅ test_pass_eth_signing_msg_through
✅ test_polkadot_test_signing_input

✅ tw_proto::proto_tests

✅ test_deserialize
✅ test_deserialize_prefixed
✅ test_serialize
✅ test_serialize_deserialize
✅ test_serialize_prefixed

✅ tw_ronin::address

✅ test_ronin_address_invalid
✅ test_ronin_address_valid

✅ tw_ronin::compiler

✅ test_ronin_preimage_hashes_and_compile

✅ tw_ronin::rlp

✅ test_rlp_encode_ronin_address

✅ tw_ronin::signer

✅ test_ronin_signing
✅ test_sign_json

✅ tw_utxo::input_selection

✅ input_selector_all
✅ input_selector_all_insufficient_inputs
✅ input_selector_empty_script_bufs
✅ input_selector_exact_balance_no_change
✅ input_selector_one_input_cannot_cover_fees
✅ input_selector_one_input_required
✅ input_selector_select_ascending
✅ input_selector_two_inputs_required

✅ tw_utxo::p2pkh

✅ sighash_input_p2pkh_output_p2pkh

✅ tw_utxo::p2tr

✅ sighash_input_p2pkh_output_p2tr_key_spend

✅ tw_utxo::p2wpkh

✅ sighash_input_p2pkh_output_p2wpkh
✅ sighash_input_p2wpkh_output_p2wpkh

✅ wallet-core-rs::ethereum_rlp

✅ test_ethereum_rlp