github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/algod/getBlockHash.go (about) 1 package algod 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/algorand/go-algorand-sdk/client/v2/common" 8 "github.com/algorand/go-algorand-sdk/client/v2/common/models" 9 ) 10 11 // GetBlockHash get the block hash for the block on the given round. 12 type GetBlockHash struct { 13 c *Client 14 15 round uint64 16 } 17 18 // Do performs the HTTP request 19 func (s *GetBlockHash) Do(ctx context.Context, headers ...*common.Header) (response models.BlockHashResponse, err error) { 20 err = s.c.get(ctx, &response, fmt.Sprintf("/v2/blocks/%s/hash", common.EscapeParams(s.round)...), nil, headers) 21 return 22 }