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 🙏

© 2025 – Pkg Stats / Ryan Hefner

organic-money

v0.1.12

Published

The javascript implementation of Organic money cryptography

Downloads

365

Readme

organic-money.js

A javascript library to use Organic money features

Getting started

npm install
npm test

Build

npm run build

Usage

Create a brand new Citizen Blockchain :

const myBc = new CitizenBlockchain()
const myNewPrivateKey = myBc.startBlockchain('Gus', new Date('28/11/1989'))

Then, each day (or any day, holes will be filled), I can create my money :

myBc.createMoneyAndInvests(myNewPrivateKey)

To pay another citizen, I create a payment transaction and he or she incomes it :

const amount = 12
const newTransaction = myBc.pay(myNewPrivateKey, targetPublicKey, amount)

// Then target blockchain can income it :
otherBlockchain.income(newTransaction)

Technical informations

Hex or binary ?

Every information in blocks and transactions is in hex format. The only moments the format changes is :

  • when exporting blockchain to b64 or bytes
  • before importing blockchain from b64 or bytes

Money and Invests ids

Money Id has this format : YYYYMMDDXXX For example, the third money unit created on the 6th of november in 2015 would hase id : 20151106003

Invest Id has this format : YYYYMMDD9XXX For example, the fourth invest unit created on the 12th of november in 2025 would hase id : 202511129004

This way, you can always follow the limit date of use and also know if its a money or an invest.

Transactions

There are 11 types of transaction :

  • INIT: 0, // Initialization transaction
  • CREATE: 1, // Money and Invest creation
  • PAY: 2, // Payment
  • ENGAGE: 3, // Engagement
  • PAPER: 4, // Paper creation or income
  • SETADMIN: 5, // Ecosystem admin set
  • SETACTOR: 6, // Ecosystem actor set
  • SETPAYER: 7, // Ecosystem payer set
  • UNSETADMIN: 8, // Ecosystem admin unset
  • UNSETACTOR: 9, // Ecosystem actor unset
  • UNSETPAYER: 10, // Ecosystem payer unset

A transaction has ALWAYS this content :

{
  version: 1, // The current version of the protocol
  date: 20120527, // The date of the transaction as an Integer formated as YYYYMMDD
  type: 2, // An Integer representing the type of transaction
  source: XXXXX, // The public key of source or the transaction
  target: XXXXX, // The public key of the target of the transaction
  signer: 0, // The signer, 0 means it is the same as the source
  money: [], // The list of the money ids involved in the transaction
  invests: [], // The list of the invests ids involved in the transaction
  hash: 0 // The signed hash of the transaction
}

Blocks

A block has ALWAYS this content :

{
  version: 1, // The current version of the protocol
  closedate: 20120527, // The date when the block was sealed
  previousHash: xxx, // The hash of the previous block
  signer: xxx, // The public key of the person who signed the block
  money: [], // The currently available money
  invests: [], // The currently available invests
  total: 0, // The currently total (i.e economic experiment)
  merkleroot: xxx, // The merkle root made of the block's transactions hashes
  transactions: [] // The list of transactions of the block
}

Some phylosophical thoughts

About papers

The organic money always MUST be compatible between numeric and printed paper. It MUST be possible for someone to use only one or both of those approaches.

When a citizen creates a Paper, he or she defines the 3rd part key in the target of the Paper. Then, when another citizen or ecosystem incomes the Paper, he must have the block signed by this particular 3rd part.

This is logical when you understand that papers are for local use only. So, the 3rd part should be a common ecosystem.