
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
This package provides a streaming implementation of the Recursive Length Prefix (RLP) encoding used in Ethereum, as specified in the Ethereum yellow paper (yellowpaper.io). You can find API documentation here. Typescript definitions are included.
The streaming transform enables efficient reading of large RLP encoded files, such as blockchain dump files produced by geth. You can obtain blockchain dump files by running:
$ geth export <file> <start block> <end block>
And then use the following script to print out each block one at a time as they are encountered:
import {RlpDecoderTransform, RlpItem} from 'rlp-stream';
const asyncChunks = require('async-chunks');
const decoder = new RlpDecoderTransform();
fs.createReadStream(file).pipe(decoder);
for await (const chunk of asyncChunks(decoder)) {
console.log(JSON.stringify(chunk, null, 2));
}
If your implementation has native for-await support, you don't need async-chunks.
FAQs
Stream-based RLP (recursive length prefix) encoder/decoder
We found that rlp-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.