0.0.2 • Published 4 years ago

@ula-aca/webhook-relay-event-router v0.0.2

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

Universal Ledger Agent - Aries Cloudagent Webhook Relay Event Router

npm (scoped)

This plugin creates a WebSocket connection with a Aries Cloudagent Webhook Relay and will emit received events to the Universal Ledger Agent. You should always use this package in combination with one of the event handlers in @ula-aca/issue-credential, @ula-aca/present-proof or @ula-aca/connection

Usage

As mentioned above you should always use this plugin in combination with one of the event handlers mentioned above. See the documentation of the event handler your want to use for specific usage documentation.

You must have

import { EventHandler } from 'universal-ledger-agent'
import { WebhookRelayEventRouter } from '@ula-aca/webhook-relay-event-router'

const eventRouter = new WebhookRelayEventRouter({
  url: 'wss://whr-url.com/ws',
  apiKey: 'api-key',
  fastForward: false
})

const eventHandler = new EventHandler([eventRouter])