address

package
v0.0.0-...-22cd51a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B58AddressFromPrivateKey

func B58AddressFromPrivateKey(privateKeyHex string, ellipticCurve *btcec.KoblitzCurve) (string, error)

B58AddressFromPrivateKey returns a base58-encoded string representing the address derived from the provided private key.

Types

type Address

type Address struct {
	*btcec.PublicKey
}

func New

func New(publicKeyBytes []byte, ellipticCurve *btcec.KoblitzCurve) (*Address, error)

Returns a new address based on the provided public key and elliptic curve.

func (*Address) ToB58

func (a *Address) ToB58() (string, error)

ToB58 converts the address to a base58-encoded string representation.

func (*Address) ToBytes

func (a *Address) ToBytes() []byte

ToBytes converts the address to a byte slice representation.

func (*Address) ToHex

func (a *Address) ToHex() string

ToHex converts the address to a hexadecimal string representation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL