rest

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

nolint

nolint

Index

Constants

This section is empty.

Variables

View Source
var RestLogger tmLog.Logger

RestLogger for slashing module logger

Functions

func RegisterRoutes

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

RegisterRoutes registers slashing-related REST handlers to a router

func SlashingTxStatusHandlerFn

func SlashingTxStatusHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

swagger:route GET /slashing/isoldtx slashing slashingIsOldTx It returns whether the transaction is old responses:

200: slashingIsOldTxResponse

Returns slashing tx status information

Types

type BaseReq added in v0.3.2

type BaseReq struct {

	//Address of the sender
	//required:true
	//in:body
	From string `json:"address"`

	//Chain ID of Heimdall
	//required:true
	//in:body
	ChainID string `json:"chain_id"`
}

type Height added in v0.3.2

type Height struct {

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

type ID added in v0.3.2

type ID struct {

	//ID of the validator
	//required:true
	//in:path
	Id int64 `json:"id"`
}

type TickAckReq

type TickAckReq struct {
	BaseReq     rest.BaseReq `json:"base_req"`
	ID          uint64       `json:"ID"`
	Amount      uint64       `json:"amount"`
	TxHash      string       `json:"tx_hash"`
	LogIndex    uint64       `json:"log_index"`
	BlockNumber uint64       `json:"block_number" yaml:"block_number"`
}

type TickReq

type TickReq struct {
	BaseReq           rest.BaseReq `json:"base_req"`
	ID                uint64       `json:"ID"`
	Proposer          string       `json:"proposer"`
	SlashingInfoBytes string       `json:"slashing_info_bytes"`
}

type UnjailReq

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

	ID          uint64 `json:"ID"`
	TxHash      string `json:"tx_hash"`
	LogIndex    uint64 `json:"log_index"`
	BlockNumber uint64 `json:"block_number" yaml:"block_number"`
}

Unjail TX body

type ValidatorSlashingInfo added in v0.3.2

type ValidatorSlashingInfo struct {
	ID            int64 `json:"ID"`
	SlashedAmount int64 `json:"SlashedAmount"`
	IsJailed      bool  `json:"IsJailed"`
}

Jump to

Keyboard shortcuts

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