Notifi SDK

Typescript based SDK for React and NodeJS projects.

Usage Scenarios

Direct Push

This type of interaction assumes you have a server already running and want to push a notification to a member of your dapp. In this scenario, we first require the dapp to directly tell Notifi on our Discord SDK channel that they want to leverage our SDK. Notifi will create a tenancy that is owned by the dapp and transfer a SID/Secret pair. For now this is manual, but we will have a self-service admin panel for dapps to use in the future.

For users to sign up for notifications, the dapp will use our React SDK to logInFromDapp and then create/modify notifications. From here, the DApp SVC can send a message to the user’s wallet address, where Notifi will take care of any special filtering and routing the user wanted to do. Examples coming soon!

Direct Push Diagram

Monitor and Trigger

In this scenario, Notifi can monitor the blockchain and detect important events that users can subscribe to. This is how Notifi implements DAO proposal notifications today. If you have a dapp that you’d like Notifi to monitor, please join our Discord server and tell us about it! We’ll be open sourcing our plugins for DAO proposals in the future to help make this more self service. This can seem like a bit of magic, so feel free to ask any questions in our Discord#SDK.

Monitoring Diagram

Built With ❤️ and …

Getting Started with Direct Push

  • Join our Notifi Discord
  • Message our SDK channel for access
  • Install our npm package in your React app
  • Create UI for your users to register for notifications
  • Use our GraphQL API from your service to send messages to Notifi (NodeJS SDK coming soon!)

Getting Started with Notifi Monitoring

Note: For Notifi’s monitoring scenario, we will be releasing our Notifi Monitoring code in the future so you can simply template and/or extend off of existing patterns

Steps to deploy canary (for local development of SDK and deploying to npm)

npx lerna exec — npx rimraf dist

npx lerna exec — npx rimraf node_modules

npx lerna bootstrap

npx lerna run build

npx lerna publish –canary

Regenerate docs

npm run docs

Advanced

We understand that not all scenarios can be solved with the current state of the SDK. When adding SDK features, we’d like to ensure we’re building exactly what developers want. If you need to break out of the SDK features for more advanced interaction with Notifi, please see our Notifi GraphQL API that you can consume alongside the SDK.

GitHub

View Github