/cosmos/authz/v1beta1/grants REST API Endpoint
查詢參數
授權人
字串
必填
載入中...
受贈人
字串
必填
載入中...
msg_type_url
字串
載入中...
pagination.key
字串
載入中...
分頁偏移量
字串
載入中...
分頁.限額
字串
載入中...
分頁.總頁數
布林值
載入中...
pagination.reverse
布林值
載入中...
退貨
grants
陣列
載入中...
authorization
物件
載入中...
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套件 主函式23匯入 (4"上下文"5authz "cosmossdk.io/api/cosmos/authz/v1beta1"6"fmt"7"google.golang.grpc"8"log"9)1011func main() {12endpoint := "您的 QuickNode 端點"13目標, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.撥號(目標, opts...)15如果 err != nil {16log.致命(錯誤)17}18defer grpcConn.關閉()1920authzClient := authz.NewQueryClient(grpcConn)21resp, err := authzClient.Grants(context.Background(), &authz.QueryGrantsRequest{Granter: "GRANTER", Grantee: "GRANTEE"})22如果 err != nil {23log.致命(錯誤)24}25for _, grant := range resp.Grants {26fmt.Printf("granter %s, grantee %s, grants authorization: %s\n", grant.Granter, grant.Grantee, grant.Authorization.GetTypeUrl())27}28}29
1套件 主函式23匯入 (4"上下文"5authz "cosmossdk.io/api/cosmos/authz/v1beta1"6"fmt"7"google.golang.grpc"8"log"9)1011func main() {12endpoint := "您的 QuickNode 端點"13目標, opts := getGrpcOptions(endpoint)14grpcConn, err := grpc.撥號(目標, opts...)15如果 err != nil {16log.致命(錯誤)17}18defer grpcConn.關閉()1920authzClient := authz.NewQueryClient(grpcConn)21resp, err := authzClient.Grants(context.Background(), &authz.QueryGrantsRequest{Granter: "GRANTER", Grantee: "GRANTEE"})22如果 err != nil {23log.致命(錯誤)24}25for _, grant := range resp.Grants {26fmt.Printf("granter %s, grantee %s, grants authorization: %s\n", grant.Granter, grant.Grantee, grant.Authorization.GetTypeUrl())27}28}29
1const requestOptions = {2方法: "GET",3重定向: 「追蹤」4};56fetch("https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE", requestOptions)7.接著((回應) => 回應.文字())8.接著((結果) => 控制台.log(結果))9.catch((錯誤) => 控制台.錯誤(錯誤));
1const requestOptions = {2方法: "GET",3重定向: 「追蹤」4};56fetch("https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE", requestOptions)7.接著((回應) => 回應.文字())8.接著((結果) => 控制台.log(結果))9.catch((錯誤) => 控制台.錯誤(錯誤));
1匯入 請求23url = "https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE"45有效載荷 = {}6標題 = {}78回應 = 請求.請求("GET", url, headers=headers, data=有效載荷)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, data=有效載荷)910列印(回應.text)11
1需要 "uri"2需要 "net/http"34url = URI("https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE")56https = 網::HTTP.new(url.主機, 網址.port)7https.use_ssl = true89請求 = 淨額::HTTP::Get.new(url)1011回應 = https.請求(請求)12puts 回應。read_body13
1需要 "uri"2需要 "net/http"34url = URI("https://docs-demo.sei-pacific.quiknode.pro/cosmos/authz/v1beta1/grants?granter=GRANTER&grantee=GRANTEE")56https = 網::HTTP.new(url.主機, 網址.port)7https.use_ssl = true89請求 = 淨額::HTTP::Get.new(url)1011回應 = https.請求(請求)12puts 回應。read_body13