Bitcoin Forum
May 06, 2024, 06:55:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Connecting to a Bitcoin Core Server  (Read 184 times)
Ahmadn111 (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 2


View Profile
September 14, 2022, 12:46:27 AM
 #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
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715021713
Hero Member
*
Offline Offline

Posts: 1715021713

View Profile Personal Message (Offline)

Ignore
1715021713
Reply with quote  #2

1715021713
Report to moderator
1715021713
Hero Member
*
Offline Offline

Posts: 1715021713

View Profile Personal Message (Offline)

Ignore
1715021713
Reply with quote  #2

1715021713
Report to moderator
seoincorporation
Legendary
*
Offline Offline

Activity: 3150
Merit: 2930


Top Crypto Casino


View Profile
September 14, 2022, 02:03:11 AM
 #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

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
NeuroticFish
Legendary
*
Offline Offline

Activity: 3668
Merit: 6379


Looking for campaign manager? Contact icopress!


View Profile
September 14, 2022, 08: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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
September 14, 2022, 12:04:03 PM
 #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

BlackHatCoiner
Legendary
*
Online Online

Activity: 1512
Merit: 7355


Farewell, Leo


View Profile
September 14, 2022, 03:01:03 PM
 #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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BitMaxz
Legendary
*
Online Online

Activity: 3248
Merit: 2965


Block halving is coming.


View Profile WWW
September 14, 2022, 03:39:44 PM
 #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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Ahmadn111 (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 2


View Profile
September 15, 2022, 04:07:36 AM
 #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
BitMaxz
Legendary
*
Online Online

Activity: 3248
Merit: 2965


Block halving is coming.


View Profile WWW
September 15, 2022, 11: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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NeuroticFish
Legendary
*
Offline Offline

Activity: 3668
Merit: 6379


Looking for campaign manager? Contact icopress!


View Profile
September 16, 2022, 10: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...

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Ahmadn111 (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 2


View Profile
September 17, 2022, 01:34:08 AM
 #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
Ahmadn111 (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 2


View Profile
September 17, 2022, 01:44:59 AM
 #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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!