wallet

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keccak256Hasher

type Keccak256Hasher interface {
	Keccak256Hash() common.Hash
}

type Signature

type Signature []byte

func (Signature) Bytes

func (s Signature) Bytes() []byte

func (Signature) Hex

func (s Signature) Hex() string

func (Signature) Unmarshal

func (s Signature) Unmarshal() (common.Hash, common.Hash, uint8)

Decodes the signature in following values: R, S, V.

type Wallet

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

func New

func New(privateKeyHash string) (*Wallet, error)

func (*Wallet) GetAddress

func (w *Wallet) GetAddress() (common.Address, error)

func (*Wallet) Sign

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

func (*Wallet) SignHasher

func (w *Wallet) SignHasher(hasher Keccak256Hasher) (Signature, error)

func (*Wallet) SignHasherWithPrefix

func (w *Wallet) SignHasherWithPrefix(hasher Keccak256Hasher) (Signature, error)

func (*Wallet) SignWithPrefix

func (w *Wallet) SignWithPrefix(digestHash []byte) (Signature, error)

Jump to

Keyboard shortcuts

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