Arbitrary chainjson.HexBytes `json:"arbitrary,omitempty"`
InputID bc.Hash `json:"input_id"`
WitnessArguments []chainjson.HexBytes `json:"witness_arguments"`
+ SignData bc.Hash `json:"sign_data,omitempty"`
}
//AnnotatedOutput means an annotated transaction output.
"github.com/bytom/consensus"
"github.com/bytom/consensus/segwit"
"github.com/bytom/crypto/sha3pool"
+ dbm "github.com/bytom/database/leveldb"
"github.com/bytom/protocol/bc"
"github.com/bytom/protocol/bc/types"
"github.com/bytom/protocol/vm/vmutil"
- dbm "github.com/bytom/database/leveldb"
)
// annotateTxs adds asset data to transactions
return tx
}
-// BuildAnnotatedInput build the annotated input.
func (w *Wallet) BuildAnnotatedInput(tx *types.Tx, i uint32) *query.AnnotatedInput {
orig := tx.Inputs[i]
in := &query.AnnotatedInput{
if orig.InputType() != types.CoinbaseInputType {
in.AssetID = orig.AssetID()
in.Amount = orig.Amount()
+ in.SignData = tx.SigHash(i)
}
id := tx.Tx.InputIDs[i]