2.0.0 • Published 2 years ago

@verixyz/message-handler v2.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

verixyz Message Handler

This is a verixyz plugin that coordinates several AbstractMessageHandler implementations to provide a handleMessage method to a verixyz agent.

Classes

AbstractMessageHandler

An abstract class for creating MessageHandler plugins

Properties

  • nextMessageHandler: AbstractMessageHandler

Methods

  • handle(message, context)
  • setNext(messageHandler)

Message

Constructors

  • (constructor)(data) Constructs a new instance of the Message class

Properties

  • createdAt: string
  • credentials: VerifiableCredential []
  • data: any
  • expiresAt: string
  • from: string
  • id: string
  • metaData: IMetaData []
  • presentations: VerifiablePresentation []
  • raw: string
  • replyTo: string[]
  • replyUrl: string
  • threadId: string
  • to: string
  • type: string

Methods

  • addMetaData(meta)
  • getLastMetaData()
  • isValid()

MessageHandler

Agent plugin that provides IMessageHandler methods

Constructors

  • (constructor)(options) Constructs a new instance of the MessageHandler class

Properties

  • methods: IMessageHandler Plugin methods

  • schema: any

Methods

  • handleMessage(args, context) Parses and - optionally saves a message