Skip to content

Instantly share code, notes, and snippets.

@fivepiece
Created March 13, 2017 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fivepiece/b5b061fbd0e3b1d684b31e9c33935af3 to your computer and use it in GitHub Desktop.
Save fivepiece/b5b061fbd0e3b1d684b31e9c33935af3 to your computer and use it in GitHub Desktop.
39d38
< from bitcoin import TESTNET
654,657c653
< if TESTNET == True:
< return "m/44'/1'/%d'"% int(account_id)
< else:
< return "m/44'/0'/%d'"% int(account_id)
---
> return "m/44'/0'/%d'"% int(account_id)
10,11c10
< TYPE_ADDRESS, TYPE_SCRIPT,
< TESTNET, set_testnet)
---
> TYPE_ADDRESS, TYPE_SCRIPT)
18a18
>
22,29d21
< if TESTNET == True:
< set_testnet()
< ADDRTYPE_P2PKH = 111
< ADDRTYPE_P2SH = 196
< else:
< ADDRTYPE_P2PKH = 0
< ADDRTYPE_P2SH = 5
<
244,247c236
< if TESTNET == True:
< signed_tx = client.sign_tx('Testnet', inputs, outputs)[1]
< else:
< signed_tx = client.sign_tx('Bitcoin', inputs, outputs)[1]
---
> signed_tx = client.sign_tx('Bitcoin', inputs, outputs)[1]
333c322
< if addrtype == ADDRTYPE_P2PKH:
---
> if addrtype == 0:
360c349
< if addrtype == ADDRTYPE_P2PKH:
---
> if addrtype == 0:
362c351
< elif addrtype == ADDRTYPE_P2SH:
---
> elif addrtype == 5:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment