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

add-keplr-button

v1.0.5

Published

A React component to add a custom blockchain to Keplr

Downloads

4

Readme

A React component allows user to add the Nilchain to Keplr Wallet

Overview

In this project, a react component is provided to intergrate with a npm package that allows developers are easily to customize any blockchain within Cosmos ecosystem and add to Keplr Wallet.

Live Project

  • Website: https://nillion-add-nilchain-to-keplr.vercel.app/
  • Npm package: https://www.npmjs.com/package/add-keplr-button

Features

  • Adding Nillion chain to Keplr Wallet.
  • Allowing developers to customize chain information easily.
  • A friendly user interface with a configurable button to connect with Keplr Wallet.
  • Handling the chain addition process with errors and feedbacks.
  • Compatible with the most popular browsers (Edge, Chrome, Firefox).

Installation

Following these steps to install and run add-keplr-button package with your project.

1. Installing the package via npm or yarn

npm i add-keplr-button --save

2. Import into your project

import { KeplrAddChainButton } from 'add-keplr-button' 

3. Config the chainInfo

  • chainId: chainId in a form of {identifier}-{version} (ex. cosmoshub-4)
  • chainName: the name of the chain that will be displayed on the wallet
  • chainSymbolImageUrl: Image URL of the chain.
    • https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/{chain-identifier}/{file-name}.png
    • Please modify the chain-identifier and file-name from the link above and upload it.
  • rpc: URL of RPC endpoint of the chain
  • rest: URL of REST/API endpoint of the chain
  • nodeProvider: provide the details of the RPC/REST node providers
    • name: name of the node provider
    • email: email address of the node provider (To help other users reach out when there is an issue with the nodes’ status)
    • website(optional): website address of the node provider
  • walletUrlForStaking(optional): the URL where the users are directed when they click on Staking button of the Keplr Wallet
  • bip44: BIP-44 coin type (118 highly recommended)
  • bech32Config: prefix used at the beginning of the address
  • currencies: the list of the supported currencies. If your chain uses replicated security, please place your main native token at the top of the currencies list.
  • feeCurrencies: the list of the tokens that are accepted by the validators for fees
  • stakeCurrency: the staking token of the chain. Remove this item if your chain does not support native staking (e.g. your chain uses replicated security) or does not have a staking token.
  • coinGeckoId(optional): the active API ID for Keplr to get the price from CoinGecko
  • features: any other features that are additionally supported by the chain
    • cosmwasm: supports CosmWasm smart contracts
    • secretwasm: supports WASM smart contracts of Secret Network
    • eth-address-gen: supports EVM account generation
    • eth-key-sign: supports EVM signatures
    • axelar-evm-bridge: supports EVM bridge provided by Axelar Network
    • osmosis-txfees: supports paying fees in other currencies on Osmosis

Demo

Following these steps to run project:

1. Clone the Repository

Clone this repository:

git clone https://github.com/tonytrandevv/add-Nilchain-to-Keplr.git
cd add-Nilchain-to-Keplr

2. Install Dependencies

Install the necessary dependencies:

npm install

3. Start the Development Server

Start the development server to run the demo:

npm run start

4. Open the Web App

Open any kinds of browser and navigate to http://localhost:3000

5. Interact with the Demo

  • Click the "Add NilChain to Keplr" button to prompt Keplr to add the NilChain Testnet. In case your browser have not installed the Keplr Wallet, the website will notice you to install.
  • After adding the chain, the app will fetch and show your NIL balance.

Contribution

  • Open contributions for any issues are welcome!

Licence

This project is licensed under the MIT License - see the MIT file for details.

MIT License

Copyright (c) 2024 tonytrandevv

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contact

For any questions or support, please contact [email protected].