Params
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/consensus/v1/paramsimport requests
url = "https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"params": {
"block": {
"max_bytes": "<string>",
"max_gas": "<string>"
},
"evidence": {
"max_age_num_blocks": "<string>",
"max_age_duration": "<string>",
"max_bytes": "<string>"
},
"validator": {
"pub_key_types": [
"<string>"
]
},
"version": {
"app": "<string>"
},
"abci": {
"vote_extensions_enable_height": "<string>"
},
"authority": {
"authority": "<string>"
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}consensus
Params
gRPC: cosmos.consensus.v1.Query/Params (reference)
Params queries the parameters of x/consensus module.
GET
/
cosmos
/
consensus
/
v1
/
params
Params
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/consensus/v1/paramsimport requests
url = "https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/consensus/v1/params")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"params": {
"block": {
"max_bytes": "<string>",
"max_gas": "<string>"
},
"evidence": {
"max_age_num_blocks": "<string>",
"max_age_duration": "<string>",
"max_bytes": "<string>"
},
"validator": {
"pub_key_types": [
"<string>"
]
},
"version": {
"app": "<string>"
},
"abci": {
"vote_extensions_enable_height": "<string>"
},
"authority": {
"authority": "<string>"
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Response
A successful response.
QueryParamsResponse defines the response type for querying x/consensus parameters.
params are the tendermint consensus params stored in the consensus module.
Please note that params.version is not populated in this response, it is
tracked separately in the x/upgrade module.
Show child attributes
Show child attributes
Was this page helpful?