Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConversationV1

ConversationV1 allows you to view, stream, and send messages to/from a peer address

Hierarchy

  • ConversationV1

Implements

Index

Constructors

Properties

context: undefined = undefined

Optional field containing the conversationId and metadata for V2 conversations. Will always be undefined on V1 conversations

conversationVersion: "v1" = ...
createdAt: Date

Timestamp the conversation was created at

peerAddress: string

The wallet address of the other party in the conversation

Accessors

  • get clientAddress(): string
  • get ephemeralTopic(): string
  • get topic(): string

Methods

  • prepareMessage(content: any, options?: SendOptions): Promise<PreparedMessage>
  • processEnvelope(__namedParameters: Envelope): Promise<MessageV1>
  • Return a Stream of new ephemeral messages from this conversation's ephemeral topic.

    Stream instances are async generators and can be used in for await statements.

    for await (const message of await conversation.streamEphemeral()) {
    console.log(message.content)
    }

    Parameters

    • Optional onConnectionLost: OnConnectionLostCallback

    Returns Promise<Stream<DecodedMessage>>

Generated using TypeDoc