dgarage / NBXplorer

NBitcoin Explorer
MIT License
320 stars 211 forks source link

Need help with a setup and explanation how it works #64

Closed Ilchuk-Mihail closed 11 months ago

Ilchuk-Mihail commented 6 years ago

Please explain how to it works.

Why is this the best of a node?

How to create BitcoinExtPubKey or ExtKey form string public and private key ?

NicolasDorier commented 6 years ago

See https://github.com/dgarage/NBXplorer#how-to-build-and-run to build and run it.

Read https://programmingblockchain.gitbooks.io/programmingblockchain/content/ to understand what an HD wallet is.

Use new BitcoinExtPubKey(string wif, Network network).

Ilchuk-Mihail commented 6 years ago

I read this.

wif it's the same Bitcoin secret (private key) var btcExtPubKey = new BitcoinExtPubKey("cUfCb55kyVQuAo289YbwgWyca55UGXwABMuv4FApQc6Wwvh8N7JW", Network.TestNet); exception FormatException: The version prefix does not match the expected one 4,53,135,207

NicolasDorier commented 6 years ago

cUfCb55kyVQuAo289YbwgWyca55UGXwABMuv4FApQc6Wwvh8N7JW is not an ExtKey.

NicolasDorier commented 6 years ago

new BitcoinSecret(string wif, Network network). Please read https://programmingblockchain.gitbooks.io/programmingblockchain/content/wallet/

Ilchuk-Mihail commented 6 years ago

I have btc public key , private key and address. how to convert it to BitcoinExtPubKey or ExtKey ?

NicolasDorier commented 6 years ago

Ah, you can't. NBxplorer is only useful for HD wallet (ie, wallet that change addresses at every payment)

You can't track single keys with NBXplorer. You can just use bitcoin core with RPCClient and importprivkey for doing what you want.

NicolasDorier commented 6 years ago

You can also use a public block explorer like QBitNinja.Client nuget package which has a client.GetBalance or something, read the book.

Ilchuk-Mihail commented 6 years ago

I need implemet wallets for BTC, BCH, LTC - like exchange Creating wallet, send transaction, get transaction, get balance etc... for many users .net core backend

I want to use NBitcoin - for creating hd wallet , creating transaction. First I think use QBitNinja, but it's only for btc.

I found this libs - BitcoinLib https://github.com/GeorgeKimionis/BitcoinLib and NBXplorer https://github.com/dgarage/NBXplorer They support BTC, LTC , (BCH?)

What do you recommend using?

NicolasDorier commented 6 years ago

Don't use QBitNinja, use NBXplorer, this is exactly for what it is for.

NBitcoin is a library, NBXplorer is a block explorer. BitcoinLib is a Bitcoin RPC library (which NBitcoin also include).

While you can use RPC for making your exchange, don't do this, it is hell of a pain. Just use NBXplorer.

NBXplorer support multiple blockchain on the same server.

Ilchuk-Mihail commented 6 years ago

(NBitcoin also include) only some features (https://github.com/MetacoSA/NBitcoin/blob/331a76a3fdd4dcc38391091b6f19f4c91f7bdb3f/NBitcoin/RPC/RPCClient.cs)

BitcoinLib - much more functions implemented

NBXplorer - I would love to try it, but I do not fully understand how to work with him.

Does he fit my tasks:

creating wallet (private, public key) send transaction get transaction get balance get utxo notifications

@NicolasDorier NBXplorer support multiple blockchain on the same server.

How to get started with it? I picked up the node (bitcoind) what's next?

NicolasDorier commented 6 years ago

I picked up the node (bitcoind) what's next?

Read the README and the doc and the book.

BitcoinLib - much more functions implemented

No, NBitcoin has more feature, the RPCClient is spread on several files.

Kukks commented 11 months ago

I believe the docs currently cover this quite well by now. Closing.