Skip to content

Commit 06b2d27

Browse files
authored
feat: reference inputs in transaction events (#215)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent efb7f9c commit 06b2d27

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

input/chainsync/tx.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type TransactionEvent struct {
3434
Inputs []ledger.TransactionInput `json:"inputs"`
3535
Outputs []ledger.TransactionOutput `json:"outputs"`
3636
Certificates []ledger.Certificate `json:"certificates,omitempty"`
37+
ReferenceInputs []ledger.TransactionInput `json:"referenceInputs,omitempty"`
3738
Metadata *cbor.LazyValue `json:"metadata,omitempty"`
3839
Fee uint64 `json:"fee"`
3940
TTL uint64 `json:"ttl,omitempty"`
@@ -76,6 +77,9 @@ func NewTransactionEvent(
7677
if tx.Metadata() != nil {
7778
evt.Metadata = tx.Metadata()
7879
}
80+
if tx.ReferenceInputs() != nil {
81+
evt.ReferenceInputs = tx.ReferenceInputs()
82+
}
7983
if tx.TTL() != 0 {
8084
evt.TTL = tx.TTL()
8185
}

0 commit comments

Comments
 (0)