Files
common/docs/util-rlp
2019-02-14 21:11:42 +00:00
..
2019-02-14 21:11:42 +00:00
2018-10-19 15:38:45 +00:00
2019-02-14 09:53:14 +00:00

@polkadot/util-rlp

Utility methods for encoding and decoding Ethereum RLP structures. This is port adapted from the original EthereumJS RLP implementation to cater for Uint8Array outputs (instead of Buffer) in addition to typings.

Usage

Installation -

yarn add @polkadot/util-rlp

Functions can be imported as follows:

import { decode } from '@polkadot/util-rlp';
import { encode } from '@polkadot/util-rlp';

Documentation and Available Utilities

No methods are exposed in the Polkadot-JS Common Documentation Portal because RLP will not be included in PoC-3 of Polkadot.

However, the key functions that are available include:

  • util-rlp
    • Functions
      • Decoder
        • decode
        • decodeListLong
        • decodeListShort
        • decodeNumber
        • decodeSingle
        • decodeString
        • safeParseInt
      • Encoder
        • encode
        • encodeArray
        • encodeLength
        • encodeU8a
        • toU8a