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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@murall/museum

v1.1.0

Published

Fetch images drawn on MurAll and the token metadata

Downloads

6

Readme

MurAll Museum

Introduction

Fetch images drawn on MurAll and the token metadata

Installation

npm install @murall/museum

Requirements

Usage

To interact with the blockchains, you need to have RPC provider URLs and have them as environment variables. If you want to query Layer 1, you only need the RPC URL for Layer 1 and same for Layer 2. Both can be set too.

PROVIDER_URL - Provider URL for Layer 1 (Ethereum). You can sign up for one with Infura PROVIDER_URL_L2 - Provider URL for Layer 2 (Matic/Polygon). You can use the URLs from Matic

fetchToken(id, [options])

Gets token image and metadata

id - Token ID options:

  • isLayer2 - Optional - Either true or false to specify whether to interact with Ethereum or Polygon. Defaults to false.
  • save - Optional - If true also saves the PNG image and JSON metadata on your system.
  • saveDir - Optional - Specify the save directory for the saved files. Only taken into account if the save option is true. Defaults to .
  • filename - Optional - Specify the name (without a file extension) for the saved file. Only taken into account if the save option is true. Defaults to token_${id}.png.
  • cropped - Optional - Whether the token image should be cropped (full image) or in the relative position it is on the MurAll canvas.
  • fromBlock - Optional - Start of the block range from which the log events are queried. Defaults to earliest.
  • toBlock - Optional - End of the block range from which the log events are queried. Defaults to latest.

Returns { canvas, [metadata]} - Object containing the node Canvas and a JSON metadata object, if metadata was also required.

fetchMetadata(id, [options])

Gets token metadata

id - Token ID options:

  • isLayer2 - Optional - Either true or false to specify whether to interact with Ethereum or Polygon. Defaults to false.
  • save - Optional - If true also saves the JSON metadata on your system.
  • saveDir - Optional - Specify the save directory for the saved file. Only taken into account if the save option is true. Defaults to .
  • filename - Optional - Specify the name (without a file extension) for the saved file. Only taken into account if the save option is true. Defaults to metadata_${id}.json.

Returns { name, artist, number, series, viewUrl, isFilled } - Object containing the JSON metadata

  • name - Name of the NFT.
  • artist - Creator of the NFT.
  • number - Number given to NFT by the creator.
  • series - Series ID given to NFT by the creator.
  • viewUrl - URL where the NFT image can be viewed.
  • isFilled - Whether the NFT is filled or not. (If the NFT is filled, it means that the image data has been transferred from log storage to contract storage).

fetchMaxTokenId(isLayer2)

Find out the maximum token ID value. Tokens ID are sequential (starting with 0), so the number of NFTs minted can be derived from this

isLayer2 - Optional - Either true or false to specify whether to interact with Ethereum or Polygon. Defaults to false.

Returns Maximum token ID.

applyStateChanges(from, to, [options])

Renders the token images from the given range on a single image in their respective places. Can be used to recreate the history of MurAll. Large ranges may take a lot of time or even fail, depending on the RPC connection, so to recreate the whole history you would have to call this in batches.

from - First token ID in the range. to - Last token ID in the range. options:

  • isLayer2 - Optional - Either true or false to specify whether to interact with Ethereum or Polygon. Defaults to false.
  • save - Optional - If true also saves the JSON metadata on your system.
  • saveDir - Optional - Specify the save directory for the saved file. Only taken into account if the save option is true. Defaults to .
  • filename - Optional - Specify the name (without a file extension) for the saved file. Only taken into account if the save option is true. Defaults to tokens_${from}-${to}.png.
  • initialState - Optional - Canvas object to act as the initial state on which token images will be loaded. If not specified, the token images will be put onto a blank canvas.
  • fromBlock - Optional - Start of the block range from which the log events are queried. Defaults to earliest.
  • toBlock - Optional - End of the block range from which the log events are queried. Defaults to latest.

Returns Canvas containing the token images.

Examples

  1. Fetch a Layer 1 token image

const { canvas } = await fetchToken(0)

  1. Fetch and save a Layer 1 token image

await fetchToken(0, { save: true, saveDir: './tokenimages' })

  1. Save a cropped token image from Layer 2

await fetchToken(0, { isLayer2: true, save: true, cropped: true })

  1. Save a range of token images onto a single canvas

await applyStateChanges(0, 10, { save: true })

  1. Apply the token range multiple times to achieve a larger range and save the final image
const canvas = await applyStateChanges(0, 10)
await applyStateChanges(11, 20, { initialState: canvas, save: true })

Feedback

Feel free to file an issue. Feedback is always welcome.

If there's anything you'd like to chat about, please feel free to join our Discord!