- Demo (coming soon)
- Description
- Documentation
- Requirements
- Installation
- Usage
- Customization
- ToDo
- Tests
- License
Developer platform to easily create, deliver & manage any kind of token utility.
This library is used to quickly and efficiently integrate the Whal3s developer platform into your existing tech stack. It is written in TypeScript, but thanks to UMD build it also offers support for vanilla JS or frameworks like React or Angular.
See the whal3s.js
API docs for Guides, Examples and API endpoint definitions.
To use this library, you need an account on app.whal3s.xyz, as well as a utility ID. You can get this by creating a utility via the platform.
Install the whal3s.js package with NPM:
npm install @whal3s/whal3s.js
const whal3s = new Whal3s();
To use your NFT validation utility, you need to initialize the utility with your utility ID. You can get your utility ID from the platform or the API.
But be careful. Whal3s utilities are working in steps. Read the documentation carefully.
const utility = await whal3s.createValidationUtility(id)
await utility.connectWallet()
await utility.sign()
utility.tokenId = tokenId
await utility.reserveEngagement()
await utility.storeEngagement({JSON_METADATA})
Whal3s is developed in partnership with Blocknatives' web3-onboard. You can customize the wallet connection modal by passing initOptions to the Whal3s constructor.
const whal3s = new Whal3s({
accountCenter: {
//...
}
})
Find all available options here.
## ToDo
- [x] Wallet connection
- [x] NFT Ownership Validation Utility aka token gating
- [x] Demo page
- [ ] Write tests
- [x] Customize wallet-connect-functionallity
- [x] GitHub hooks
- [x] Deploy to npm
## Tests
The whal3s.js project comes with a demo to test and
[Unit Tests](https://en.wikipedia.org/wiki/Unit_testing).
There are two different ways to run the tests:
- Start demo by using `npm run serve`
- run `npm test` in the Terminal in the root path of the repository package.
The first one let you test the user experience in the browser, the second one tests unit tests.
## License
The JavaScript Templates script is released under the
[MIT license](https://opensource.org/licenses/MIT).