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

@sovereign-sdk/metamask-snap

v0.1.5

Published

Sovereign SDK universal snap, compitible with all Sovereign SDK built rollups.

Downloads

146

Readme

Sovereign Universal MetaMask Snap

npm version Main yarn

A universal MetaMask Snap for interacting with Sovereign SDK rollups. This snap provides secure key management and transaction signing capabilities for Sovereign rollup applications.

This repository contains the snap implementation that is installed in the MetaMask snap store.

Having a universal snap allows Sovereign SDK applications to be compatible with all Sovereign SDK rollups removing the need for developers to implement and audit their own snap.

Features

  • 🔐 Secure key derivation and management
  • 📝 Verifiable human-readable transaction data display (No blind signing!)
  • ✍️ Transaction signing for multiple curves (ed25519, secp256k1)
  • 🔍 Schema validation for transaction safety
  • 🔄 Seamless integration with Sovereign SDK applications

Usage

The snap is typically used through the @sovereign-sdk/signers package, which provides a convenient interface for interacting with the snap:

import { newMetaMaskSnapSigner } from '@sovereign-sdk/signers';

const signer = newMetaMaskSnapSigner({
  curve: 'ed25519',
  schema: yourSchema,
  snapId: 'local:http://localhost:8080', // Local snap id for development, run `yarn start` to serve a local version of the snap
});
// Get public key
const publicKey = await signer.publicKey();
// Sign a transaction
const signature = await signer.sign(message);

Development

Prerequisites

Setup

# Install dependencies
yarn install

Available Commands

  • yarn build - Build the snap for production
  • yarn start - Start development server for local testing
  • yarn test - Run test suite
  • yarn lint - Run linting
  • yarn lint:fix - Fix linting and formatting issues
  • yarn clean - Clean build artifacts

See the DEVELOPMENT.md file for more information on how to develop on the snap.

Snap Manifest

The snap manifest (snap.manifest.json) is a crucial configuration file that defines the snap's properties and permissions. Key configurations include:

  • version: The snap's version number. This must match the version in the package.json file. Should be automatically managed via CI/CD pipeline.
  • proposedName: The name shown to users in MetaMask
  • description: A brief description of the snap
  • source: The entry point of the snap
  • initialPermissions: Required permissions for the snap to function:
    • snap_dialog: For displaying transaction information
    • snap_getBip32Entropy: For key derivation
    • endowment:webassembly: For running the snap's WebAssembly code. Required for universal wallet wasm support.

Security

For security concerns, please open an issue or contact us directly. We take security issues seriously and will respond promptly.