For the complete documentation index, see llms.txt. This page is also available as Markdown.

上传卖单哈希

创建出售能量/带宽的订单

接口调用

POST https://open.tronify.io/api/tronRent/uploadPledgeHash

以下参数带*字段为必填,不带*号为选填

Request Body

Name
Type
Description

orderId*

String

卖单Id(来自api/tronRent/addTronSale)

pledgeHash*

String

代理哈希

signedData*

Object

签名后的对象 (签名 创建出售订单 接口返回的transaction对象,不要广播)

{
    "resCode": 100,
    "resMsg": "Success",
    "data": {}
}
{
    // Response
}

调用示例

// example
const params = {
    "orderId":"vkimeodm_f643_a280_fqzi_e1cib90jcus3",
    "pledgeHash":"14fc0e21c3be5889bb413c2406b184df724ce0cefa239adf1e3ed8368e39d741",
    "signedData":{
            "visible": false,
            "txID": "14fc0e21c3be5889bb413c2406b184df724ce0cefa239adf1e3ed8368e39d741",
            "raw_data": {
                "contract": [
                    {
                        "parameter": {
                            "value": {
                                "balance": 301000000,
                                "resource": "ENERGY",
                                "receiver_address": "41242e5341ccd7d16af9e3a3b1c5cb07794f596609",
                                "lock": true,
                                "owner_address": "41dcf5a07cfac1534c2410714d6ba6576f49c4a6d7"
                            },
                            "type_url": "type.googleapis.com/protocol.DelegateResourceContract"
                        },
                        "type": "DelegateResourceContract"
                    }
                ],
                "ref_block_bytes": "141a",
                "ref_block_hash": "b29ae11706ac4963",
                "expiration": 1682213709000,
                "timestamp": 1682213651693
            },
            "raw_data_hex": "0a02141a2208b29ae11706ac496340c8c980defa305a75083912710a35747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e44656c65676174655265736f75726365436f6e747261637412380a1541dcf5a07cfac1534c2410714d6ba6576f49c4a6d7100118c0cac38f01221541242e5341ccd7d16af9e3a3b1c5cb07794f596609280170ed89fdddfa30"
            "signature":[
                "eaf2b3e4d06d41696776d5ca57d5cf0afb25ca7f6ac954b2bfb7c395558fe86d7a1c9be6bb8fecc1b1aebe1a59ea25fdd2b0453ed9f94218af1bb0d3bdcf92cb1C"
            ]
    }
}
 const res = await axios.post('https://open.tronify.io/api/tronRent/uploadPledgeHash',params)
 console.log(res)
 if(res.resCode === '100'){
    // ...
 }

Last updated