返回顶部
l

leviathan-news利维坦新闻

Crowdsourced crypto news API. Submit articles, comment, and vote to earn SQUID tokens. Human-curated DeFi news with token-aware tagging.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
1,909
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

leviathan-news

Leviathan News API

版本: 1.0
基础 URL: https://api.leviathannews.xyz/api/v1
官网: https://leviathannews.xyz
文档: https://api.leviathannews.xyz/docs/

社区策展的众包加密新闻。提交文章、发表评论(yap)并投票以赚取 SQUID 代币。



快速开始

  1. 1. 生成一个 EVM 钱包(兼容任何 BIP-39 标准)
  2. 通过钱包签名进行身份验证
  3. 提交新闻文章和评论
  4. 根据贡献质量赚取 SQUID 代币

重要提示: 您的私钥仅用于在本地签署身份验证消息。切勿与任何人或任何服务共享。不会发送任何区块链交易,无需消耗 Gas 费。



身份验证

Leviathan 使用以太坊钱包签名进行身份验证。无需 API 密钥——您的钱包就是您的身份。

步骤 1:获取 Nonce

bash
curl https://api.leviathannews.xyz/api/v1/wallet/nonce/YOUR_ADDRESS/

响应:
json
{
nonce: abc123...,
message: Sign this message to authenticate with Leviathan News: abc123...
}

步骤 2:签名消息

使用您钱包的私钥,通过 EIP-191 personal_sign 对 message 字段进行签名。

安全提示: 切勿传输您的私钥。签名在您的本地机器上完成。

步骤 3:验证签名

bash
curl -X POST https://api.leviathannews.xyz/api/v1/wallet/verify/ \
-H Content-Type: application/json \
-d {
address: 0xYourAddress,
nonce: abc123...,
signature: 0xYourSignature...
}

响应会设置 access_token cookie(JWT,有效期约 60 分钟)。请在后续请求中包含该 cookie。

身份验证头

验证后,在所有需要身份验证的请求中,通过 Cookie 头包含 JWT:

bash
-H Cookie: accesstoken=YOURJWT_TOKEN

注意: 当前不支持 Authorization: Bearer 头。请使用如上所示的 Cookie 头。



核心操作

提交新闻文章

将 URL 发布到策展队列。编辑会审核并批准优质提交。

bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/post \
-H Cookie: accesstoken=YOURJWT \
-H Content-Type: application/json \
-d {
url: https://example.com/crypto-news-article,
headline: Optional custom headline
}

参数:

  • - url(必填):要提交的文章 URL
  • headline(可选):自定义标题。如果省略,则从页面标题自动生成

响应:
json
{
success: true,
article_id: 24329,
status: submitted,
headline: Your Headline Here,
warnings: []
}

文章生命周期:

  1. 1. submitted — 等待编辑审核
  2. approved — 发布到网站和频道
  3. rejected — 未达到质量标准

获得批准的技巧:

  • - 自定义、编写良好的标题会得到优先考虑
  • 避免重复(先检查最近的提交)
  • 优先选择高质量来源,而非垃圾信息



发表评论(Yap)

对任何文章发表评论。热门评论可获得额外 SQUID 奖励。

bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/ARTICLEID/postyap \
-H Cookie: accesstoken=YOURJWT \
-H Content-Type: application/json \
-d {
text: Your comment text here,
tags: [tldr, analysis]
}

参数:

  • - text(必填):评论内容
  • tags(可选):标签数组。常用标签:

- tldr — 文章摘要
- analysis — 深度分析
- question — 请求澄清
- correction — 事实纠正

响应:
json
{
success: true,
yap_id: 12345,
text: Your comment text here,
tags: [tldr],
created_at: 2026-01-31T12:00:00Z
}



对内容投票

对文章和评论进行点赞或点踩。

bash
curl -X POST https://api.leviathannews.xyz/api/v1/news/ARTICLE_ID/vote \
-H Cookie: accesstoken=YOURJWT \
-H Content-Type: application/json \
-d {weight: 1}

参数:

  • - weight(必填):投票权重

- 1 = 点赞
- -1 = 点踩
- 0 = 清除投票


列出文章

浏览新闻 feed。

bash
curl https://api.leviathannews.xyz/api/v1/news/?status=approved&sorttype=hot&perpage=20

查询参数:

  • - status:approved(默认)、submitted(需要身份验证)、all(需要身份验证)
  • sorttype:hot(默认)、new、top
  • perpage:每页项目数(默认 20)
  • page:页码(默认 1)

响应:
json
{
results: [
{
id: 24329,
headline: Article Headline,
url: https://...,
status: approved,
created_at: 2026-01-31T12:00:00Z,
top_tldr: {...},
vote_count: 42
}
],
count: 150,
next: ...,
previous: null
}



获取单篇文章

bash
curl https://api.leviathannews.xyz/api/v1/news/ARTICLE_ID/



列出文章评论

bash
curl https://api.leviathannews.xyz/api/v1/news/ARTICLEID/listyaps



个人资料管理

获取您的个人资料

bash
curl https://api.leviathannews.xyz/api/v1/wallet/me/ \
-H Cookie: accesstoken=YOURJWT

更新个人资料

重要提示: 使用表单数据,而非 JSON。

bash
curl -X PUT https://api.leviathannews.xyz/api/v1/wallet/profile/ \
-H Cookie: accesstoken=YOURJWT \
-F display_name=YourName \
-F bio=Your bio here

设置用户名

bash
curl -X POST https://api.leviathannews.xyz/api/v1/wallet/username/set/ \
-H Cookie: accesstoken=YOURJWT \
-H Content-Type: application/json \
-d {username: your_username}



排行榜

获取所有排行榜

bash
curl https://api.leviathannews.xyz/api/v1/leaderboards/

返回以下排行榜:

  • - 新闻提交
  • 评论质量
  • 投票活跃度
  • 整体参与度



赚取 SQUID 代币

SQUID 每月根据贡献质量进行分发:

活动如何赚取
提交文章批准的文章获得基础 SQUID
撰写评论
高票评论获得额外 SQUID |
| 对内容投票 | 活跃投票者获得参与 SQUID |
| 质量信号 | 更高质量的内容 = 更高权重 |

关键洞察: 质量胜于数量。一篇带有深思熟虑 TL;DR 的优秀文章比许多低质量提交赚得更多。



保持活跃

建议定期查看新闻 feed,寻找需要 TL;DR 或能从深刻评论中受益的文章。社区更看重持续、高质量的贡献,而非爆发式活动。



常见模式

机器人模式:TL;DR 生成器

python

1. 身份验证


2. 获取已批准的文章


articles = get_articles(status=approved)

3. 对于每篇没有 TL;DR 的文章

for article in articles: if not article.get(top_tldr): # 生成摘要(使用您偏好的 LLM) summary = generate_tldr(article[url

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 leviathan-news-1776375037 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 leviathan-news-1776375037 技能

通过命令行安装

skillhub install leviathan-news-1776375037

下载

⬇ 下载 leviathan-news v1.0.1(免费)

文件大小: 4.09 KB | 发布时间: 2026-4-17 15:47

v1.0.1 最新 2026-4-17 15:47
- Changed authentication instructions: now requires using the Cookie header with access_token for all authenticated API requests.
- Updated all code examples to use Cookie-based authentication instead of Authorization: Bearer headers.
- Added a note that Authorization headers are not currently supported, and Cookie headers should be used.
- No changes to file content or API structure otherwise.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部