Loading...
Loading...
Use when the user mentions staking HAEDAL, locking, extending lock, claiming rewards, decay, or operating VeHaedal on Haedal Protocol (a DeFi ecosystem on SUI). Trigger phrases: "stake haedal", "lock haedal", "extend lock", "claim rewards from haedal", "unlock/redeem haedal", "add to stake", "start decay", "stop decay", "vehaedal". This skill calls https://skillsapi.haedal.xyz/api/v1/vehaedal/* via curl POST. add_stake and claim_rewards* need only signerAddress (+ amount/periods); add_to_existing_stake, extend_existing_lock, start_decay, stop_decay, unstake_and_claim require vehaedalObj — fetch via get_vehaedal_list(address), present the list with current_amount/locked_amount/is_decaying/lock_end_time to the user, then use their chosen objectId. All amounts are human-readable. On HTTP 200 returns txBytes (base64); on non‑200 returns msg.
npx skill4agent add haedallsd/haedal-skill haedal-vehaedalamount"amount":"20"vehaedalObjaddress{
"list": [
{
"objectId": "0x...",
"fields": {
"current_amount": "10000000000",
"initial_amount": "10000000000",
"is_decaying": true,
"lock_end_time": "1803708378450",
"lock_start_time": "1772258778450",
"locked_amount": "10000000000",
"original_lock_weeks": "52",
"owner": "0x...",
"remaining_lock_weeks_when_stopped_decay": "52",
"token_type": { "fields": { "name": "...::haedal::HAEDAL" }, "type": "0x1::type_name::TypeName" }
}
}
]
}objectIdcurrent_amountlocked_amountis_decayingoriginal_lock_weekslock_end_timeobjectIdvehaedalObjvehaedalObjobjectIdvehaedalObjhttps://skillsapi.haedal.xyz/api/v1/vehaedal| Method | Required fields | Notes |
|---|---|---|
| add_stake | signerAddress, amount, lockWeeks, isDecaying | Creates a new veHaedal position |
| get_vehaedal_list | address | Query veHaedal objects owned by this address; returns |
| add_to_existing_stake | signerAddress, vehaedalObj, amount | Requires an existing veHaedal object ID |
| extend_existing_lock | signerAddress, vehaedalObj, additionalWeeks | Requires an existing veHaedal object ID |
| start_decay | signerAddress, vehaedalObj | Requires an existing veHaedal object ID |
| stop_decay | signerAddress, vehaedalObj | Requires an existing veHaedal object ID |
| unstake_and_claim | signerAddress, vehaedalObj | Requires an existing veHaedal object ID |
| claim_rewards_v2 | signerAddress, periods | No object field needed |
| claim_rewards_v2_epoch_1 | signerAddress | No object field needed |
curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/add_stake" \
-H "Content-Type: application/json" \
-d '{"signerAddress":"0xYOUR_ADDRESS","amount":"20","lockWeeks":4,"isDecaying":false}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/get_vehaedal_list" \
-H "Content-Type: application/json" \
-d '{"address":"0xYOUR_ADDRESS"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/add_to_existing_stake" \
-H "Content-Type: application/json" \
-d '{"signerAddress":"0xYOUR_ADDRESS","vehaedalObj":"0xOBJECT_ID","amount":"10"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/extend_existing_lock" \
-H "Content-Type: application/json" \
-d '{"signerAddress":"0xYOUR_ADDRESS","vehaedalObj":"0xOBJECT_ID","additionalWeeks":2}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/start_decay" \
-H "Content-Type: application/json" \
-d '{"signerAddress":"0xYOUR_ADDRESS","vehaedalObj":"0xOBJECT_ID"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/stop_decay" \
-H "Content-Type: application/json" \
-d '{"signerAddress":"0xYOUR_ADDRESS","vehaedalObj":"0xOBJECT_ID"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/unstake_and_claim" \
-H "Content-Type: application/json" \
-d '{"signerAddress":"0xYOUR_ADDRESS","vehaedalObj":"0xOBJECT_ID"}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/claim_rewards_v2" \
-H "Content-Type: application/json" \
-d '{"signerAddress":"0xYOUR_ADDRESS","periods":["1","2"]}'curl -s -w "\n%{http_code}" -X POST "https://skillsapi.haedal.xyz/api/v1/vehaedal/claim_rewards_v2_epoch_1" \
-H "Content-Type: application/json" \
-d '{"signerAddress":"0xYOUR_ADDRESS"}'{"txBytes":"<base64>"}jq -r '.txBytes'jq -r '.msg'{"list":[{"objectId":"...","fields":{...}}, ...]}jq -r '.list'objectIdvehaedalObjMoveAbort(..., <code>)| Code | Constant Name | Description |
|---|---|---|
| 0 | | |
| 1 | | Invalid lock duration, must be between 1 and 52 weeks |
| 2 | | Caller is not the owner of the veHAEDAL token |
| 3 | | No tokens available to unstake ( |
| 4 | | Invalid amount, must be greater than 0 |
| 5 | | Lock period has not expired yet |
| 6 | | Lock period should be expired |
| 7 | | Stake amount is below the minimum required |
| 8 | | Pool version does not match the current program version |
| 9 | | Lock period has already expired |