python-bitshares: How to derive transaction ids
Some developers might have noticed that python-graphene and python-bitshares are still pretty much in development.
That said, I finally got to figure out (thanks to ) how to derive transaction ids from a given transaction on the blockchain and quickly implemented this feature in python-bitshares.
From release 0.5.7 of python-graphene and with the next release of python-bitshares (currently in develop branch), you can obtain the transaction id of any transaction by simply:
from bitshares.block import Block
from bitsharesbase.signedtransactions import Signed_Transaction
block = Block(23743383)
tx = Signed_Transaction(**block["transactions"][2])
print(tx.id)
The Signed_Transaction expects keywords with identical names as on the blockchain, which explains the use of ** in front of the dictionary.
The attribute .id of tx is an internal method that derives the transaction id accordingly.
The resulting ids are similar to the ones derived by the cli_wallet and indexed by cryptofresh.com.
In the future, I intend to put more updates on libraries whenever nice features are included (such as the proposal subsystem of pybitshares which was released without further announcements ;D)
Have fun.
Leave python-bitshares: How to derive transaction ids to:
Read more #bitshares posts
Best Posts From Fabian Schuh
We have not curated any of xeroc's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Fabian Schuh
- Awesome-BitShares has a new home
- New BitShares PaperWallet - Now with account registration capabilities
- Resignation as Director of PBSA
- Release Candidate 0 - python-graphenelib 1.0.0
- Experimental Pilot for a BitShares Browser Plugin (Chrome)
- [PSA] BitShares Blockchain Upgrade successful!!
- [pybitshares/uptick] How to add new on-chain features
- New email addresses for workers of the BitShares Blockchain Foundation
- python-bitshares: How to derive transaction ids
- BitShares: Clarification on recent fears, uncertainty and doubt
- BitShares to be first blockchain to reach 20Mio blocks!
- PeerPlays public testnet blockchain / ppytest.com
- Historical Facts about Daniel Larimer and his Contributions to the Blockchain Industry
- BitShares Testnet Official Mailing List Open for Registrations
- docs.bitshares.org moves to bitshares organization on github
- BitShares Block Production Incident Report
- BitShares Blockchain Foundation
- BitShares fee schedule
- [Changelog] python-bitshares 0.1.4
- Test