account

package
v0.0.0-...-6333696 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAccountIndex = -1
)

Variables

This section is empty.

Functions

func CreateRandomKeyPair

func CreateRandomKeyPair(now int64) (*ecdsa.PrivateKey, error)

Types

type Account

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

func New

func New(logger logging.Logger) *Account

func (*Account) Authorise

func (a *Account) Authorise(password string) bool

func (*Account) CreatePodAccount

func (a *Account) CreatePodAccount(accountId int, passPhrase string, createPod bool) error

func (*Account) CreateUserAccount

func (a *Account) CreateUserAccount(passPhrase, mnemonic string) (string, string, error)

func (*Account) DeletePodAccount

func (a *Account) DeletePodAccount(accountId int)

func (*Account) GetAddress

func (a *Account) GetAddress(index int) utils.Address

func (*Account) GetPodAccountInfo

func (a *Account) GetPodAccountInfo(index int) (*AccountInfo, error)

func (*Account) GetUserAccountInfo

func (a *Account) GetUserAccountInfo() *AccountInfo

func (*Account) GetUserPrivateKey

func (a *Account) GetUserPrivateKey(index int) *ecdsa.PrivateKey

func (*Account) LoadUserAccount

func (a *Account) LoadUserAccount(passPhrase, encryptedMnemonic string) error

type AccountInfo

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

func (*AccountInfo) GetAddress

func (ai *AccountInfo) GetAddress() utils.Address

func (*AccountInfo) GetPrivateKey

func (ai *AccountInfo) GetPrivateKey() *ecdsa.PrivateKey

func (*AccountInfo) GetPublicKey

func (ai *AccountInfo) GetPublicKey() *ecdsa.PublicKey

type Wallet

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

func NewWallet

func NewWallet(mnemonic string) *Wallet

func (*Wallet) CreateAccount

func (w *Wallet) CreateAccount(walletPath string, plainMnemonic string) (accounts.Account, error)

func (*Wallet) LoadMnemonicAndCreateRootAccount

func (w *Wallet) LoadMnemonicAndCreateRootAccount(mnemonic string) (accounts.Account, string, error)

Jump to

Keyboard shortcuts

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