wallet

package
v0.0.0-...-14f2c24 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAddress

func ValidateAddress(address string) bool

ValidateAddress validates a wallet address

Types

type Wallet

type Wallet struct {
	PrivateKey *ecdsa.PrivateKey
	PublicKey  []byte
	Address    string
}

Wallet represents a cryptocurrency wallet

func NewWallet

func NewWallet() (*Wallet, error)

NewWallet creates a new wallet with a new key pair

func (*Wallet) GetBalance

func (w *Wallet) GetBalance() int

GetBalance calculates the balance of the wallet (simplified version)

func (*Wallet) Sign

func (w *Wallet) Sign(data []byte) ([]byte, error)

Sign signs data with the wallet's private key

func (*Wallet) Verify

func (w *Wallet) Verify(data []byte, signature []byte) bool

Verify verifies a signature with the wallet's public key

Jump to

Keyboard shortcuts

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