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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@coti-io/coti-snap

v1.0.19-8ac5b7

Published

COTI Snap - MetaMask Snap for managing confidential tokens and confidential transactions

Readme

COTI AES Key Manager Snap

A MetaMask Snap for managing AES keys and confidential tokens on the COTI network.

Features

  • 🔐 AES Key Management: Securely store and manage AES keys in MetaMask
  • 🪙 Confidential Tokens: View and manage confidential ERC-20 tokens
  • 🖼️ NFT Support: Handle confidential NFTs with metadata
  • 🔄 Token Operations: Transfer and deposit tokens
  • 🛡️ Secure Storage: Encrypted storage within MetaMask's secure environment
  • 🔗 COTI Network: Native support for COTI's confidential blockchain

Installation

For Users

  1. Install MetaMask if you haven't already
  2. Visit the companion dapp: https://metamask.coti.io
  3. Connect your wallet and follow the installation prompts
  4. Generate your AES key to start managing confidential tokens

For Developers

# Clone the repository
git clone https://github.com/coti-io/coti-snap.git
cd coti-snap

# Install dependencies
yarn install

# Build the snap
yarn workspace @coti-io/coti-snap build

# Run tests
yarn workspace @coti-io/coti-snap test

# Start development server
yarn workspace @coti-io/coti-snap start

Usage

AES Key Management

// Check if user has AES key
const hasKey = await invokeSnap({ method: 'has-aes-key' });

// Get AES key (requires user confirmation)
const aesKey = await invokeSnap({ method: 'get-aes-key' });

// Set AES key
await invokeSnap({
  method: 'set-aes-key',
  params: { newUserAesKey: 'your-aes-key' }
});

// Delete AES key
await invokeSnap({ method: 'delete-aes-key' });

Encryption/Decryption

// Encrypt data
const encrypted = await invokeSnap({
  method: 'encrypt',
  params: { value: 'data-to-encrypt' }
});

// Decrypt data
const decrypted = await invokeSnap({
  method: 'decrypt',
  params: { value: encryptedData }
});

API Reference

RPC Methods

| Method | Description | Parameters | |--------|-------------|------------| | has-aes-key | Check if AES key exists | None | | get-aes-key | Retrieve AES key | None | | set-aes-key | Store AES key | { newUserAesKey: string } | | delete-aes-key | Remove AES key | None | | encrypt | Encrypt data | { value: string } | | decrypt | Decrypt data | { value: string } | | connect-to-wallet | Connect to MetaMask | None | | get-permissions | Get wallet permissions | None |

Permissions

The snap requires the following permissions:

  • snap_dialog: For user confirmations
  • snap_manageState: For secure state storage
  • endowment:ethereum-provider: For blockchain interactions
  • endowment:network-access: For API calls
  • endowment:rpc: For dapp communication

Security

  • AES keys are stored securely in MetaMask's encrypted storage
  • All operations require user confirmation through MetaMask dialogs
  • State is isolated per chain and address
  • No sensitive data is logged or exposed

Development

Project Structure

packages/snap/
├── src/
│   ├── components/     # Snap UI components
│   ├── config/        # Configuration files
│   ├── utils/         # Utility functions
│   ├── test/          # Test files
│   └── index.tsx      # Main snap entry point
├── images/            # Snap icons
├── snap.manifest.json # Snap manifest
└── package.json       # Package configuration

Building

# Development build with watch mode
yarn workspace @coti-io/coti-snap start

# Production build
yarn workspace @coti-io/coti-snap build

# Clean build
yarn workspace @coti-io/coti-snap build:clean

Testing

# Run all tests
yarn workspace @coti-io/coti-snap test

# Run tests in watch mode
yarn workspace @coti-io/coti-snap test --watch

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

MIT License - see LICENSE for details.

Support

Version History

  • v1.0.0: Initial production release with AES key management and confidential token support