Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (22 loc) · 1.68 KB

README.md

File metadata and controls

43 lines (22 loc) · 1.68 KB

IOTA MAM v0

The following examples are available.

Simple

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.

Simple with JSON

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.

Listener

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.

Browser

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.

API

Demonstrates how to wrap the mam lib behind an API.

See ./api/index.js for more details.