Questions tagged [c#]

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

16 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
2answers
1k views

C# BC, successfully creating and signing raw transaction

First time on stackexchange to ask for help, sorry if i make mistakes (english is not my native language). I try to create a valid raw transaction on C# with bouncycastle and i seems stuck, not able ...
2
votes
0answers
213 views

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 { ...
2
votes
0answers
818 views

nbitcoin Get balance

Try to get balance : var bitcoinPrivateKey = new BitcoinSecret("xxxx"); var network = bitcoinPrivateKey.Network; var address = bitcoinPrivateKey.GetAddress(); var client = new QBitNinjaClient(...
2
votes
0answers
1k views

bitcoind 400 bad request - what's wrong with this code?

As per this code sample, I'm attempting to make a .net httpwebrequest from my local machine to a local bitcoind -daemon server. However, I'm only receiving a 400 bad request at webRequest.GetResponse()...
1
vote
2answers
224 views

NBitcoin, how to implement wallet restoration? How does it work?

at first sorry for my ignorance, I have little experience at bitcoin programming. Im trying to implement a very simple wallet using NBitcoin library. I have done some work, but now Im stucked with ...
1
vote
0answers
628 views

call JSON RPC API Using C#?

I am trying to call JSON RPS API Using C#. I have added my own IP address with its credentials. Before writing API in C#, I have installed Bitcoin on my server. Now, using the server details, i ...
1
vote
0answers
219 views

Creating HD wallets with BouncyCastle in C#?

I'm trying to write a class that can be used to generate public/private key pairs for bitcoin (and any of its 'clones'), I found some code elsewhere that uses BouncyCastle to generate keys, here's the ...
1
vote
0answers
635 views

How can I see the wallet balance using Blockchain Api? C#

Stupid question, but I cant get it So, then I type my wallet adress on blockchain.info I immediately can see my balance, but from my project I can't type something like: WalletAddress wa = new ...
1
vote
0answers
388 views

How to add parameters like “-regtest=1” to a JSON-RPC call in C#?

I'm trying to modify the CoiniumServ codebase ( https://github.com/int6/CoiniumServ ), so it supports bitcoind in regtest mode. I know using bitcoin-cli you need to add -regtest to the bitcoin-cli ...
1
vote
0answers
889 views

Creating publicKey from random programtically in c#

I've been looking around I can't understand or find a complete explanation of how to accomplish this, I've tried multiple way even this link How do you get a Bitcoin Public Key from a Private Key ...
1
vote
0answers
266 views

Mt.Gox API v2 with C# - authentication problem 403

I'm trying to access the Mt.Gox API v2 via C# and HTTP requests. I've put together the following code based on various examples I found online (e.g. the nitrous documentation). private string ...
1
vote
0answers
3k views

C# - JSON-RPC - How to build the json object before serialization (createrawtransaction)

I am trying to build a C# application working on JSON-RPC with Bitcoin-qt (server mode). I am using Bitsharp, though I don't think this should matter at all. First off the InvokeMethod: ...
0
votes
0answers
30 views

How to calculate nBits from difficulty?

I've created some code for generate target from difficulty. var maxTarget = (double)Diff1; // Diff1 is BigInteger var target = new BigInteger(maxTarget / difficulty); return target.ToString("X"); ...
0
votes
0answers
65 views

Using NBitcoin to send Btc in C#

I have a variable number of addresses I want to send Btc to and I have a wallet (created in NBitcoin) as the source. A couple of questions. All the examples use the fluent methodology to declare, ...
0
votes
1answer
31 views

Candle decimal places

What is the query param to specify the decimal precision in Bitfinex API v2? Seemly the default precision is ####.0, but i want a "precision more precise" than only one decimal place
0
votes
0answers
263 views

bitcoinlib 'There was a problem sending the request to the wallet'

I've configured the bitcoin.conf and web.config file in visual studio to match, and I keep getting the above exception, also getting this when I run it... 'No connection could be made because the ...