8

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 HD pub key have more information than just the pubkey. The correct code is string wifStr = **pubkey**.Derive([some client data]).ToString(Network.Main) Then ...


4

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(dest: [Add any IDestination here, like new BitcoinAddress("mivD5GHroixrzgjv6Ww73pV5R55PcL8JdM", Network.TestNet)], unspentOnly: true).Result; if (balanceModel....


3

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.io/programmingblockchain/content/other_types_of_ownership/ for more info. But in a nutshell, if you want to have a P2WPKH-PS2SH (Segwit P2PKH wrapped into ...


2

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.SendMessage(new TxPayload(tx)); should be perfect. However Stratis is currently building a Bitcoin .NET fullnode, with the lead of Nicolas Dorier, NBitcoin's creator,...


2

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 looks like this: BitcoinAddress address = privateKey.Derive(orderID, true).Key.PubKey.GetAddress(Network.Main); It requires the private key. It also doesn't ...


2

////////////////1st offline SERVER////////////////// //Create Master Private Key with a seed ExtKey privateKey = new ExtKey("16236c2028fd2018eb7049825e6b4f0191de4dbff003579918de7b7348ff06ac"); //create master public key from this privateKey ExtPubKey pubKey = privateKey.Neuter(); //save it's wifStr as key to the next server to use and generate all child keys ...


2

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


2

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. These duplicates happen because the coinbase transaction in two different blocks can be exactly the same, so they have exactly the same txid. This is because ...


2

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 answer: https://ethereum.stackexchange.com/questions/3542/how-are-ethereum-addresses-generated Edit: Nethereum has implemented it in C#: https://github.com/...


1

The various private and public keys are all derived from that master seed.


1

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 means the m for those wallets is actually the key at the path m/44'/0'/0'. However in your code with NBitcoin, you are using direct BIP 32 paths, so your m is ...


1

I have found your transaction here: 12e548ababf06160486f91bfa2a406f131631258b2db025eb36bcd5230a70524 It was successfully created, signed and submitted. I can also see a message that you added in. There are a few things I picked up that are different when I look into the transaction vs how you built it up. The address that is derived from that private key ...


1

There is a comprehensive Bitcoin library for .NET called NBitcoin. You might want to check that out.


1

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.


1

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 transaction, you have two ways: One is to use TransactionBuilder.SetLockTime(blockHeight) where block height is the currentHeight-1 (actually, if you put 0 it will be ...


1

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 transactions: (output is in json) http://btc.blockr.io/api/v1/address/balance/198aMn6ZYAczwrE5NvNTUMyJ5qkfy4g3Hi,1L8meqhMTRpxasdGt8DHSJfscxgHHzvPgk?confirmations=1 ...


1

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", alice.GetAddress()), new TxOut("0.8", alice.Key.PubKey) } }; Coin[] aliceCoins = aliceFunding .Outputs .Select((o,...


1

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 https://blockchainprogramming.azurewebsites.net/ so I'm almost sure it is the problem. EDIT : You are crashing during Handshake, can you check Node....


1

API selection with other technology selection is having major dependencies on final goal. so you have to select the best suit of technology as per the business requirement.


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