Bitcoin Forum
April 28, 2024, 08:12:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to publish a transaction after constructed?  (Read 1309 times)
BitPiggy (OP)
Member
**
Offline Offline

Activity: 67
Merit: 10



View Profile WWW
February 11, 2012, 08:57:13 AM
 #1

Hi,

I am using one of the bitcoin Ruby libraries out there (https://github.com/lian/bitcoin-ruby) and I can use it to construct a valid transaction, and get the raw data thereof. I want to then publish that transaction to the bitcoin network.

Are there any scripts or tools that can run on a server to publish an arbitrary valid transaction? Does someone offer a service to do as much?

In other words, imagine I had created the following transaction (I just grabbed it from blockexplorer.com), how do I go about publishing it to other bitcoin nodes?

{
  "hash":"a3ac439de09be35adaf9849e37b497c19b23f1f8d832b0a84902f7b0044ed531",
  "ver":1,
  "vin_sz":1,
  "vout_sz":2,
  "lock_time":0,
  "size":259,
  "in":[
    {
      "prev_out":{
        "hash":"3e62a213b7706b14346a710f2a0b95cbf58ebaec6f76286d29526ac8058c171a",
        "n":0
      },
      "scriptSig":"3046022100e0999e9fe9c7b4736fd5dd8907b29b35b0816b8b3103f5b17a8a25eb81d8e8a002210 08090d5f89529667dcdaf1a8bef995ceca30a2e3da4b6c0771325c0dddece45bb01 04ae3bbf874401fdef5001c91a7d6668df16b4517b14e8ede95cef45223496dea7e4fd776083fef 941664417924424891e55a4f77973062d982c644987d3b5936b"
    }
  ],
  "out":[
    {
      "value":"380.00980000",
      "scriptPubKey":"OP_DUP OP_HASH160 34896b26f47edae1ad757ccc7ec248c9aafa3a1b OP_EQUALVERIFY OP_CHECKSIG"
    },
    {
      "value":"49.99020000",
      "scriptPubKey":"OP_DUP OP_HASH160 a2483d6845de9892fb9bf57924b32f6698f1d0f1 OP_EQUALVERIFY OP_CHECKSIG"
    }
  ]
}


Note: I've been told the Ruby library above can do it, but I don't know much about building services that connect to other computers and send data back and forth, and so even after looking at the code I don't understand what I'm supposed to do.

Any help would be greatly appreciated.

Cheers,
~Mat

http://BitPiggy.com: Australian Dollars (AUD) to BitCoin exchange
@bitpiggy

Me: Ruby on Rails developer, 12+ years programming experience.
@matholroyd, http://www.linkedin.com/in/matholroyd
1714291972
Hero Member
*
Offline Offline

Posts: 1714291972

View Profile Personal Message (Offline)

Ignore
1714291972
Reply with quote  #2

1714291972
Report to moderator
1714291972
Hero Member
*
Offline Offline

Posts: 1714291972

View Profile Personal Message (Offline)

Ignore
1714291972
Reply with quote  #2

1714291972
Report to moderator
1714291972
Hero Member
*
Offline Offline

Posts: 1714291972

View Profile Personal Message (Offline)

Ignore
1714291972
Reply with quote  #2

1714291972
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714291972
Hero Member
*
Offline Offline

Posts: 1714291972

View Profile Personal Message (Offline)

Ignore
1714291972
Reply with quote  #2

1714291972
Report to moderator
BitPiggy (OP)
Member
**
Offline Offline

Activity: 67
Merit: 10



View Profile WWW
February 11, 2012, 10:46:44 PM
 #2

Take a look at the subvertx command line tools.

Cheers, I came across subvertx last night, and have been trying to get it to compile on my mac. Hmm, the tools set looks perfect. I'll figure it out for Ubuntu first I guess, and worry about getting it working on my dev machine later.

Thanks again,
~Mat

http://BitPiggy.com: Australian Dollars (AUD) to BitCoin exchange
@bitpiggy

Me: Ruby on Rails developer, 12+ years programming experience.
@matholroyd, http://www.linkedin.com/in/matholroyd
FreeMoney
Legendary
*
Offline Offline

Activity: 1246
Merit: 1014


Strength in numbers


View Profile WWW
February 11, 2012, 10:58:01 PM
 #3

http://bitsend.rowit.co.uk/

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
BitPiggy (OP)
Member
**
Offline Offline

Activity: 67
Merit: 10



View Profile WWW
February 12, 2012, 12:44:30 AM
 #4

Yep, I've seen http://bitsend.rowit.co.uk/.

I was going to say I can't ask my users to copy-paste transactions into that site, but then I realized I can just do a POST to the form.

I think I'll just do that for now. Hopefully rowit.com won't mind if I send a bunch of data their way!

Cheers,
~Mat




http://BitPiggy.com: Australian Dollars (AUD) to BitCoin exchange
@bitpiggy

Me: Ruby on Rails developer, 12+ years programming experience.
@matholroyd, http://www.linkedin.com/in/matholroyd
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!