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

@snappy-recovery/snap

v0.0.1

Published

Snappy Recovery Snap: Social recovery RPC API for MetaMask wallets

Downloads

1

Readme

💥 Snappy Recovery

Social Recovery for MetaMask wallets using "Snaps", sandboxed JS plugins for MetaMask.

Why it's safe-ish?

  • The Snap code runs in a sandboxed environment inside the MetaMask extension
  • The Snap code has access to private keys, but no internet access -- it doesn't request that permission
  • The Snap never exposes a sensitive private key to the Dapp (browser environment) unless it's encrypted
  • The Snap code is installed from NPM and can be audited at all times

Why it's probably not so safe?

  • I have only a rudimentary cryptography training
  • I built this alone, working late at night
  • Nobody reviewed nor audited this code
  • MetaMask Snaps are still a new feature in development

What does this mean?

⚠️ USE ONLY WITH ON TEST NETWORKS AND WITH TEST MNEMONICS

How it works?

Setup the social recovery

  1. Connect to MetaMask
  2. Accept the permission to manage your Ethereum private keys
  3. Go to your profile and copy your Snappy Recovery public key, save it somewhere. It's public data, harmless to save it in the clear.
  4. Find 5 friends with whom to split a secret backup key, send them to Snappy Recovery, and ask them for their Snappy Recovery public key (they have to login and go to their profile)
  5. Enter the 5 public keys in the "Setup Recovery" section, and press "Setup"
  6. The Snappy Recovery Snap, working fully inside MetaMask's sandboxed environment, will:
  7. Grab your parent Ethereum node, used to generate all your accounts
  8. Create a brand new backup AES encryption key
  9. Use this backup key to symmetrically encrypt your Ethereum node
  10. Split the backup key using a 3-of-5 Shamir secret sharing scheme
  11. Encrypt each backup key part using one of your friends' public keys
  12. Return the encrypted Ethereum key + the 5 encrypted shards to this Dapp. This means that at no point will the Dapp be able to "see" your master Ethereum private key in the clear
  13. Your encrypted Ethereum key + the 5 encrypted shards will be stored on Gun, a distributed peer-to-peer database
  14. All you have to do is save your Snappy Recovery public key ("View your public key" at the top) somewhere like your email or cloud storage

Recover your wallet / funds

  1. Reinstall MetaMask
  2. Go to Snappy Recovery and connect metamask, installing the Snap
  3. Press "I lost my private key!"
  4. Enter your Snappy Recovery public key that you copied back when you had access to your wallet
  5. Press "Get recovery URL"
  6. You'll get a URL, share it with at least three of your five friends
  7. The recovery page will self-update as your friends follow the procedure on their side -- they just have to click a button
  8. Once 3 of your friends have fulfilled their responsibility, press "Recover my ETH!"
  9. After a few seconds, you'll see your old accounts appear, with their balances and transaction count
  10. To recover an account:
  11. Press "Show private key" next to the address
  12. Go to MetaMask's menu and choose "Import Account"
  13. Paste your private key to import your account
  14. Send your funds to a non-imported account from your current wallet