wallet

package
v0.0.0-...-372d3c0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeysFromPassword

func GenerateKeysFromPassword(password string) (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)

func LoadPrivateKeyFromFile

func LoadPrivateKeyFromFile(filename string) (*ecdsa.PrivateKey, error)

func PublicKeyCompressedToString

func PublicKeyCompressedToString(pubKey *ecdsa.PublicKey) string

func PublicKeyToECDSA

func PublicKeyToECDSA(pubKey string) (*ecdsa.PublicKey, error)

func SavePrivateKeyToFile

func SavePrivateKeyToFile(filename string, privKey *ecdsa.PrivateKey) error

func SignData

func SignData(privKey *ecdsa.PrivateKey, data []byte) ([]byte, error)

Sing data using private key

func VerifySignature

func VerifySignature(pubKey *ecdsa.PublicKey, data []byte, signature []byte) bool

Types

type Wallet

type Wallet struct {
	PrivateKey []byte // Chave privada da carteira.
	PublicKey  []byte // Chave pública derivada da privada.
	Address    string // Endereço público da carteira (derivado do hash da chave pública).
}

Wallet represent a key pairs

Jump to

Keyboard shortcuts

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