GetAccountAtBlockHeight Access API Method
パラメータ
Address
bytes
必須
読み込み中...
BlockHeight
整数
必須
読み込み中...
返品
アカウント
オブジェクト
読み込み中...
住所
文字列
読み込み中...
バランス
整数
読み込み中...
keys
配列
読み込み中...
公開鍵
文字列
読み込み中...
sign_algo
整数
読み込み中...
hash_algo
整数
読み込み中...
weight
整数
読み込み中...
sequence_number
整数
読み込み中...
契約
オブジェクト
読み込み中...
PrivateReceiverForwarder
文字列
読み込み中...
リクエスト
1パッケージ main23import (4「文脈」5"encoding/hex"6"encoding/json"7"fmt"8「log」910"github.com/onflow/flow/protobuf/go/flow/access"11)121314func main() {1516// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.17client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")18ctx := context.Background()19もし err != nil {20log.Fatalf("err: %v", err)21}2223// get latest (sealed) block24latestResp, err := client.GetLatestBlock(ctx, &access.GetLatestBlockRequest{IsSealed: true})25もし err != nil {26log.Fatal("get latest block failed: ", err)27}2829// Get Account At Block Height30height := latestResp.Block.Height - 10031address, err := hex.DecodeString("18eb4ee6b3c026d2")32もし err != nil {33log.Fatalf("err: %v", err)34}35accountHeightResp, err := client.GetAccountAtBlockHeight(ctx, &access.GetAccountAtBlockHeightRequest{Address: address, BlockHeight: height})36respJSON, err := json.Marshal(accountHeightResp)37もし err != nil {38log.Fatalf("err: %v", err)39}40fmt.Println("Get Account At Block Height response:", string(respJSON))41}
1パッケージ main23import (4「文脈」5"encoding/hex"6"encoding/json"7"fmt"8「log」910"github.com/onflow/flow/protobuf/go/flow/access"11)121314func main() {1516// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.17client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")18ctx := context.Background()19もし err != nil {20log.Fatalf("err: %v", err)21}2223// get latest (sealed) block24latestResp, err := client.GetLatestBlock(ctx, &access.GetLatestBlockRequest{IsSealed: true})25もし err != nil {26log.Fatal("get latest block failed: ", err)27}2829// Get Account At Block Height30height := latestResp.Block.Height - 10031address, err := hex.DecodeString("18eb4ee6b3c026d2")32もし err != nil {33log.Fatalf("err: %v", err)34}35accountHeightResp, err := client.GetAccountAtBlockHeight(ctx, &access.GetAccountAtBlockHeightRequest{Address: address, BlockHeight: height})36respJSON, err := json.Marshal(accountHeightResp)37もし err != nil {38log.Fatalf("err: %v", err)39}40fmt.Println("Get Account At Block Height response:", string(respJSON))41}