@goat-sdk/dpsn-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Dpsn Plugin for Goat SDK

This plugin enables goat-agents to connect , subscribe to, and interact with data streams available on the DPSN Data Streams Store.

Agents can leverage this plugin to consume real-time data for decision-making, reacting to events, or integrating external information feeds.

To provide personalized data streams for your agents, you can create and publish data into your own DPSN topics using the dpsn-client for node.

For more information, visit:

✨ Features

  • Seamless Integration: Connect your GOAT agents to DPSN's decentralized pub/sub network
  • Real-time Data Processing: Subscribe to and process real-time data streams in your agents
  • Topic Management: Subscribe and unsubscribe to DPSN topics programmatically or through llm queries
  • Event-based Architecture: Use event emitters to handle incoming messages efficiently

Installation

npm install @goat-sdk/dpsn-plugin
yarn add @goat-sdk/dpsn-plugin
pnpm add @goat-sdk/dpsn-plugin

Usage

import { dpsnplugin } from '@goat-sdk/dpsn-plugin';
const dpsn_plugin=dpsnplugin({
        DPSN_URL: process.env.DPSN_URL,
        EVM_WALLET_PVT_KEY: process.env.EVM_WALLET_PVT_KEY
    });
    //Event listener setup to listen to messages on subscribing to dpsn topics.
     const DpsnDataStreamHandler=dpsn_plugin.DpsnDataStream;
     DpsnDataStreamHandler.on("message", (message: unknown) => {
        console.log("Received message from DPSN:", message);
        // Add your message processing logic here
    });
const tools = await getOnChainTools({
    wallet: // ...
    plugins: [
      dpsn_plugin
    ]
});

Tools

  • Subscribe to a dpsn topic
  • Unsubscribe to a dpsn topic


Readme

Keywords

Package Sidebar

Install

npm i @goat-sdk/dpsn-plugin

Homepage

ohmygoat.dev

Weekly Downloads

13

Version

0.1.1

License

MIT

Unpacked Size

21 kB

Total Files

32

Last publish

Collaborators

  • aigustin
  • mpaella