GetAccountAtBlockHeight Access API Method
매개변수
주소
bytes
필수
로딩 중...
BlockHeight
정수
필수
로딩 중...
반품
계정
객체
로딩 중...
주소
문자열
로딩 중...
균형
정수
로딩 중...
keys
배열
로딩 중...
공개 키
문자열
로딩 중...
sign_algo
정수
로딩 중...
hash_algo
정수
로딩 중...
weight
정수
로딩 중...
sequence_number
정수
로딩 중...
contracts
객체
로딩 중...
PrivateReceiverForwarder
문자열
로딩 중...
요청
1패키지 main23import (4"문맥"5"인코딩/16진수"6"encoding/json"7"fmt"8"로그"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"인코딩/16진수"6"encoding/json"7"fmt"8"로그"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}