wallets

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

func NewTransaction

func NewTransaction(privatekey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey,
	sender string, recipient string, value float32) *Transaction

func (*Transaction) GenerateSignature

func (t *Transaction) GenerateSignature() *utils.Signature

func (*Transaction) MarshalJSON

func (t *Transaction) MarshalJSON() ([]byte, error)

type TransactionRequest

type TransactionRequest struct {
	SenderPrivateKey           *string `json:"senderPrivateKey"`
	SenderBlockchainAddress    *string `json:"senderBlockchainAddress"`
	RecipientBlockchainAddress *string `json:"recipientBlockchainAddress"`
	SenderPublicKey            *string `json:"senderPublicKey"`
	Value                      *string `json:"value"`
}

func (*TransactionRequest) Validate

func (tr *TransactionRequest) Validate() bool

type Wallet

type Wallet struct {
	// contains filtered or unexported fields
}

func NewWallet

func NewWallet() *Wallet

func (*Wallet) BlockchainAddress

func (w *Wallet) BlockchainAddress() string

As struct is lowercase can't be exported

func (*Wallet) MarshalJSON

func (w *Wallet) MarshalJSON() ([]byte, error)

For webwallet UI

func (*Wallet) PrivateKey

func (w *Wallet) PrivateKey() *ecdsa.PrivateKey

As struct is lowercase can't be exported

func (*Wallet) PrivateKeyStr

func (w *Wallet) PrivateKeyStr() string

func (*Wallet) PublicKey

func (w *Wallet) PublicKey() *ecdsa.PublicKey

As struct is lowercase can't be exported

func (*Wallet) PublicKeyStr

func (w *Wallet) PublicKeyStr() string

Jump to

Keyboard shortcuts

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