Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Bitcoin in perl

by grondilu (Friar)
on Sep 11, 2012 at 20:18 UTC ( #993055=note: print w/replies, xml ) Need Help??


in reply to Re: Bitcoin in perl
in thread Bitcoin in perl

Yes, normally you should be able to parse the transaction data. It has only been tested with a few blocks but normally everything can be red. It even recognises transaction scripts and tries to decompile them. For instance, it will see if the embedded data is pure ASCII text. That's how for instance the times headline can be explicitely seen when you read the genesis block.

So, assuming your transaction is in the binary string $tx, the following code should work, but you'll have to convert it into Bitcoin::DataStream first (I haven't made that automatic)

use Bitcoin::Transaction; use YAML; my $stream = new Bitcoin::DataStream $tx; say +Dump Bitcoin::Transaction->new($stream);

I did use cryptographic libraries for digests, but I've found no perl library for ECDSA, and I've found using C libraries with XS or something much too complicated for me.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://993055]
help
Chatterbox?
zentara...oO 1 more reason I prefer Perl to Python is I can't believe how long Python takes to compile, and you can't disable the myriad of tests
[LanX]: so that's where you've been the last two years? Compiling Python?
[zentara]: LanX no! I was learning why Krishna made me into a unicorn. :-)
[LanX]: The old chromosone question ... Why Y???

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-03-30 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (361 votes). Check out past polls.