Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reason-rlp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reason-rlp

[Recursive Length](https://github.com/ethereum/wiki/wiki/RLP) prefix encoding implementation in Reason.

  • 0.1.0-alpha.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Recursive Length Prefix Encoding

Recursive Length prefix encoding implementation in Reason.

Install

npm install reason-rlp

Install with -g if you want to use the cli.

Usage

var RLP = require('reason-rlp');
var assert = require('assert');

var nestedList = [ [], [[]], [ [], [[]] ] ]; /* Set theoretic representation of 3 */
var encoded = RLP.encode(nestedList);
var decoded = RLP.decode(encoded);
assert.deepEquals(nestedList, decoded);

API

rlp.encode(plain) - RLP encoded an Array, Buffer or String and returns a Buffer WIP rlp.decode(encoded, [skipRemainderCheck=false]) - Decodes an RLP encoded Buffer, Array or String and returns a Buffer or an Array of Buffers. If skipRemainderCheck is enabled rlp will just decode the first rlp sequence in the buffer. By default it would through an error if there is more bytes in Buffer than used by the rlp sequence.

Tests

Tests use mocha. To run npm test

Keywords

FAQs

Package last updated on 14 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc