Name component.

Remarks

This type is immutable.

Constructors

  • Construct GenericNameComponent from TLV-VALUE.

    Parameters

    • type: undefined
    • value: string | Uint8Array

    Returns Component

    Deprecated

    Pass TT.GenericNameComponent as type.

  • Construct from TLV-TYPE and TLV-VALUE.

    Parameters

    • Optional type: number

      TLV-TYPE. Default is GenericNameComponent.

    • Optional value: string | Uint8Array

      TLV-VALUE. If specified as string, it's encoded as UTF-8 but not interpreted as URI. Use Component.from() to interpret URI.

    Returns Component

    Throws

    Error Thrown if type is not a valid name component TLV-TYPE.

  • Decode from TLV.

    Parameters

    • tlv: Uint8Array

    Returns Component

    Throws

    Error Thrown if tlv does not contain a complete name component TLV and nothing else.

  • Internal

    Parameters

    • type: number
    • isFrom: typeof FROM
    • encoder: Encoder
    • length: number

    Returns Component

Properties

tlv: Uint8Array

Whole TLV.

type: number

TLV-TYPE.

value: Uint8Array

TLV-VALUE.

Accessors

Methods

Generated using TypeDoc