Author

Topic: Transaction form (Read 730 times)

sr. member
Activity: 532
Merit: 250
August 12, 2015, 08:41:40 PM
#5
This you make this "manual"?
I bow to you if you did Cheesy
Looks like witchcraft to me Cheesy
How do you write your transactions?

Well, to start with, that wouldn't currently be a valid transaction since output #1 from TXID 07f0acabb9d1bd5a82be57ef7a8697ec664ea5dec780c1cddf8ca7a62bca91aa has already been spent




Awesome effort.  Thanks very much.  I really appreciate the inputs.  But unfortunately I still don't know what the structure of a N of M multisig transaction looks like.  

I understand that those inputs are invalid and a bunch of other crap has been changed.  But I am really just trying to understand the structure of MultiSig by way of example.  How do those outputs look?  

For example, which part of an output tells the stack this is a 1 of 5, or 3 of 4, MultiSig?
legendary
Activity: 3472
Merit: 4801
August 12, 2015, 08:33:26 PM
#4
This you make this "manual"?
I bow to you if you did Cheesy
Looks like witchcraft to me Cheesy
How do you write your transactions?

Well, to start with, that wouldn't currently be a valid transaction since output #1 from TXID 07f0acabb9d1bd5a82be57ef7a8697ec664ea5dec780c1cddf8ca7a62bca91aa has already been spent

Additionally, the following is not a valid version 1 address:
Code:
 
OP_DUP OP_HASH160 0cc3ed93022d209d7907939a5be757db143e568c

If I were to try to write a similar transaction, I'd probably use one of the following 3 methods depending on the use case:

Code:
{
   "lock_time":0,
   "size":221,
   "inputs":[
      {
         "prev_out":{
            "index":1,
            "hash":"07f0acabb9d1bd5a82be57ef7a8697ec664ea5dec780c1cddf8ca7a62bca91aa"
         },
         "script":""
      }
   ],
   "version":1,
   "vin_sz":1,
   "hash":"98d5771fc5f86029f562d95ac1692c12f626bbe588eda966e1c912ccc26ef65d",
   "vout_sz":5,
   "out":[
      {
         "script_string":"OP_DUP OP_HASH160 b76da706eff5571ff4e495b1f842d0dd601fea59 OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1Hit1tfRSH5tuR8Jz4jcNRL1V7cw3Gs7Dz",
         "value":5000003,
         "script":"76a914b76da706eff5571ff4e495b1f842d0dd601fea5988ac"
      },
      {
         "script_string":"OP_DUP OP_HASH160 b76da7009052c994cb90872887df6fa894e58872 OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1Hit1tGh1njnZB7q4sG7au8Xws8ZPzkqir",
         "value":2000001,
         "script":"76a914b76da7009052c994cb90872887df6fa894e5887288ac"
      },
      {
         "script_string":"OP_DUP OP_HASH160 b76da70265985ea5a90e6527a76e17925acd6fb1 OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1Hit1tPECmEtT9U8pLZJmJ4ZHcGnJTaYXF",
         "value":7000001,
         "script":"76a914b76da70265985ea5a90e6527a76e17925acd6fb188ac"
      },
      {
         "script_string":"OP_DUP OP_HASH160 08de6bd04fe5375f3f3a9a5c6132440c63e453a3 OP_EQUALVERIFY OP_CHECKSIG",
         "address":"1otrdMrZoVdon3EbuooZFmmy2esp5a9Mu",
         "value":44200000,
         "script":"76a91408de6bd04fe5375f3f3a9a5c6132440c63e453a388ac"
      },
      {
         "script_string":"OP_DUP OP_HASH160 0cc3ed93022d209d7907939a5be757db143e568c OP_EQUALVERIFY OP_CHECKSIG",
         "address":"12AVpcwsVBryy46E8LP3ryeNDPM3aEp9Ca",
         "value":4555841,
         "script":"76a9140cc3ed93022d209d7907939a5be757db143e568c88ac"
      }
   ]
}
Code:
createrawtransaction '[
        {"txid":"07f0acabb9d1bd5a82be57ef7a8697ec664ea5dec780c1cddf8ca7a62bca91aa","vout":1}
    ]'
    '{
        "1Hit1tfRSH5tuR8Jz4jcNRL1V7cw3Gs7Dz":0.05000003,
        "1Hit1tGh1njnZB7q4sG7au8Xws8ZPzkqir":0.02000001,
        "1Hit1tPECmEtT9U8pLZJmJ4ZHcGnJTaYXF":0.07000001,
        "1otrdMrZoVdon3EbuooZFmmy2esp5a9Mu":0.44200000,
        "12AVpcwsVBryy46E8LP3ryeNDPM3aEp9Ca":0.04555841
    }'
Code:
0100000001aa91ca2ba6a78cdfcdc180c7dea54e66ec97867aef57be825abdd1b9abacf0070100000000ffffffff05434b4c00000000001976a914b76da706eff5571ff4e495b1f842d0dd601fea5988ac81841e00000000001976a914b76da7009052c994cb90872887df6fa894e5887288acc1cf6a00000000001976a914b76da70265985ea5a90e6527a76e17925acd6fb188ac4070a202000000001976a91408de6bd04fe5375f3f3a9a5c6132440c63e453a388ac41844500000000001976a9140cc3ed93022d209d7907939a5be757db143e568c88ac00000000

Can you post an example of a MultiSig transaction?  How does that look?  

Do all the output addresses have a '3' as their first character?  Can we use vanityGen to make addresses that start with a '3'?

Note that an address that starts with a 3 is Pay-to-script-hash address, whereas addresses that start with a 1 are Pay-to-Pubkey-hash

I don't think vanityGen is currently designed to generate Pay-to-script-hash addresses, but it wouldn't be very difficult to create such a program if one doesn't already exist.

Here's an example of a MultiSig transaction:

Code:
0100000001acc6fb9ec2c3884d3a12a89e7078c83853d9b7912281cefb14bac00a2737d33a000000008b483045022100fbce708d1398c62a8acfaf250daa32f1698e77c47b22eb79410eba6bd5311cd802202ca038b123714c36e339620f967fa80a6576bf616ed2099fe0a73125cc55820b01410431393af9984375830971ab5d3094c6a7d02db3568b2b06212a7090094549701bbb9e84d9477451acc42638963635899ce91bacb451a1bb6da73ddfbcf596bddfffffffff01400001000000000017a9141a8b0026343166625c7475f01e48b5ede8c0252e8700000000
Code:
{
   "lock_time":0,
   "size":222,
   "inputs":[
      {
         "prev_out":{
            "index":0,
            "hash":"3ad337270ac0ba14fbce812291b7d95338c878709ea8123a4d88c3c29efbc6ac"
         },
         "script":"483045022100fbce708d1398c62a8acfaf250daa32f1698e77c47b22eb79410eba6bd5311cd802202ca038b123714c36e339620f967fa80a6576bf616ed2099fe0a73125cc55820b01410431393af9984375830971ab5d3094c6a7d02db3568b2b06212a7090094549701bbb9e84d9477451acc42638963635899ce91bacb451a1bb6da73ddfbcf596bddf"
      }
   ],
   "version":1,
   "vin_sz":1,
   "hash":"02b082113e35d5386285094c2829e7e2963fa0b5369fb7f4b79c4c90877dcd3d",
   "vout_sz":1,
   "out":[
      {
         "script_string":"OP_HASH160 1a8b0026343166625c7475f01e48b5ede8c0252e OP_EQUAL",
         "address":"347N1Thc213QqfYCz3PZkjoJpNv5b14kBd",
         "value":65600,
         "script":"a9141a8b0026343166625c7475f01e48b5ede8c0252e87"
      }
   ]
}
sr. member
Activity: 532
Merit: 250
August 12, 2015, 05:57:15 PM
#3
This you make this "manual"?
I bow to you if you did Cheesy
Looks like witchcraft to me Cheesy
How do you write your transactions?
hero member
Activity: 490
Merit: 500
Captain
August 12, 2015, 05:30:54 PM
#2
This you make this "manual"?
I bow to you if you did Cheesy
Looks like witchcraft to me Cheesy
sr. member
Activity: 532
Merit: 250
August 12, 2015, 05:29:37 PM
#1
This is what a very cool Bitcoin transaction looks like:

{    
"hash": "fa08429ffc1f8cc219be99f1590d8d94d515635531d9929076e630cda79599c8",    
"ver": 1,    "vin_sz": 1,    "vout_sz": 5,    "lock_time": 0,    "size": 365,    

"in": [
      {        "prev_out":
   {          "hash": "07f0acabb9d1bd5a82be57ef7a8697ec664ea5dec780c1cddf8ca7a62bca91aa",          "n": 1        },           "scriptSig": "304502210085b52beeca88c06883e4e487420f4d788d7114a8e2aa58a5bf30003ed67d2d4a02201 b1dd5676abec65b2feb735bb8b88d6079cb2ff59560480e27167290e6b1141501 03611dc2a57e244ab48a6d1b9bbb8958a0743c002d141def726cd2d2732dd01561"      }    
   ],  

"out": [
      {        "value": "0.05000003",        "scriptPubKey": "OP_DUP OP_HASH160 b76da706eff5571ff4e495b1f842d0dd601fea59 OP_EQUALVERIFY OP_CHECKSIG"      },  
      {        "value": "0.02000001",        "scriptPubKey": "OP_DUP OP_HASH160 b76da7009052c994cb90872887df6fa894e58872 OP_EQUALVERIFY OP_CHECKSIG"      },      
      {        "value": "0.07000001",        "scriptPubKey": "OP_DUP OP_HASH160 b76da70265985ea5a90e6527a76e17925acd6fb1 OP_EQUALVERIFY OP_CHECKSIG"      },      
      {        "value": "0.44200000",        "scriptPubKey": "OP_DUP OP_HASH160 08de6bd04fe5375f3f3a9a5c6132440c63e453a3 OP_EQUALVERIFY OP_CHECKSIG"      },            
      {        "value": "0.04555841",        "scriptPubKey": "OP_DUP OP_HASH160 0cc3ed93022d209d7907939a5be757db143e568c    
   ]
}

Can you post an example of a MultiSig transaction?  How does that look?  

Do all the output addresses have a '3' as their first character?  Can we use vanityGen to make addresses that start with a '3'?




Jump to: