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

@atomone/chronostate

v2.3.0

Published

ChronoState is a library which parses memos from individual blocks on-chain and then is meant to use the event sourcing pattern to reconstruct and give applications specific instructions to reconstruct state.

Readme

ChronoState

Reconstructing the past, validating the present, securing the future.

ChronoState is a library which parses memos from individual blocks on-chain and then is meant to use the event sourcing pattern to reconstruct and give applications specific instructions to reconstruct state.

How?

Using the default cosmos banking module, a memo can be used to invoke action state.

Action state can be targeted towards a specific public address which wants to handle the action state.

The only requirement is that you have a prefix for your memos; which helps the event parser find information about events.

Example

namespace.Function("arg1", "arg2", "arg3")

How does this library work?

pnpm i @atomone/chronostate

Setting up an Instance

This is how you setup ChronoState and start the block parsing system. It's recommended to have a starting block number, and use that to reconstruct the rest of the state, or create live state based on that.

const endpoints = [`https://atomone-api.allinbits.com/`, `https://atomone-rest.publicnode.com`];

// This function takes incoming memos from blocks being parsed
function handleAction(action: Action) {
    console.log(action);
}

// This function starts the block parsing process by getting current block height,
// Then sets up a ChronoState instance that looks for messages with a prefix of 0xTest
// It also checks to ensure the receiver is a specific address.
// We give it a minimum height to start processing blocks from, usually last block processed.
async function parseBlocks() {
    const height = await getCurrentBlockHeight(endpoints);
    const min_height = `${parseInt(height) - 50}`;

    const state = new ChronoState({
        API_URLS: endpoints,
        MEMO_PREFIX: '0xTest',
        // RECEIVER: 'atone1uq6zjslvsa29cy6uu75y8txnl52mw06j6fzlep', // These are optional
        // SENDER: 'atone1uq6zjslvsa29cy6uu75y8txnl52mw06j6fzlep', // These are optional
        START_BLOCK: min_height,
        LOG: true,
    });

    state.onAction(handleAction);
    await state.start();
}

Getting an Action Response

This is what you can expect from the handle action function when logging results.

{
  hash: '682defbf453ffe65a1a56f595fdadd9cc14e99b6e9b8a396bc924b9c69fc9d0b',
  from: 'atone16k0xnxqr48qdwxreu6rgcghg0xp9hn7vpn06nm',
  to: 'atone1uq6zjslvsa29cy6uu75y8txnl52mw06j6fzlep',
  memo: '0xTest',
  amounts: [
    { denom: 'uatone', amount: '1000000' }
  ],
  timestamp: '2025-03-18T14:45:37.323011612Z',
  height: '2267005'
}