Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace rlp

Interfaces

Type aliases

Functions

Type aliases

Input

Input: Buffer | string | number | bigint | Uint8Array | BN | List | null

Functions

decode

  • decode(input: Buffer, stream?: boolean): Buffer
  • decode(input: Buffer[], stream?: boolean): Buffer[]
  • decode(input: Input, stream?: boolean): Buffer[] | Buffer | Decoded
  • RLP Decoding based on: RLP

    Parameters

    • input: Buffer

      will be converted to buffer

    • Optional stream: boolean

      Is the input a stream (false by default)

    Returns Buffer

    • returns decode Array of Buffers containg the original message
  • Parameters

    • input: Buffer[]
    • Optional stream: boolean

    Returns Buffer[]

  • Parameters

    • input: Input
    • Optional stream: boolean

    Returns Buffer[] | Buffer | Decoded

encode

  • encode(input: Input): Buffer
  • RLP Encoding based on: https://github.com/ethereum/wiki/wiki/%5BEnglish%5D-RLP This function takes in a data, convert it to buffer if not, and a length for recursion

    Parameters

    • input: Input

      will be converted to buffer

    Returns Buffer

    returns buffer of encoded data

getLength

  • getLength(input: Input): Buffer | number
  • Get the length of the RLP input

    Parameters

    Returns Buffer | number

    The length of the input or an empty Buffer if no input

Generated using TypeDoc