GetUnStakeTransaction
Send a transaction to release the stake
Parameter​
- fromAddr: Initiator's address
- utxoHash: UTXO hash during staking
- isFindUtxo: Is the current status of UTXO being explored across the entire network
- txInfo: Transaction description information
{
"id" : "1",
"jsonrpc": "2.0",
"params" : "{"fromAddr" : "69b34b7538DeB6913f2b9f59Cbc8610059442e5A", "utxoHash" : "405efe5ae260a8297751784ce5bb590efea1324b29c24b658b3b2e1ed948eec3","isFindUtxo": true, "txInfo": ""}"
}
Response​
- code
- 0: success
- -1: Failed to get the current highest block height
- -2: Check parameters failed
- -3: FromAddr is not normal addr.
- -4: FindUtxo failed
- -5: Utxo is empty
- -6: Tx owner is empty
- -7: The information entered exceeds the specified length
- -8: The total amount is less than expend
- -9: GetBlockPackager error
- -101: Get all stake address failed
- -102: The account number has not staked assets
- -103: Get stake utxo from address failed
- -104: The utxo to be de staked is not in the staked utxo
- -105: The staked utxo is not more than 30 days
- -106: Stake tx not found
- -107: Failed to parse transaction body
- -108: Stake value is zero
- message: Return value information
- txJson: Transaction entity information
- height: height
- vrfJson: VRF information
- txType: transaction type
- time: Time of sending transaction
- gas: Fuel
Return to Example​
{
"id": "1",
"jsonrpc": "2.0",
"method": "GetUnStakeTransaction",
"result": {
"code": 0,
"gas": "39300",
"height": "595",
"message": "success",
"time": "1717147041334522",
"txJson": "{\"time\":\"1717147041334522\",\"identity\":\"372b320ECA35F86A28249E3e309545A44270DD7D\",\"utxo\":{\"owner\":[\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\",\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\"],\"vin\":[{\"prevOut\":[{\"hash\":\"b088fde1b1b270399134a7027408b2ef270d7f00859f306f9cb006e46de77e18\",\"n\":1}]},{\"prevOut\":[{\"hash\":\"e47b853d8d59e8d5982f68ed19dee6cdc5ce7e173df3e699af817366bd7b7541\"}],\"sequence\":1}],\"vout\":[{\"value\":\"100000000000\",\"addr\":\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\"},{\"value\":\"899899437600\",\"addr\":\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\"},{\"value\":\"39300\",\"addr\":\"VirtualBurnGas\"}]},\"type\":\"Tx\",\"consensus\":7,\"txType\":3,\"data\":\"{\\\"TxInfo\\\":{\\\"UnstakeUtxo\\\":\\\"b088fde1b1b270399134a7027408b2ef270d7f00859f306f9cb006e46de77e18\\\"}}\"}",
"txType": "0",
"vrfJson": "{}"
}
}
The call to the GetUnStakeTransaction
interface is completed, and the SDK is used to sign the returned transaction body.
After signing, the transaction body is broadcasted through sendMessage
. The process is the same as GetTransaction
.