基础API端点 (Basic API Endpoints)

Here are some basic API Endpoints that might be helpful when configuring your node or validator.

以下是一些在配置节点或验证者时可能会有帮助的基本 API 端点。

For the examples below, it is assumed that the commands are run alongside the node / validator process. However, it is possible to send these requests to a remote node:

对于下面的示例,假设命令与节点/验证者进程一起运行。但是,可以将这些请求发送到远程节点:

  • For CLI calls, you may specify a remote node with the --node flag 对于 CLI 调用,您可以使用 --node 标志指定远程节点

  • For REST calls, you can replace localhost with the IP address of the remote node 对于 REST 调用,您可以将 localhost 替换为远程节点的 IP 地址

获取节点信息 (Get Node status)

CLI

> seid status | jq -r ".NodeInfo"
{
  "protocol_version": {
    "p2p": "8",
    "block": "11",
    "app": "0"
  },
  "id": "c3beb6d42f10311fd453029cb3ee6ac08880d522",
  "listen_addr": "tcp://0.0.0.0:26656",
  "network": "sei-testnet-1",
  "version": "0.34.15",
  "channels": "40202122233038606100",
  "moniker": "phils validator",
  "other": {
    "tx_index": "on",
    "rpc_address": "tcp://127.0.0.1:26657"
  }

REST

获得节点id (Get Node Id)

命令行 CLI

REST

获取同步状态 (Get Sync Status)

命令行 CLI

REST

获得最新区块 (Get Latest Block)

命令行 CLI

REST

查询银行余额 (Query Bank Balances)

命令行 CLI

REST

获取验证者 (Get Validators)

命令行 CLI

REST

最后更新于