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

    Interface AssetIdVectors

    Cross-repo test vectors for the Arkade Asset ID encodings.

    Shipped from src/ rather than test/ so consumers outside this package can pin the same bytes: lightning-swap-service imports this value, while NArk and go-sdk vendor the backing assetIdVectors.json from a pinned revision of this repository.

    The encoding is implemented in seven places across three repos and every disagreement between them fails silently — a flipped txid makes a covenant unsatisfiable, a flipped group index resolves to a different asset, a case mismatch is a routing miss. None of those name their cause, which is what these vectors are for.

    plans/asset-id-shared-vectors.md

    interface AssetIdVectors {
        invalid_construction: readonly {
            expected_error: string;
            group_index: number;
            label: string;
            outside_uint16?: boolean;
            txid_hex: string;
        }[];
        invalid_decode: readonly {
            expected_error: string;
            label: string;
            value: string;
        }[];
        invalid_identity: readonly {
            label: string;
            normalizes_to?: string;
            value: string;
            why: string;
        }[];
        note: string;
        script_txid_hex: string;
        txid_hex: string;
        valid: readonly {
            asset_id_hex: string;
            group_index: number;
            label: string;
            script_group_index_item_hex: string;
        }[];
        version: number;
    }
    Index

    Properties

    invalid_construction: readonly {
        expected_error: string;
        group_index: number;
        label: string;
        outside_uint16?: boolean;
        txid_hex: string;
    }[]

    Refused by AssetId.create / validate.

    invalid_decode: readonly {
        expected_error: string;
        label: string;
        value: string;
    }[]

    Refused by AssetId.fromString / fromBytes.

    invalid_identity: readonly {
        label: string;
        normalizes_to?: string;
        value: string;
        why: string;
    }[]

    Refused by the identity rule (^[0-9a-f]{68}$), though not necessarily by the decoder.

    note: string
    script_txid_hex: string

    txid_hex reversed: serialization order, what the introspection opcodes match.

    txid_hex: string

    Genesis txid in display order — the 32 bytes an id's leading 64 hex chars carry.

    valid: readonly {
        asset_id_hex: string;
        group_index: number;
        label: string;
        script_group_index_item_hex: string;
    }[]
    version: number