Skip to main content

GetDisInvestTransaction

Sending investment transactions for resolution

Parameter​

  • fromAddr: Initiator's address
  • toAddr: Invested address
  • utxoHash: UTXO hash during investment
  • 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","toAddr":"69b34b7538DeB6913f2b9f59Cbc8610059442e5A","utxoHash":"db2caaf71ff57ec954e67cabede4a4b2207fd8645e684e66983eaefea63f4e2a","isFindUtxo": false, "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: To address is not normal addr.
    • -5: The information entered exceeds the specified length
    • -6: FindUtxo failed
    • -7: Utxo is empty
    • -8: Tx owner is empty
    • -9: gas cannot be 0
    • -10: The total amount is less than expend
    • -11: GetBlockPackager error
    • -101: GetBonusAddrByInvestAddr failed
    • -102: The account has not invested assets to node
    • -103: GetBonusAddrInvestUtxosByBonusAddr failed
    • -104: The utxo to divest is not in the utxos that have been invested
    • -105: The invested utxo is not more than 1 day
    • -106: Invest tx not found
    • -107: Failed to parse transaction body
    • -108: The node to be divested is not invested
    • -109: The invested 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
{
"id": "1",
"jsonrpc": "2.0",
"method": "GetDisInvestTransaction",
"result": {
"code": 0,
"gas": "45000",
"height": "591",
"message": "success",
"time": "1717146744611408",
"txJson": "{\"time\":\"1717146744611408\",\"identity\":\"3292FEAbea61A76cf59Fa917b9DCcC937Ca489eE\",\"utxo\":{\"owner\":[\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\",\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\"],\"vin\":[{\"prevOut\":[{\"hash\":\"3941c0cc427c3053222b9d1f32a2882a564e1ed3c45bcf59a48dc08c6eceb6e3\",\"n\":1}]},{\"prevOut\":[{\"hash\":\"3941c0cc427c3053222b9d1f32a2882a564e1ed3c45bcf59a48dc08c6eceb6e3\"}],\"sequence\":1}],\"vout\":[{\"value\":\"1000000000000\",\"addr\":\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\"},{\"value\":\"899899576300\",\"addr\":\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\"},{\"value\":\"45000\",\"addr\":\"VirtualBurnGas\"}]},\"type\":\"Tx\",\"consensus\":7,\"txType\":5,\"data\":\"{\\\"TxInfo\\\":{\\\"BonusAddr\\\":\\\"69b34b7538DeB6913f2b9f59Cbc8610059442e5A\\\",\\\"DisinvestUtxo\\\":\\\"3941c0cc427c3053222b9d1f32a2882a564e1ed3c45bcf59a48dc08c6eceb6e3\\\"}}\"}",
"txType": "0",
"vrfJson": "{}"
}
}

The call to the GetDisInvestTransaction 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.