Skip to main content

Object

type Object

An object on the IOTA blockchain

BCS

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

```text object = object-data owner digest u64 ```

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

func LiftFromExternalObject

func LiftFromExternalObject(handle uint64) *Object

func NewObject

func NewObject(data *ObjectData, owner *Owner, previousTransaction *TransactionDigest, storageRebate uint64) *Object

func ObjectFromBcs

func ObjectFromBcs(bcs []byte) (*Object, error)

Create this type from BCS encoded bytes.

func ObjectFromJson

func ObjectFromJson(json string) (*Object, error)

Create this type from JSON encoded string.

func (*Object) AsPackage

func (_self *Object) AsPackage() *MovePackage

Interpret this object as a move package

func (*Object) AsPackageOpt

func (_self *Object) AsPackageOpt() **MovePackage

Try to interpret this object as a move package

func (*Object) AsStruct

func (_self *Object) AsStruct() MoveStruct

Interpret this object as a move struct

func (*Object) AsStructOpt

func (_self *Object) AsStructOpt() *MoveStruct

Try to interpret this object as a move struct

func (*Object) Data

func (_self *Object) Data() *ObjectData

Return this object's data

func (*Object) DebugString

func (_self *Object) DebugString() string

func (*Object) Destroy

func (object *Object) Destroy()

func (*Object) Digest

func (_self *Object) Digest() *ObjectDigest

Calculate the digest of this `Object`

This is done by hashing the BCS bytes of this `Object` prefixed

func (*Object) Eq

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

func (*Object) Id

func (_self *Object) Id() *ObjectId

Return this object's id

func (*Object) Ne

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

func (*Object) ObjectRef

func (_self *Object) ObjectRef() ObjectReference

Return this object's reference

func (*Object) ObjectType

func (_self *Object) ObjectType() *ObjectType

Return this object's type

func (*Object) Owner

func (_self *Object) Owner() *Owner

Return this object's owner

func (*Object) PreviousTransaction

func (_self *Object) PreviousTransaction() *TransactionDigest

Return the digest of the transaction that last modified this object

func (*Object) StorageRebate

func (_self *Object) StorageRebate() uint64

Return the storage rebate locked in this object

Storage rebates are credited to the gas coin used in a transaction that deletes this object.

func (*Object) Version

func (_self *Object) Version() *Version

Return this object's version