check-whitelist
TypeScript icon, indicating that this package has built-in type declarations

1.1.9 • Public • Published

check-whitelist

npm version npm downloads

The "Whitelist SDK" package provides a simple solution for verifying whether a given Ethereum address is whitelisted. It offers features for adding and removing addresses from a whitelist and checking whether an address is included. By installing the package and using its functions, access control can be simplified and made more effective. Further research or consultation with experienced developers may help in utilizing this package.

Getting an API Key

To use this package, you'll need to obtain an API key from the WhitelistSDK website. Follow these steps to get an API key:

  1. Go to https://whitelistwizard.xyz in your web browser.
  2. Sign up or log in to your account.
  3. Once you're logged in, you should see your API key on the main dashboard.

Adding Whitelisted Addresses

To add whitelisted addresses, follow these steps:

  1. Go to https://whitelistwizard.xyz in your web browser.
  2. Sign up or log in to your account.
  3. Enter the Ethereum addresses that you want to whitelist under "Add whitelist addresses" field and click the "Add Addresses" button.
  4. Congratulations, you have successfully added your whitelisted addresses!
  5. Please note that only the addresses that you have added will be able to access your app.

Installation

You can install this package using npm:

npm install check-whitelist or yarn add check-whitelist

Usage

To use this package, first import the useWhitelist function:

  const apiKey = "YOUR_API_KEY_GENERATED_BY_WHITELISTWIZARD";
  const client = new CheckWhitelistClient(apiKey);

Then, call the useWhitelist function with an address and an API key:

const isWhitelisted = await client.isWhitelisted(address);

if (isWhitelisted) {
  console.log('The address is whitelisted!');
} else {
  console.log('The address is not whitelisted.');
} 

API

isWhitelisted(address: string): Promise<boolean>

Checks whether the given address is whitelisted using the API key specified by apiKey. Returns a boolean indicating whether the address is whitelisted.

Contributing

If you find a bug or have a feature request, please open an issue on GitHub. Pull requests are also welcome!

About the Author

Untitled labs empowers businesses and individuals to participate in the decentralized economy with user-friendly Web3 products and services.

Untitled Labs : Twitter

Readme

Keywords

none

Package Sidebar

Install

npm i check-whitelist

Weekly Downloads

12

Version

1.1.9

License

ISC

Unpacked Size

13.9 kB

Total Files

13

Last publish

Collaborators

  • ch1rag.eth