Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTooLong = errors.New("base58 address too long") ErrInvalidChecksum = errors.New("invalid checksum") )
Functions ¶
This section is empty.
Types ¶
type A25 ¶
type A25 [25]byte
A25 is a type for a 25 byte (not base58 encoded) bitcoin address.
func ParseBTCAddress ¶
ParseBTCAddress decodes a base58 encoded bitcoin address and returns an error if the checksum is invalid. See https://rosettacode.org/wiki/Bitcoin/address_validation#Go
func (*A25) ComputeChecksum ¶
ComputeChecksum returns a four byte checksum computed from the first 21 bytes of the address. The embedded checksum is not updated.
func (*A25) Decode ¶
Decode takes a base58 encoded address and decodes it into the receiver. Errors are returned if the argument is not valid base58 or if the decoded value does not fit in the 25 byte address. The address is not otherwise checked for validity.
func (*A25) EmbeddedChecksum ¶
Click to show internal directories.
Click to hide internal directories.