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

git-remote-ipfs-mam

v0.3.20

Published

Git remote that publishes to IPFS and broadcasts updates to the IOTA tangle.

Downloads

5

Readme

Interplanetary Filesystem (IPFS) Git Remote Helper

Push and fetch commits to IPFS. Updates are broadcast to the IOTA tangle where others may retrieve the most recent version.

Installation

npm install --global git-remote-ipfs+mam

Usage

(Insecure) Cloud Backup

  1. git push ipfs+mam:: --tags # you can't push all and tags at the same time
  2. git push ipfs+mam:: --all
  3. Pin the resultant hash on a pinning service.

Push master with tags and get an IPFS CID back:

git push --tags ipfs+mam:: master

Pull a commit:

git pull ipfs::Qma5iwyvJqxzHqCT9aqyc7dxZXXGoDeSUyPYFqkCWGJw92

Clone a repository:

git clone ipfs::Qma5iwyvJqxzHqCT9aqyc7dxZXXGoDeSUyPYFqkCWGJw92 repo

See debugging info:

IGIS_DEBUG=t git push ipfs::

IPFS Data Structures

This program is an extension of git-remote-ipfs. For information about the IPFS file structure, see that repository.

IOTA Data Structures

In IOTA, it is possible to write to any address. A Masked Authentication Message (MAM) channel is formed by including in each published message the next address that will be used.

When a repository is published, this remote publishes a signed JSON Linked Data object to the MAM channel for the format:

{
  '@context': {
    schema: 'http://schema.org/',
    action: 'schema:action',
    agent: 'schema:name',
    repository: 'schema:url',
    publisher: 'schema:url',
    next_root: 'schema:url',
    published_at: 'schema:datetime',
  },
  action: 'RepositoryUpdate',
  repository: 'ipfs://QmThisIsTheCIDOfTheRepo',
  publisher: 'did:key:zABase58EncodedED25519Key',
  next_root: `iota://NEXT9TANGLE9ADDRESS9IN9THE9MAM9TREE:TAG9FROM9REPO9UUID`,
  agent: 'git-remote-ipfs+mam',
  published_at: new Date(),
  'https://w3id.org/security#proof': {…}
}

Additionally, a signed JSON-LD object is published to the tangle address 99IPFS9MAM9CHNL9LINK9VA99${multicodec_of_repo_cid} of the format:

{
  '@context': {
    schema: 'http://schema.org/',
    action: 'schema:action',
    agent: 'schema:name',
    publisher: 'schema:url',
    bundle: 'schema:url',
    published_at: 'schema:datetime',
  },
  action: 'MAMLink',
  publisher: 'did:key:zABase58EncodedED25519Key',
  bundle: `iota:bundle://IOTA9BUNDLE9HASH9In9MAM9TREE`,
  agent: 'git-remote-ipfs+mam',
  published_at: new Date(),
  'https://w3id.org/security#proof': {…}
}

If a different remote is asked to clone from that CID, it can check that address and get the bundle hash of a message in the channel. The publisher field is also present in the IPFS repository, so the user is able to verify the signatures (and differentiate between genuine messages and those inserted by an attacker).

License

MIT