6 chainjson "github.com/bytom/encoding/json"
9 type DataWitness chainjson.HexBytes
11 func (dw DataWitness) materialize(args *[][]byte) error {
12 *args = append(*args, dw)
16 func (dw DataWitness) MarshalJSON() ([]byte, error) {
18 Type string `json:"type"`
19 Value chainjson.HexBytes `json:"value"`
22 Value: chainjson.HexBytes(dw),
24 return json.Marshal(x)