rest

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestNetworkAddr = "network"
	RestNumLimit    = "limit"
	RestMoniker     = "moniker"
	RestOwner       = "owner"
	RestQueryType   = "query_type"
)

REST Variable names nolint

Variables

This section is empty.

Functions

func RegisterHandlers added in v0.8.0

func RegisterHandlers(clientCtx client.Context, rtr *mux.Router)

RegisterHandlers registers register-related REST handlers to a router

Types

type CreateMetaNodeRequest added in v0.8.0

type CreateMetaNodeRequest struct {
	BaseReq     rest.BaseReq      `json:"base_req" yaml:"base_req"`
	NetworkAddr string            `json:"network_address" yaml:"network_address"`
	PubKey      string            `json:"pubkey" yaml:"pubkey"` // in bech32
	Amount      sdk.Coin          `json:"amount" yaml:"amount"`
	Description types.Description `json:"description" yaml:"description"`
}

type CreateResourceNodeRequest

type CreateResourceNodeRequest struct {
	BaseReq     rest.BaseReq      `json:"base_req" yaml:"base_req"`
	NetworkAddr string            `json:"network_address" yaml:"network_address"`
	PubKey      string            `json:"pubkey" yaml:"pubkey"` // in bech32
	Amount      sdk.Coin          `json:"amount" yaml:"amount"`
	Description types.Description `json:"description" yaml:"description"`
	NodeType    uint32            `json:"node_type" yaml:"node_type"`
}

type MetaNodeRegVoteRequest added in v0.8.0

type MetaNodeRegVoteRequest struct {
	BaseReq                 rest.BaseReq `json:"base_req" yaml:"base_req"`
	CandidateNetworkAddress string       `json:"candidate_network_address" yaml:"candidate_network_address"`
	CandidateOwnerAddress   string       `json:"candidate_owner_address" yaml:"candidate_owner_address"`
	Opinion                 bool         `json:"opinion" yaml:"opinion"`
	VoterNetworkAddress     string       `json:"voter_network_address" yaml:"voter_network_address"`
}

type RemoveMetaNodeRequest added in v0.8.0

type RemoveMetaNodeRequest struct {
	BaseReq         rest.BaseReq `json:"base_req" yaml:"base_req"`
	MetaNodeAddress string       `json:"meta_node_address" yaml:"meta_node_address"` // in bech32
}

type RemoveResourceNodeRequest

type RemoveResourceNodeRequest struct {
	BaseReq             rest.BaseReq `json:"base_req" yaml:"base_req"`
	ResourceNodeAddress string       `json:"resource_node_address" yaml:"resource_node_address"` // in bech32
}

type UpdateEffectiveDepositRequest added in v0.10.0

type UpdateEffectiveDepositRequest struct {
	BaseReq         rest.BaseReq         `json:"base_req" yaml:"base_req"`
	Reporters       []stratos.SdsAddress `json:"reporters" yaml:"reporters"`           // reporter(sp node) p2p address
	ReporterOwner   []sdk.AccAddress     `json:"reporter_owner" yaml:"reporter_owner"` // report(sp node) wallet address
	NetworkAddress  string               `json:"network_address" yaml:"network_address"`
	EffectiveTokens sdk.Int              `json:"effective_tokens" yaml:"effective_tokens"`
	InitialTier     uint32               `json:"initial_tier" yaml:"initial_tier"`
	OngoingTier     uint32               `json:"ongoing_tier" yaml:"ongoing_tier"`
}

type UpdateMetaNodeDepositRequest added in v0.10.0

type UpdateMetaNodeDepositRequest struct {
	BaseReq        rest.BaseReq `json:"base_req" yaml:"base_req"`
	NetworkAddress string       `json:"network_address" yaml:"network_address"`
	DepositDelta   sdk.Coin     `json:"deposit_delta" yaml:"deposit_delta"`
	IncrDeposit    string       `json:"incr_deposit" yaml:"incr_deposit"`
}

type UpdateMetaNodeRequest added in v0.8.0

type UpdateMetaNodeRequest struct {
	BaseReq        rest.BaseReq      `json:"base_req" yaml:"base_req"`
	Description    types.Description `json:"description" yaml:"description"`
	NetworkAddress string            `json:"network_address" yaml:"network_address"`
}

type UpdateResourceNodeDepositRequest added in v0.10.0

type UpdateResourceNodeDepositRequest struct {
	BaseReq        rest.BaseReq `json:"base_req" yaml:"base_req"`
	NetworkAddress string       `json:"network_address" yaml:"network_address"`
	DepositDelta   sdk.Coin     `json:"deposit_delta" yaml:"deposit_delta"`
}

type UpdateResourceNodeRequest added in v0.4.0

type UpdateResourceNodeRequest struct {
	BaseReq        rest.BaseReq      `json:"base_req" yaml:"base_req"`
	Description    types.Description `json:"description" yaml:"description"`
	NodeType       uint32            `json:"node_type" yaml:"node_type"`
	NetworkAddress string            `json:"network_address" yaml:"network_address"`
}

Jump to

Keyboard shortcuts

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