mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-04-29 21:36:49 +08:00
committed by
Matthew Little
parent
338754b16f
commit
67b79e64f7
@@ -27,7 +27,8 @@ Here is an example code that connects with the WebSocket server and subscribes t
|
||||
```js
|
||||
import { connectWebSocketClient } from '@stacks/blockchain-api-client';
|
||||
|
||||
const client = await connectWebSocketClient('ws://stacks-node-api.blockstack.org/');
|
||||
// for mainnet, replace with ws://stacks-node-api.testnet.stacks.co/
|
||||
const client = await connectWebSocketClient('ws://stacks-node-api.mainnet.stacks.co/');
|
||||
|
||||
const sub = await client.subscribeAddressTransactions('ST3GQB6WGCWKDNFNPSQRV8DY93JN06XPZ2ZE9EVMA', event =>
|
||||
console.log(event);
|
||||
|
||||
Reference in New Issue
Block a user