Skip to content

navdiir/MAMExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAMExample

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

Installation

Clone this repository and then execute

npm i

Getting Started

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

Fetching Data

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

About

An example of sending data with MAM to tangle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published