Documentation ¶
Overview ¶
Example (RespChainInfo_json) ¶
display.Print(&respChainInfo{ &types.ChainInfo{ ChainID: "kwil-chain", BlockHeight: 100, BlockHash: "00000beefbeefbeef", }, }, nil, "json")
Output: { "result": { "chain_id": "kwil-chain", "block_height": 100, "block_hash": "00000beefbeefbeef" }, "error": "" }
Example (RespChainInfo_text) ¶
display.Print(&respChainInfo{ &types.ChainInfo{ ChainID: "kwil-chain", BlockHeight: 100, BlockHash: "00000beefbeefbeef", }, }, nil, "text")
Output: Chain ID: kwil-chain Height: 100 Hash: 00000beefbeefbeef
Example (RespKwilCliConfig_json) ¶
pk, err := crypto.GenerateSecp256k1Key() if err != nil { panic(err) } display.Print(&respKwilCliConfig{ cfg: &config.KwilCliConfig{ PrivateKey: pk, ChainID: "chainid123", Provider: "localhost:9090", }, }, nil, "json")
Output: { "result": { "private_key": "***", "provider": "localhost:9090", "chain_id": "chainid123" }, "error": "" }
Example (RespKwilCliConfig_text) ¶
pk, err := crypto.GenerateSecp256k1Key() if err != nil { panic(err) } display.Print(&respKwilCliConfig{ cfg: &config.KwilCliConfig{ PrivateKey: pk, ChainID: "chainid123", Provider: "localhost:9090", }, }, nil, "text")
Output: PrivateKey: *** Provider: localhost:9090 ChainID: chainid123
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdUtils ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.