accounts

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: LGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllAccounts

func GetAllAccounts() ([]string, error)

GetAllAccounts - get list of local account addresses

func GetAllContracts added in v0.5.1

func GetAllContracts(deployingAccount common.Address) ([]string, error)

GetAllContracts - get list of all deployed contracts from account

Types

type Account

type Account struct {
	Address              common.Address    `json:"address"`      // Account address
	PrivateKey           *ecdsa.PrivateKey `json:"privateKey"`   // Account private key
	SerializedPrivateKey []byte            `json:"s_privateKey"` // Serialized account private key
}

Account - container holding account metadata, private key

func AccountFromKey

func AccountFromKey(privateKey *ecdsa.PrivateKey) (*Account, error)

AccountFromKey - generate account from given private key

func NewAccount

func NewAccount() (*Account, error)

NewAccount - create new account

func NewContractAccount added in v0.5.1

func NewContractAccount(contractSource []byte, deployingAccountAddress *common.Address) (*Account, error)

NewContractAccount - create new account for contract

func ReadAccountFromMemory

func ReadAccountFromMemory(address common.Address) (*Account, error)

ReadAccountFromMemory - read account with address from persistent memory

func (*Account) Bytes

func (account *Account) Bytes() []byte

Bytes - convert given account to byte array

func (*Account) MakeEncodingSafe

func (account *Account) MakeEncodingSafe() error

MakeEncodingSafe - make account safe for encoding

func (*Account) RecoverSafeEncoding

func (account *Account) RecoverSafeEncoding() error

RecoverSafeEncoding - recover full data from safely encoded type

func (*Account) String

func (account *Account) String() string

String - convert given account to string

func (*Account) WriteToMemory

func (account *Account) WriteToMemory() error

WriteToMemory - write given account to persistent memory

Jump to

Keyboard shortcuts

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