How to create a valid unsigned transaction How can I create a valid unsigned transaction which can be broadcasted and mined using these addresses?

Could someone create the raw transaction and show me?

sender's address: 1NsRUK6vmPbtQa8sSjeXVxeYQiGCGNi6W3

receiver's address: 37KSBUjixDYxmgmTdepb79aso69vPZrLu2

Note: These are both my addresses and their balances are 0.
This is not how Bitcoin works.

Bitcoin does not use an accounts system nor does it use addresses on a protocol level. Spending Bitcoin means that you are spending from a transaction output. If there is no available transaction output for you to spend from, then you cannot create a transaction. So with addresses with 0 balance, no such valid transaction can be created.

Next, the "sending address" that you specified requires a digital signature in order to spend outputs associated with it. This is because that address type tells wallets that an output should be created which has the form OP_DUP OP_HASH160 &lt;hash&gt; OP_EQUALVERIFY OP_CHECKSIG where the address encodes the &lt;hash&gt; and the type of address specifies the other opcodes. So you cannot spend outputs that are associated with this address without being able to provide a valid digital signature that corresponds to the public key that hashes to &lt;hash&gt;.

What you could do is have a transaction output whose script is something like OP_DUP OP_HASH160 &lt;hash&gt; OP_EQUAL. This does not require a signature, but such a script, even though it can be constructed with the provided address, does not correspond to that address because it does not have the construction that the address type specifies.

Thus it is impossible to create such a valid unsigned transaction because 1) there is no output to spend and 2) the address requires a signature in order to spend from outputs associated with it.



Such a signature-less script as a I described corresponds to no address; there is no address type that specifies it.

The output script would look like this:

76a914ef0ffa5f1cc59bed17cf4e35ae9cbf396cddf17088


A transaction spending from that script would look like:

0200000001deadbeef000000000000000000000000deadbeef00000000000000000000000000000000222103061e97605659c9dc77ed437cbc345ec41633888ae3b2c75fdd532db789cc476fffffffff01000000000000000016a914ef0ffa5f1cc59bed17cf4e35ae9cbf396cddf1708700000000