mock

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 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 Account

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

func NewAccount

func NewAccount(name string, passphrase []byte) *Account

NewAccount creates a new account.

func (*Account) ID

func (a *Account) ID() uuid.UUID

ID provides the ID for the account.

func (*Account) IsUnlocked

func (a *Account) IsUnlocked() bool

IsUnlocked returns true if the account is unlocked.

func (*Account) Lock

func (a *Account) Lock()

Lock locks the account. A locked account cannot sign.

func (*Account) Name

func (a *Account) Name() string

Name provides the name for the account.

func (*Account) Path

func (a *Account) Path() string

Path provides the path for the account. Can be empty if the account is not derived from a path.

func (*Account) PublicKey

func (a *Account) PublicKey() e2types.PublicKey

PublicKey provides the public key for the account.

func (*Account) Sign

func (a *Account) Sign(data []byte) (e2types.Signature, error)

Sign signs data with the account.

func (*Account) Unlock

func (a *Account) Unlock(passphrase []byte) error

Unlock unlocks the account. An unlocked account can sign.

Jump to

Keyboard shortcuts

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