Created
December 13, 2018 16:16
-
-
Save xeroc/e82a747bb9d98e33e70ba486dd11534a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pushtx(tx): | |
if not re.match('^[0-9a-fA-F]*$', tx): | |
tx = tx.encode('hex') | |
req = requests.get('https://blockchain.info/pushtx?tx={}'.format(tx)) | |
assert req.status_code == 200 | |
return req.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment