Bitcoin Forum
November 10, 2024, 08:03:42 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: C# Bitcoin-Tool, variety of uses.  (Read 9783 times)
mb300sd (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
March 01, 2013, 08:52:03 PM
 #1

https://github.com/mb300sd/Bitcoin-Tool/

Code:
Bitcoin-Tool
============

Collection of bitcoin related classes, can be used to impliment
a variety of functions.

* Work with addresses, public and private keys
* Generate and sign transactions
* Connect over P2P to a bitcoin node
* Easily generate and evaulate custom scripts
* Decode and encode blocks, transactions, scripts, network messages
* Parse blockchain for data

Program.cs contains test code/me playing around/etc and usually contains
commented out code that can be used for examples.
I wrote this mostly as a learning exercise and added more out of boredom.
No particular goal with this other than experimenting. Any interesting/fun suggestions might get written.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
March 02, 2013, 03:49:21 AM
 #2

Any interesting/fun suggestions might get written.

Any desire to have it read a wallet.dat?

Here's a resource on that:
 - http://bitcoin.stackexchange.com/a/849/153

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Insu Dra
Full Member
***
Offline Offline

Activity: 182
Merit: 100



View Profile
March 03, 2013, 11:06:58 AM
 #3

Interesting, definitely some classes in there that can save me some time and trouble. license ?

"drugs, guns, and gambling for anyone and everyone!"
mb300sd (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
March 05, 2013, 08:42:56 PM
Last edit: March 07, 2013, 05:46:08 AM by mb300sd
 #4

Interesting, definitely some classes in there that can save me some time and trouble. license ?

dunno, lets say gpl for now

Any interesting/fun suggestions might get written.

Any desire to have it read a wallet.dat?

Here's a resource on that:
 - http://bitcoin.stackexchange.com/a/849/153

I've read somewhere that the devs are moving away from BDB for wallet.dat soon. I'll probably hold off for now.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
mb300sd (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
March 08, 2013, 05:05:34 PM
 #5

Couple updates..

Wrote some code that computes the unspent TxOut set, and calculates the balances of all addresses.

https://github.com/mb300sd/Bitcoin-Tool/tree/master/Bitcoin%20Tool/Apps

This is getting pretty close to becoming a lite client. I'll probably write network downloading of new blocks and updating of the utxo set as soon as I figure out how to handle orphaned blocks.

I'm working on a custom transaction gui tool that will use the unspent output database, transaction creation, and broadcast functionality.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
swordfish6975
Hero Member
*****
Offline Offline

Activity: 721
Merit: 523



View Profile WWW
June 27, 2013, 12:56:40 PM
Last edit: June 28, 2013, 01:39:09 PM by swordfish6975
 #6

when generating the utxo.dat it only looks at blk00000.dat

should it look at all the blk0000XX.dat files?



fs.Position is equal fs.Length (link) at the end of the blk00000.dat so it returns null and then goes on to write out the utxo.dat  (128mb) with only the data from blk00000.dat


Edit: I modified the code and got it working, the data now matches blockchain.info

>>>>  Physical Bitcoin And Altcoin Price Ticker Screen - http://afkdata.com <<<<

                    http://cryptofolio.info  - google finance of cryptos
qualalol
Jr. Member
*
Offline Offline

Activity: 57
Merit: 1



View Profile
June 27, 2013, 01:23:58 PM
 #7

Interesting, definitely some classes in there that can save me some time and trouble. license ?

dunno, lets say gpl for now

If you want people to actually be able to use it you'll need to put the license on Github, e.g. with GPL you need to supply a copy of the gpl, and should add headers to the file just to make things clear (See https://www.gnu.org/licenses/gpl-3.0.html ). Without clear licensing no responsible developer will touch the code with a bargepole. (GPL is a fairly safe first choice -- all improvements have to be rereleased as source code, and you can always switch to more permissive licences later should you wish.)
slothbag
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 18, 2013, 12:11:24 PM
 #8

Thanks for the library mb300sd.  It's been a big help for me..

I see you already have sign & verify for transactions, do you think you could add message signing & verification like in bitcoin-qt?

I got as far as adding the "Magic String", double SHA256 hashing the data and then ECDSA signing it.. but the ECKey.recoverFromSignature part has me stumped. (i'm comparing to bitoinj).

Willing to pay 1 BTC for it Smiley
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!