You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generator just generates random base58 text. I implemented a function that can fix checksums of a randomly generated address, it just requires base58 encode/decode. You can copy this small implementation into the Faker lib to not need to go get it: https://github.com/akamensky/base58/blob/master/base58.go. Or implement it yourself.
If base58 is in this package, I can make a PR that runs all bitcoin generated addressed through a checksum fix function and make sure they are valid.
Describe the bug
Bitcoin keys use base58 check (see https://en.bitcoin.it/wiki/Base58Check_encoding, for example: https://gobittest.appspot.com/Address). Addresses generated by this package are not valid Bitcoin addresses since their checksums are invalid.
The generator just generates random base58 text. I implemented a function that can fix checksums of a randomly generated address, it just requires base58 encode/decode. You can copy this small implementation into the
Faker
lib to not need togo get
it: https://github.com/akamensky/base58/blob/master/base58.go. Or implement it yourself.If base58 is in this package, I can make a PR that runs all bitcoin generated addressed through a checksum fix function and make sure they are valid.
To Reproduce
https://go.dev/play/p/No5BYCcsUk4
Expected behavior
The address should pass the CheckDecode
The text was updated successfully, but these errors were encountered: