File tree Expand file tree Collapse file tree 4 files changed +20
-12
lines changed Expand file tree Collapse file tree 4 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ func WithPolicies(policyIds []string) ChainSyncOptionFunc {
30
30
}
31
31
}
32
32
33
- //WithAssetFingerprints specifies the asset fingerprint (asset1xxx) to filter on
33
+ // WithAssetFingerprints specifies the asset fingerprint (asset1xxx) to filter on
34
34
func WithAssetFingerprints (assetFingerprints []string ) ChainSyncOptionFunc {
35
35
return func (c * ChainSync ) {
36
36
c .filterAssetFingerprints = assetFingerprints [:]
Original file line number Diff line number Diff line change @@ -3,18 +3,21 @@ module github.com/blinklabs-io/snek
3
3
go 1.19
4
4
5
5
require (
6
- github.com/blinklabs-io/gouroboros v0.51 .0
6
+ github.com/blinklabs-io/gouroboros v0.52 .0
7
7
github.com/gen2brain/beeep v0.0.0-20230602101333-f384c29b62dd
8
8
github.com/kelseyhightower/envconfig v1.4.0
9
9
go.uber.org/zap v1.25.0
10
10
gopkg.in/yaml.v2 v2.4.0
11
11
)
12
12
13
+ // XXX: uncomment when testing local changes to gouroboros
14
+ // replace github.com/blinklabs-io/gouroboros v0.52.0 => ../gouroboros
15
+
13
16
require (
14
17
github.com/fxamacker/cbor/v2 v2.4.0 // indirect
15
18
github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4 // indirect
16
19
github.com/godbus/dbus/v5 v5.1.0 // indirect
17
- github.com/jinzhu/copier v0.3.5 // indirect
20
+ github.com/jinzhu/copier v0.4.0 // indirect
18
21
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
19
22
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect
20
23
github.com/x448/float16 v0.8.4 // indirect
Original file line number Diff line number Diff line change 1
1
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A =
2
- github.com/blinklabs-io/gouroboros v0.51 .0 h1:cgl2jgTsPAKC1Jdp44vvzKxDn5fYJNooRR2HpP/ZjkI =
3
- github.com/blinklabs-io/gouroboros v0.51 .0 /go.mod h1:cQt3XVVG2b+cpIJh+DhID7ivsyBQmTsXqbTDZ+7esXI =
2
+ github.com/blinklabs-io/gouroboros v0.52 .0 h1:5abdw2PXHKHxve26BITukfAzz7OJoTPKWylbyth9Sxk =
3
+ github.com/blinklabs-io/gouroboros v0.52 .0 /go.mod h1:2wCCNNsHNYMT4gQB+bXS0Y99Oeu8+EM96hi7hW22C2w =
4
4
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
5
5
github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88 =
6
6
github.com/fxamacker/cbor/v2 v2.4.0 /go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo =
@@ -10,8 +10,8 @@ github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4 h1:qZNfIGkIANxGv/Oq
10
10
github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4 /go.mod h1:kW3HQ4UdaAyrUCSSDR4xUzBKW6O2iA4uHhk7AtyYp10 =
11
11
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk =
12
12
github.com/godbus/dbus/v5 v5.1.0 /go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA =
13
- github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg =
14
- github.com/jinzhu/copier v0.3.5 /go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg =
13
+ github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8 =
14
+ github.com/jinzhu/copier v0.4.0 /go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg =
15
15
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8 =
16
16
github.com/kelseyhightower/envconfig v1.4.0 /go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg =
17
17
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ =
Original file line number Diff line number Diff line change 15
15
package chainsync
16
16
17
17
import (
18
+ "github.com/blinklabs-io/gouroboros/cbor"
18
19
"github.com/blinklabs-io/gouroboros/ledger"
19
20
)
20
21
@@ -26,19 +27,23 @@ type TransactionEvent struct {
26
27
TransactionCbor byteSliceJsonHex `json:"transactionCbor,omitempty"`
27
28
Inputs []ledger.TransactionInput `json:"inputs"`
28
29
Outputs []ledger.TransactionOutput `json:"outputs"`
30
+ Metadata * cbor.Value `json:"metadata,omitempty"`
29
31
}
30
32
31
- func NewTransactionEvent (block ledger.Block , txBody ledger.TransactionBody , includeCbor bool ) TransactionEvent {
33
+ func NewTransactionEvent (block ledger.Block , tx ledger.Transaction , includeCbor bool ) TransactionEvent {
32
34
evt := TransactionEvent {
33
35
BlockNumber : block .BlockNumber (),
34
36
BlockHash : block .Hash (),
35
37
SlotNumber : block .SlotNumber (),
36
- TransactionHash : txBody .Hash (),
37
- Inputs : txBody .Inputs (),
38
- Outputs : txBody .Outputs (),
38
+ TransactionHash : tx .Hash (),
39
+ Inputs : tx .Inputs (),
40
+ Outputs : tx .Outputs (),
39
41
}
40
42
if includeCbor {
41
- evt .TransactionCbor = txBody .Cbor ()
43
+ evt .TransactionCbor = tx .Cbor ()
44
+ }
45
+ if tx .Metadata () != nil {
46
+ evt .Metadata = tx .Metadata ()
42
47
}
43
48
return evt
44
49
}
You can’t perform that action at this time.
0 commit comments