wallet

package
v0.0.0-...-f39f649 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sig

type Sig = []byte

Sig is always 65 bytes long.

type Wallet

type Wallet struct {
	Wallet *phd.Wallet
	Acc    *phd.Account
}

Wallet stores a hdwallet and an unlocked account which will be used for signing.

func NewWallet

func NewWallet(mnemonic string, accountIndex uint) *Wallet

NewWallet creates a wallet from a `mnemonic` string. The secrete key of the account is deterministically derived from the `mnemonic`.

func (*Wallet) SignText

func (w *Wallet) SignText(acc accounts.Account, text []byte) (Sig, error)

SignText implements the tee.TextSigner interface.

Jump to

Keyboard shortcuts

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