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

transmute-framework

v0.2.5

Published

Event Sourced Decentralized Application Development Framework.

Readme

Transmute Framework

The transmute framework converts javascript objects to ipfs hashes, and stores them on ethereum smart contracts.

It is meant to be a building block for decentralized applications that are built on immutable event logs.

It also supports some Redux like functionality which makes building models from event streams easy. These models can then be saved to document databases for querying and indexing.

The environment used by the framework can easily be configured in ./src/transmute-config/env.json.

Getting Started With Ganache

If you want to use the framework with ganache and a local ipfs node, you can do so by using the localhost env.

First, make sure to install and start ipfs and ganache in the default manner:

ipfs daemon
ganache-cli

Next, use TRANSMUTE_ENV to test the framework with this local environment.

npm i
TRANSMUTE_ENV='localhost' npm run truffle:test
TRANSMUTE_ENV='localhost' npm run truffle:migrate
TRANSMUTE_ENV='localhost' npm run test

Getting Started With Minikube

If you are using the minikube environment, you will need to ensure that the framework is configured to connect to the correct ipfs and ethereum rpc interface.

Follow the instructions in the root level readme.


export KONG_ADMIN_URL=$(minikube service gateway-kong-admin --url | sed 's,http://,https://,g')
export KONG_PROXY_URL=$(minikube service gateway-kong-proxy --url | sed 's,http://,https://,g')

echo $KONG_PROXY_URL

curl -k -X GET \
  --url $KONG_ADMIN_URL/apis \
  | jq -r '.'

You can configure your /etc/hosts like so:

192.168.99.100  transmute.minikube
192.168.99.100  ipfs.transmute.minikube
192.168.99.100  ganache.transmute.minikube

With the /scripts/configure-hosts.sh from the root of the repo.

Update minikube in ./src/transmute-config/env.json.

The kong proxy port is likly the only thing that will change when using minikube locally.

npm i
npm run truffle:test
npm run truffle:migrate
npm run test

Usage

The examples below are pulled from the __tests__ directories, that are run by travis ci.

The EventStoreFactory contract can be used to create EventStore contracts.

const eventStoreFactoryArtifact = require('../../../build/contracts/EventStoreFactory.json');
const transmuteConfig = {
  "mixpanelConfig": {
    ...
  },
  "ipfsConfig": {
    "host": "ipfs.transmute.minikube",
    "port": 32443,
    "protocol": "https"
  },
  "web3Config": {
    "providerUrl": "https://ganache.transmute.minikube:32443"
  }
}
eventStoreFactory = new EventStoreFactory({
  eventStoreFactoryArtifact,
  ...transmuteConfig
});

await eventStoreFactory.init();
let result = await eventStoreFactory.createEventStore(
  accounts[0]
);

Saving key-value pairs to an EventStore contract can be done like so:

const EventStore = require('../index.js');
const transmuteConfig = require('../../transmute-config');
const eventStoreArtifact = require('../../../build/contracts/EventStore.json');

const eventStore = new EventStore({
  eventStoreArtifact,
  ...transmuteConfig
});

await eventStore.init();

const event = {
  key: {
    type: 'ACCOUNT_CREATED',
    value: '0x123'
  },
  value: {
    name: 'alice'
  }
}

let result = await eventStore.write(
  accounts[0],
  event.key,
  event.value
);

Events can be retrieved using:

let events = await eventStore.getSlice(0, 2);
Encryption should be used before saving sensitive information to Ethereum and IPFS!

Stream models can be built from the events like so:

const filter = event => {
  return true;
};
const reducer = (state, event) => {
  let eventHash = eventStore.web3.sha3(JSON.stringify(event));
  const eventHashes = new Set(state.eventHashes || []);
  eventHashes.add(eventHash);
  return {
    ...state,
    eventHashes: Array.from(eventHashes)
  };
};
const streamModel = new StreamModel(eventStore, filter, reducer);
await eventStore.write(
  accounts[0],
  someNewEvent.key,
  someNewEvent.value
);
await streamModel.sync();

Stream models filter events, and then use a reducer function to build up state, just like Redux!

See ./src/__tests__ for more example usage.