block

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureRoutes

func ConfigureRoutes(g *gin.RouterGroup)

func HandleGetBlock

func HandleGetBlock(c *gin.Context)

func HandleGetBlockLatest

func HandleGetBlockLatest(c *gin.Context)

func HandleGetBlockList

func HandleGetBlockList(c *gin.Context)

Types

type BlockResponse

type BlockResponse struct {
	Hash            []byte `json:"hash"`
	EpochNumber     uint16 `json:"epoch_no"`
	SlotNumber      uint32 `json:"slot_no"`
	EpochSlotNumber uint32 `json:"epoch_slot_no"`
	BlockNumber     uint32 `json:"block_no"`
	//PreviousID      int64      `json:"previous_id"`
	//SlotLeaderID    int64      `json:"slot_leader_id"`
	Size       uint32     `json:"size"`
	Time       *time.Time `json:"time"`
	TxCount    int64      `json:"tx_count"`
	ProtoMajor uint16     `json:"proto_major"`
	ProtoMinor uint16     `json:"proto_minor"`
	VrfKey     string     `json:"vrf_key"`
}

func NewBlockResponse

func NewBlockResponse(b *models.Block) *BlockResponse

Build response object from DB model

type GetBlockUriParams

type GetBlockUriParams struct {
	Number uint32 `uri:"number" binding:"required"`
}

URI params for GetBlock

Jump to

Keyboard shortcuts

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