Skip to content

Instantly share code, notes, and snippets.

@xeroc
Created December 13, 2018 16:16
Show Gist options
  • Save xeroc/e82a747bb9d98e33e70ba486dd11534a to your computer and use it in GitHub Desktop.
Save xeroc/e82a747bb9d98e33e70ba486dd11534a to your computer and use it in GitHub Desktop.
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