JSPM

@polkadot/util-rlp

0.33.16
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q83912F
  • License MPL-2.0

RLP encoding and decoding

Package Exports

  • @polkadot/util-rlp
  • @polkadot/util-rlp/decode
  • @polkadot/util-rlp/encode

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@polkadot/util-rlp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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