chain

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetServerChain

func SetServerChain(c *Chain)

SetServerChain sets the server chain object to package variable serverChain.

Types

type Chain

type Chain struct {
	ID              string
	Version         string
	CreationDate    time.Timestamp
	BlockWorker     string
	SignatureScheme string
	MinSubmit       int
	MinCfm          int
}

Chain represents data structure that holds the chain data.

func GetServerChain

func GetServerChain() *Chain

GetServerChain returns the chain object for the server chain.

func NewChain

func NewChain(blockWorker, signatureScheme string, minSubmit, mintCfm int) *Chain

NewChain creates a new Chain.

func Provider

func Provider() *Chain

Provider returns entity for chain object.

type Config

type Config interface {
	// LogDir returns directory to store logs.
	LogDir() string

	// LogLvl returns level of logs.
	LogLvl() string

	// BlockWorker returns address of dns server.
	BlockWorker() string

	// SignatureScheme returns signature scheme.
	SignatureScheme() string
}

Config represents config interface used for setup wallet.

Jump to

Keyboard shortcuts

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