common

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFreeSpace added in v0.1.30

func GetFreeSpace(dataDir string) (uint64, error)

GetFreeSpace returns total number of free bytes on a path's volume

func ValidatePath added in v0.1.30

func ValidatePath(dataDir string) bool

ValidatePath validates file permissions for the current user for the directory in the provided path

Types

type AccountState

type AccountState struct {
	Nonce            uint64
	Balance          uint64
	ProjectedNonce   uint64
	ProjectedBalance uint64
}

type InnerSerializableSignedTransaction

type InnerSerializableSignedTransaction struct {
	AccountNonce uint64
	Recipient    types.Address
	GasLimit     uint64
	Price        uint64
	Amount       uint64
}

InnerSerializableSignedTransaction is the internal transaction data TODO rename to SerializableTransaction once we remove the old SerializableTransaction

type LocalAccount

type LocalAccount struct {
	Name    string
	PrivKey ed25519.PrivateKey // the pub & private key
	PubKey  ed25519.PublicKey  // only the pub key part
}

func (*LocalAccount) Address

func (a *LocalAccount) Address() gosmtypes.Address

type NetInfo

type NetInfo struct {
	GenesisTime   uint64
	CurrentLayer  uint32
	CurrentEpoch  uint64
	NetId         uint64
	LayerPerEpoch uint64
	LayerDuration uint64
	MaxTxsPerSec  uint64
}

type NodeInfo

type NodeInfo struct {
	Version string
	Build   string
}

type SerializableSignedTransaction

type SerializableSignedTransaction struct {
	InnerSerializableSignedTransaction
	Signature [64]byte
}

SerializableSignedTransaction is a signed serializable transaction Once we support signed txs we should replace SerializableTransaction with this struct. Currently it is only used in the rpc server.

type Store

type Store map[string]accountKeys

func (Store) CreateAccount

func (s Store) CreateAccount(alias string) *LocalAccount

func (Store) GetAccount

func (s Store) GetAccount(name string) (*LocalAccount, error)

func (Store) ListAccounts

func (s Store) ListAccounts() []string

Jump to

Keyboard shortcuts

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