An example of sending data with MAM to tangle
This example is made in JavaScript, be sure that you have NodeJS and NPM for used this repository
Clone this repository and then execute
npm i
After you've successfully installed you can execute index for a simple user experience
node index.js [sec] [mode]
sec: time for loop in seconds
mode: can be 3 (Public: 1, Private: 2, Restricted: 3)
i.e. (Send data in private mode each 15 seconds)
node index.js 15 2
If you want to fetch your data that is on tangle you can run respective file for fetch inside the fetchData folder
node fetchPublic.js [root]
root: root since you want to fetch
i.e. (for our last example sending data in private mode each 15 seconds)
node fetchPrivate.js QUYVAZAGSLKPBSXFUWGHGBSTJUDR9KXHPFGF9WXMYFHYULSHEFYXAWDYRHKNSA9GVRFWKALVCUSETQDDJ
Also you can go to MAM-explorer and start fetching the data