Documentation ¶
Index ¶
- Constants
- Variables
- func AddGenesisAccountCmd(ctx *app.Context, cdc *codec.Codec) *cobra.Command
- func AddGenesisShardCmd(ctx *app.Context, cdc *codec.Codec) *cobra.Command
- func AddGenesisValidatorCmd(ctx *app.Context, cdc *codec.Codec) *cobra.Command
- func AddServerCommands(ctx *app.Context, cdc *amino.Codec, rootCmd *cobra.Command, ...)
- func CopyFile(src, dst string) error
- func CustomGRPCHeaderMatcher(key string) (string, bool)
- func ExportCmd(appExporter app.AppExporter, defaultNodeHome string) *cobra.Command
- func ExportConfigHandler(ctx context.Context) http.HandlerFunc
- func ExportEnv(ctx context.Context) http.HandlerFunc
- func ExportLogHandler(ctx context.Context) http.HandlerFunc
- func GetVersion() version.Info
- func Handle404() http.Handler
- func HealthCheckHandler(ctx context.Context) http.HandlerFunc
- func IaviewerPrintDiff(cdc *codec.Codec, dataDir string, compareDir string, modules []string, ...)
- func InitWithConfig(cdc *amino.Codec, appInit app.AppInit, c *cfg.Config, initConfig InitConfig) (chainID string, ethChainID uint64, nodeID string, appMessage json.RawMessage, ...)
- func MustSortJSON(toSortJSON []byte) []byte
- func OpenDB(dir string) (dbm.DB, error)
- func ParseAccAddress(addr string) types.AccAddress
- func ParseCoin(denom, amount string) (types.Coin, error)
- func ReadTree(dir string, version int, prefix []byte, cacheSize int) (*iavl.MutableTree, error)
- func SortJSON(toSortJSON []byte) ([]byte, error)
- func StartInProcess(ctx *app.Context, appCreator app.AppCreator, cdc *codec.Codec) (*node.Node, error)
- func StartRestServer(cdc *codec.Codec, tmNode *node.Node, addr string) error
- type GenesisTx
- type HeightParams
- type InitConfig
- type QueryParams
- type Res
- type ResBlock
- type Response
- type RestServer
- type ValidatorAccount
Constants ¶
const ( FlagHeight = "height" FlagForZeroHeight = "for-zero-height" FlagJailAllowedAddrs = "jail-allowed-addrs" )
const ( KeyAcc = "accounts" KeyEVM = "vm" )
const ( FlagListenAddr = "laddr" FlagMaxOpenConnections = "max-open" FlagRPCReadTimeout = "read-timeout" FlagRPCWriteTimeout = "write-timeout" FlagWebsocket = "wsport" GenesisFile = "genesis.json" PrivValidatorKey = "priv_validator_key.json" )
const CorePrefix = "/core"
const DefaultCacheSize int = 100000
const (
FlagStartHeight string = "start_height"
)
const (
StartBlockHeight = 0
)
Variables ¶
var ( FlagName = "name" FlagClientHome = "home-client" FlagOWK = "owk" )
var ( FlagOverwrite = "overwrite" FlagWithTxs = "with-txs" FlagIP = "ip" FlagChainID = "chain_id" FlagEthChainID = "eth_chain_id" //FlagDBName = "dbname" FlagCoinName = "denom" )
Functions ¶
func AddGenesisAccountCmd ¶
func AddGenesisShardCmd ¶
func AddGenesisValidatorCmd ¶
func AddServerCommands ¶
func AddServerCommands( ctx *app.Context, cdc *amino.Codec, rootCmd *cobra.Command, appInit app.AppInit, appCreator app.AppCreator, appExport app.AppExporter, )
func CustomGRPCHeaderMatcher ¶ added in v1.6.8
CustomGRPCHeaderMatcher for mapping request headers to GRPC metadata. HTTP headers that start with 'Grpc-Metadata-' are automatically mapped to gRPC metadata after removing prefix 'Grpc-Metadata-'. We can use this CustomGRPCHeaderMatcher if headers don't start with `Grpc-Metadata-`
func ExportCmd ¶ added in v1.5.23
func ExportCmd(appExporter app.AppExporter, defaultNodeHome string) *cobra.Command
func ExportConfigHandler ¶ added in v1.6.8
func ExportConfigHandler(ctx context.Context) http.HandlerFunc
func ExportLogHandler ¶ added in v1.6.8
func ExportLogHandler(ctx context.Context) http.HandlerFunc
func HealthCheckHandler ¶ added in v1.6.8
func HealthCheckHandler(ctx context.Context) http.HandlerFunc
func IaviewerPrintDiff ¶ added in v1.6.8
func IaviewerPrintDiff(cdc *codec.Codec, dataDir string, compareDir string, modules []string, height int)
IaviewerPrintDiff reads different key-value from leveldb according two paths
func InitWithConfig ¶
func MustSortJSON ¶ added in v1.5.23
MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.
func ParseAccAddress ¶
func ParseAccAddress(addr string) types.AccAddress
func ReadTree ¶ added in v1.6.8
ReadTree loads an iavl tree from the directory If version is 0, load latest, otherwise, load named version The prefix represents which iavl tree you want to read. The iaviwer will always set a prefix.
func StartInProcess ¶
Types ¶
type GenesisTx ¶
type GenesisTx struct { NodeID string `json:"node_id"` IP string `json:"ip"` Validator tmtypes.GenesisValidator `json:"validator"` AppGenTx json.RawMessage `json:"app_gen_tx"` }
type HeightParams ¶ added in v1.6.8
type HeightParams struct {
Height string `json:"height"`
}
type InitConfig ¶
type QueryParams ¶ added in v1.6.8
type QueryParams struct {
Data HeightParams `json:"data"`
}
type Res ¶ added in v1.6.8
type Res struct { Ret uint32 `json:"ret"` Data ctypes.ResultBlock `json:"data"` Message string `json:"message"` }
type ResBlock ¶ added in v1.6.8
type ResBlock ctypes.ResultBlock
type RestServer ¶ added in v1.6.8
type RestServer struct { Mux *mux.Router GRPCGatewayRouter *runtime.ServeMux CliCtx context.Context // contains filtered or unexported fields }
RestServer represents the Light Client Rest server
func NewRestServer ¶ added in v1.6.8
func NewRestServer(cdc *codec.Codec, tmNode *node.Node) *RestServer