Bitcoin Forum
December 06, 2016, 12:29:52 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: New C# Bitcoin RPC Library  (Read 4821 times)
mb300sd
Legendary
*
Offline Offline

Activity: 1232

Drunk Posts


View Profile WWW
June 25, 2012, 07:48:44 AM
 #1

I wrote this for a couple projects I'm working on, but thought I'd share it since the only other C# library hasn't been updated in over a year. I've implemented every rpc call in 0.6.2, as well as the coin control branch.

https://github.com/mb300sd/Bitcoin.NET

Tested with Mono framework as well as Microsoft .Net.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
1481027392
Hero Member
*
Offline Offline

Posts: 1481027392

View Profile Personal Message (Offline)

Ignore
1481027392
Reply with quote  #2

1481027392
Report to moderator
1481027392
Hero Member
*
Offline Offline

Posts: 1481027392

View Profile Personal Message (Offline)

Ignore
1481027392
Reply with quote  #2

1481027392
Report to moderator
1481027392
Hero Member
*
Offline Offline

Posts: 1481027392

View Profile Personal Message (Offline)

Ignore
1481027392
Reply with quote  #2

1481027392
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
jim618
Legendary
*
Offline Offline

Activity: 1708



View Profile WWW
June 25, 2012, 08:41:37 AM
 #2

Good work there mb300sd!

Hopefully it will inspire C# coders to write <Insert Great New Bitcoin Program Here> with it.

:-)

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
_mr_e
Legendary
*
Offline Offline

Activity: 814


View Profile
June 27, 2012, 12:58:17 AM
 #3

Is there any documentation on how to use this? What is the Uri that needs to be passed into BitcoinRPC?
mb300sd
Legendary
*
Offline Offline

Activity: 1232

Drunk Posts


View Profile WWW
June 27, 2012, 04:57:39 AM
 #4

Is there any documentation on how to use this? What is the Uri that needs to be passed into BitcoinRPC?

Look in Test.cs for a basic example. No documentation but its pretty intuitive. All commands have the same parameters as the ones passed to bitcoind, and return a basic type, xxxxxxResponse class or IEnumerable<> of one. The xxxxxResponse classes have the same property names as the JSON objects returned by bitcoind.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
flower1024
Hero Member
*****
Offline Offline

Activity: 854


luck is just a share away


View Profile
June 27, 2012, 06:03:07 AM
 #5

does it work with blockchain.infos wallet? it does implement all bitcoin rpc calls

i just want to write a small stats app
mb300sd
Legendary
*
Offline Offline

Activity: 1232

Drunk Posts


View Profile WWW
June 27, 2012, 06:17:26 AM
 #6

does it work with blockchain.infos wallet? it does implement all bitcoin rpc calls

i just want to write a small stats app

I see no reason it wouldn't as long as the rpc calls are the same.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
Kitemike
Member
**
Offline Offline

Activity: 108



View Profile WWW
June 27, 2012, 09:28:30 PM
 #7

I’m glad to see I’m not the only one that writes 10,000 lines of code without a single comment LOL.  I’m still reading thru the code making sure there isn’t a line hidden in someplace that just steals my wallet, but so far it look pretty complete.  Thanks for making this available. I’m really looking forward to digging into it and automating my SatoshiDice plays. Wink

mb300sd
Legendary
*
Offline Offline

Activity: 1232

Drunk Posts


View Profile WWW
June 27, 2012, 11:20:19 PM
 #8

I’m glad to see I’m not the only one that writes 10,000 lines of code without a single comment LOL.  I’m still reading thru the code making sure there isn’t a line hidden in someplace that just steals my wallet, but so far it look pretty complete.  Thanks for making this available. I’m really looking forward to digging into it and automating my SatoshiDice plays. Wink

Exactly what I'm using it for Cheesy

----------------------

I just pushed a new branch that supports batch rpc calls from this pull request, https://github.com/bitcoin/bitcoin/pull/1512

Mostly untested.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
_mr_e
Legendary
*
Offline Offline

Activity: 814


View Profile
September 26, 2013, 02:18:44 AM
 #9

Is this library still working? I am trying to understand the code and run the test but am having a problem deserializing the result. I am getting the error:

Error setting value to 'result' on 'BitcoinNET.RPCClient.RPCResponse`1[Newtonsoft.Json.Linq.JObject]'.
BitKoot
Member
**
Offline Offline

Activity: 113



View Profile
September 26, 2013, 02:05:00 PM
 #10

Is this library still working? I am trying to understand the code and run the test but am having a problem deserializing the result. I am getting the error:

Error setting value to 'result' on 'BitcoinNET.RPCClient.RPCResponse`1[Newtonsoft.Json.Linq.JObject]'.

I case you can't get it to work, I have made a similar RPC wrapper for bitcoin-qt: BitcoinRpcSharp - A C# wrapper for the Bitcoin JSON RPC interface

One quick example (calling getinfo):
Code:
BitcoinWallet wallet = new BitcoinWallet("http://192.168.56.1:19001", "test", "123", false);
Info info = wallet.GetInfo();
Console.WriteLine("Current difficulty: {0}", info.Difficulty);
vual
Hero Member
*****
Offline Offline

Activity: 658



View Profile
September 29, 2013, 09:35:10 AM
 #11

Thanks a bunch, very sexy!

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!