haedal-farming

Installation
SKILL.md

Haedal Farming

通过 curl 直接调用 Farming 接口,无需脚本。

Haedal 通用约定(farming / hasui / hawal / vehaedal 均适用):Base URL 为 https://skillsapi.haedal.xyz/api/v1/,路径 /{module}/{method},POST JSON body,不传任何 object(如 poolObj、coinObj 等),只传地址与 amount 等业务参数;200 返回 {"txBytes":"..."},非 200 返回 {"msg":"错误原因"}

数量参数均为人类可读:所有与数量相关的参数(如 amount)直接传人类可读的数值即可,无需手动乘 decimal。例如数量是 20 个就传 20,不要传 20000000000 等带精度的值。

Base URL

https://skillsapi.haedal.xyz/api/v1/farming

请求体(无 object)

方法 必要字段
add_deposit signerAddress, coinType, amount
deposit signerAddress, coinType, amount
harvest signerAddress, depositCoinType, rewardCoinType
withdraw signerAddress, coinType, amount

curl 示例

deposit

curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/farming/deposit" \
  -H "Content-Type: application/json" \
  -d '{"signerAddress":"0xYOUR_ADDRESS","coinType":"0x2::sui::SUI","amount":"20"}'

add_deposit

curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/farming/add_deposit" \
  -H "Content-Type: application/json" \
  -d '{"signerAddress":"0xYOUR_ADDRESS","coinType":"0x2::sui::SUI","amount":"20"}'

harvest

curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/farming/harvest" \
  -H "Content-Type: application/json" \
  -d '{"signerAddress":"0xYOUR_ADDRESS","depositCoinType":"0x2::sui::SUI","rewardCoinType":"0x2::sui::SUI"}'

withdraw

curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/farming/withdraw" \
  -H "Content-Type: application/json" \
  -d '{"signerAddress":"0xYOUR_ADDRESS","coinType":"0x2::sui::SUI","amount":"20"}'

响应

  • 200:响应体 {"txBytes":"<base64>"},用 jq -r '.txBytes' 取出。
  • 非 200:响应体含 msg,用 jq -r '.msg' 取出错误原因返回用户。
Related skills

More from haedallsd/haedal-skill

Installs
2
First Seen
Mar 13, 2026