Skip to content

Instantly share code, notes, and snippets.

@xeroc
Created December 14, 2018 06:36
Show Gist options
  • Save xeroc/b3396faa6890c8b3942daca2fd858a9c to your computer and use it in GitHub Desktop.
Save xeroc/b3396faa6890c8b3942daca2fd858a9c to your computer and use it in GitHub Desktop.
def pushtx(tx):
import re
import json
if not re.match('^[0-9a-fA-F]*$', tx):
tx = tx.encode('hex')
req = requests.post('https://blockchain.info/pushtx?tx={}'.format(tx))
print("Server: {}".format(req.text))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment