rest

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: GPL-3.0 Imports: 14 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 checkpoint-related REST handlers to a router

func TopupHandlerFn

func TopupHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

swagger:route POST /topup/fee topup topupFee It returns the prepared msg for topup fee responses:

200: topupFeeResponse

TopupHandlerFn - http request handler to topup coins to a address.

func TopupTxStatusHandlerFn added in v0.1.5

func TopupTxStatusHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

swagger:route GET /topup/isoldtx topup topupIsOldTx It returns whether the transaction is old responses:

200: topupIsOldTxResponse

Returns topup tx status information

func VerifyAccountProofHandlerFn added in v0.1.7

func VerifyAccountProofHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

swagger:route GET /topup/account-proof/{address}/verify topup topupDividendAccountProofVerify It returns true if given Merkle path for dividendAccountID is valid responses:

200: topupDividendAccountProofVerifyResponse

VerifyAccountProofHandlerFn - Returns true if given Merkle path for dividendAccountID is valid

func WithdrawFeeHandlerFn

func WithdrawFeeHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

swagger:route POST /topup/withdraw topup topupWithdraw It returns the prepared msg for topup withdraw responses:

200: topupWithdrawResponse

WithdrawFeeHandlerFn - http request handler to withdraw fee coins from a address.

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 DividendAccount added in v0.3.2

type DividendAccount struct {
	User      string `json:"user"`
	FeeAmount string `json:"feeAmount"`
}

type DividendAccountProof added in v0.3.2

type DividendAccountProof struct {
	User  string `json:"user"`
	Proof string `json:"accountProof"`
	Index uint64 `json:"index"`
}

type Height added in v0.3.2

type Height struct {

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

type TopupReq

type TopupReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`

	TxHash      string `json:"tx_hash" yaml:"tx_hash"`
	LogIndex    uint64 `json:"log_index" yaml:"log_index"`
	User        string `json:"user" yaml:"user"`
	Fee         string `json:"fee" yaml:"fee"`
	BlockNumber uint64 `json:"block_number" yaml:"block_number"`
}

TopupReq defines the properties of a topup request's body.

type WithdrawFeeReq

type WithdrawFeeReq struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	Amount  string       `json:"amount" yaml:"amount"`
}

WithdrawFeeReq defines the properties of a withdraw fee request's body.

Jump to

Keyboard shortcuts

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