Skip to main content

Argument

type Argument​

An argument to a programmable transaction command

BCS​

The BCS serialized form of this type is specified in [`bcs-schema.abnf`](https://github.com/iotaledger/iota-rust-sdk/blob/develop/crates/iota-sdk-types/bcs-schema.abnf\).

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

func ArgumentFromBcs​

func ArgumentFromBcs(bcs []byte) (*Argument, error)

Create this type from BCS encoded bytes.

func ArgumentFromJson​

func ArgumentFromJson(json string) (*Argument, error)

Create this type from a JSON encoded string.

func ArgumentNewGas​

func ArgumentNewGas() *Argument

The gas coin. The gas coin can only be used by-ref, except for with `TransferObjects`, which can use it by-value.

func ArgumentNewInput​

func ArgumentNewInput(input uint16) *Argument

One of the input objects or primitive values (from `ProgrammableTransaction` inputs)

func ArgumentNewNestedResult​

func ArgumentNewNestedResult(commandIndex uint16, subresultIndex uint16) *Argument

Like a `Result` but it accesses a nested result. Currently, the only usage of this is to access a value from a Move call with multiple return values.

func ArgumentNewResult​

func ArgumentNewResult(result uint16) *Argument

The result of another command (from `ProgrammableTransaction` commands)

func LiftFromExternalArgument​

func LiftFromExternalArgument(handle uint64) *Argument

func (*Argument) DebugString​

func (_self *Argument) DebugString() string

func (*Argument) Destroy​

func (object *Argument) Destroy()

func (*Argument) Eq​

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

func (*Argument) Ne​

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

func (*Argument) NestedResult​

func (_self *Argument) NestedResult(ix uint16) **Argument

Get the nested result for this result at the given index. Returns None if this is not a Result.

func (*Argument) ToBcs​

func (_self *Argument) ToBcs() ([]byte, error)

Convert this type to BCS encoded bytes.

func (*Argument) ToDisplayString​

func (_self *Argument) ToDisplayString() string

Render this type as human-readable text.

Some types also print this through the binding's native string conversion; this method is the spelling every object type has.

The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.

func (*Argument) ToJson​

func (_self *Argument) ToJson() (string, error)

Convert this type to a JSON encoded string.