rest

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryParamKeyID     = "key_id"
	QueryParamValidator = "validator"
)

query parameters

View Source
const (
	TxKeygenStart          = "start"
	TxMasterKeyRotate      = "rotate"
	TxRegisterExternalKeys = "register-external-keys"

	QuerySignature                = keeper.QuerySignature
	QueryKey                      = keeper.QueryKey
	QueryRecovery                 = keeper.QueryRecovery
	QueryKeyID                    = keeper.QueryKeyID
	QueryNextKeyID                = keeper.QueryNextKeyID
	QueryKeySharesByKeyID         = keeper.QueryKeySharesByKeyID
	QueryActiveOldKeys            = keeper.QueryActiveOldKeys
	QueryActiveOldKeysByValidator = keeper.QueryActiveOldKeysByValidator
	QueryKeySharesByValidator     = keeper.QueryKeySharesByValidator
	QueryDeactivated              = keeper.QueryDeactivated
	QueryExternalKeyID            = "external-key-id"
)

rest routes

Variables

This section is empty.

Functions

func GetHandlerKeyRotate

func GetHandlerKeyRotate(cliCtx client.Context) http.HandlerFunc

GetHandlerKeyRotate returns a handler that rotates the active keys to the next assigned ones

func GetHandlerKeygenStart

func GetHandlerKeygenStart(cliCtx client.Context) http.HandlerFunc

GetHandlerKeygenStart returns the handler to start a keygen

func GetHandlerRegisterExternalKeys

func GetHandlerRegisterExternalKeys(cliCtx client.Context) http.HandlerFunc

GetHandlerRegisterExternalKeys returns the handler to register an external key

func QueryHandlerActiveOldKeys

func QueryHandlerActiveOldKeys(cliCtx client.Context) http.HandlerFunc

QueryHandlerActiveOldKeys returns a handler to query for a list of active old key IDs held by a validator address

func QueryHandlerActiveOldKeysByValidator

func QueryHandlerActiveOldKeysByValidator(cliCtx client.Context) http.HandlerFunc

QueryHandlerActiveOldKeysByValidator returns a handler to query for a list of active old key IDs held by a validator address

func QueryHandlerDeactivatedOperator

func QueryHandlerDeactivatedOperator(cliCtx client.Context) http.HandlerFunc

QueryHandlerDeactivatedOperator returns a list of deactivated operator addresses

func QueryHandlerExternalKeyID

func QueryHandlerExternalKeyID(cliCtx client.Context) http.HandlerFunc

QueryHandlerExternalKeyID returns a handler to query the keyIDs of the current set of external keys

func QueryHandlerKeyID

func QueryHandlerKeyID(cliCtx client.Context) http.HandlerFunc

QueryHandlerKeyID returns a handler to query the keyID of the most recent key given the keyChain and keyRole

func QueryHandlerKeySharesByKeyID

func QueryHandlerKeySharesByKeyID(cliCtx client.Context) http.HandlerFunc

QueryHandlerKeySharesByKeyID returns a handler to query for a list of key shares for a given keyID

func QueryHandlerKeySharesByValidator

func QueryHandlerKeySharesByValidator(cliCtx client.Context) http.HandlerFunc

QueryHandlerKeySharesByValidator returns a handler to query for a list of key shares held by a validator address

func QueryHandlerKeyStatus

func QueryHandlerKeyStatus(cliCtx client.Context) http.HandlerFunc

QueryHandlerKeyStatus returns a handler to query a key's vote status by its keyID

func QueryHandlerNextKeyID

func QueryHandlerNextKeyID(cliCtx client.Context) http.HandlerFunc

QueryHandlerNextKeyID returns a handler to query the keyID of the next key given the keyChain and keyRole

func QueryHandlerRecovery

func QueryHandlerRecovery(cliCtx client.Context) http.HandlerFunc

QueryHandlerRecovery returns a handler to query the recovery data for some operator and key IDs

func QueryHandlerSigStatus

func QueryHandlerSigStatus(cliCtx client.Context) http.HandlerFunc

QueryHandlerSigStatus returns a handler to query a signature's vote status by its sigID

func RegisterRoutes

func RegisterRoutes(cliCtx client.Context, r *mux.Router)

RegisterRoutes registers all REST routes with the given router

Types

type ReqKeyRotate

type ReqKeyRotate struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	Chain   string       `json:"chain" yaml:"chain"`
	KeyRole string       `json:"key_role" yaml:"key_role"`
	KeyID   string       `json:"key_id" yaml:"key_id"`
}

ReqKeyRotate represents a request to rotate a key

type ReqKeygenStart

type ReqKeygenStart struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	KeyID   string       `json:"key_id" yaml:"key_id"`
	KeyRole string       `json:"key_role" yaml:"key_role"`
	KeyType string       `json:"key_type" yaml:"key_type"`
}

ReqKeygenStart represents a key-gen request

type ReqRegisterExternalKey

type ReqRegisterExternalKey struct {
	BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
	KeyIDs  []string     `json:"key_ids" yaml:"key_ids"`
	PubKeys []string     `json:"pub_keys" yaml:"pub_keys"`
}

ReqRegisterExternalKey represents a request to register external keys for a chain

Jump to

Keyboard shortcuts

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