Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Bitcoin Programming with Python

You're reading from  Hands-On Bitcoin Programming with Python

Product type Book
Published in Aug 2018
Publisher
ISBN-13 9781789537000
Pages 90 pages
Edition 1st Edition
Languages
Author (1):
BignumWorks Software LLP BignumWorks Software LLP
Profile icon BignumWorks Software LLP
Toc

Creating a multisignature bitcoin address

A multisignature address is an address that is associated with more than one private key; therefore, we need to create three private keys.

Go through the following steps to create a multisignature bitcoin address:

  1. Create three private keys:
#!/usr/bin/env python
'''
Title - Create multi-signature address

This program demonstrates the creation of
Multi-signature bitcoin address.
'''
# import bitcoin
from bitcoin import *

# Create Private Keys
my_private_key1 = random_key()
my_private_key2 = random_key()
my_private_key3 = random_key()

print("Private Key1: %s" % my_private_key1)
print("Private Key2: %s" % my_private_key2)
print("Private Key3: %s" % my_private_key3)
print('\n')
  1. Create three public keys from those private keys using the privtopub function:
# Create Public keys
my_public_key1...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime