Forget a message

Creates a FORGET Message referencing Messages where the content and item_content will be emptied.

Returns

A forget message object that is being sent to the network.

Usage & Example

import { forget } from 'aleph-sdk-ts'
import { ItemType } from "aleph-sdk-ts/messages/message"

(async() => {
  await forget.publish({
    account: account,
    channel: 'TEST',
    storageEngine: ItemType.inline,
    inlineRequested: true,
    APIServer: 'https://api2.aleph.im',
    hashes: ['<item_hash_here>']
  })
})()

Required parameters

account - Account

Account submitting the forget message. Should either be:

  • The sender of the original message to forget OR the sender of the VM that created the message.

  • The address the original message was attributed to

channel - string

Channel of the message. Ideally, an application would decide and use one channel.

storageEngine - ItemType

The storage engine to use when storing the object (IPFS or Aleph)

inlineRequested - boolean

Will the message be inlined ?

APIServer - string

The API server endpoint used to carry the request to the Aleph's network.

hashes - array of strings

A list of original message item hashes to forget. Multiple can be passed at once.

Optional parameters

  • reason - string Optional description of why the messages should be forgotten.

Last updated