rest

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package classification HiemdallRest API

    Schemes: http
    BasePath: /
    Version: 0.0.1
    title: Iris 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 zena module logger

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

Functions

func RegisterRoutes

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

RegisterRoutes registers zena-related REST handlers to a router

Types

type BaseReq

type BaseReq struct {

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

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

type Height

type Height struct {

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

type IrisSpanResultWithHeight

type IrisSpanResultWithHeight 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"`
	ZenaChainID string `json:"zena_chain_id"`
}

ProposeSpanReq struct for proposing new span

type ResponseWithHeight

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 zena

type SendReqInput

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
	ZenaChainID string `json:"zena_chain_id"`
}

Jump to

Keyboard shortcuts

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