Author

Topic: Connecting to a Bitcoin Core Server (Read 203 times)

newbie
Activity: 11
Merit: 2
September 16, 2022, 08:44:59 PM
#11
What is an appropriate subpoena?

So I want the summons.  the appropriate.

You use strange words, possibly cause by some translation software you're using.
This makes it difficult for the people understand your questions, hence the answers are guesses.
You also didn't say whether your problem is solved or not. If it's not, maybe you try to ask clearer (more words at the very least) or maybe you also ask in the subforum for your local language...

Sorry dear.  I may have typed some words wrong.  But I didn't notice
newbie
Activity: 11
Merit: 2
September 16, 2022, 08:34:08 PM
#10
Dear.  I have a fully synchronized bitcoin node on my device.  I have an app that I made in his language.  C#.  All I want is to connect to the Bitcoin Core server through the app I made.  So I want the summons.  the appropriate.  In order to put it in my application and control my Bitcoin Core wallet through this application.  And that's it.  Thank you all for your wonderful responses

So you want to control your Bitcoin core wallet with your app built with C# language. We already told you what you need RPC API should be work if you can't able to use them and you receive a few errors using RPC commands I suggest you check your Bitcoin.conf file and add these 2


Code:
#For JSON-RPC commands
server=1

# Accept public REST requests
rest=1

Also, I think you still don't know how to put an HTTP request in your app you can use it to send commands like " $ ./bitcoin-cli getbalance" from your wallet.

Most of us here don't understand why you can't make it work and honestly, if you receive an error sending these RPC commands you should tell us the error so that we know the next suggestion. Without error or any update from your APP, this thread will become a long thread without solving your case.

Yes, brother, this is what I mean by submitting an application in my program.  I searched and found his desk on the wiki.  I found a suitable arrangement for the language.  C#.  Check if this is correct.....

 HttpWebRequest webRequest =
(HttpWebRequest) WebRequest.Create ("http://localhost.:8332");
      webRequest.Credentials = new NetworkCredential("user", "pwd");
      /// IMPORTANT, otherwise the service will not be able to fulfill your request properly
      webRequest.ContentType="application/json-rpc";
      webRequest.Method = "POST";
 
      JObject joe = new JObject(),
      joe.Add(new JProperty("jsonrpc", "1.0")));
      joe.Add(new JProperty("id", "1")));
      joe.Add(new JProperty("method", method));
      // Parameters are array values ​​required by the method..
      If (Params.Keys.Count == 0)
      {
       joe.Add(new JProperty("params", new JArray()));
      }
      else
      {
          props JArray = new JArray();
          // Add props in reverse order!
          for (int i = Params.Keys.Count - 1; i > = 0; i--)
          {
             .... // add parameters
          }
          joe.Add (new JProperty ("params", props);
          }
 
          // json sequence for request
          string s = JsonConvert.SerializeObject(Joe),
          byte[] byteArray = Encoding.UTF8.GetBytes,
          webRequest.ContentLength = byteArray.Length,
          dataStream = webRequest.GetRequestStream(),
          dataStream.Write(byteArray, 0, byteArray.Length);
          dataStream.Close(),
     
     
          WebResponse webResponse = webRequest.GetResponse(),
     
          ... // deserialize the response
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
September 16, 2022, 05:01:53 AM
#9
What is an appropriate subpoena?

So I want the summons.  the appropriate.

You use strange words, possibly cause by some translation software you're using.
This makes it difficult for the people understand your questions, hence the answers are guesses.
You also didn't say whether your problem is solved or not. If it's not, maybe you try to ask clearer (more words at the very least) or maybe you also ask in the subforum for your local language...
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
September 15, 2022, 06:57:05 PM
#8
Dear.  I have a fully synchronized bitcoin node on my device.  I have an app that I made in his language.  C#.  All I want is to connect to the Bitcoin Core server through the app I made.  So I want the summons.  the appropriate.  In order to put it in my application and control my Bitcoin Core wallet through this application.  And that's it.  Thank you all for your wonderful responses

So you want to control your Bitcoin core wallet with your app built with C# language. We already told you what you need RPC API should be work if you can't able to use them and you receive a few errors using RPC commands I suggest you check your Bitcoin.conf file and add these 2


Code:
#For JSON-RPC commands
server=1

# Accept public REST requests
rest=1

Also, I think you still don't know how to put an HTTP request in your app you can use it to send commands like " $ ./bitcoin-cli getbalance" from your wallet.

Most of us here don't understand why you can't make it work and honestly, if you receive an error sending these RPC commands you should tell us the error so that we know the next suggestion. Without error or any update from your APP, this thread will become a long thread without solving your case.
newbie
Activity: 11
Merit: 2
September 14, 2022, 11:07:36 PM
#7
It seems you already have an old thread about connecting Bitcoin to your C# program?

API calls should be the right command you need but you need to make sure if your Bitcoin core is fully synced to be able to use other features and commands because not all features will work if your Bitcoin is not yet fully synced.

If you can just give us some idea of what exactly you want to achieve with C# maybe we can give you some examples to be able to communicate your C# program to your Bitcoin core server.

Dear.  I have a fully synchronized bitcoin node on my device.  I have an app that I made in his language.  C#.  All I want is to connect to the Bitcoin Core server through the app I made.  So I want the summons.  the appropriate.  In order to put it in my application and control my Bitcoin Core wallet through this application.  And that's it.  Thank you all for your wonderful responses
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
September 14, 2022, 10:39:44 AM
#6
It seems you already have an old thread about connecting Bitcoin to your C# program?

API calls should be the right command you need but you need to make sure if your Bitcoin core is fully synced to be able to use other features and commands because not all features will work if your Bitcoin is not yet fully synced.

If you can just give us some idea of what exactly you want to achieve with C# maybe we can give you some examples to be able to communicate your C# program to your Bitcoin core server.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
September 14, 2022, 10:01:03 AM
#5
Your previous details weren't sufficient apparently, that's why you didn't get a clear answer. Just tell us what you're trying to accomplish, without disclosing who you are or what's your project. Are you searching for a Bitcoin C# library? If so, NBitcoin and Bitcoin.Net are your best courses. If you need to communicate with your Bitcoin Core wallet, then you'll have to search the RPC API reference.
legendary
Activity: 952
Merit: 1386
September 14, 2022, 07:04:03 AM
#4
What exactly do you want to do? If you want to use RPC api from Bitcoin Core, you need only basic knowledge of HttpWebRequest.

Or take a look at that library: https://github.com/cryptean/bitcoinlib

legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
September 14, 2022, 03:26:00 AM
#3
I am not sure what you need.
* Is it the development environment? Then Visual Studio will do. If you look carefully you'll find free versions on Microsoft website.
* Is it a c# library for this kind of projects? Then look at NBitcoin (https://github.com/MetacoSA/NBitcoin which is also available as NuGet packaged for Visual Studio , but just look at git page for other links, docs, or even applications to look into).
* It is examples? Again, NBitcoin git has links. There are there even links to nice CodeProject pages.
legendary
Activity: 3346
Merit: 3130
September 13, 2022, 09:03:11 PM
#2
I'm not a C# coder, but when you understand the nature of bitcoin is the same for all languages.

You need to understand bitcoin is a service, and you want need to make the call on it's port (8332) to get the data in JSON and for that you can use a wrapper.

https://programmingblockchain.gitbook.io/programmingblockchain/wallet/full-node
https://gameobject.net/game-program/json-rpc-bitcoin-visual-studio-csharp-application-tutorial-1549/

The calls that you can make and the commands are the same that you can make with bitcoin-cli, with that tool you can list transactions, create transactions, get data from the blockchain and do all the stuff that the core allows.

I hope this info helps in your project  Wink
newbie
Activity: 11
Merit: 2
September 13, 2022, 07:46:27 PM
#1
Hello my supportive brothers here.  Please I asked for your help before, but I couldn't find a clear answer to my request.  It's simple and clear.  I have an application built in a language.  C #.  Through it I would like to connect to my Bitcoin Core wallet on the same machine.  What is an appropriate subpoena?  To put it in the application you created.  This means that I want to connect to my Bitcoin Core wallet through the app I made.  To remind the app in its language.  C# I want to call.  Appropriate.  in this language.  Windows system.  Thank you
Jump to: