Loading...
Loading...
Compare original and translation side by side
amount"amount":"20"amount"amount":"20"validatornode_id0x0node_idreferences/validators.mdnode_idvalidatornode_id0x0node_idreferences/validators.mdnode_idaddress{
"list": [
{
"objectId": "0x...",
"type": "0x...::staking::UnstakeTicket",
"version": "...",
"fields": {
"claim_epoch": "646",
"claim_timestamp_ms": "1737135496590",
"id": { "id": "0x..." },
"st_amount": "1000000000",
"sui_amount": "1045887315",
"unstake_timestamp_ms": "1737085604741"
}
}
]
}objectIdst_amountsui_amountclaim_epochclaim_timestamp_msobjectIdPOST /api/v1/hasui/claim{"address":"0x...","NFTObj":"<objectId from previous step>"}objectIdaddress{
"list": [
{
"objectId": "0x...",
"type": "0x...::staking::UnstakeTicket",
"version": "...",
"fields": {
"claim_epoch": "646",
"claim_timestamp_ms": "1737135496590",
"id": { "id": "0x..." },
"st_amount": "1000000000",
"sui_amount": "1045887315",
"unstake_timestamp_ms": "1737085604741"
}
}
]
}objectIdst_amountsui_amountclaim_epochclaim_timestamp_msobjectIdPOST /api/v1/hasui/claim{"address":"0x...","NFTObj":"<上一步获取的objectId>"}objectIdhttps://skillsapi.haedal.xyz/api/v1/hasuihttps://skillsapi.haedal.xyz/api/v1/hasui| Method | Required fields | Notes |
|---|---|---|
| stake | address, amount, validator | No object field |
| withdraw | address, amount | No object field |
| withdraw_instant | address, amount | No object field |
| claim | address, NFTObj | Requires NFT object ID, see the "Claiming rewards" flow above |
| get_unstake_tickets_list | address | Query the UnstakeTicket list for this address to obtain NFTObj |
| 方法 | 必填字段 | 说明 |
|---|---|---|
| stake | address, amount, validator | 无object字段 |
| withdraw | address, amount | 无object字段 |
| withdraw_instant | address, amount | 无object字段 |
| claim | address, NFTObj | 需要NFT对象ID,详见上方“领取奖励”流程 |
| get_unstake_tickets_list | address | 查询该地址的UnstakeTicket列表以获取NFTObj |
validator0x0references/validators.mdundefinedvalidator0x0references/validators.mdundefined
**withdraw**
```bash
curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hasui/withdraw" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","amount":"100"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hasui/withdraw_instant" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","amount":"100"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hasui/get_unstake_tickets_list" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS"}'{"list":[{"objectId":"...","type":"...","version":"...","fields":{...}}, ...]}objectIdst_amountsui_amountclaim_epochclaim_timestamp_mslist[].objectIdcurl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hasui/claim" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","NFTObj":"0xOBJECT_ID_FROM_LIST"}'
**提取(withdraw)**
```bash
curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hasui/withdraw" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","amount":"100"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hasui/withdraw_instant" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","amount":"100"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hasui/get_unstake_tickets_list" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS"}'{"list":[{"objectId":"...","type":"...","version":"...","fields":{...}}, ...]}objectIdst_amountsui_amountclaim_epochclaim_timestamp_mslist[].objectIdcurl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hasui/claim" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","NFTObj":"0xOBJECT_ID_FROM_LIST"}'{"txBytes":"<base64>"}jq -r '.txBytes'jq -r '.msg'{"list":[{"objectId","type","version","fields":{...}}, ...]}jq -r '.list'fieldsst_amountsui_amountclaim_epochclaim_timestamp_msunstake_timestamp_msobjectId{"txBytes":"<base64>"}jq -r '.txBytes'jq -r '.msg'{"list":[{"objectId","type","version","fields":{...}}, ...]}jq -r '.list'fieldsst_amountsui_amountclaim_epochclaim_timestamp_msunstake_timestamp_msobjectIdMoveAbort(..., <code>)| Code | Constant Name | Description |
|---|---|---|
| 1 | | Data does not match the program |
| 2 | | Staked SUI rewards do not match |
| 3 | | Invalid staking parameters |
| 4 | | Not enough SUI to stake |
| 5 | | No stSUI minted during staking |
| 6 | | Normal unstake ticket is still in locking period |
| 7 | | Not enough SUI to fulfill unstake |
| 8 | | Unstake amount exceeds the max SUI amount |
| 9 | | Instant unstake requires a service fee (fee not set) |
| 10 | | Commented out: not enough staked SUI for unstake |
| 11 | | Unstake stSUI amount must not be zero |
| 12 | | Staking is paused |
| 13 | | Unstaking is paused |
| 14 | | Commented out: reserved for claim |
| 15 | | Commented out: no minimum staking threshold met |
| 16 | | Unstake |
| 17 | | Claiming is paused |
| 18 | | Validator count does not match |
| 19 | | Validator not found |
| 20 | | Injected rewards amount is too low |
MoveAbort(..., <code>)| 错误码 | 常量名称 | 描述 |
|---|---|---|
| 1 | | 数据与程序不匹配 |
| 2 | | 质押的SUI奖励不匹配 |
| 3 | | 质押参数无效 |
| 4 | | 质押所需SUI不足 |
| 5 | | 质押过程中未铸造stSUI |
| 6 | | 普通提取票据仍处于锁定期 |
| 7 | | 提取所需SUI不足 |
| 8 | | 提取金额超过SUI最大限额 |
| 9 | | 即时提取需要服务费(未设置费用) |
| 10 | | 已注释:质押的SUI不足以进行提取 |
| 11 | | 提取的stSUI金额不能为零 |
| 12 | | 质押已暂停 |
| 13 | | 提取已暂停 |
| 14 | | 已注释:为领取奖励预留 |
| 15 | | 已注释:未达到最低质押阈值 |
| 16 | | 提取的 |
| 17 | | 领取奖励已暂停 |
| 18 | | 验证节点数量不匹配 |
| 19 | | 未找到验证节点 |
| 20 | | 注入的奖励金额过低 |