public

package
v0.0.0-...-c97bdb9 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package public maintains the group of handlers for public access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handlers

type Handlers struct {
	Log   *zap.SugaredLogger
	State *state.State
	NS    *nameservice.NameService
	WS    websocket.Upgrader
	Evts  *events.Events
}

Handlers manages the set of bar ledger endpoints.

func (Handlers) Accounts

func (h Handlers) Accounts(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Accounts returns the current balances for all users.

func (Handlers) BlocksByAccount

func (h Handlers) BlocksByAccount(ctx context.Context, w http.ResponseWriter, r *http.Request) error

BlocksByAccount returns all the blocks and their details.

func (Handlers) Events

Events handles a web socket to provide events to a client.

func (Handlers) Genesis

func (h Handlers) Genesis(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Genesis returns the genesis information.

func (Handlers) Mempool

func (h Handlers) Mempool(ctx context.Context, w http.ResponseWriter, r *http.Request) error

Mempool returns the set of uncommitted transactions.

func (Handlers) SubmitWalletTransaction

func (h Handlers) SubmitWalletTransaction(ctx context.Context, w http.ResponseWriter, r *http.Request) error

SubmitWalletTransaction adds new transactions to the mempool.

Jump to

Keyboard shortcuts

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