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

siw-any

v1.0.0

Published

SIWE and Sign-In With Solana Implementation (SIWS). Felxible for more implementations

Downloads

100

Readme

siw-any-chain

siw-any-chain is a flexible package that provides a unified interface for signing and verifying messages across different blockchain platforms. It supports Sign-In With Ethereum (SIWE) and Sign-In With Solana (SIWS) implementations out of the box, and it can be easily extended to support additional blockchain platforms.

Features

  • Sign-In With Ethereum (SIWE): Provides the ability to create, sign, and verify Ethereum-based messages using the SIWE standard.
  • Sign-In With Solana (SIWS): Offers support for creating, signing, and verifying messages specific to the Solana blockchain using the SIWS standard.
  • Flexible Architecture: Designed to be extensible, allowing easy integration of new blockchain platforms by implementing the provided BlockchainMessage interface.
  • TypeScript Support: Written in TypeScript and includes type declarations for seamless integration with TypeScript projects.
  • Easy-to-Use API: Provides a simple and intuitive API for creating, signing, and verifying messages across different blockchain platforms.

Installation

Install the package using npm:

npm install siw-any-chain

Or with yarn:

yarn add siw-any-chain

Usage

import { MessageFactory, BlockchainType } from 'siw-any-chain';

// Create a SIWE message
const siweMessage = MessageFactory.createMessage(siweParams, BlockchainType.EVM);

// Create a SIWS message
const siwsMessage = MessageFactory.createMessage(siwsParams, BlockchainType.SOL);

// Sign and verify the messages
const signature = ...; // Get the signature
const verified = await siweMessage.verify(signature);

Acknowledgements

This package is built upon the excellent work of the SIWE team from spruceid. SIWE (Sign-In with Ethereum) is becoming more popular as a standard for authenticating users with web3 wallets. I extend their library by adding Solana functionality while maintaining compatibility with their core package.

Their library serves as the foundation for this package, allowing us to provide sign-in capabilities using Solana and in the future, other blockchain networks.

Please visit the SIWE GitHub repository to learn more about their project and show your support by giving them a star.

Contributing

Contributions are welcome! If you have any ideas, bug fixes, or feature suggestions, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.