Created
June 10, 2016 09:11
-
-
Save kumrzz/06ac0e2b1ef69a9d044eede1cfb26d79 to your computer and use it in GitHub Desktop.
generate pymt from multisig wallet, lifted from https://github.com/blockcypher/blockcypher-python/issues/28
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
from blockcypher import create_unsigned_tx | |
dest_addr = "mgMZ3UdQsEmJ1ebjRV9ibTn1DFCxgmMo7a" | |
priv1 = "9c46389dde9e820294b68defd44e01da12cfe1374324cf27c198e4822e7d9d1e" | |
pub1 = "0471b0e83960b9a8ad980400fc7ee85e9739009f0ee08ef033784bdcefe7f38c64e9ba2b9d842089486735556e0b1940304db510ad521865bb5b028dee229c1dbd" | |
addr1 = "mySFV5esqFZqz8maEVjEodxwc9xyhXMmmY" | |
pub2 = '04a3cc3225df2ef6ca72e960c5cab0059731301d5efe61e7ffa1c4cac3a8e4994adcb27f01a282b7747d96ffdad324e774087c4a35197e99016bca62541af26eab' | |
addr2 = 'mouKAz9iAgMJzZjiiw4bZ4rxkJapkTXVDZ' | |
pub3 = '04db43666cf4206e7848aaaf551e2ea6af2488b23046c155f1456d0dd175c782eef61acc42ededcd45a37012c7e096125e356c839e9c0a5f9c75d48aeddcad6712' | |
addr3 = 'mkmCeTJCLuhQw37xGCW7gFSSh3z4wXxGQ1' | |
pubkey_list = [pub1, pub2, pub3] | |
#multisig = generate_multisig_address(pubkey_list, coin_symbol='btc-testnet') | |
# so we got: | |
multisig_addr = '2NEMZM6bLwdT18sKSrnfXcdcdGfqgccc9Qj' | |
inputs = [{'pubkeys':pubkey_list, 'script_type': 'multisig-2-of-3'}] | |
outputs = [{'address': dest_addr, 'value':200000 }] | |
unsigned_tx = create_unsigned_tx(inputs=inputs, outputs=outputs, coin_symbol='btc-testnet', include_tosigntx=True, api_key='8ef9f4d633d54aa891f583e1bdf2b9a7') | |
import pprint; pprint.pprint(unsigned_tx, width=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment