deso

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InputOpType  = "INPUT"
	OutputOpType = "OUTPUT"

	Online  Mode = "ONLINE"
	Offline Mode = "OFFLINE"

	Mainnet Network = "MAINNET"
	Testnet Network = "TESTNET"
)

Variables

View Source
var (
	Currency = types.Currency{
		Symbol:   "DESO",
		Decimals: 9,
	}

	OperationTypes = []string{
		InputOpType,
		OutputOpType,
	}

	SuccessStatus  = "SUCCESS"
	RevertedStatus = "REVERTED"

	MinFeeRateNanosPerKB = uint64(1000)
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Mode                   Mode
	Network                *types.NetworkIdentifier
	Params                 *lib.DeSoParams
	Currency               *types.Currency
	GenesisBlockIdentifier *types.BlockIdentifier
	Port                   int
	NodePort               int
	DataDirectory          string
	MinerPublicKeys        []string
	TXIndex                bool
	Regtest                bool
}

func LoadConfig

func LoadConfig() (*Config, error)

type Mode

type Mode string

type Network

type Network string

type Node

type Node struct {
	*lib.Server
	Params  *lib.DeSoParams
	TXIndex *lib.TXIndex
	Online  bool
	Config  *Config
}

func NewNode

func NewNode(config *Config) *Node

func (*Node) CurrentBlock

func (node *Node) CurrentBlock() *types.Block

func (*Node) GetBlock

func (node *Node) GetBlock(hash string) *types.Block

func (*Node) GetBlockAtHeight

func (node *Node) GetBlockAtHeight(height int64) *types.Block

func (*Node) Start

func (node *Node) Start()

Jump to

Keyboard shortcuts

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