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...::walstaking::UnstakeTicket",
"version": "...",
"fields": {
"claim_epoch": 27,
"claim_timestamp_ms": "1774364404744",
"hawal_amount": "700000000000",
"id": { "id": "0x..." },
"unstake_timestamp_ms": "1772871784320",
"wal_amount": "700635659164"
}
}
]
}objectIdhawal_amountwal_amountclaim_epochclaim_timestamp_msobjectIdPOST /api/v1/hawal/claim{"address":"0x...","NFTObj":"<objectId from previous step>"}objectIdaddress{
"list": [
{
"objectId": "0x...",
"type": "0x...::walstaking::UnstakeTicket",
"version": "...",
"fields": {
"claim_epoch": 27,
"claim_timestamp_ms": "1774364404744",
"hawal_amount": "700000000000",
"id": { "id": "0x..." },
"unstake_timestamp_ms": "1772871784320",
"wal_amount": "700635659164"
}
}
]
}objectIdhawal_amountwal_amountclaim_epochclaim_timestamp_msobjectIdPOST /api/v1/hawal/claim{"address":"0x...","NFTObj":"<上一步获取的objectId>"}objectIdhttps://skillsapi.haedal.xyz/api/v1/hawalhttps://skillsapi.haedal.xyz/api/v1/hawal| 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/hawal/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/hawal/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/hawal/get_unstake_tickets_list" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS"}'{"list":[{"objectId":"...","type":"...","version":"...","fields":{...}}, ...]}objectIdhawal_amountwal_amountclaim_epochclaim_timestamp_mslist[].objectIdcurl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hawal/claim" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","NFTObj":"0xOBJECT_ID_FROM_LIST"}'
**提取**
```bash
curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hawal/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/hawal/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/hawal/get_unstake_tickets_list" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS"}'{"list":[{"objectId":"...","type":"...","version":"...","fields":{...}}, ...]}jq -r '.list'fieldshawal_amountwal_amountclaim_epochclaim_timestamp_msunstake_timestamp_msobjectIdcurl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hawal/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'fieldshawal_amountwal_amountclaim_epochclaim_timestamp_msunstake_timestamp_msobjectId{"txBytes":"<base64>"}jq -r '.txBytes'jq -r '.msg'{"list":[{"objectId","type","version","fields":{...}}, ...]}jq -r '.list'fieldshawal_amountwal_amountclaim_epochclaim_timestamp_msunstake_timestamp_msobjectIdMoveAbort(..., <code>)| Code | Constant Name | Description |
|---|---|---|
| 1 | | Data version does not match the current program version |
| 2 | | Stake amount is below the minimum staking threshold (1 WAL) |
| 3 | | Calculated haWAL mint amount is zero |
| 4 | | Unstake ticket is still locked (claim epoch/time not reached) |
| 5 | | Unstake WAL amount exceeds total available WAL |
| 6 | | Unstake input haWAL amount must not be zero |
| 7 | | Staking is currently paused |
| 8 | | Unstaking is currently paused |
| 9 | | Unstake process failed: remaining |
| 10 | | Claim is currently paused |
| 11 | | Provided validator count does not match existing validator count |
| 12 | | Validator not found in the validator list |
| 13 | | No active validators found for staking |
| 14 | | Unstake timestamp is out of the valid epoch time range |
| 15 | | Active validators list is empty |
| 16 | | Unstake WAL amount is below the minimum staking threshold |
MoveAbort(..., <code>)| 错误码 | 常量名称 | 描述 |
|---|---|---|
| 1 | | 数据版本与当前程序版本不匹配 |
| 2 | | 质押金额低于最低质押阈值(1 WAL) |
| 3 | | 计算出的haWAL铸造量为零 |
| 4 | | 提取票据仍处于锁定状态(未到领取周期/时间) |
| 5 | | 提取WAL金额超过可用WAL总额 |
| 6 | | 提取输入的haWAL金额不能为零 |
| 7 | | 当前质押功能已暂停 |
| 8 | | 当前提取功能已暂停 |
| 9 | | 提取流程失败:剩余 |
| 10 | | 当前领取奖励功能已暂停 |
| 11 | | 提供的验证节点数量与现有验证节点数量不匹配 |
| 12 | | 在验证节点列表中未找到指定节点 |
| 13 | | 未找到可用于质押的活跃验证节点 |
| 14 | | 提取时间戳超出有效周期时间范围 |
| 15 | | 活跃验证节点列表为空 |
| 16 | | 提取WAL金额低于最低提取阈值 |