CreateTransaction

POST: http://172.104.51.182:16667/wallet/createtransaction

Create a TRX transfer transaction. If to_address does not exist, then create the account on the blockchain.

BODY PARAMS

{

"to_address": string,

"owner_address": string,

"amount": int32

}

Example:

curl -X POST http://172.104.51.182:16667/wallet/createtransaction  -d '{"to_address": "41a9c46373aEB4749E3CE45acA242b027A46f486f9", "owner_address": "414203485a535a4072C9FBFaADDfe2A010AD0BcdB0", "amount": 30000000}'

input:

{

"to_address": "41a9c46373aEB4749E3CE45acA242b027A46f486f9", "owner_address": "414203485a535a4072C9FBFaADDfe2A010AD0BcdB0", "amount": 30000000

}

response: {

"visible": false, "txID": "886a099bc3ba32aeffcf4a34e5cfd1850b1f919b32a2ec4d51097f3f87f56409", "raw_data": { "contract": [ { "parameter": { "value": { "amount": 30000000, "owner_address": "414203485a535a4072c9fbfaaddfe2a010ad0bcdb0", "to_address": "41a9c46373aeb4749e3ce45aca242b027a46f486f9" }, "type_url": "type.googleapis.com/protocol.TransferContract" }, "type": "TransferContract" } ], "ref_block_bytes": "7c27", "ref_block_hash": "1a12b9ee9ce6c53a", "expiration": 1639989840000, "timestamp": 1639989783073 }, "raw_data_hex": "0a027c2722081a12b9ee9ce6c53a4080918cb8dd2f5a68080112640a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412330a15414203485a535a4072c9fbfaaddfe2a010ad0bcdb0121541a9c46373aeb4749e3ce45aca242b027a46f486f9188087a70e70a1d488b8dd2f"

}

==> Continue you call gettransactionsign API then call broadcasttransaction API

We will the final result: The account created success on WEL network.

{

"result": true, "txid": "886a099bc3ba32aeffcf4a34e5cfd1850b1f919b32a2ec4d51097f3f87f56409"

}

Last updated