sammchardy / python-binance-chain

Binance Chain Exchange API python implementation for automated trading
http://python-binance-chain.rtfd.io
MIT License
302 stars 132 forks source link

Generate tx_id offline #25

Closed logan059 closed 5 years ago

logan059 commented 5 years ago

How to generate the tx_id **offline** ? Thanks.

logan059 commented 5 years ago

@sammchardy Can you give me some help? Now we want to get txid before the tx broadcasted.

logan059 commented 5 years ago

Fixed.

data = msg.to_hex_data() txid= hashlib.new('sha256', bytes.fromhex(data)).digest()