rest

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

nolint

nolint

Index

Constants

This section is empty.

Variables

View Source
var RestLogger tmLog.Logger

RestLogger for staking module logger

Functions

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router)

RegisterRoutes registers staking-related REST handlers to a router

Types

type BaseReq added in v0.3.2

type BaseReq struct {

	//Address of the sender
	From string `json:"address"`

	//Chain ID of Heimdall
	ChainID string `json:"chain_id"`
}

type HeaderACKReq

type HeaderACKReq struct {
	BaseReq rest.BaseReq `json:"base_req"`

	From        hmTypes.HeimdallAddress `json:"from"`
	HeaderBlock uint64                  `json:"header_block"`
	StartBlock  uint64                  `json:"start_block"`
	EndBlock    uint64                  `json:"end_block"`
	Proposer    hmTypes.HeimdallAddress `json:"proposer"`
	RootHash    hmTypes.HeimdallHash    `json:"root_Hash"`
	TxHash      hmTypes.HeimdallHash    `json:"tx_hash"`
	LogIndex    uint64                  `json:"log_index"`
}

HeaderACKReq struct for sending ACK for a new headers by providing the header index assigned my mainchain contract

type HeaderBlockReq

type HeaderBlockReq struct {
	BaseReq rest.BaseReq `json:"base_req"`

	Proposer        hmTypes.HeimdallAddress `json:"proposer"`
	RootHash        hmTypes.HeimdallHash    `json:"root_Hash"`
	AccountRootHash hmTypes.HeimdallHash    `json:"account_root_hash"`
	StartBlock      uint64                  `json:"start_block"`
	EndBlock        uint64                  `json:"end_block"`
	BorChainID      string                  `json:"bor_chain_id"`
}

HeaderBlockReq struct for incoming checkpoint

type HeaderBlockResult

type HeaderBlockResult struct {
	Proposer   hmTypes.HeimdallAddress `json:"proposer"`
	RootHash   common.Hash             `json:"rootHash"`
	StartBlock uint64                  `json:"startBlock"`
	EndBlock   uint64                  `json:"endBlock"`
}

HeaderBlockResult represents header block result

type HeaderNoACKReq

type HeaderNoACKReq struct {
	BaseReq rest.BaseReq `json:"base_req"`

	Proposer hmTypes.HeimdallAddress `json:"proposer"`
}

HeaderNoACKReq struct for sending no-ack for a new headers

type Height added in v0.3.2

type Height struct {

	//Block Height
	//in:query
	Height string `json:"height"`
}

Jump to

Keyboard shortcuts

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