Add Fake Bitcoin Address and Transaction Hash Generation
Description
This pull request adds support for generating fake Bitcoin addresses and transaction hashes within the Java Faker library. It includes:
Bitcoin Address Generation:
Implemented methods to generate fake Bitcoin addresses for the main network (address()) and the test network (testnetAddress()).
Addresses are generated using Base58Check encoding with network-specific version bytes (0 for mainnet, 111 for testnet), following Bitcoin's address format conventions.
Added a method (generateTransactionHash()) to create random 64-character hexadecimal strings simulating Bitcoin transaction hashes.
The method uses SHA-256 hashing for generating the transaction hash format.
Motivation
This addition allows Java Faker to generate realistic data related to Bitcoin transactions, enhancing the library’s utility for testing cryptocurrency-related applications.
Testing
Added unit tests to verify:
Correct format and prefix of mainnet and testnet addresses.
Address length within the expected range (26 to 35 characters).
Validity of generated transaction hashes as 64-character hexadecimal strings.
Notes
Please let me know if any adjustments are needed, or if further tests and documentation updates are required.
Add Fake Bitcoin Address and Transaction Hash Generation
Description
This pull request adds support for generating fake Bitcoin addresses and transaction hashes within the Java Faker library. It includes:
Bitcoin Address Generation:
address()
) and the test network (testnetAddress()
).Transaction Hash Generation:
generateTransactionHash()
) to create random 64-character hexadecimal strings simulating Bitcoin transaction hashes.Motivation
This addition allows Java Faker to generate realistic data related to Bitcoin transactions, enhancing the library’s utility for testing cryptocurrency-related applications.
Testing
Notes
Please let me know if any adjustments are needed, or if further tests and documentation updates are required.