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

    Class AssetId

    AssetId identifies a specific asset.

    Asset ids are derived from the genesis transaction id plus the asset group index.

    AssetRef

    const assetId = AssetId.create('00'.repeat(32), 0)
    const encoded = assetId.toString()
    const decoded = AssetId.fromString(encoded)
    Index

    Properties

    groupIndex: number
    txid: Uint8Array

    Methods

    • Create an asset id from a genesis transaction id and group index.

      Parameters

      • txid: string

        Hex-encoded genesis transaction id

      • groupIndex: number

        Asset group index within the genesis transaction

      Returns AssetId

      A validated asset id

      Error if the txid is missing, malformed, or not 32 bytes long

      fromString