npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ethscriptions-indexer

v0.1.0

Published

> Ethscriptions indexer only for Blob-created ethscriptions, > [ESIP-8](https://docs.ethscriptions.com/esips/esip-8-ethscription-attachments-aka-blobscriptions)

Downloads

7

Readme

blobscriptions indexer

Ethscriptions indexer only for Blob-created ethscriptions, ESIP-8

How it works?

In src/indexing.ts we have trackBlobscriptions function, in future maybe the rest of the Ethscriptions indexer. In it we use Viem's watchBlocks method to listen on blocks and track only EIP-4844 (Blobs) transactions that has data: calldata (gzipped or not). Optionally you can track all overall blob transactions, not only blobscription ones, by passing onlyBlobscriptions: false to the trackBlobscriptions options. Then a the handler function passed to the trackBlobscriptions is called in turn which is passed the transaction and block details.

In the trackBlobscriptions we DO NOT parse, process or validate the actual blob contents, we don't even have it there. For how it can be done check exampleBlobProcessor function in the src/main.ts we do it inside the handler we pass to trackBlobscriptions.

The idea is that you can do that on the handler you pass, once you are sure that the there's blobscription transaction.

Currently, src/main.ts has trackBlobscriptions handler function that just sends the data to a given Webhook URL.

Deploy

Currently, I use Fly.io, which runs the src/main.ts with Bun (a JavaScript/TypeScript runtime). And there is one server deployed at https://deno-fly-viem-eths-indexer.fly.dev that is listening on mainnet and sending webhooks to https://webhook.site/9392df98-49f1-407c-8531-6a7190e22e1f

If you want to deploy your own, you should:

  1. Register on Fly.io, install their CLI and login through there
  2. Register on GetBlock.io to get an RPC node url that support blob transactions
  3. In the ENV file you can pass your RPC_URL, WEBHOOK_URL and INDEX_CHAIN_ID
  4. Populate the environment variables in .env.example, copy it to .env
  5. Run fly launch --yes --copy-config --name your-indexer-name (only the first time, then fly deploy)
  6. then run npm run env:populate
  7. Deploy using fly deploy (you may need to update the Dockerfile/fly.tom)

In a bit I'll deploy a Cloudflare Worker that receives these webhooks, does the blob parsing and processing, and then re-distribute to registered webhooks (eg. you would be able to just give me a Webhook url).

Blobbed.xyz will receive the finalized stuff so it will show it in the site.

Example Creating blobs

Check out the create-blob-example.ts file.

If you don't want to deploy or anything, but just want to try create a BlobScription then you still need:

  1. to get RPC from GetBlock.io and put RPC_URL in the .env file
  2. switch the INDEX_CHAIN_ID to 1
  3. add CREATOR_PRIVATE_KEY and make sure this wallet has some funds (~5-10$), otherwise it won't be able to create a blobscription transaction
  4. Run bun run create-blob-example.ts

This way you'll use the currently deployed indexer and APIs (on blobbed.xyz).