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
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])