Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @ndn/tlv

Index

Type aliases

Encodable

Encodable: Uint8Array | undefined | EncodableObj | EncodableTlv

An object acceptable to Encoder.encode().

EncodableTlv

EncodableTlv: [number, ...any[]]

An encodable TLV structure.

First item is a number for TLV-TYPE. Optional second item could be OmitEmpty to omit the TLV if TLV-VALUE is empty. Subsequent items are Encodables for TLV-VALUE.

Functions

NNI

  • NNI(n: number | bigint, __namedParameters?: Options<Len>): Encodable

fromHex

  • fromHex(s: string): Uint8Array
  • Convert hexadecimal string to byte array.

    This function lacks error handling. Use on trusted input only.

    Parameters

    • s: string

    Returns Uint8Array

fromUtf8

  • fromUtf8(buf: Uint8Array): string

printTT

  • printTT(tlvType: number): string

toHex

  • toHex(buf: Uint8Array): string

toUtf8

  • toUtf8(s: string): Uint8Array

Generated using TypeDoc