github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/client/rpc/root.go (about)

     1  package rpc
     2  
     3  import (
     4  	"github.com/gorilla/mux"
     5  
     6  	"github.com/fibonacci-chain/fbc/libs/cosmos-sdk/client/context"
     7  )
     8  
     9  // Register REST endpoints
    10  func RegisterRPCRoutes(cliCtx context.CLIContext, r *mux.Router) {
    11  	r.HandleFunc("/node_info", NodeInfoRequestHandlerFn(cliCtx)).Methods("GET")
    12  	r.HandleFunc("/syncing", NodeSyncingRequestHandlerFn(cliCtx)).Methods("GET")
    13  	r.HandleFunc("/blocks/latest", LatestBlockRequestHandlerFn(cliCtx)).Methods("GET")
    14  	r.HandleFunc("/blocks/{height}", BlockRequestHandlerFn(cliCtx)).Methods("GET")
    15  	r.HandleFunc("/block_info/{height}", BlockInfoRequestHandlerFn(cliCtx)).Methods("GET")
    16  	r.HandleFunc("/validatorsets/latest", LatestValidatorSetRequestHandlerFn(cliCtx)).Methods("GET")
    17  	r.HandleFunc("/validatorsets/{height}", ValidatorSetRequestHandlerFn(cliCtx)).Methods("GET")
    18  }