Skip to main content

SplitCoins

type SplitCoins​

Command to split a single coin object into multiple coins

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 SplitCoins struct {
// contains filtered or unexported fields
}

func LiftFromExternalSplitCoins​

func LiftFromExternalSplitCoins(handle uint64) *SplitCoins

func NewSplitCoins​

func NewSplitCoins(coin *Argument, amounts []*Argument) *SplitCoins

func SplitCoinsFromBcs​

func SplitCoinsFromBcs(bcs []byte) (*SplitCoins, error)

Create this type from BCS encoded bytes.

func SplitCoinsFromJson​

func SplitCoinsFromJson(json string) (*SplitCoins, error)

Create this type from a JSON encoded string.

func (*SplitCoins) Amounts​

func (_self *SplitCoins) Amounts() []*Argument

The amounts to split off

func (*SplitCoins) Coin​

func (_self *SplitCoins) Coin() *Argument

The coin to split

func (*SplitCoins) DebugString​

func (_self *SplitCoins) DebugString() string

func (*SplitCoins) Destroy​

func (object *SplitCoins) Destroy()

func (*SplitCoins) Eq​

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

func (*SplitCoins) Ne​

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

func (*SplitCoins) ToBcs​

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

Convert this type to BCS encoded bytes.

func (*SplitCoins) ToDisplayString​

func (_self *SplitCoins) 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 (*SplitCoins) ToJson​

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

Convert this type to a JSON encoded string.