Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadTransactionParam is returned when invalid params are given to the // controller upon execution of a transaction. ErrBadTransactionParam = errors.New("transaction has bad parameters") )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Behavior behavior Result *api.Return Receipt *core.TransactionInfo // contains filtered or unexported fields }
Controller drives the transaction signing process
func NewController ¶
func NewController( client *client.GrpcClient, senderKs *keystore.KeyStore, senderAcct *keystore.Account, tx *core.Transaction, options ...func(*Controller), ) *Controller
NewController initializes a Controller, caller can control behavior via options
func (*Controller) ExecuteTransaction ¶
func (C *Controller) ExecuteTransaction() error
ExecuteTransaction is the single entrypoint to execute a plain transaction. Each step in transaction creation, execution probably includes a mutation Each becomes a no-op if executionError occurred in any previous step
func (*Controller) GetRawData ¶
func (C *Controller) GetRawData() ([]byte, error)
GetRawData Byes from Transaction
func (*Controller) GetResultError ¶
func (C *Controller) GetResultError() error
GetResultError return result error
func (*Controller) SignTransactionByPrivateKey ¶ added in v1.0.2
func (C *Controller) SignTransactionByPrivateKey(privateKey string) (*core.Transaction, error)
func (*Controller) TransactionHash ¶
func (C *Controller) TransactionHash() (string, error)
TransactionHash extract hash from TX
Click to show internal directories.
Click to hide internal directories.