The Connectifi SDK contains types and helpers to make integrating Connectifi a breeze.
- Delivery hooks types and helper utilities
- Receptor API - types and a simple agent to make calling receptor endpoints a snap
To get started, simply install the module into your application:
npm install @connectifi/sdk
To use the receptor helpers, start out by creating the receptor agent
import { createReceptorAgent } from '@connectifi/sdk';
const interopHost = '<YOUR HOST HERE>';
const agent = createReceptorAgent({ interopHost });
To broadcast an instrument to an app/user, you provide an API key (JWT) and an "on behalf of" user
...
const token = '<YOUR API JWT HERE>';
const from = '<USER EMAIL HERE>';
agent.broadcast(token, from, { type: 'fdc3.instrument', id: { ticker: 'MSFT' } })