@@ -11,6 +11,7 @@ import (
1111 "github.com/bitcoinschema/go-boost"
1212 "github.com/bitcoinschema/go-bpu"
1313 magic "github.com/bitcoinschema/go-map"
14+ "github.com/bitcoinschema/go-sigma"
1415 "github.com/libsv/go-bt/v2"
1516)
1617
@@ -24,6 +25,7 @@ type Tx struct {
2425 MAP []magic.MAP `json:"MAP,omitempty" bson:"MAP,omitempty"`
2526 Run []* run.Jig `json:"Run,omitempty" bson:"Run,omitempty"`
2627 Ord []* ord.Ordinal `json:"Ord,omitempty" bson:"Ord,omitempty"`
28+ Sigma []* sigma.Sig `json:"Sigma,omitempty" bson:"Sigma,omitempty"`
2729}
2830
2931// NewFromBob returns a new BmapTx from a BobTx
@@ -62,7 +64,7 @@ func NewFromRawTxString(tx string) (bmapTx *Tx, err error) {
6264
6365// FromBob returns a BmapTx from a BobTx
6466func (t * Tx ) FromBob (bobTx * bob.Tx ) (err error ) {
65- for _ , out := range bobTx .Out {
67+ for vout , out := range bobTx .Out {
6668 for index , tape := range out .Tape {
6769 // Handle string prefixes
6870 if len (tape .Cell ) > 0 && tape .Cell [0 ].S != nil {
@@ -108,6 +110,10 @@ func (t *Tx) FromBob(bobTx *bob.Tx) (err error) {
108110 }
109111 t .B = append (t .B , bOut )
110112 continue
113+ case sigma .Prefix :
114+ sigOut := sigma .NewSigFromTape (out .Tape [index ], vout )
115+ t .Sigma = append (t .Sigma , sigOut )
116+ continue
111117 }
112118 }
113119 // Handle OPCODE prefixes
0 commit comments