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 🙏

© 2024 – Pkg Stats / Ryan Hefner

eth-spore

v0.0.10

Published

Spore - Simple package manager for Ethereum

Downloads

29

Readme

Gitter

IMPORTANT: This is a proof of concept prototype and shouldn't be used in production

For fast development of DApps a package management is needed. Spore is a Proof of Concept prototype for a such package manager build on top of truffle, ethereum and ipfs.

Any form on Feedback and contribution is highly wellcome.

Installation

Make sure you have node v4+ installed:

$ node --version
v4.0.0

Install Spore:

npm i -g eth-spore

On your first run spore will guide you trough a eth-rpc and ipfs configuration.

Currently it is optimized for truffle, you may want to install truffle as well:

npm -g i truffle

For full decentral usage:

Usage

$ spore --help

Simple package management for Ethereum

Usage:
  spore init
  spore upgrade
  spore publish 
  spore add       <path>
  spore link
  
  spore info     [<package>]
  spore install  [<package>]
  spore clone     <package>
  spore uninstall <package>
  
  spore remote list
  spore remote select <name>
  spore remote add    <name>
  spore remote remove <name>
  
  spore update
  spore search <string>
  
  spore instance add <package> <address> [--contract <contract>]
  spore instance list <package>
  
Arguments:
  <package>                    Package name or hash
  <path>                       path to file/ directory
  <name>                       rpc settings name
  
Options:
  -v, --version                Shows the version of spore
  -h, --help                   Shows this help screen
  --verbose                    Shows interlal logs

GUI

http://spore.memhub.io

(Decentral version on IPFS will follow shortly)

Workflow

Create a new project:

mkdir mypackage 
cd mypackage
truffle init
spore init

this will create a spore.json in your root project directory:

{
  "name": "mypackage",
  "version": "0.1.0",
  "description": "description",
  "dependencies": {},
  "contracts": [],
  "ignore": [],
  "files": [],
  "tags": []
}

install a dependency:

spore install mortal

import dependency to your contract: contracts/mcontract.sol

import "mortal";

contract mycontract is mortal {
...

link the dependencies:

spore link

add some files:

spore add contracts/mycontract.sol
spore add readme.md

publish the package:

spore publish

Now you can install the package mypackage along with it's dependencies in another project via:

spore install mypackage

Beginner Turorial

How to write a coin tutorial with truffle and spore

API documentation

Read the Full API Documentation here.

Development - Installation

This will guide you trough a local development installation. The contract is not deployed on a global chain, yet.

Make sure you have node v4+ installed:

$ node --version
v4.0.0

Make sure you have solidity installed:

$ solc --version
solc, the solidity compiler commandline interface
Version: 0.1.1-ed7a8a35/Release-Darwin/clang/JIT

Install eth-testrpc for testing/ dev purposes. pip install eth-testrpc

Install truffle. npm install -g truffle

Install ipfs.

clone this repo: git clone https://github.com/mhhf/spore.git

install:

cd spore
npm install
npm link

Run your rpc client( In this case testrpc testrpc )

Deploy the spore ethereum contract with: truffle deploy

Test

Run a local chain: testrpc

Deploy the contract: truffle deploy

Run the test: mocha test

How it works

This Ethereum contract has a name => ipfs-hash mapping and some functionallity to access and manipulate it.

The ipfs-hash is pointing to a package-header which specified by this json schema. An example header for spore is:

{
  "name": "spore",
  "version": "0.1.0",
  "description": "Simple package manager for dapp development.",
  "dependencies": {},
  "contracts": [
    "Spore"
  ],
  "ignore": [],
  "files": [
    "contracts/Spore.sol"
  ],
  "tags": [
    "spore",
    "package manager"
  ]
}

The dependencies property contains packages with their ipfs header file. The root property points to a ipfs directory node which contains the package files.