account

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenAccount added in v0.0.2

func GenAccount() (crypto.PrivateKey, crypto.PublicKey)

func SavePrivateKey added in v0.0.2

func SavePrivateKey(path string, content string)

Types

type Account added in v0.0.7

type Account struct {
	Id          int
	PrivateKey  crypto.PrivateKey
	PublicKey   crypto.PublicKey
	Address     common.Address
	InitBalance uint64
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(privateKeyHex string) *Account

func RandomAccount added in v0.0.7

func RandomAccount() *Account

func (*Account) ConsumeNonce added in v0.0.7

func (s *Account) ConsumeNonce() (uint64, error)

func (*Account) GetNonce added in v0.0.7

func (s *Account) GetNonce() (uint64, error)

func (*Account) SetNonce added in v0.0.7

func (s *Account) SetNonce(lastUsedNonce uint64)

type PrivateInfo added in v0.0.7

type PrivateInfo struct {
	Type       string
	PrivateKey string
	Id         string
}

Jump to

Keyboard shortcuts

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