🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

dpsn-subscribe-unsubscribe-agent

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dpsn-subscribe-unsubscribe-agent

Example agent using the DPSN plugin to subscribe to data streams.

latest
npmnpm
Version
0.0.0
Version published
Maintainers
1
Created
Source
GOAT

Subscribe to DPSN Topics

🚀 Quickstart

This example demonstrates how to use GOAT to get real-time events by subscribing to dspn topics from the DPSN Data Streams Store . This example uses Binance BTC/USDT price tracking data feed from the dpsn streams You can use this example with any other agent framework, chain, and wallet of your choice.

You can use this example with any other agent framework of your choice.

Prerequisites

  • An EVM wallet pvt key used for authentication , no on-chain transactions are invoked.

Setup

  • Clone the repository:
git clone https://github.com/goat-sdk/goat.git
  • Go to the example directory:
cd typescript/examples/by-use-case/dpsn-subscribe
  • Copy the .env.template and populate with your values:
cp .env.template .env
  • OPENAI_API_KEY
  • DPSN_URL
  • EVM_WALLET_PVT_KEY
  • Install dependencies:
pnpm install

Usage

You can select dpsn topics to subscribe to from the DPSN Data Streams Store.

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.

  • Run the plugin and invoke method directly to start consuming message:
pnpm example
  • Run with interactive CLI:
pnpm llm_example

Chat with the agent:

  • Subscribe to topic 0xe14768a6d8798e4390ec4cb8a4c991202c2115a5cd7a6c0a7ababcaf93b4d2d4/BTCUSDT/ticker
  • Unsubscribe to topic 0xe14768a6d8798e4390ec4cb8a4c991202c2115a5cd7a6c0a7ababcaf93b4d2d4/BTCUSDT/ticker

Using in production

In production, developers require advanced wallet setups that utilize smart wallets, which allow them to:

  • Increase security by setting programmable permissions (e.g. limiting fund amounts, restricting contract interactions, and defining required signatures)
  • Maintain regulatory compliance by ensuring agent wallets are non-custodial. This means that:
    • Launchpads, wallet providers, or agent platforms never have access to agents' wallets.
    • Agent platforms do not require money transmitter licenses.

Agent Wallets

Crossmint offers one of the most advanced solutions for agent developers and launchpads: Agent Wallets.

To integrate Agent Wallets with GOAT, check out the following quickstarts:



GOAT

FAQs

Package last updated on 16 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts