1.0.11 • Published 11 months ago

@diamondhh/verify v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

About Verify

Verify allows you to verify whether users own an NFT with one line of Javascript. It automatically handles connecting their wallet, signing a nonce and checking for ownership of NFTs under a specified contract.

You can also add unlockable content, which can only be accessed if they own a valid NFT. Unlockable content supports videos, images, digital downloads, and even allows you to build completely custom integrations with Webhooks.

It works seamlessly across Ethereum, Polygon and Solana, with more chains under active development. You can use the results returned directly on the frontend, and/or validate the signature on the backend to grant access to gated content.

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Install with NPM

  1. Get a free API Key at https://diamondhandshotel.com/verify
  2. Install the SDK

    npm install --save @diamondhh/verify
  3. Initialize the SDK with your public API key

    import VerifySdk from '@diamondhh/verify';
    // If you're only using a single chain you can also import a chain specific version
    // import VerifySdk from '@diamondhh/verify/ethereum'
    const verify = new VerifySdk('pk_YOUR_API_KEY');

Install with

  1. Get a free API Key at https://diamondhandshotel.com/verify
  2. Add the script tag before your closing body tag

    <script src="https://unpkg.com/@diamondhh/verify/dist/verify.umd.js"></script>
  3. Initialize the SDK with your public API key

    var verify = new VerifySdk('pk_YOUR_API_KEY');

Usage

Start a verification attempt by calling verify.nft() with a configuration object for the contract. This returns a promise which will resolve on successful attempt (no errors), or reject if the user closed the connection dialog or refused the wallet connection.

await verify.nft({
  chain: 'ETH',
  contract: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'
})

You can pass additional arguments to customise the connection window, link to marketplace listings and request access to unlockable content.

For more examples, please refer to the Documentation

Roadmap

  • Ethereum ERC721 support
  • Polygon ERC721 support
  • Solana Metaplex support
  • Ethereum ERC1155 support (WIP)
  • Polygon ERC1155 support (WIP)
  • Solana SPL Token support (WIP)

See the open issues for a full list of proposed features (and known issues).

Contributing

This repository contains only prebuilt libraries for the Verify SDK, and the source is not available at this time (though we have plans to release it!). As such, we're not accepting code contributions.

If you have a suggestion that would make Verify better or a bug report (excluding security issues) please open an issue.

If you've identified a security issue or bug please send us the details confidentially via our website at https://diamondhandshotel.com/contact by selecting "Report a security issue" in the form.

Don't forget to give the project a star if you like it! Thanks again!

License

Distributed under the ISC License. See LICENSE.txt for more information.

Contact

Diamond Hands Hotel - @DiamondHH - frontdesk@diamondhandshotel.com

Project Link: https://github.com/DiamondHandsHotel/verify

Acknowledgments

1.0.9

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.8

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago