Skip to main content

ProgrammableTransaction

type ProgrammableTransaction

A user transaction

Contains a series of native commands and move calls where the results of one command can be used in future commands.

BCS

The BCS serialized form for this type is defined by the following ABNF:

```text ptb = (vector input) (vector command) ```

type ProgrammableTransaction struct {
// contains filtered or unexported fields
}

func LiftFromExternalProgrammableTransaction

func LiftFromExternalProgrammableTransaction(handle uint64) *ProgrammableTransaction

func NewProgrammableTransaction

func NewProgrammableTransaction(inputs []*Input, commands []*Command) *ProgrammableTransaction

func ProgrammableTransactionFromBcs

func ProgrammableTransactionFromBcs(bcs []byte) (*ProgrammableTransaction, error)

Create this type from BCS encoded bytes.

func ProgrammableTransactionFromJson

func ProgrammableTransactionFromJson(json string) (*ProgrammableTransaction, error)

Create this type from JSON encoded string.

func (*ProgrammableTransaction) Commands

func (_self *ProgrammableTransaction) Commands() []*Command

The commands to be executed sequentially. A failure in any command will result in the failure of the entire transaction.

func (*ProgrammableTransaction) DebugString

func (_self *ProgrammableTransaction) DebugString() string

func (*ProgrammableTransaction) Destroy

func (object *ProgrammableTransaction) Destroy()

func (*ProgrammableTransaction) Eq

func (_self *ProgrammableTransaction) Eq(other *ProgrammableTransaction) bool

func (*ProgrammableTransaction) Hash

func (_self *ProgrammableTransaction) Hash() uint64

func (*ProgrammableTransaction) Inputs

func (_self *ProgrammableTransaction) Inputs() []*Input

Input objects or primitive values

func (*ProgrammableTransaction) Ne

func (_self *ProgrammableTransaction) Ne(other *ProgrammableTransaction) bool

func (*ProgrammableTransaction) String

func (_self *ProgrammableTransaction) String() string