chinesemusk commited on
Commit
79b2eb6
·
verified ·
1 Parent(s): c324914

Create tools.py

Browse files
Files changed (1) hide show
  1. tools.py +38 -0
tools.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+
3
+ def fetch_website(url):
4
+ """
5
+ Fetch and return the first 1000 characters of the given URL.
6
+ """
7
+ try:
8
+ response = requests.get(url, timeout=5)
9
+ response.raise_for_status()
10
+ return response.text[:1000] + "..."
11
+ except Exception as e:
12
+ return f"Error fetching {url}: {e}"
13
+
14
+ def list_wallets():
15
+ """
16
+ Return a curated list of popular Stellar wallets.
17
+ """
18
+ return """
19
+ ✅ **Popular Stellar wallets:**
20
+ - [Lobstr](https://lobstr.co/)
21
+ - [Solar Wallet](https://solarwallet.io/)
22
+ - [StellarTerm](https://stellarterm.com/)
23
+ - [Albedo](https://albedo.link/)
24
+
25
+ Always do your own research before using any wallet!
26
+ """
27
+
28
+ def get_docs_links():
29
+ """
30
+ Return quick links to key Stellar docs.
31
+ """
32
+ return """
33
+ 📚 **Key Stellar resources:**
34
+ - [Official site](https://stellar.org)
35
+ - [Horizon API](https://developers.stellar.org/docs/fundamentals-and-concepts/horizon/)
36
+ - [Soroban smart contracts](https://soroban.stellar.org/docs)
37
+ - [GitHub](https://github.com/stellar)
38
+ """