cosmos REST APIEndpoint
查询参数
授权人
字符串
必填
正在加载...
受让人
字符串
必填
正在加载...
msg_type_url
字符串
正在加载...
pagination.key
字符串
正在加载...
分页偏移量
字符串
正在加载...
分页.限额
字符串
正在加载...
分页总数
布尔型
正在加载...
pagination.reverse
布尔型
正在加载...
退货
拨款
数组
正在加载...
授权
对象
正在加载...
type_url
字符串
正在加载...
值
字符串
正在加载...
到期
字符串
正在加载...
分页
对象
正在加载...
next_key
字符串
正在加载...
总计
字符串
正在加载...
请求
1curl --location 'https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE'
1curl --location 'https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE'
1包 main23import (4"上下文"5authz "cosmossdk.cosmos"6"fmt"7"google.golang.grpc"8“日志”9)1011func main() {12endpoint := "您的QuickNode端点"13目标, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(目标, opts...)15如果 err != nil {16log.致命(err)17}18defer grpcConn.关闭()1920authzClient := authz.NewQueryClient(grpcConn)21resp, err := authzClient.Grants(context.Background(), &authz.QueryGrantsRequest{Granter: "GRANTER", Grantee: "GRANTEE"})22如果 err != nil {23log.致命(err)24}25for _, grant := range resp.Grants {26fmt.Printf("授权方 %s,受权方 %s,授予授权:%s\n", grant.授权方, 授予.受让人, 拨款.授权.GetTypeUrl())27}28}29
1包 main23import (4"上下文"5authz "cosmossdk.cosmos"6"fmt"7"google.golang.grpc"8“日志”9)1011func main() {12endpoint := "您的QuickNode端点"13目标, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.Dial(目标, opts...)15如果 err != nil {16log.致命(err)17}18defer grpcConn.关闭()1920authzClient := authz.NewQueryClient(grpcConn)21resp, err := authzClient.Grants(context.Background(), &authz.QueryGrantsRequest{Granter: "GRANTER", Grantee: "GRANTEE"})22如果 err != nil {23log.致命(err)24}25for _, grant := range resp.Grants {26fmt.Printf("授权方 %s,受权方 %s,授予授权:%s\n", grant.授权方, 授予.受让人, 拨款.授权.GetTypeUrl())27}28}29
1const requestOptions = {2方法: "GET",3重定向: "follow"4};56fetch("https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE", requestOptions)7.然后((响应) => 响应.文本())8.然后((结果) => 控制台.log(result))9.catch((error) => 控制台.错误(error));
1const requestOptions = {2方法: "GET",3重定向: "follow"4};56fetch("https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE", requestOptions)7.然后((响应) => 响应.文本())8.然后((结果) => 控制台.log(result))9.catch((error) => 控制台.错误(error));
1导入 请求23url = "https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE"45有效载荷 = {}6标题 = {}78回复 = 请求.请求("GET", url, headers=headers, 数据=有效载荷)910打印(响应.text)11
1导入 请求23url = "https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE"45有效载荷 = {}6标题 = {}78回复 = 请求.请求("GET", url, headers=headers, 数据=有效载荷)910打印(响应.text)11
1require "uri"2require "net/http"34url = URI("https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE")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.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE")56https = Net::HTTP.new(url.主机, url.端口)7https.use_ssl = true89请求 = Net::HTTP::Get.new(url)1011回复 = https.请求(请求)12返回响应.read_body13