/cosmos/base/tendermint/v1beta1/validatorsets/{height} REST API Endpoint
路径参数
高度
字符串
必填
正在加载...
查询参数
pagination.key
字符串
正在加载...
pagination.offset
字符串
正在加载...
pagination.limit
字符串
正在加载...
pagination.count_total
布尔型
正在加载...
pagination.reverse
布尔型
正在加载...
退货
block_height
字符串
正在加载...
验证者
数组
正在加载...
地址
字符串
正在加载...
公钥
对象
正在加载...
@type
字符串
正在加载...
值
字符串
正在加载...
voting_power
字符串
正在加载...
提案人优先级
字符串
正在加载...
pagination
对象
正在加载...
next_key
字符串
正在加载...
总计
字符串
正在加载...
请求
1curl --location 'https://docs-demo.injective-testnet.quiknode.pro/cosmos/base/tendermint/v1beta1/validatorsets/65899000'
1curl --location 'https://docs-demo.injective-testnet.quiknode.pro/cosmos/base/tendermint/v1beta1/validatorsets/65899000'
1包 main23导入 (4"上下文"5tm "cosmossdk.io/api/cosmos/base/tendermint/v1beta1"6"fmt"7"google.golang.org/grpc"8"日志"9)1011func main() {12端点 := "YOUR_QUICKNODE_ENDPOINT"13目标, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(目标, opts...)15如果 err != nil {16log.致命(err)17}18defer grpcConn.关闭()1920height := int64(1234567)21tc := tm.NewServiceClient(grpcConn)22resp, err := tc.GetValidatorSetByHeight(context.Background(), &tm.GetValidatorSetByHeightRequest{Height: 65899000})23如果 err != nil {24log.致命(err)25}26fmt.Println("validator set for height: ", height)27for _, val := range resp.Validators {28fmt.Println(val.GetAddress())29}30}31
1包 main23导入 (4"上下文"5tm "cosmossdk.io/api/cosmos/base/tendermint/v1beta1"6"fmt"7"google.golang.org/grpc"8"日志"9)1011func main() {12端点 := "YOUR_QUICKNODE_ENDPOINT"13目标, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(目标, opts...)15如果 err != nil {16log.致命(err)17}18defer grpcConn.关闭()1920height := int64(1234567)21tc := tm.NewServiceClient(grpcConn)22resp, err := tc.GetValidatorSetByHeight(context.Background(), &tm.GetValidatorSetByHeightRequest{Height: 65899000})23如果 err != nil {24log.致命(err)25}26fmt.Println("validator set for height: ", height)27for _, val := range resp.Validators {28fmt.Println(val.GetAddress())29}30}31
1const requestOptions = {2方法: "GET",3重定向: "follow"4};56fetch("https://docs-demo.injective-testnet.quiknode.pro/cosmos/base/tendermint/v1beta1/validatorsets/65899000", requestOptions)7.然后((响应) => 响应.文本())8.然后((结果) => 控制台.log(result))9.catch((error) => 控制台.错误(error));
1const requestOptions = {2方法: "GET",3重定向: "follow"4};56fetch("https://docs-demo.injective-testnet.quiknode.pro/cosmos/base/tendermint/v1beta1/validatorsets/65899000", requestOptions)7.然后((响应) => 响应.文本())8.然后((结果) => 控制台.log(result))9.catch((error) => 控制台.错误(error));
1导入 请求23url = "https://docs-demo.injective-testnet.quiknode.pro/cosmos/base/tendermint/v1beta1/validatorsets/65899000"45有效载荷 = {}6标题 = {}78回复 = 请求.请求("GET", url, headers=headers, data=有效载荷)910打印(响应.text)11
1导入 请求23url = "https://docs-demo.injective-testnet.quiknode.pro/cosmos/base/tendermint/v1beta1/validatorsets/65899000"45有效载荷 = {}6标题 = {}78回复 = 请求.请求("GET", url, headers=headers, data=有效载荷)910打印(响应.text)11
1require "uri"2require "net/http"34url = URI("https://docs-demo.injective-testnet.quiknode.pro/cosmos/base/tendermint/v1beta1/validatorsets/65899000")56https = Net::HTTP.new(url.主机, url.端口)7https.use_ssl = true89请求 = Net::HTTP::Get.new(url)1011回复 = https.请求(请求)12返回响应.read_body13
1require "uri"2require "net/http"34url = URI("https://docs-demo.injective-testnet.quiknode.pro/cosmos/base/tendermint/v1beta1/validatorsets/65899000")56https = Net::HTTP.new(url.主机, url.端口)7https.use_ssl = true89请求 = Net::HTTP::Get.new(url)1011回复 = https.请求(请求)12返回响应.read_body13