From 758171a27c9d5f690ef355961230845efbe94ff9 Mon Sep 17 00:00:00 2001 From: mirai Date: Fri, 2 Dec 2022 08:16:47 +0300 Subject: [PATCH] Updated requirements.txt Updated ws_talk.py --- requirements.txt | 3 ++- ws_talk.py | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3c7f3a1..7f87eca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,5 @@ requests rsa cryptography colorama -pydantic \ No newline at end of file +pydantic +websocket \ No newline at end of file diff --git a/ws_talk.py b/ws_talk.py index fc75f01..6f6b01f 100644 --- a/ws_talk.py +++ b/ws_talk.py @@ -1,2 +1,8 @@ -import requests +import json +from websocket import create_connection +ws = create_connection("wss://ws.dogechain.info/inv") +ws.send(json.dumps({"op":"addr_sub", "addr":"dogecoin_address"})) +result = ws.recv() +print (result) +ws.close() \ No newline at end of file