Mastering Bitcoin

PDF Publication Title:

Mastering Bitcoin ( mastering-bitcoin )

Previous Page View | Next Page View | Return to Search List

Text from PDF Page: 138

unspent = [ OutputInfo("ebadfaa92f1fd29e2fe296eda702c48bd11ffd52313e986e99ddad9084062167", 1, 8000000), OutputInfo("6596fd070679de96e405d52b51b8e1d644029108ec4cbfe451454486796a1ecf", 0, 16050000), OutputInfo("b2affea89ff82557c60d635a2a3137b8f88f12ecec85082f7d0a1f82ee203ac4", 0, 10000000), OutputInfo("7dbc497969c7475e45d952c4a872e213fb15d45e5cd3473c386a71a1b0c136a1", 0, 25000000), OutputInfo("55ea01bd7e9afd3d3ab9790199e777d62a0709cf0725e80a7350fdb22d7b8ec6", 17, 5470541), OutputInfo("12b6a7934c1df821945ee9ee3b3326d07ca7a65fd6416ea44ce8c3db0c078c64", 0, 10000000), OutputInfo("7f42eda67921ee92eae5f79bd37c68c9cb859b899ce70dba68c48338857b7818", 0, 16100000), ] if len(argv) > 1: target = long(argv[1]) else: target = 55000000 print "For transaction amount %d Satoshis (%f bitcoin) use: " % (target, target/10.0**8) print select_outputs_greedy(unspent, target) if __name__ == "__main__": main() If we run the select-utxo.py script without a parameter it will attempt to construct a set of UTXO (and change) for a payment of 55000000 Satoshis (0.55 bitcoin). If you provide a target payment amount as a parameter, the script will select UTXO to make that target payment amount. Below, we run the script trying to make a payment of 0.5 bitcoin or 50000000 Satoshis: Example 5-4. Running the select-utxo.py script $ python select-utxo.py 50000000 For transaction amount 50000000 Satoshis (0.500000 bitcoin) use: ([<7dbc497969c7475e45d952c4a872e213fb15d45e5cd3473c386a71a1b0c136a1:0 with 25000000 Satoshis>, \ <7f42eda67921ee92eae5f79bd37c68c9cb859b899ce70dba68c48338857b7818:0 with 16100000 Satoshis>, \ <6596fd070679de96e405d52b51b8e1d644029108ec4cbfe451454486796a1ecf:0 with 16050000 Satoshis>],\ 'Change: 7150000 Satoshis') Once the UTXO is selected, the wallet then produces unlocking scripts containing sig‐ natures for each of the UTXO, thereby making them spendable by satisfying their lock‐ ing script conditions. The wallet adds these UTXO references and unlocking scripts as inputs to the transaction. Table 5-3. The structure of a transaction input Size 32 bytes 4 bytes 1-9 bytes (VarInt) Variable 4 bytes Field Transaction Hash Output Index Unlocking-Script Size Unlocking-Script Sequence Number Description Pointer to the transaction containing the UTXO to be spent The index number of the UTXO to be spent, first one is 0 Unlocking-Script length in bytes, to follow A script that fulfills the conditions of the UTXO locking-script. Currently-disabled Tx-replacement feature, set to 0xFFFFFFFF Transaction Outputs and Inputs | 119

PDF Image | Mastering Bitcoin

PDF Search Title:

Mastering Bitcoin

Original File Name Searched:

05db7df4f31840f0a873d6ea14dcc28d.pdf

DIY PDF Search: Google It | Yahoo | Bing

NFT (Non Fungible Token): Buy our tech, design, development or system NFT and become part of our tech NFT network... More Info

IT XR Project Redstone NFT Available for Sale: NFT for high tech turbine design with one part 3D printed counter-rotating energy turbine. Be part of the future with this NFT. Can be bought and sold but only one design NFT exists. Royalties go to the developer (Infinity) to keep enhancing design and applications... More Info

Infinity Turbine IT XR Project Redstone Design: NFT for sale... NFT for high tech turbine design with one part 3D printed counter-rotating energy turbine. Includes all rights to this turbine design, including license for Fluid Handling Block I and II for the turbine assembly and housing. The NFT includes the blueprints (cad/cam), revenue streams, and all future development of the IT XR Project Redstone... More Info

Infinity Turbine ROT Radial Outflow Turbine 24 Design and Worldwide Rights: NFT for sale... NFT for the ROT 24 energy turbine. Be part of the future with this NFT. This design can be bought and sold but only one design NFT exists. You may manufacture the unit, or get the revenues from its sale from Infinity Turbine. Royalties go to the developer (Infinity) to keep enhancing design and applications... More Info

Infinity Supercritical CO2 10 Liter Extractor Design and Worldwide Rights: The Infinity Supercritical 10L CO2 extractor is for botanical oil extraction, which is rich in terpenes and can produce shelf ready full spectrum oil. With over 5 years of development, this industry leader mature extractor machine has been sold since 2015 and is part of many profitable businesses. The process can also be used for electrowinning, e-waste recycling, and lithium battery recycling, gold mining electronic wastes, precious metals. CO2 can also be used in a reverse fuel cell with nafion to make a gas-to-liquids fuel, such as methanol, ethanol and butanol or ethylene. Supercritical CO2 has also been used for treating nafion to make it more effective catalyst. This NFT is for the purchase of worldwide rights which includes the design. More Info

NFT (Non Fungible Token): Buy our tech, design, development or system NFT and become part of our tech NFT network... More Info

Infinity Turbine Products: Special for this month, any plans are $10,000 for complete Cad/Cam blueprints. License is for one build. Try before you buy a production license. May pay by Bitcoin or other Crypto. Products Page... More Info

CONTACT TEL: 608-238-6001 Email: greg@infinityturbine.com (Standard Web Page)