A comprehensive Bitcoin library for the .NET framework.
Questions tagged [nbitcoin]
52 questions
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
0 answers
How to Use TransactionBuilder in NBitcoin
I have used this code. It returns a success, but does not send bitcoin.
var txRepo = new NoSqlTransactionRepository();
// Let’s me introduce you, Alice, Bob, Satoshi, and Nico with their private keys.
BitcoinSecret alice = new…
Hitesh
- 51
- 2
4
votes
1 answer
How to run QBitNinja Server locally?
I have written a simple program that determines the available balance of a Bitcoin wallet, but it used the public API for QBitNinja at http://tapi.qbit.ninja, and everything is working fine, but I wish to run the QBitNinja server locally on my PC. I…
Stephen MacDougall
- 41
- 3
3
votes
1 answer
Why does a same transaction signed separately have different witness values?
I signed a bitcoin testnet transaction using nbitcoin library and got an output:
…
Akshay Dev
- 75
- 6
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
NBitCoin Analyzing Blockchain
Maybe this question is utterly stupid, but I just don't get it:
I am doing some POC work to understand the BitCoin network a little better and chose C# and the NBitCoin library as my implementation for it. Now, I was trying to read through the…
AmbitiousScriptKiddy
- 43
- 2
3
votes
2 answers
How to sign a SegWit transaction via NBitcoin?
Most tutorials out there just show how to sign it in the legacy way. And I know that NBitcoin already supports SegWit, so is there a snippet out there on how to sign it this way?
knocte
- 1,764
- 1
- 17
- 32
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
3
votes
3 answers
NBitcoin - how to set RBF to true in order to give higher fee for transaction
I have a few transactions staying unconfirmed - been a few days now.
I suspect the minimum mining fee was upped - 15 minutes prior I was still doing hundreds of transactions a day at that fee - but now it is not enough.
All documentation indicates…
Peter PitLock
- 155
- 4
3
votes
1 answer
'The node is not in a connected state' error when trying to execute OP_RETURN transaction with NBitcoin
This is my first time trying out the NBitcoin library to create a transaction. I am trying to create an OP_RETURN transaction, but every time I try to execute the Version Handshake with the node I get the error: The node is not in a connected…
cfly24
- 101
- 3
2
votes
2 answers
What is needed to generate a bech32 address?
So I wrote a vanity address generator in c# with the NBitcoin lib. When I use the private key used to generate the address and input it in Mycelium it outputs a different address. This does not occur when working with legacy addresses, so I'm…
Relaxo143
- 21
- 2