Receiving notifications via Neo Cast Delivery Nodes is a versatile solution for enabling Web3 Neo Cast notifications in various apps, including mobile, desktop, or extensions. These nodes facilitate web3 to web2 bridging, allowing any platform, whether centralized or decentralized, to receive communications from Neo Cast storage nodes, which validate and index all communications tied to users' wallet addresses and multi-chain identities. Below are the steps to get started with the Delivery Node Module:
Prerequisites:
MYSQL (Version >= 5.7)
Redis (Version >= 6.0)
Docker (For local setup)
Google FCM (Firebase Cloud Messaging) Account Setup
Refer to the env sample file. Update the MYSQL DB credentials and Redis URL. The remaining configuration can be left as is. If you use docker-compose for the local setup, you can leave the MYSQL DB and Redis config as they are.
Host MYSQL and Redis separately and add their credentials in the .env file.
Step 4: FCM Project Setup
Refer to the Firebase Cloud Messaging documentation to create an FCM project. Create a firebase-adminsdk.json file in the root folder and add the FCM JSON to this file.
Step 5: Build the Delivery Node Project
Navigate to the push-delivery-node directory and install dependencies.
Step 6: Start the Delivery Node Project
You can start the server using the following command:
Step 7: Device Registration
An endpoint is hosted as part of the Delivery Node Project, which can be used for Device Registration. This endpoint allows you to create a mapping between a wallet address and a device token to which messages need to be delivered.
Replace <delivery_node_url> with the base URL of the Delivery Node you have hosted. Here's a curl request example to register a device:
This API call registers a device associated with a specific wallet address, allowing messages to be delivered to the registered device.