Questions tagged [c#]

Pronounced "C-Sharp". A computer language developed by Microsoft.

Pronounced "C-Sharp". A computer language developed by Microsoft.

66 questions
9
votes
6 answers

Are there any C# Bitcoin libraries and/or mining pool software packages?

I was keen to write/launch a .Net pooled mining server as an exercise of getting into the Bitcoin universe. Are there any C# ports of the libraries needed to achieve this? If not Are there any current tech mining servers that would suit my skill…
BitCoin New Guy
  • 888
  • 4
  • 13
  • 22
7
votes
2 answers

How can i send bitcoin using c# and the nbitcoin library?

I am using NBitcoin library to create my private keys and addresses, but I can't find an example of how to send Bitcoin. Does anyone have a c# example code to send Bitcoin using the NBitcoin library ?
gideonlouw
  • 171
  • 1
  • 3
7
votes
1 answer

Which language has better Bitcoin API experience, C# or Node.js?

At the moment it seems to me on the .NET side NBitcoin would compete with Bitcoin.js on the other. Update: I decided on NBitcoin. It has a great book to learn from. Note I will not form opinion on my question, I contributed a great chunk of this…
nopara73
  • 796
  • 5
  • 21
7
votes
2 answers

C# parse bitcoin blockchain to get balance of an address

Is there a way to scan the Bitcoin blockchain in C# without using an external API? I am looking for the amount of spendable money of a Bitcoin address. I am using NBitcoin. // create new key pair based on private key NBitcoin.Key key = new…
Pa Ddy
  • 71
  • 1
  • 2
6
votes
2 answers

How to use NBitcoin for BIP32 wallets

I'm using c# NBitcoin to generate master key at an offline server ExtKey privateKey = new ExtKey("[My seed]"); ExtPubKey pubKey = privateKey.Neuter(); I will need to give the online server the master public key, and it can generate as many…
Haddar Macdasi
  • 978
  • 1
  • 14
  • 22
4
votes
1 answer

I'm developing on the Test network. Are there any "rules" or communication methods I should adopt?

I'm testing a C# port of the client on the Test network and need to test for a variety of conditions. Should I communicate to others regarding my actions on the network? If so, what method of communication should I use? Is there any expected…
makerofthings7
  • 12,656
  • 11
  • 60
  • 129
4
votes
2 answers

How do I call JSON RPC API using C#?

How do I access the JSON RPC API in C# in such a way that I can also read the errors that the interface provides?
makerofthings7
  • 12,656
  • 11
  • 60
  • 129
4
votes
2 answers

Is the generated Public Key from Private Key Unique in Bitcoin?

I am generating public key from my private key. I did in Java script and C#. but generated public keys are different. My Code in c# (KeyCore.NET): PrivateKey pv = new PrivateKey(Globals.ProdDumpKeyVersion,…
arman
  • 43
  • 4
4
votes
3 answers

How to get the bitcoin balance of a public key in C#?

How can I get the bitcoin balance of a public key in C#? E.g. for this public key: 1FqLoEpbQpMxow5bqEPpFbPVnBEbFcsg3J How can I get its balance in C#?
emcor
  • 141
  • 1
  • 5
4
votes
1 answer

JSON-RPC signrawtransaction returns false when using private keys

I've been working with BitcoinLib testing various parameters on the signrawtransaction rpc call. It's been mostly successful, however there seems to be a persisting problem when using only private keys to sign a transaction. (second optional…
angelitto
  • 94
  • 8
3
votes
1 answer

What is wrong with this C# code that converts a block's bits into a target?

UPDATE: The code in this question works for all test cases (Hurray!) however I don't like how GetCompact uses the Math.Abs function and don't think it's true to the OpenSSL implementation. Fixing this issue will probably make this implementation…
makerofthings7
  • 12,656
  • 11
  • 60
  • 129
3
votes
0 answers

Nbitcoin node c#

Create a transaction to send money, then it needs to be "registered" in the system, before doing so : using (var node = Node.Connect(Network.Main, node_address))//, node_address { try { …
Lolidze
  • 161
  • 5
3
votes
0 answers

nbitcoin Get balance

Try to get balance : var bitcoinPrivateKey = new BitcoinSecret("xxxx"); var network = bitcoinPrivateKey.Network; var address = bitcoinPrivateKey.GetAddress(); var client = new QBitNinjaClient(network); var balance =…
Lolidze
  • 161
  • 5
3
votes
1 answer

How do I Base58 Checked encode / decode an address in C#? What does "normalize leading zeros" mean?

I am trying to encode and decode a Base58 address in C#. The following function is a start, but it has a few issues: This code does not normalize leading zeros (what does that look like?) If this method is repeatedly called in rapid succession…
makerofthings7
  • 12,656
  • 11
  • 60
  • 129
3
votes
1 answer

How to determine if transaction is going to propagate?

So I am creating a transaction using TransactionBuilder like this: var builder = new TransactionBuilder(); Transaction tx = builder .AddCoins(coins) .AddKeys(privateKeys) .Send(recipientAddress, Money.Coins(amount)) …
rosstripi
  • 203
  • 1
  • 3
1
2 3 4 5