0

I have call this post API in Python:

url = "https://api.trongrid.io/wallet/createtransaction"
headers = {
    "accept": "application/json",
    "content-type": "application/json"
}
body = {
    "owner_address": "Txxxxxxx",
    "to_address": "Tyyyyyyyy",
    "amount": 100_000,
    "visible": True
}

So in response we get transaction data like this:

{'visible': True, 'txID': 'b6b4b95a4864b9a93a9686ae9dccb2e71d415f611da68d80ec75e3e366488s77', 'raw_data': {'contract': [{'parameter': {'value': {'amount': 100000, 'owner_address': 'Txxxxxxx', 'to_address': 'Tyyyyyyyy'}, 'type_url': 'type.googleapis.com/protocol.TransferContract'}, 'type': 'TransferContract'}], 'ref_block_bytes': '2c65', 'ref_block_hash': '3d73328b7ccf78s3', 'expiration': 1693055346000, 'timestamp': 1693055288583}, 'raw_data_hex': '0a022c6522083d73328b7cxxxxx'}

So we can use second API

https://api.trongrid.io/wallet/gettransactionsign

To sign transaction with private key, But in 2023 this API depricated and not supported anymore.

So i need to know what is the best alternative for this API?
Run new node on my own server? If this is best way, tell me how?
Do it offline? Is it possible and how?
Or any suggestion.

reza_khalafi
  • 6,230
  • 7
  • 56
  • 82
  • This methos in tronweb static signString(message, privateKey, useTronHeader = true) sign a transaction but can not find it for Python – reza_khalafi Aug 27 '23 at 07:42

0 Answers0