The following examples are available.
Demonstrates a simple publish and fetch of ascii text data using MAM v0, the channel state is stored in channelState.json
between each execution.
A random seed will be generated, which is then stored as part of the state file, so subsequent executions will add to the same channel.
See ./simple/index.js for more details.
Demonstrates a simple publish and fetch of json data using MAM v0, the channel state is stored in channelState.json
between each execution.
A random seed will be generated, which is then stored as part of the state file, so subsequent executions will add to the same channel.
See ./simple-json/index.js for more details.
Demonstrates a background listener which monitors the channel from the simple example for new messages.
Reads the channelState.json
from the simple example, so you will need to run that first.
See ./listen/index.js for more details.
This example makes use of the variant of the library which built for the browser index-browser.js
, you need to include the @iota/iota.js
and big-integer
packages externally.
Demonstrates a simple publish and fetch of ascii text data using MAM v0, the channel state is stored in window.localStorage
between each execution.
A random seed will be generated, which is then stored as part of the state file, so subsequent executions will add to the same channel.
See ./browser/index.html for more details.
Demonstrates how to wrap the mam lib behind an API.
See ./api/index.js for more details.