Last updated
Last updated
A Node.js Bot SDK for SendingNetwork.
Start by installing the SDK as a dependency in your Node.js project:
Create a file named bot.creds.json
and provide the following information:
You can configure the NODE_URL
with https://portal0101.sending.network to connect to a public Edge Node.
Make sure to replace YOUR_WALLET_ADDRESS
, YOUR_PRIVATE_KEY
and YOUR_DEV_KEY
with the actual value.
SDNClient
After setting up the configuration file, you can create an instance of the SDNClient
class. This will allow you to interact with the SendingNetwork API.
Once you have created an instance of SDNClient
and started syncing with the SendingNetwork server, you can use the SDK to perform various actions. Here are a few examples:
Create a new room
Invite a user to a room
Send a message
For more examples and detailed use cases, you can refer to the examples
directory in the SDK repository.
You will need a developer key to access the Edge Network. For further insight into the mechanism and to request a developer key, please consult the provided guide .