Verify - Javascript SDK
Securely attach photos, videos, files and more to your NFTs.
Install in minutes, on any website, without changes to your smart contract.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
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
-
Get a free API Key at https://diamondhandshotel.com/verify
-
Install the SDK
npm install --save @diamondhh/verify
-
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 <script>
-
Get a free API Key at https://diamondhandshotel.com/verify
-
Add the script tag before your closing body tag
<script src="https://unpkg.com/@diamondhh/verify/dist/verify.umd.js"></script>
-
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
- [x] Ethereum ERC721 support
- [x] Polygon ERC721 support
- [x] 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