Questions tagged [c#]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
99 views

NBitcoin in C# MVC App Gives Me A WitnessProgramMissmatch Error When I Try to Build The Transaction

I am writing tests for an app I built that uses NBitcoin to send bitcoin and make bitcoin transactions. I have the following code to create fake bitcoins for an integration test: private ICoin[] ...
ChristianOConnor's user avatar
1 vote
0 answers
57 views

Buy Bitcoin with NBitcoin c# Web App

I have been using the NBitcoin lib with c# to create a Bitcoin wallet app. I have pretty much sorted out the creation of the wallet and everything that this entails. What I need some help with is on ...
Michael Brooks's user avatar
0 votes
0 answers
98 views

C# Bitcoin class - Create unique btc address for each order - make deposit & withdraw

I am looking for a good library in c# for bitcoin as payment method in my web site. My purposes from this library : Create unique btc address for each order deposit job with callback url withdraw job ...
SilverLight's user avatar
1 vote
1 answer
219 views

developing hd wallet using bip32 and bip 39

I'm developing a HD wallet using C#. I want to use this wallet for multiple blockchains like bitcoin, ethereum, dogecoin etc... I've read that I should use bip32 for my wallet. i know what's bip32 but ...
amir's user avatar
  • 11
0 votes
1 answer
176 views

Read Wallet addresses with C# and Berkeley

I have searched all threads, but still couldn't find an answer. I am trying to read from a wallet that is not encrypted, but I am not able to proceed on retrieving the address values, they are byte[] ...
John Lopez's user avatar
1 vote
2 answers
1k views

Generate BTC Private key from user string input

I am looking to generate a Bitcoin Address from an user input text (like the good old days Brainwallet). User input a "Text string" and based on this text string generate the corresponding ...
Olivier Martin's user avatar
0 votes
1 answer
317 views

Generate public addresses (NBitcoin)

I'm trying to generate a public address and for that, I have the code: var key = new Key(); var wif = key.GetWif(Network.Main); Console.WriteLine($"WIF: {wif}"); var secret = new ...
Paulo Aboim Pinto's user avatar
1 vote
1 answer
163 views

Nbitcoin's BitcoinPubKeyAddress not recognizing native segwit addresses

I'm trying to build a transaction using Nbitcoin. When I run this line there is an error parsing the address. It runs fine with segwit addresses starting with a 1, but not native segwit. Using System; ...
Chiru's user avatar
  • 141
0 votes
0 answers
216 views

Bitcoin payment gateways in c#

My question is about Bitcoin payment gateways and we can add their gateways to my site Like those sites (bitpay.com,https://gourl.io/), I want to create a bitcoin payment gateway in C# my question : ...
user2071969's user avatar
0 votes
1 answer
744 views

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

I've looked through the docs, I've Googled, I've searched here, and it all just seems like Greek to me... I must not be using the right keywords, because I just can't figure out what I think should be ...
encoder's user avatar
  • 103
0 votes
3 answers
2k views

Generate address of 'private key' from user input

I want to take a private key as input from the user and convert it to a wallet address using C#. I have seen this in a tutorial to generate a random key: Key privateKey = new Key(); PubKey publicKey = ...
svvc's user avatar
  • 21
2 votes
2 answers
1k views

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 ...
Relaxo143's user avatar
0 votes
1 answer
168 views

NBitcoin Transaction sign(secret, bool) is giving error. Instead of bool it says to pass Coin Object

I am using NBitcoin (I'm new to it) to sign a transaction. Here Transaction sign(secret, bool) method is giving error. (I've searched the Internet, but got no help.) Instead of bool it says to pass ...
Abhishek Pandey's user avatar
0 votes
1 answer
237 views

How do I call getblocktemplate from C#'s bitcoinlib?

How do I call getblocktemplate from the bitcoinlib package for C#? This call does not work ICoinService CoinService = new BitcoinService(useTestnet: true); var blockTemplate = CoinService....
Thorkil Værge's user avatar
0 votes
0 answers
56 views

How to recover bitcoin wallet from messed up seeds [duplicate]

I have a ledger nano s wallet that is broken , when i tried to recover wallet from 24 recovery word i got error that says the recovery phrase is incorrect, i think the place of some words is incorrect ...
M Taher's user avatar
1 vote
1 answer
195 views

How do I connect to the Electrs index?

Goal: My goal is to be able to have my own local blockchain indexed so I can perform searches based on public keys. Blockchain: wget https://bitcoincore.org/bin/bitcoin-core-0.19.1/bitcoin-0.19.1-...
oshirowanen's user avatar
1 vote
2 answers
7k views

Blockchain Explorer for local full node

I would like to build my own blockchain explorer because I have found that using the API's of 3rd party blockchain explorers only gives me around 2 or 3 requests per second. Does an open source ...
oshirowanen's user avatar
0 votes
1 answer
99 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
Matheus's user avatar
  • 101
1 vote
2 answers
442 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 ...
Martin Lipták's user avatar
0 votes
2 answers
482 views

Invoking the listunspent command via json-rpc on a full node

I am trying to use the following example code for C# programming, so I can connect to my own bitcoin full node: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#.NET_.28C.23.29 Which has resulted ...
oshirowanen's user avatar
0 votes
1 answer
51 views

About Nbitcoin NodeBehavior

We wrote our transaction listener and we were implement the NodeBehavior class. But when I update version of NBitcoin v3.0.0.60 to v4.1.1.46 I can't use the NodeBehavior. Because Nbitcoin cannot ...
Turgut Kanceltik's user avatar
1 vote
3 answers
1k views

Trying to understand parent fingerprint in HD wallets

I'm trying to implement a barebones HD wallet generator in C#. I'm starting with a mnemonic and derivation path m/0' and want to generate BIP141 p2wpkh-in-p2sh addresses. Obviously for the Master ...
MrPuzzler's user avatar
  • 233
3 votes
0 answers
452 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 { ...
Lolidze's user avatar
  • 161
2 votes
1 answer
527 views

C# code for Bitcoin Cash address conversion between legacy and new format

I need to convert legacy Bitcoin Cash addresses to new format and back. I am aware of similar question, but it asks about PRC and has solution using python, JS. I need it done in C# with no ...
Igor Yalovoy's user avatar
3 votes
0 answers
2k 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(...
Lolidze's user avatar
  • 161
1 vote
0 answers
2k 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 ...
Orion's user avatar
  • 11
0 votes
2 answers
2k views

C#, How can I actively query the crypto-market?

Are there any wrappers to get the real-time crypto-currency value similar to coincap.io? Right now I am using Json to deserialize a download string from CoinMarketCap, however, the api does not ...
herboren's user avatar
0 votes
1 answer
899 views

Creating Payment system using Blockchain API

I see a whole lot of websites using the blockchain API to create bitcoin wallets (if i am correct), send and receive payments, I know how to ordinarily make a payment system using C#/MSSQL or PHP/...
John's user avatar
  • 1
2 votes
1 answer
635 views

C# library for exploring Bitcoin Cash blockchain

Does anyone know of a good C# library which would enable me to explore the Bitcoin Cash blockchain by communicating with my own node? Something like Nethereum (Web3) for Ethereum. Or, alternatively, ...
Eutherpy's user avatar
  • 153
1 vote
1 answer
765 views

Can't RPC to Bitcoind (C# / Windows)

I am running a node on Windows Server 2016. Everything seems to be running fine. If I go to https://bitnodes.earn.com/ and put myip:8333, the node is successfully reachable. My bitcoin.conf is: ...
Thomas's user avatar
  • 125
2 votes
2 answers
2k views

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

I am using NBitcoin, C# and the Bip44 standard to create an hdroot to derive child keys from. I then create keys that I want to use for Litecoin and Ethereum addresses by setting the proper 'coin_type'...
INNVTV's user avatar
  • 133
1 vote
0 answers
343 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 ...
Alex Ashmore's user avatar
1 vote
0 answers
934 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 ...
toxic2501's user avatar
2 votes
1 answer
3k views

NBitcoin: signing a transaction in TestNet

I am using the NBitcoin Library to program a simple Bitcoin Transfer Program in C#. The Program will take the coins from a Transaction ID and then Transfer it to a Destination Wallet Address The ...
Dr. David Bowman's user avatar
3 votes
1 answer
459 views

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,...
rosstripi's user avatar
  • 203
4 votes
2 answers
917 views

Is the generated Public Key from Private Key Unique in Bitcoin?

I am generating public key from my private key. I did in Java script and C#. but generated public keys are different. My Code in c# (KeyCore.NET): PrivateKey pv = new PrivateKey(Globals....
arman's user avatar
  • 43
3 votes
2 answers
2k 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 ...
greedomyhero's user avatar
4 votes
3 answers
5k views

How to get the bitcoin balance of a public key in C#?

How can I get the bitcoin balance of a public key in C#? E.g. for this public key: 1FqLoEpbQpMxow5bqEPpFbPVnBEbFcsg3J How can I get its balance in C#?
emcor's user avatar
  • 141
7 votes
2 answers
8k views

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's user avatar
1 vote
0 answers
470 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 ...
Fernando Tiberti's user avatar
2 votes
0 answers
1k 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 ...
user31889's user avatar
0 votes
0 answers
302 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 ...
BitcoinLiam's user avatar
3 votes
2 answers
1k views

Sender address from DecodeRawTransaction (C#)

I'm trying to get the senders address using the Bitcoin JSON RPC in C#. So I GetRawTransaction and then use the DecodeRawTransaction method to return my JSON object. I can see in the 'vout' of this ...
BitcoinLiam's user avatar
7 votes
1 answer
771 views

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 ...
nopara73's user avatar
  • 796
7 votes
2 answers
7k views

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 ...
Pa Ddy's user avatar
  • 71
6 votes
2 answers
4k views

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 ...
Haddar Macdasi's user avatar
3 votes
2 answers
2k views

How to generate a Litecoin Private key and correspondent Public Address in C#

I found this C# tool to generate addresses for Bitcoin (compressed and uncompressed): https://en.bitcoin.it/wiki/Bitcoin_Address_Utility https://github.com/casascius/Bitcoin-Address-Utility It ...
Gustir's user avatar
  • 33
0 votes
2 answers
995 views

Bitfinex 400 error

string url = @"https://api.bitfinex.com/v1/balances"; string paramDict = "{\"request\": \"/v1/balances\",\"nonce\": \"" + GetNonce() * 10000 + "\"}"; string payload = Convert....
Yura Sultanov's user avatar
1 vote
1 answer
386 views

c# BitcoinLib: GetRawTransaction verbose=1 does not work

I want to find out confirmation number for non-wallet transaction. When I use CoinService.DecodeRawTransaction(CoinService.GetRawTransaction("...
Alex's user avatar
  • 183
1 vote
1 answer
581 views

Matching KeyPath in application with Wallet32 Keypath for Bip44 wallets

I have an application where I create an HD wallet with a passphrase and save the public master key to the database for the user. Then, I want the user to be able to back up the wallet to their own ...
pfunc's user avatar
  • 111