api

package
v0.0.0-...-a6ba2ba Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Error string
}

type Block

type Block struct {
	Hash          string
	Version       uint32
	DataHash      string
	PrevBlockHash string
	Height        uint32
	Timestamp     int64
	Validator     string
	Signature     string

	TxResponse TxResponse
}

type Server

type Server struct {
	ServerConfig
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg ServerConfig, bc *core.Blockchain, txChan chan *core.Transaction) *Server

func (*Server) Start

func (s *Server) Start() error

type ServerConfig

type ServerConfig struct {
	Logger     log.Logger
	ListenAddr string
}

type TxResponse

type TxResponse struct {
	TxCount uint
	Hashes  []string
}

Jump to

Keyboard shortcuts

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