Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1.25 KB

File metadata and controls

30 lines (20 loc) · 1.25 KB

Transports

An agent needs an inbound and outbound transport. At this current time, the outbound transport is already built-in and can be used. The inbound transport is a tad bit more complicated and has to be added manually.

Outbound Transport

Outbound transports allow you to send messages to other agents. Currently, only a single outbound transport can be used. See Issue 268: Add support for multiple transports for progress on supporting multiple outbound transports.

import { HttpOutboundTransport, WsOutboundTransport, Agent } from '@aries-framework/core'

const agent = new Agent({
  /* config */
})

// Use HTTP as outbound transport
const httpOutboundTransport = new HttpOutboundTransport()
agent.registerOutboundTransport(httpOutboundTransport)

// Or use WebSocket instead
const wsOutboundTransport = new WsOutboundTransport()
agent.registerOutboundTransport(wsOutboundTransport)

Inbound Transport

TODO: