Get the latest Flashbots blocks and Flashbots transactions using TypeScript in two lines of code !

Overview

mev-blocks-js

This package can let you query the Flashbots blocks API easily from any JavaScript or TypeScript project.

You can access the Flashbots blocks and transactions using two lines of code only !

How does it work ?

Under the hood, it queries the Flashbots blocks API and returns the result with strong type support.

Please be careful, as you may be limited by the Flashbots server when performing to many request per second.

Getting started !

Installation

You just have to run the following command:

yarn add mev-blocks-js

Quickstart

To query the last 100 Flashbots blocks, just include the following lines of code:

const requester = new BlockRequester();
const res = await requester.GetBlocks();

To query the last 100 Flashbots transactions, just include the following lines of code:

const requester = new BlockRequester();
const res = await requester.GetTransactions();

You can provide filters when calling the getters. Below, the requester will return the last 2 Flashbots transactions, before block number 11999806:

const requester = new BlockRequester();
const res = await requester.GetTransactions({
    before: 11999806,
    limit: 2,
});

Author

Made with ❤️ by 🤖 Luca Georges François 🤖

You might also like...

🦜️🔗 This is a very simple re-implementation of LangChain, in ~100 lines of code

🦜️ 🔗 LangChain-mini This is a very simple re-implementation of LangChain, in ~100 lines of code. In essence, it is an LLM (GPT-3.5) powered chat app

Aug 14, 2023

CLI utility that broadcasts BTC, ETH, SOL, ZEC & XMR transactions through TOR using public block explorers

tx-tor-broadcaster CLI utility that broadcasts BTC, ETH, SOL, ZEC & XMR transactions through TOR using public block explorers. Provides a great degree

Dec 25, 2022

An obsidian plugin that give additional features to code blocks.

An obsidian plugin that give additional features to code blocks.

Obsidian Advanced Codeblock Add additioinal features to code blocks. Demo Feature Add line numbers to code block Add line highlight to code block Usag

Jan 3, 2023

⚡️ CLI building blocks & framework for the TypeScript era.

molt A set of packages related to building CLIs. Alpha maturity. Each package has its own docs. 📛 Package Path Description Use Case 🌲 molt packages/

Jan 6, 2023

Benefit cards API, create and store card data and log transactions

Benefit cards API, create and store card data and log transactions

Valex 💳 Benefit cards for companies and employees! 💻 Tech used Overview An API to store benefit cards from companies to employees and log transactio

Apr 25, 2022

An easy and simple way to manage your financial transactions.

An easy and simple way to manage your financial transactions.

MyWallet An easy and simple way to manage your financial transactions. With MyWallet you can track your incomes and expenses and always keep track of

Nov 16, 2022

E-Commerce solution for security of databases and transactions.

commerce_new_era AMAÇ Amacımız günümüzde E-Ticaret sitelerinde bulunan sahte ürünlerin ve mağduriyetlerin önüne geçmektir. Bunu yapmak için Blockchai

May 14, 2022

Ethereum chain sniperbot for tokens. This bot sniffs the mempool for pending transactions for trading enabled and also liquidity add functions.

Ethereum chain sniperbot for tokens. This bot sniffs the mempool for pending transactions for trading enabled and also liquidity add functions.

Dec 5, 2022

Transform and compose data for HTTP transactions.

Transform and compose data for HTTP transactions.

Fragments Fragments is a platform to compose and manage custom data objects for HTTP transactions. Simply put, you can write simple jinja templates to

Sep 6, 2022
Owner
Luca G.F.
Learning Ethereum 2.0
Luca G.F.
Zero Two Bot,A fully Modular Whatsapp Bot to do everything possible in WhatsApp by Team Zero Two

?? ???????? ?????? ???? ?? A Moduler WhatsApp Bot designed for both PM and Groups - To take your boring WhatsApp usage into a whole different level. T

Sam Pandey 69 Dec 25, 2022
Get the latest feed of GitHub Stars out there! 🌟 ⭐ ✨

GitHub Stars Feed Get the latest feed of GitHub Stars out there! ⭐ The GitHub Stars program thanks GitHub’s most influential developers and gives them

Vinit Shahdeo 30 Oct 5, 2022
An obsidian plugin that allows code blocks executed interactively in sandbox like jupyter notebooks. Supported language rust、kotlin、python、Javascript、TypeScript etc.

Obsidian Code Emitter This plugin allows code blocks executed interactively like jupyter notebooks. Currently, support languages: Rust Kotlin JavaScri

YiiSh 38 Dec 28, 2022
Argon - extension for VS Code and plugin for Roblox allowing easy two-way sync of code and instances

About Argon is a simple two-way sync plugin for Roblox and extension for Visual Studio Code allowing developers not only to sync code but every possib

DARK 16 Dec 29, 2022
Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript and Node.js.

Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript and Node.js.

Berry 243 Jan 8, 2023
Perfect SvelteKit dark mode in 2 lines of code. Support System preference and any other theme with no flashing

This library is a port of next-theme for SvelteKit. All credit goes to pacocoursey and all next-themes contributors While usable, this library is stil

null 42 Sep 30, 2022
A fast and optimized middleware server with an absurdly small amount of code (300 lines) built on top of Deno's native HTTP APIs

A fast and optimized middleware server with an absurdly small amount of code (300 lines) built on top of Deno's native HTTP APIs with no dependencies. It also has a collection of useful middlewares: log file, serve static, CORS, session, rate limit, token, body parsers, redirect, proxy and handle upload. In "README" there are examples of all the resources. Faster's ideology is: all you need is an optimized middleware manager, all other functionality is middleware.

Henrique Emanoel Viana 19 Dec 28, 2022
🚀 A mongoose plugin to monetize your apis in few lines of code

Stripe Mongoose Api Stripe Mongoose Api is a Mongoose plugin that simplifies building checkout and payment system for apis with stripe. It will provid

Moscatelli Marco 13 Dec 29, 2022
Find out how many lines of code you have written for your project 📜

?? TLOC (Tomper Lines Of Code) Find out how many lines of code you have written for your project. ?? Installation (Install the package globally) npm i

Varun Tiwari 9 Oct 17, 2022
Capable Langchain/AutoGPT alternative in ~350 lines of core code

??️ ?? BingChain This is an evolution of langchain-mini, a very simple re-implementation of LangChain, in ~350 lines of core code. In essence, it is a

Postman Open Technologies 19 Jul 30, 2023