Skip to main content

bytesToBuffer

Callable

  • bytesToBuffer(data: Bytes): Buffer

  • Convert a value from bytes to Buffer

    @example
    console.log(web3.utils.bytesToBuffer(new Uint8Array([72, 12])));
    > <Buffer 48 0c>

    Parameters

    • data: Bytes

      Data to be converted

    Returns Buffer

    • The Buffer representation of the input data