OSDN Git Service

versoin1.1.9 (#594)
[bytom/vapor.git] / blockchain / txbuilder / signing_instruction.go
index e8786e2..ba448d6 100644 (file)
@@ -3,11 +3,17 @@ package txbuilder
 import (
        "encoding/json"
 
-       "github.com/vapor/crypto/ed25519/chainkd"
-       chainjson "github.com/vapor/encoding/json"
-       "github.com/vapor/errors"
+       "github.com/bytom/vapor/crypto/ed25519/chainkd"
+       chainjson "github.com/bytom/vapor/encoding/json"
+       "github.com/bytom/vapor/errors"
 )
 
+// AddDataWitness append data to the witness array
+func (si *SigningInstruction) AddDataWitness(data chainjson.HexBytes) {
+       dw := DataWitness(data)
+       si.WitnessComponents = append(si.WitnessComponents, &dw)
+}
+
 // AddWitnessKeys adds a SignatureWitness with the given quorum and
 // list of keys derived by applying the derivation path to each of the
 // xpubs.