gateway

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: GPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeCommand

func ServeCommand(cdc *codec.Codec) *cobra.Command

ServeCommand will start the application REST service as a blocking process. It takes a codec to create a RestServer object and a function to register all necessary routes.

Types

type GuardRequest added in v0.2.0

type GuardRequest struct {
	SignedSimplexStateBytes string `json:"signed_simplex_state_bytes" yaml:"signed_simplex_state_bytes"`
	SimplexReceiverSig      string `json:"simplex_receiver_sig" yaml:"simplex_receiver_sig"`
}

type RestServer

type RestServer struct {
	Mux *mux.Router
	// contains filtered or unexported fields
}

RestServer represents the Light Client Rest server

func NewRestServer

func NewRestServer(cdc *codec.Codec) (*RestServer, error)

NewRestServer creates a new rest server instance

func (*RestServer) Start

func (rs *RestServer) Start(listenAddr string, maxOpen int, readTimeout, writeTimeout uint) error

Start starts the rest server

type RewardRequest added in v0.2.5

type RewardRequest struct {
	MiningReward            string `json:"mining_reward"`
	ServiceReward           string `json:"service_reward"`
	RewardRequestProtoBytes string `json:"reward_request_proto_bytes"` // proto msg for reward snapshot from latest intendWithdraw
}

type SubscribeRequest

type SubscribeRequest struct {
	EthAddr string `json:"eth_addr" yaml:"eth_addr"`
	Amount  string `json:"amount" yaml:"amount"`
}

type SyncDelegatorRequest

type SyncDelegatorRequest struct {
	CandidateAddress string `json:"candidate_address"`
	DelegatorAddress string `json:"delegator_address"`
}

type UpdateSidechainAddrRequest added in v0.2.0

type UpdateSidechainAddrRequest struct {
	EthAddr string `json:"eth_addr" yaml:"eth_addr"`
}

type WithdrawRewardRequest

type WithdrawRewardRequest struct {
	EthAddr string `json:"eth_addr" yaml:"eth_addr"`
}

Jump to

Keyboard shortcuts

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