From 2353fd0e0d29b9b22bb319609e9342b8bfbc8d7d Mon Sep 17 00:00:00 2001 From: p4u Date: Thu, 16 Nov 2023 17:26:44 +0100 Subject: [PATCH] add signature to API transaction handler Signed-off-by: p4u --- api/api_types.go | 1 + api/chain.go | 1 + 2 files changed, 2 insertions(+) diff --git a/api/api_types.go b/api/api_types.go index b2a0e70a2..4c3aceba6 100644 --- a/api/api_types.go +++ b/api/api_types.go @@ -196,6 +196,7 @@ type BlockTransactionsInfo struct { type GenericTransactionWithInfo struct { TxContent json.RawMessage `json:"tx"` TxInfo indexertypes.Transaction `json:"txInfo"` + Signature types.HexBytes `json:"signature"` } type ChainInfo struct { diff --git a/api/chain.go b/api/chain.go index 3b9d25e37..635737a28 100644 --- a/api/chain.go +++ b/api/chain.go @@ -580,6 +580,7 @@ func (a *API) chainTxHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) er } tx := &GenericTransactionWithInfo{ TxContent: []byte(protoFormat(stx.Tx)), + Signature: stx.Signature, TxInfo: *ref, } data, err := json.Marshal(tx)