Loading...
Loading...
Use when the user mentions staking WAL, withdrawing hawal, claiming rewards, or operating haWAL on Haedal Protocol (a DeFi/LST protocol on SUI). Trigger phrases: “stake hawal”,"stake hawal", "withdraw hawal", "withdraw wal","instant withdraw hawal","instant withdraw wal","claim hawal rewards","claim wal rewards" . This skill calls https://skillsapi.haedal.xyz/api/v1/hawal/* via curl POST. On HTTP 200 returns txBytes (base64); on non‑200 returns msg.
npx skill4agent add haedallsd/haedal-skill haedal-hawalamount"amount":"20"validatornode_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>"}objectIdhttps://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 |
validator0x0references/validators.md# Use the default validator
curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hawal/stake" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","amount":"100","validator":"0x0"}'
# Or specify an explicit validator node_id (for example Nansen)
curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/hawal/stake" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS","amount":"100","validator":"0x7b3ba6de2ae58283f60d5b8dc04bb9e90e4796b3b2e0dea75569f491275242e7"}'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"}'{"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 |