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

web3-wallet-selector

v1.0.5

Published

Utility Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the Utility ecosystem

Downloads

82

Readme

Utility Wallet Selector

Utility Wallet Selector makes it easy for users to interact with your dApp by providing an abstraction over various wallets within the Utility ecosystem:

Preview

React / Next.js and Angular variations of the Guest Book dApp can be found in the examples directory. You can use these to gain a concrete understanding of how to integrate Utility Wallet Selector into your own dApp.

Preview

Installation and Usage

The easiest way to use Utility Wallet Selector is to install the core package from the NPM registry, some packages may require web3-api-js v1.0.0 or above check them at packages

# Using Yarn
yarn add web3-api-js

# Using NPM.
npm install web3-api-js
# Using Yarn
yarn add @web3-wallet-selector/core

# Using NPM.
npm install @web3-wallet-selector/core

Next, you'll need to install the wallets you want to support:

# Using Yarn
yarn add \
  @web3-wallet-selector/mywallets \
  @web3-wallet-selector/wallet-connect

# Using NPM.
npm install \
  @web3-wallet-selector/mywallets \
  @web3-wallet-selector/wallet-connect

Optionally, you can install our modal-ui or modal-ui-js package for a pre-built interface that wraps the core API and presents the supported wallets:

# Using Yarn
yarn add @web3-wallet-selector/modal-ui

# Using NPM.
npm install @web3-wallet-selector/modal-ui

Then in your dApp:

import { setupWalletSelector } from "@web3-wallet-selector/core";
import { setupModal } from "@web3-wallet-selector/modal-ui";
import { setupMywallets } from "@web3-wallet-selector/mywallets";
import { setupWalletConnect } from "@web3-wallet-selector/wallet-connect";

const selector = await setupWalletSelector({
  network: "testnet",
  modules: [
    setupMywallets(),
    setupWalletConnect({
      projectId: "c4f79cc...",
      metadata: {
        name: "Utility Wallet Selector",
        description: "Example dApp used by Utility Wallet Selector",
        url: "https://github.com/utnet-org/wallet-selector",
        icons: ["https://avatars.githubusercontent.com/u/37784886"],
      },
    }),
    setupNearMobileWallet(),
    setupMintbaseWallet({
          networkId: "mainnet",
          walletUrl: "https://wallet.mintbase.xyz",
          callbackUrl: "https://www.mywebsite.com",
          deprecated: false,
      }),
  ],
});

const modal = setupModal(selector, {
  contractId: "guest-book.testnet"
});

Wallet Package Documentation

Each wallet package contains its own README document, please refer inside the packages folder for extra information.

Contributing

Contributors may find the examples directory useful as it provides a quick and consistent way to manually test new changes and/or bug fixes.

More details around contributing to this project can be found here.

Editor Setup

This project uses ESLint (with Prettier) to enforce a consistent coding style. It's important that you configure your editor correctly to avoid issues when you're ready to open a Pull Request.

Although this project uses Prettier, it's simply an "internal" dependency to our ESLint configuration. This is because we want Prettier to handle code styling while avoiding conflicts with ESLint which specifically focuses on potentially problematic code. As a result, it's important that you switch off Prettier in your editor and ensure only ESLint is enabled.

License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE-MIT and LICENSE-APACHE for details.