Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to handle the protocol VarString type http://dev.nuls.io/protocol/index.html#VarString

Hierarchy

  • VarStringSerializer

Index

Properties

Methods

Properties

Static DEFAULT_ENCODING

DEFAULT_ENCODING: string = "utf8"

Methods

Static read

Static size

  • size(data: string): number

Static write

  • write(data: string, buf: Buffer, offset: number): number
  • Writes data to buf at the specified offset

    Parameters

    • data: string

      String to be written to buf

    • buf: Buffer

      Buffer object where the string will be written

    • offset: number

      Number of bytes to skip before starting to write.

    Returns number

    Offset plus the number of bytes that has been written