transaction

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2024 License: LGPL-3.0 Imports: 11 Imported by: 0

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) TransactionHash

func (C *Controller) TransactionHash() (string, error)

TransactionHash extract hash from TX

type SignerImpl

type SignerImpl int
const (
	Software SignerImpl = iota
	Ledger
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL