sammchardy / python-binance-chain

Binance Chain Exchange API python implementation for automated trading

Home Page:http://python-binance-chain.rtfd.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate tx_id offline

logan059 opened this issue · comments

commented

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

commented

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

commented

Fixed.

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