"github.com/bytom/common"
"github.com/bytom/consensus"
"github.com/bytom/crypto/ed25519/chainkd"
- chainjson "github.com/bytom/encoding/json"
"github.com/bytom/errors"
"github.com/bytom/protocol/bc"
"github.com/bytom/protocol/bc/types"
return txInput, sigInst, nil
}
-//NewControlAction create new control action
-func (m *Manager) NewControlAction(amt bc.AssetAmount, accountID string, refData chainjson.Map) txbuilder.Action {
- return &controlAction{
- accounts: m,
- AssetAmount: amt,
- AccountID: accountID,
- ReferenceData: refData,
- }
-}
-
//DecodeControlAction unmarshal JSON-encoded data of control action
func (m *Manager) DecodeControlAction(data []byte) (txbuilder.Action, error) {
a := &controlAction{accounts: m}
accounts *Manager
bc.AssetAmount
AccountID string `json:"account_id"`
- ReferenceData chainjson.Map `json:"reference_data"`
}
func (a *controlAction) Build(ctx context.Context, b *txbuilder.TemplateBuilder) error {