block

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidIntervalPeriod = errors.New("invalid interval and/or period")
)

Functions

func NewGetBlockSummaryHttpHandler

func NewGetBlockSummaryHttpHandler(blockSummaryDb store.BlockSummary) *getBlockSummaryHttpHandler

func NewGetBlockSummaryUseCase

func NewGetBlockSummaryUseCase(blockSummaryDb store.BlockSummary) *getBlockSummaryUseCase

func NewGetBlockTimesHttpHandler

func NewGetBlockTimesHttpHandler(blockSeqDb store.BlockSeq) *getBlockTimesHttpHandler

func NewGetBlockTimesUseCase

func NewGetBlockTimesUseCase(blockSeqDb store.BlockSeq) *getBlockTimesUseCase

func NewGetByHeightHttpHandler

func NewGetByHeightHttpHandler(c *client.Client, syncablesDb store.Syncables) *getByHeightHttpHandler

func NewGetByHeightUseCase

func NewGetByHeightUseCase(c *client.Client, syncablesDb store.Syncables) *getByHeightUseCase

Types

type DetailsView

type DetailsView struct {
	Height         int64                  `json:"height"`
	Time           types.Time             `json:"time"`
	Hash           string                 `json:"hash"`
	ParentHash     string                 `json:"parent_hash"`
	ExtrinsicsRoot string                 `json:"extrinsics_root"`
	StateRoot      string                 `json:"state_root"`
	Extrinsics     []ExtrinsicDetailsView `json:"extrinsics"`
}

func ToDetailsView

func ToDetailsView(rawResponse *blockpb.GetByHeightResponse) *DetailsView

type ExtrinsicDetailsView

type ExtrinsicDetailsView struct {
	ExtrinsicIndex int64  `json:"extrinsic_index"`
	Hash           string `json:"hash"`
	IsSigned       bool   `json:"is_signed"`
	Signature      string `json:"signature"`
	PublicKey      string `json:"public_key"`
	Nonce          int64  `json:"nonce"`
	Method         string `json:"method"`
	Section        string `json:"section"`
	Args           string `json:"args"`
	IsSuccess      bool   `json:"is_success"`
	PartialFee     string `json:"partial_fee"`
	Tip            string `json:"tip"`
}

type GetBlockTimesForIntervalRequest

type GetBlockTimesForIntervalRequest struct {
	Interval types.SummaryInterval `form:"interval" binding:"required"`
	Period   string                `form:"period" binding:"required"`
}

type GetBlockTimesRequest

type GetBlockTimesRequest struct {
	Limit int64 `uri:"limit" binding:"required"`
}

type Request

type Request struct {
	Height *int64 `form:"height" binding:"-"`
}

Jump to

Keyboard shortcuts

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