diff --git a/go_templates/query.vm b/go_templates/query.vm index 0eab2fa..cb9ee13 100644 --- a/go_templates/query.vm +++ b/go_templates/query.vm @@ -34,10 +34,10 @@ import ( #end "github.com/algorand/go-algorand-sdk/v2/client/v2/common" -#if ( $returnType.contains("model") && $queryType != "GetLedgerStateDelta" ) +#if ( $returnType.contains("model") && $queryType != "GetLedgerStateDelta" && $queryType != "GetLedgerStateDeltaForTransactionGroup" ) "github.com/algorand/go-algorand-sdk/v2/client/v2/common/models" #end -#if ( $queryType == "PendingTransactionsByAddress" || $queryType == "PendingTransactionInformationByAddress" || $queryType == "PendingTransactionInformation" || $queryType == "PendingTransactions" || $queryType == "Block" || $queryType == "SuggestedParams" || $queryType == "GetLedgerStateDelta" ) +#if ( $queryType == "PendingTransactionsByAddress" || $queryType == "PendingTransactionInformationByAddress" || $queryType == "PendingTransactionInformation" || $queryType == "PendingTransactions" || $queryType == "Block" || $queryType == "SuggestedParams" || $queryType == "GetLedgerStateDelta" || $queryType == "GetLedgerStateDeltaForTransactionGroup" ) "github.com/algorand/go-algorand-sdk/v2/types" #end #foreach( $qp in $q.bodyParameters) @@ -220,7 +220,7 @@ func (s *SendRawTransaction) Do(ctx context.Context, headers ...*common.Header) } } if addContentType { - headers = append(headers, &common.Header{"Content-Type", "application/x-binary"}) + headers = append(headers, &common.Header{Key: "Content-Type", Value: "application/x-binary"}) } err = s.c.post(ctx, &response, "/v2/transactions", nil, headers, s.rawtxn) txid = response.Txid @@ -271,6 +271,11 @@ func (s *${queryType}) Do(ctx context.Context, headers ...*common.Header) (respo err = s.c.get(ctx, &response, $processedPath, $queryArg, headers) return } +#elseif( $queryType == "GetLedgerStateDeltaForTransactionGroup" ) +func (s *${queryType}) Do(ctx context.Context, headers ...*common.Header) (response types.LedgerStateDelta, err error) { + err = s.c.get(ctx, &response, $processedPath, $queryArg, headers) + return +} #elseif( $queryType == "SetBlockTimeStampOffset" )## TODO: "post" can be generated, there is nothing special here. func (s *${queryType}) Do(ctx context.Context, headers ...*common.Header) (response $returnType, err error) { err = s.c.post(ctx, &response, $processedPath, nil, headers, nil)