rpc

package
v0.0.0-...-35c05eb Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 28 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APIVersion = app.AppVersion

Functions

func ACL

func Account

func Account(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func AccountTxs

func AccountTxs(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Accounts

func Accounts(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func AllBlockTxs

func AllBlockTxs(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func AllParams

func AllParams(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func App

func AppParams

func AppParams(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Apps

func Balance

func Balance(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Block

func BlockTxs

func BlockTxs(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Chains

func Challenge

func Challenge(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Challenge supports CORS functionality

func DAOOwner

func DAOOwner(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Dispatch

func Dispatch(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Dispatch supports CORS functionality

func FreeMemory

func FreeMemory(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func Height

func Height(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func LocalNodes

func LocalNodes(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func MemStats

func MemStats(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func Node

func NodeClaim

func NodeClaim(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func NodeClaims

func NodeClaims(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func NodeParams

func NodeParams(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Nodes

func Param

func PocketParams

func PocketParams(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func PopModel

func PopModel(_ http.ResponseWriter, r *http.Request, _ httprouter.Params, model interface{}) error

func QueryValidatorsByChain

func QueryValidatorsByChain(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Relay

Relay supports CORS functionality

func Router

func Router(routes Routes) *httprouter.Router

func SecondUpgrade

func SecondUpgrade(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func SendRawTx

func SendRawTx(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func SigningInfo

func SigningInfo(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func SimRequest

func SimRequest(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func StartRPC

func StartRPC(port string, timeout int64, simulation, debug, allBlockTxs, hotReloadChains bool)

func State

func Stop

Stop

func Supply

func Supply(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func SupportedChains

func SupportedChains(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Tx

func UnconfirmedTx

func UnconfirmedTx(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func UnconfirmedTxs

func UnconfirmedTxs(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func UpdateChains

func UpdateChains(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

UpdateChains

func Upgrade

func Upgrade(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Version

func Version(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func WriteErrorResponse

func WriteErrorResponse(w http.ResponseWriter, errorCode int, errorMsg string)

func WriteJSONResponse

func WriteJSONResponse(w http.ResponseWriter, jsn, path, ip string)

func WriteJSONResponseWithCode

func WriteJSONResponseWithCode(w http.ResponseWriter, jsn, path, ip string, code int)

func WriteRaw

func WriteRaw(w http.ResponseWriter, jsn, path, ip string)

func WriteResponse

func WriteResponse(w http.ResponseWriter, jsn, path, ip string)

Types

type HashAndProveParams

type HashAndProveParams struct {
	Hash  string `json:"hash"`
	Prove bool   `json:"prove"`
}

type HeightAndAddrParams

type HeightAndAddrParams struct {
	Height  int64  `json:"height"`
	Address string `json:"address"`
}

type HeightAndApplicaitonOptsParams

type HeightAndApplicaitonOptsParams struct {
	Height int64                              `json:"height"`
	Opts   appTypes.QueryApplicationsWithOpts `json:"opts"`
}

type HeightAndKeyParams

type HeightAndKeyParams struct {
	Height int64  `json:"height"`
	Key    string `json:"key"`
}

type HeightAndValidatorOptsParams

type HeightAndValidatorOptsParams struct {
	Height int64                           `json:"height"`
	Opts   nodeTypes.QueryValidatorsParams `json:"opts"`
}

type HeightParams

type HeightParams struct {
	Height int64 `json:"height"`
}

type PaginateAddrParams

type PaginateAddrParams struct {
	Address  string `json:"address"`
	Page     int    `json:"page,omitempty"`
	PerPage  int    `json:"per_page,omitempty"`
	Received bool   `json:"received,omitempty"`
	Prove    bool   `json:"prove,omitempty"`
	Sort     string `json:"order,omitempty"`
	Height   int64  `json:"height,omitempty"`
}

type PaginatedHeightAndAddrParams

type PaginatedHeightAndAddrParams struct {
	Height  int64  `json:"height"`
	Addr    string `json:"address"`
	Page    int    `json:"page,omitempty"`
	PerPage int    `json:"per_page,omitempty"`
}

type PaginatedHeightParams

type PaginatedHeightParams struct {
	Height  int64  `json:"height"`
	Page    int    `json:"page,omitempty"`
	PerPage int    `json:"per_page,omitempty"`
	Prove   bool   `json:"prove,omitempty"`
	Sort    string `json:"order,omitempty"`
}

type QueryNodeReceiptParam

type QueryNodeReceiptParam struct {
	Address      string `json:"address"`
	Blockchain   string `json:"blockchain"`
	AppPubKey    string `json:"app_pubkey"`
	SBlockHeight int64  `json:"session_block_height"`
	Height       int64  `json:"height"`
	ReceiptType  string `json:"receipt_type"`
}

type RPCRelayErrorResponse

type RPCRelayErrorResponse struct {
	Error    error                   `json:"error"`
	Dispatch *types.DispatchResponse `json:"dispatch"`
}

type RPCRelayResponse

type RPCRelayResponse struct {
	Signature string `json:"signature"`
	Response  string `json:"response"`
}

type RPCResponseDeliverTx

type RPCResponseDeliverTx struct {
	Code        uint32        `json:"code"`
	Data        []byte        `json:"data"`
	Log         string        `json:"log"`
	Info        string        `json:"info"`
	Events      []abci.Event  `json:"events"`
	Codespace   string        `json:"codespace"`
	Signer      types.Address `json:"signer"`
	Recipient   types.Address `json:"recipient"`
	MessageType string        `json:"message_type"`
}

type RPCResultTx

type RPCResultTx struct {
	Hash     bytes.HexBytes       `json:"hash"`
	Height   int64                `json:"height"`
	Index    uint32               `json:"index"`
	TxResult RPCResponseDeliverTx `json:"tx_result"`
	Tx       types.Tx             `json:"tx"`
	Proof    types.TxProof        `json:"proof,omitempty"`
	StdTx    RPCStdTx             `json:"stdTx,omitempty"`
}

Result of querying for a tx

func ResultTxToRPC

func ResultTxToRPC(res *core_types.ResultTx) *RPCResultTx

type RPCResultTxSearch

type RPCResultTxSearch struct {
	Txs       []*RPCResultTx `json:"txs"`
	PageCount int            `json:"page_count"`
	TotalTxs  int            `json:"total_txs"`
}

Result of searching for txs

func ResultTxSearchToRPC

func ResultTxSearchToRPC(res *core_types.ResultTxSearch) RPCResultTxSearch

type RPCResultUnconfirmedTx

type RPCResultUnconfirmedTx struct {
	Hash        bytes.HexBytes `json:"hash"`
	MessageType string         `json:"message_type"`
	StdTx       RPCStdTx       `json:"stdTx,omitempty"`
}

Result of querying for a tx

func ResultUnconfirmedTxToRPC

func ResultUnconfirmedTxToRPC(res types.Tx, height int64) *RPCResultUnconfirmedTx

type RPCResultUnconfirmedTxSearch

type RPCResultUnconfirmedTxSearch struct {
	Txs       []*RPCResultUnconfirmedTx `json:"txs"`
	PageCount int                       `json:"page_count"`
	TotalTxs  int                       `json:"total_txs"`
}

Result of search unconfirmed txs

type RPCStdSignature

type RPCStdSignature struct {
	PublicKey string `json:"pub_key"`
	Signature string `json:"signature"`
}

type RPCStdTx

type RPCStdTx types2.StdTx

func (RPCStdTx) MarshalJSON

func (r RPCStdTx) MarshalJSON() ([]byte, error)

type Route

type Route struct {
	Name        string
	Method      string
	Path        string
	HandlerFunc httprouter.Handle
}

type Routes

type Routes []Route

func GetRoutes

func GetRoutes() Routes

type SendRawTxParams

type SendRawTxParams struct {
	Addr        string `json:"address"`
	RawHexBytes string `json:"raw_hex_bytes"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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