10 votes
Accepted

How to use NBitcoin for BIP32 wallets

when you are doing BitcoinAddress address1 = **pubKey**.Derive([some client data]).PubKey.GetAddress(Network.Main); You are getting the bitcoin address, but not the master public key. (ExtPubKey) A ...
user avatar
4 votes
Accepted

Why does a same transaction signed separately have different witness values?

Bitcoin signatures have two components: s and R. To sign a Bitcoin transaction with private key k, the signing algorithm generates an ephemeral private key r. The R component of the signature is the x-...
user avatar
  • 6,978
4 votes

C# parse bitcoin blockchain to get balance of an address

How about running a QBitNinja server locally? var client = new QBitNinjaClient(baseAddress:"specify host here, you probably want localhost", Network.TestNet); var balanceModel = client.GetBalance(...
user avatar
  • 788
4 votes

How to sign a SegWit transaction via NBitcoin?

signing with Segwit is in no way different from signing with P2SH or P2PKH. If you want interoperability, you need to use Segwit wrapped into P2SH. Please check https://programmingblockchain.gitbooks....
user avatar
3 votes

Blockchain Explorer for local full node

You could check https://github.com/Blockstream/esplora I think it ticks all of the boxes, I am not sure about the NBitcoin though.
user avatar
  • 1,584
2 votes

How to determine if transaction is going to propagate?

Verify() verifies if the transaction is properly signed. Since Verify() doesn't really tell us if a transaction will successfully propagate It is either untrue or you found a bug. node....
user avatar
  • 788
2 votes

How to run QBitNinja Server locally?

No, it is not possible. QBitNinja is too tightly coupled with Azure, that means vendor-locked. See this issue for a recent attempt to decouple it.
user avatar
2 votes
Accepted

Does NBitcoin use hardened private derivation?

Am I using hardened private derivation function? No. You're using nonhardened derivation. That's the only kind of derivation that you can use when you only have the public key. Hardened derivation ...
user avatar
  • 28.7k
2 votes

How to use NBitcoin for BIP32 wallets

////////////////1st offline SERVER////////////////// //Create Master Private Key with a seed ExtKey privateKey = new ExtKey("16236c2028fd2018eb7049825e6b4f0191de4dbff003579918de7b7348ff06ac"); //...
user avatar
2 votes

How can I integrate Bitcoin payments into my website created in C#?

Here is a book which teach you some basics of bitcoin programming https://programmingblockchain.gitbooks.io/programmingblockchain/content/
user avatar
2 votes
Accepted

NBitCoin Analyzing Blockchain

You aren't doing anything wrong. You just need to be able to handle those duplicate transaction ids. It actually happens a few times before BIP 30 went into effect making such duplicate txids invalid. ...
user avatar
  • 62.2k
2 votes

Using NBitcoin or C# to derive Litecoin and Ethereum Addresses from Master HD Key

Not sure how NBitcoin works, but it looks like so far you have derived your private and public key, you now need to hash it in the Ethereum method rather than the bitcoin way. Look at step 3 in this ...
user avatar
2 votes

Blockchain Explorer for local full node

You can use my blockchain parser (python script) that converts the local copy of blockchain (blkXXXXX.dat files) to human readable text view -> my parser Bases on this parser you can do anything you ...
user avatar
2 votes
Accepted

What is the signature digest for Segwit outputs

For signatures in P2WPKH and P2WSH spends, the sighash algorithm is described in BIP143. It is very different from the one used in legacy spends.
user avatar
1 vote

NBitcoin how can I get notify when I receive coins?

NBitcoin is only a library. In order to get notified upon receipt of funds you would need to be running a bitcoin implementation such as bitcoin-core and use it's JSON-RPC, or ZMQ or it's built-in ...
user avatar
  • 5,233
1 vote
Accepted

NBitcoin -- How do I just check the balance of my wallet from my seed phrase?

Use var key = mnemoObj.DeriveExtKey(); then you can derive addresses as explained in this chapter (https://programmingblockchain.gitbook.io/programmingblockchain/key_generation). mnemo = new Mnemonic(&...
user avatar
  • 5,233
1 vote

How can I get all transaction for a specific address using Nbitcoin?

you can't get all the transactions done on an address using just Nbitcoin. you need a block explorer for that. you can check out qbi t, blockcypher etc. However you can get that using Nbitcoin and ...
user avatar
1 vote

How can I get all transaction for a specific address using Nbitcoin?

var client = new QBitNinjaClient("http://api.qbit.ninja/", Network.Main); var address1 = new BitcoinPubKeyAddress("your --Address", Network.Main); var balance = await client....
user avatar
1 vote
Accepted

Do transactions need to be signed

Transaction do not need to be signed. They are if the locking script requires so, which is the most usual thing, but scripts redeemable without a signature can also be valid. That being said, a ...
user avatar
  • 2,712
1 vote

Electrum's "script hash" form with NBitcoin?

In F#: let address = BitcoinAddress.Create("1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1", NBitcoin.Network.Main) let sha = NBitcoin.Crypto.Hashes.SHA256(address....
user avatar
  • 1,668
1 vote

Understanding a Wallet Restore

The various private and public keys are all derived from that master seed.
user avatar
1 vote

NBitcoin: signing a transaction in TestNet

I have found your transaction here: 12e548ababf06160486f91bfa2a406f131631258b2db025eb36bcd5230a70524 It was successfully created, signed and submitted. I can also see a message that you added in. ...
user avatar
1 vote
Accepted

NBitcoin and Mnemonic Standards

The mnemonic standard is BIP 39, and that is not the problem. The problem is the derivation paths. Exodus, Jaxx, Coinomi, and many other wallets use the BIP 44 specification for deriving keys. This ...
user avatar
  • 62.2k
1 vote

How to sign a SegWit transaction via NBitcoin?

I got stuck on this as well and combined with Nicolas answer the code samples below are what helped sort out my understanding. I used the simplest segwit example from bip-0143 as the basis. The c# ...
user avatar
1 vote

How can I integrate Bitcoin payments into my website created in C#?

There is a comprehensive Bitcoin library for .NET called NBitcoin. You might want to check that out.
user avatar
  • 64.4k
1 vote

NBitcoin - how to set RBF to true in order to give higher fee for transaction

NBitcoin just follow BIP125 public bool RBF { get { return Inputs.Any(i => i.Sequence < 0xffffffff - 1); } } If you are using the TransactionBuilder for creating a ...
user avatar
1 vote

How to confirm a payment was made?

I'm not sure about Nbitcoin node's API, but I could help you on a blockchain explorer API. I would recommend Blockr.io, they are fast and trustable. Use the following code to check for confirmed ...
user avatar
1 vote

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

You can find an example here. Specifically, see the first example where Alice sends bitcoins to Satoshi: Transaction aliceFunding = new Transaction() { Outputs = { new TxOut("0.45", ...
user avatar
  • 2,204
1 vote

'The node is not in a connected state' error when trying to execute OP_RETURN transaction with NBitcoin

I think the problem is that there is only OP_RETURN, I remember seeing in the Bitcoin code that only OP_RETURN without anything else is forbidden. Except that, your code looks like what is in my book ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible