rest

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

nolint

nolint

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryBalancesRequestHandlerFn

func QueryBalancesRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

swagger:route GET /bank/balances/{address} bank bankBalanceByAddress It returns the matic balance of particular address responses:

200: bankBalanceByAddressResponse

QueryBalancesRequestHandlerFn query accountREST Handler

func RegisterRoutes

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

RegisterRoutes - Central function to define routes that get registered by the main application

func SendRequestHandlerFn

func SendRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc

swagger:route POST /bank/accounts/{address}/transfers bank bankBalanceTransfer It returns the prepared msg for the transfer of balance from one account to another. responses:

200: bankBalanceTransferResponse

SendRequestHandlerFn - http request handler to send coins to a address.

Types

type Address added in v0.3.2

type Address struct {

	//Address of the account
	//required:true
	//in:path
	Address string `json:"address"`

	//Address of the account
	//in:query
	Height string `json:"height"`
}

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 SendReq

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

	Amount sdk.Coins `json:"amount" yaml:"amount"`
}

SendReq defines the properties of a send request's body.

type SendReqInput added in v0.3.2

type SendReqInput struct {

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

	//required:true
	//in:body
	Amount []coin `json:"amount"`
}

Jump to

Keyboard shortcuts

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