Bitcoin Forum
April 19, 2024, 11:57:10 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: New C# Bitcoin RPC Library  (Read 5191 times)
mb300sd (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

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
1713571030
Hero Member
*
Offline Offline

Posts: 1713571030

View Profile Personal Message (Offline)

Ignore
1713571030
Reply with quote  #2

1713571030
Report to moderator
1713571030
Hero Member
*
Offline Offline

Posts: 1713571030

View Profile Personal Message (Offline)

Ignore
1713571030
Reply with quote  #2

1713571030
Report to moderator
1713571030
Hero Member
*
Offline Offline

Posts: 1713571030

View Profile Personal Message (Offline)

Ignore
1713571030
Reply with quote  #2

1713571030
Report to moderator
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713571030
Hero Member
*
Offline Offline

Posts: 1713571030

View Profile Personal Message (Offline)

Ignore
1713571030
Reply with quote  #2

1713571030
Report to moderator
1713571030
Hero Member
*
Offline Offline

Posts: 1713571030

View Profile Personal Message (Offline)

Ignore
1713571030
Reply with quote  #2

1713571030
Report to moderator
1713571030
Hero Member
*
Offline Offline

Posts: 1713571030

View Profile Personal Message (Offline)

Ignore
1713571030
Reply with quote  #2

1713571030
Report to moderator
jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



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: 817
Merit: 1000



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 (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

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
Legendary
*
Offline Offline

Activity: 1428
Merit: 1000


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 (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

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
Merit: 10



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 (OP)
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

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: 817
Merit: 1000



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
Merit: 10



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: 714
Merit: 500



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

Thanks a bunch, very sexy!
edmlbox
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
August 26, 2020, 02:22:39 PM
 #12

The newest up to date c# library for .net  is .Net-Bitcoin-RPC with full documentation about each call. Very easy to use.
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6671


bitcoincleanup.com / bitmixlist.org


View Profile WWW
August 27, 2020, 02:58:25 PM
 #13

The newest up to date c# library for .net  is .Net-Bitcoin-RPC with full documentation about each call. Very easy to use.

What newer features does yours have over the original one? I looked through your project's commit history and these are the only additions I could find: https://github.com/edmlbox/.Net-Bitcoin-RPC/commit/c06532fbf1435b114b33e7235bb1fdc7c753c397#diff-793e161d67bc194802346c5b61423b04

It looks to me like the only things you added are a wrapper class for multiple wallets, a wallet name class, a wallet directory class and a class that serializes JSON.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!