rest

package
v1.0.5 Latest Latest
Warning

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

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

Documentation

Overview

Package classification HiemdallRest API

    Schemes: http
    BasePath: /
    Version: 0.0.1
    title: Heimdall APIs
    Consumes:
    - application/json
	   Host:localhost:1317
    - application/json

nolint

nolint

Index

Constants

This section is empty.

Variables

View Source
var RestLogger tmLog.Logger

RestLogger for bor module logger

View Source
var SPAN_OVERRIDES = map[string][]byte{
	"heimdall-137": mainnetSpanJSON,
}

Functions

func RegisterRoutes

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

RegisterRoutes registers bor-related REST handlers to a router

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 HeimdallSpanResultWithHeight added in v0.2.7

type HeimdallSpanResultWithHeight struct {
	Height int64
	Result []byte
}

type ProposeSpanReq

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

	ID         uint64 `json:"span_id"`
	StartBlock uint64 `json:"start_block"`
	BorChainID string `json:"bor_chain_id"`
}

ProposeSpanReq struct for proposing new span

type ResponseWithHeight added in v1.0.1

type ResponseWithHeight struct {
	Height string              `json:"height"`
	Result jsoniter.RawMessage `json:"result"`
}

ResponseWithHeight defines a response object type that wraps an original response with a height. TODO:Link it with bor

type SendReqInput added in v0.3.2

type SendReqInput struct {

	//required:true
	//in:body
	BaseReq BaseReq `json:"base_req"`

	//required:true
	//in:body
	ID uint64 `json:"span_id"`

	//required:true
	//in:body
	StartBlock uint64 `json:"start_block"`

	//required:true
	//in:body
	BorChainID string `json:"bor_chain_id"`
}

Jump to

Keyboard shortcuts

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