encryption

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Unlicense Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mnemonic

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

func NewMnemonic

func NewMnemonic(phrase string) *Mnemonic

func (*Mnemonic) PrivateKey

func (mnemonic *Mnemonic) PrivateKey(derivationPath string, password string) (*PrivateKey, error)

type PrivateKey

type PrivateKey struct {
	*ecdsa.PrivateKey
}

func DecodePrivateKey

func DecodePrivateKey(privateKeyString string) (*PrivateKey, error)

func (*PrivateKey) String

func (privateKey *PrivateKey) String() string

type PublicKey

type PublicKey struct {
	*ecdsa.PublicKey
}

func DecodePublicKey

func DecodePublicKey(publicKeyString string) (*PublicKey, error)

func NewPublicKey

func NewPublicKey(privateKey *PrivateKey) *PublicKey

func (*PublicKey) Address

func (publicKey *PublicKey) Address() string

func (*PublicKey) String

func (publicKey *PublicKey) String() string

type Signature

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

func DecodeSignature

func DecodeSignature(signatureString string) (*Signature, error)

func NewSignature

func NewSignature(marshaledTransaction []byte, privateKey *PrivateKey) (*Signature, error)

func (*Signature) String

func (signature *Signature) String() string

func (*Signature) Verify

func (signature *Signature) Verify(marshaledTransaction []byte, publicKey *PublicKey, transactionSenderAddress string) bool

type Wallet

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

func DecodeWallet

func DecodeWallet(mnemonicString string, derivationPath string, password string, privateKeyString string) (*Wallet, error)

func NewEmptyWallet

func NewEmptyWallet() *Wallet

func (*Wallet) Address

func (wallet *Wallet) Address() string

func (*Wallet) MarshalJSON

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

func (*Wallet) PrivateKey

func (wallet *Wallet) PrivateKey() *PrivateKey

func (*Wallet) PublicKey

func (wallet *Wallet) PublicKey() *PublicKey

Jump to

Keyboard shortcuts

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