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
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
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: