Skip to content

Commit

Permalink
feat: reference inputs in transaction events (#215)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
  • Loading branch information
wolf31o2 authored May 29, 2024
1 parent efb7f9c commit 06b2d27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions input/chainsync/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type TransactionEvent struct {
Inputs []ledger.TransactionInput `json:"inputs"`
Outputs []ledger.TransactionOutput `json:"outputs"`
Certificates []ledger.Certificate `json:"certificates,omitempty"`
ReferenceInputs []ledger.TransactionInput `json:"referenceInputs,omitempty"`
Metadata *cbor.LazyValue `json:"metadata,omitempty"`
Fee uint64 `json:"fee"`
TTL uint64 `json:"ttl,omitempty"`
Expand Down Expand Up @@ -76,6 +77,9 @@ func NewTransactionEvent(
if tx.Metadata() != nil {
evt.Metadata = tx.Metadata()
}
if tx.ReferenceInputs() != nil {
evt.ReferenceInputs = tx.ReferenceInputs()
}
if tx.TTL() != 0 {
evt.TTL = tx.TTL()
}
Expand Down

0 comments on commit 06b2d27

Please sign in to comment.