Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyAndAddress ¶
GenerateKeyAndAddress generates a new private key and corresponding Bitcoin address using secp256k1 elliptic curve cryptography. The private key is encoded in hex and the address is in bech32 format.
func PublicKeyToAddress ¶
publicKeyToAddress calculates the Bitcoin address corresponding to an ECDSA public key. The resulting address will be a bech32-encoded string in the 'bc' prefix.
The public key is first SHA256-hashed, and then the resulting hash is RIPEMD160-hashed. The resulting hash is then run through the bech32 conversion algorithm to produce the final Bitcoin address.
Refer to BIP13 for more information on the bech32 encoding format.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.