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

sproof

v0.0.1

Published

Proof of Solvency (PoS) library and CLI

Downloads

9

Readme

Proof of Solvency

Proof of Solvency specification and Javascript implementation.

Proof of Solvency (PoS) is a scheme designed to let users verify the solvency of online websites which accept Bitcoin (or other similar currency) deposits (e.g. exchange websites, online wallets, gambling websites, etc.).

This scheme is based on the Proof Of Liabilities and Proof of Assets schemes.

Table of Contents

Proof of Solvency extension

extension screenshot

Table of Contents

Specification

Work in progress.

Liabilites proof

The liabilities proof is done using the scheme described at olalonde/blind-liability-proof.

Embedded:

PS: The x-liabilities-proof-root must be available on the index page (domain.com/) of the domain name and should be retrievable by non logged in visitors.

<meta name="x-liabilities-proof" data="/account/btc-partial-tree.json">
<meta name="x-liabilities-proof-root" data="/btc-root.json">

/acccount/btc-partial-tree.json (different for each user)

{
  "id": "MtGox.com BTC liabilities",
  "partial_tree": { ... }
}

/btc-root.json

{ 
  "id": "MtGox.com BTC liabilities",
  "root": {
    "value": 37618,
    "hash": "2evVTMS8wbF2p5aq1qFETanO24BsnP/eshJxxPHJcug="
  }
}

Assets proof

The assets proof is done using the scheme described at olalonde/bitcoin-asset-proof.

Embedded:

<meta name='x-assets-proof' data='/btc-assets.json'>

/btc-assets.json

{
  "id": "MtGox.com BTC assets",
  "signatures": [
    { "address": "", "signature": "" }
  ],
  "type": "BTC" (optional - defaults to bitcoin)
}

Verification

The proof that a site is solvent can be done by adding up all amounts controlled by addresses listed in the assets proof and deducting this amount from the root value in the liabilities proof.

function is_solvent() { return (assets >= liabilities) }

Assets and liabilities proof should be paired together using the id key. An asset proof must have the same id as its matching liabilities proof. This allows a shared wallet who handles multiple currencies to have multiple solvency proofs.

Known limitations

  • This scheme warns users when an exchange is insolvent but it does not prevent them from running away with the money / getting hacked / etc.
  • The asset proof could be generated by convincing/scamming someone else into signing a message for you / using an online service that signs message without revealing the private keys used.
  • The same keys can be used to generate multiple asset proofs for different domains although this can be mitigated by relying on a third party server that detects this.
  • It is possible for exchanges to exclude users that haven't logged in for a while from the liability proof. This can be mitigated by implementing a "push" protocol which would prevent exchange from knowing who is verifying the proof.
  • The verifier extension currently relies on a third party server to fetch the liability proof roots in order to make sure the user is not served a custom root. It also relies on a trusted third party server to retrieve the balance for a given asset proof. Both those servers are relatively easy to host and they could be optionally customized in the extension's settings.

Sites that implement this scheme

Send a pull request if you would like your site listed here.