0% found this document useful (0 votes)
2 views

Lab Assignment 2

The lab assignment focuses on developing blockchain functionalities using Python, specifically addressing Bitcoin address generation, multisignature address creation, transaction history retrieval, and trade volume analysis. It explains the process of generating multisignature addresses for enhanced security and shared control, as well as how to track Bitcoin transactions and trade volume using blockchain explorers and APIs. The assignment concludes by highlighting the importance of these aspects for transparency, accountability, and market assessment in Bitcoin.

Uploaded by

avadhoot.dhumal9
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab Assignment 2

The lab assignment focuses on developing blockchain functionalities using Python, specifically addressing Bitcoin address generation, multisignature address creation, transaction history retrieval, and trade volume analysis. It explains the process of generating multisignature addresses for enhanced security and shared control, as well as how to track Bitcoin transactions and trade volume using blockchain explorers and APIs. The assignment concludes by highlighting the importance of these aspects for transparency, accountability, and market assessment in Bitcoin.

Uploaded by

avadhoot.dhumal9
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

PRASAD AROTE B21 77

Lab Assignment 2

AIM: Development of Blockchain using Python.


a) Address generation in Bitcoin.
b) Multisignature Bitcoin Address generation.
c) Bitcoin Transaction history
d) Bitcoin Trade volume
LO1: Develop and test smart contract on local Blockchain.
Theory:
1. Multisignature Bitcoin Address Generation
A multisignature (multisig) address is a Bitcoin address that requires multiple
private keys to authorize a transaction. This is often used for enhanced security
or shared control over funds. For example, a 2-of-3 multisig address requires two
out of three private keys to sign a transaction. This enhances security and is
commonly used for shared accounts, escrow services, and corporate wallets.
Steps to Generate a Multisig Address
1. Generate Multiple Key Pairs
o Each participant generates a public-private key pair.
o Public keys are shared among participants, while private keys
remain confidential.
2. Create a Multisig Address
o A P2SH (Pay-to-Script-Hash) address is created from multiple
public keys.
o A script defines how many keys are required to authorize a
transaction (e.g., a 2-of-3 multisig address requires two out of three
private keys to sign).
3. Redeeming Transactions
o When spending from a multisig address, the required number of
private keys must sign the transaction.
o Bitcoin nodes verify signatures before processing the transaction.
PRASAD AROTE B21 77
PRASAD AROTE B21 77

OUTPUT:

Bitcoin Transaction History


Bitcoin transactions are recorded on the blockchain, allowing anyone to track
funds by viewing a specific address or transaction ID.
This can be retrieved using blockchain explorers or APIs.
Steps to Retrieve Transaction History:
1. Use a Blockchain Explorer:
o Visit Blockchain.com Explorer or Blockstream Explorer.
o Enter a Bitcoin address to view its transaction history.
2. Use an API:
o Use the Blockchain.com API or BlockCypher API.
PRASAD AROTE B21 77

Bitcoin Trade Volume


Bitcoin trade volume represents the total amount of Bitcoin traded over a specific
period, typically 24 hours. It is an important metric for assessing market activity
and liquidity.
To retrieve Bitcoin’s 24-hour trade volume, I used the CoinGecko API. The API
provides the total trading volume in USD. Below is the output:
PRASAD AROTE B21 77

OUTPUT:
PRASAD AROTE B21 77

Conclusion
This assignment provided a comprehensive understanding of three key aspects of
Bitcoin: multisignature address generation, transaction history, and trade volume.
Multisig addresses enhance security and enable shared control over funds,
making them ideal for corporate and escrow use cases. Bitcoin’s transaction
history, available on the blockchain, ensures transparency and accountability.
Finally, trade volume is a critical metric for assessing market activity and
liquidity.

You might also like