Documentation ¶
Index ¶
- Variables
- type Controller
- func (C *Controller) ExecuteTransaction() error
- func (C *Controller) GetRawData() ([]byte, error)
- func (C *Controller) GetResultError() error
- func (C *Controller) SignTxWithPrivKey(pk *ecdsa.PrivateKey, tx *core.Transaction) (*core.Transaction, error)
- func (C *Controller) TransactionHash() (string, error)
- type SignerImpl
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, privKey string, 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) SignTxWithPrivKey ¶
func (C *Controller) SignTxWithPrivKey(pk *ecdsa.PrivateKey, tx *core.Transaction) (*core.Transaction, error)
SignTxWithPrivKey signs the given transaction with the requested account.
func (*Controller) TransactionHash ¶
func (C *Controller) TransactionHash() (string, error)
TransactionHash extract hash from TX
Click to show internal directories.
Click to hide internal directories.