evm

package
v0.0.0-...-6fdbc3c Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 5 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 {
	ID         uuid.UUID         `json:"id" `         // 16 byte random UUID (version 4)
	Address    common.Address    `json:"address"`     // 20 byte eip-55 address
	PrivateKey *ecdsa.PrivateKey `json:"private_key"` // 32 byte ecdsa private key
}

Account represents an Ethereum address

func (*Account) Export

func (a *Account) Export(password []byte) ([]byte, error)

Export returns the account as encrypted JSON using standard scrypt params

func (*Account) Gen

func (a *Account) Gen() error

Gen generates a new account

func (*Account) Import

func (a *Account) Import(payload, password []byte) error

Import populates an account from an encrypted JSON payload

func (*Account) String

func (a *Account) String() string

String dumps a mixed-case checksum encoded address

Jump to

Keyboard shortcuts

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