dat-ephemeral-ext-msg
Methods for implementing ephemeral messages as extension messages over Dat. Read the spec here.
const DatEphemeralExtMsg = var datEphemeralExtMsg = /** * Step 1. Register the 'ephemeral' extension in the protocol streams */var mySwarm = /** * Step 2. Wire up each dat you create */datEphemeralExtMsg // can pass a ddatabase, hyperdb, or dwebfs reference as the dat// datEphemeralExtMsg.unwatchDat(dat) when done /** * Step 3. Listen to events */datEphemeralExtMsgdatEphemeralExtMsg /** * Step 4. Use the API */datEphemeralExtMsgdatEphemeralExtMsgdatEphemeralExtMsg