GetTransactionResult Access API Method
매개변수
Id
bytes
필수
로딩 중...
반품
상태
정수
로딩 중...
행사
배열
로딩 중...
유형
문자열
로딩 중...
transaction_id
문자열
로딩 중...
payload
문자열
로딩 중...
block_id
문자열
로딩 중...
transaction_id
문자열
로딩 중...
collection_id
문자열
로딩 중...
블록 높이
정수
로딩 중...
요청
1패키지 main23import (4"문맥"5"인코딩/16진수"6"encoding/json"7"fmt"8"로그"910"github.com/onflow/flow/protobuf/go/flow/access"11)1213func main() {1415// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.16client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17ctx := context.Background()18만약 err != nil {19log.Fatalf("err: %v", err)20}2122// Get Transaction by ID23transactionId, err := hex.DecodeString("45c36ca2e7ac95eaeb1f66b12ff55d51ae976abc026a8e81ed081ad54e0e66c7")24만약 err != nil {25log.Fatalf("err: %v", err)26}27resultResp, err := client.GetTransactionResult(ctx, &access.GetTransactionRequest{Id: transactionId})28respJSON, err := json.Marshal(resultResp)29만약 err != nil {30log.Fatalf("err: %v", err)31}32fmt.Println("Get Transaction Result response:", string(respJSON))33}
1패키지 main23import (4"문맥"5"인코딩/16진수"6"encoding/json"7"fmt"8"로그"910"github.com/onflow/flow/protobuf/go/flow/access"11)1213func main() {1415// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.16client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")17ctx := context.Background()18만약 err != nil {19log.Fatalf("err: %v", err)20}2122// Get Transaction by ID23transactionId, err := hex.DecodeString("45c36ca2e7ac95eaeb1f66b12ff55d51ae976abc026a8e81ed081ad54e0e66c7")24만약 err != nil {25log.Fatalf("err: %v", err)26}27resultResp, err := client.GetTransactionResult(ctx, &access.GetTransactionRequest{Id: transactionId})28respJSON, err := json.Marshal(resultResp)29만약 err != nil {30log.Fatalf("err: %v", err)31}32fmt.Println("Get Transaction Result response:", string(respJSON))33}