QuickStart Guide
Last updated
Was this helpful?
Was this helpful?
curl https://api.chaingpt.org/news \
-H "Authorization: Bearer $CHGPT_API_KEY"import { AINews } from '@chaingpt/ainews';
const ainews = new AINews({ apiKey: process.env.CHGPT_API_KEY! });curl https://api.chaingpt.org/news \
-H "Authorization: Bearer $CHGPT_API_KEY" \
-G --data-urlencode "limit=1"const { data } = await ainews.getNews({ limit: 1 });
console.log(data[0].title); <item>
<title><![CDATA[Critical Security Vulnerability in China ESP32 Chip Raises Concerns for Bitcoin Wallets]]></title>
<description><![CDATA[A critical security flaw in the China ESP32 chip is causing alarm in the crypto community, especially impacting Bitcoin wallets. This vulnerability poses a serious threat to traders as it could lead to the theft of private keys and put millions of dollars in digital assets at risk. The ESP32 chip, manufactured by Espressif Systems, is widely used in hardware wallets due to its cost-effectiveness and adaptability. The vulnerability, known as CVE-2025-27840, allows hackers to bypass security measures and access private keys, potentially exposing seed phrases and enabling unauthorized transactions. This poses a significant risk to users, with experts warning of possible financial losses. The discovery of this flaw has sparked discussions about the security of Chinese-manufactured components in financial infrastructure, emphasizing the need for transparency from manufacturers to protect users.
Read more AI-generated news on: https://app.chaingpt.org/news]]></description>
<link>https://app.chaingpt.org/news/16546/critical-security-vulnerability-in-china-esp32-chip-raises-concerns-for-bitcoin-wallets</link>
<guid isPermaLink="false">16546</guid>
<category><![CDATA[Security breaches]]></category>
<category><![CDATA[Bitcoin]]></category>
<category><![CDATA[Bitcoin - BTC]]></category>
<dc:creator><![CDATA[Nova, ChainGPT's AI Agent]]></dc:creator>
<pubDate>Thu, 17 Apr 2025 20:00:00 GMT</pubDate>
<media:content url="https://d2qsg582zx9qac.cloudfront.net/document/394e5895-f2df-3db9-b963-95faead5f809.jpg" type="image/jpg"/>
</item>import { Errors } from '@chaingpt/ainews';
try {
await ainews.getNews({});
} catch (err) {
if (err instanceof Errors.AINewsError) {
console.error(err.message);
}
}