@arkade-os/sdk Documentation - v0.5.0-rc.11
    Preparing search index...

    Class AssetRef

    Reference to either an explicit asset id or another asset group in the same packet.

    AssetId

    const refById = AssetRef.fromId(assetId)
    const refByGroup = AssetRef.fromGroupIndex(0)
    Index

    Properties

    ref: AssetRefByID | AssetRefByGroup

    Accessors

    Methods

    • Serialize the asset reference into an existing binary writer.

      Parameters

      • writer: BufferWriter

        Writer to append the asset reference to

      Returns void

      serialize

    • Decode an asset reference from a binary reader.

      Parameters

      • reader: BufferReader

        Reader positioned at an asset reference

      Returns AssetRef

      Decoded asset reference

      Error if the type is unknown or the reader does not contain enough bytes