Transmute Framework
raw JSON →Transmute Framework is a JavaScript library for building decentralized applications on Ethereum and IPFS. It converts JavaScript objects to IPFS hashes and stores them on Ethereum smart contracts, enabling immutable event logs and event-sourced models. The latest stable version is 0.9.3, released after a major refactor adding JOSE/COSE/SCITT support. The project appears to be in active development but with infrequent releases (major versions months apart). Key differentiators include Redux-like event stream processing, built-in EventStore contracts, and support for multiple environments (local Ganache, Minikube, cloud). Alternative frameworks like Truffle and Embark offer broader dApp development features but less focus on event sourcing and IPFS integration.
Common errors
error Error: Cannot find module 'transmute-framework' ↓
error Error: EventStore is not a constructor ↓
error Error: write is not a function ↓
error Error: connect ECONNREFUSED 127.0.0.1:5001 ↓
error Error: Returned error: VM Exception while processing transaction: revert ↓
Warnings
breaking BREAKING CHANGE: Major refactor in v0.9.0 - renamed several exports and changed IPFS/Ethereum configuration schema. ↓
breaking BREAKING CHANGE: v0.9.0 switched to ESM-only exports. CommonJS require() will not work in Node.js without ESM flags. ↓
deprecated DEPRECATED: EventStoreFactory.createEventStore() no longer accepts a callback; use async/await. ↓
gotcha Encryption is not handled by the framework. Sensitive data stored on Ethereum/IPFS is public. ↓
gotcha EventStore contract must be deployed first via migration or EventStoreFactory; writes will fail if contract not found. ↓
gotcha IPFS and Ethereum nodes must be running and accessible; errors with 'connect ECONNREFUSED' indicate misconfiguration. ↓
Install
npm install transmute-framework yarn add transmute-framework pnpm add transmute-framework Imports
- EventStore wrong
const EventStore = require('transmute-framework');correctimport { EventStore } from 'transmute-framework'; - EventStoreFactory wrong
const EventStoreFactory = require('transmute-framework').EventStoreFactory;correctimport { EventStoreFactory } from 'transmute-framework'; - TransmuteConfig wrong
import TransmuteConfig from 'transmute-framework';correctimport { TransmuteConfig } from 'transmute-framework';
Quickstart
// Install dependencies
// npm i transmute-framework web3 ipfs-http-client
import { EventStore, EventStoreFactory } from 'transmute-framework';
import Web3 from 'web3';
import ipfsHttpClient from 'ipfs-http-client';
// Configuration for local Ganache and IPFS
const transmuteConfig = {
ipfsConfig: {
host: '127.0.0.1',
port: 5001,
protocol: 'http'
},
web3Config: {
providerUrl: 'http://127.0.0.1:8545'
}
};
// Initialize EventStore contract
const eventStore = new EventStore({
eventStoreArtifact: require('./build/contracts/EventStore.json'),
...transmuteConfig
});
async function main() {
await eventStore.init();
const accounts = await eventStore.web3.eth.getAccounts();
// Write an event
const event = {
key: {
type: 'ACCOUNT_CREATED',
value: accounts[0]
},
value: {
name: 'Alice'
}
};
await eventStore.write(accounts[0], event.key, event.value);
// Read events
const events = await eventStore.getSlice(0, 10);
console.log('Events:', events);
}
main().catch(console.error);