Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [c]

C is a general-purpose programming language whose constructs map efficiently to typical machine instructions.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

Bitcoin message signing and other functions coded in C (not C++). Is there a good library that takes care of it all?

After searching for libraries that could do this, and/or code that could do this, all around the internet, and also AI code assistants failing me, I have managed to write C code (not C++, simple C) ...
capodieci's user avatar
0 votes
0 answers
30 views

Explain the importance of Bitcoin Hash Rate using cpuminer

I need thoroughly explanations about Bitcoin Hash Rate beyond the trivial ones like: "Hashrate" refers to the total combined computational power that is being used to mine and process ...
R. S.'s user avatar
  • 11
3 votes
1 answer
216 views

Questions about secp256k1_pubkey_load/save() implementation

I'm a newbie who has just started reading Bitcoin Core code. I have a lot of questions about seemingly trivial code. Right now, I have two questions. When branching to an if statement, why is the ...
Gildong.Hong's user avatar
1 vote
1 answer
545 views

Questions about generating a random number for ECDSA

One of the component of making of SECP256K1 signatures, is a random number that is later multiplied by the generator point in order to be used in further computations. If we imagine that k - is the ...
Maltoon Yezi's user avatar
0 votes
1 answer
114 views

libbtc: Where are the binaries generated?

I installed and compiled libbtc from https://github.com/libbtc/libbtc, but where are the binaries generated or how can I compile my C project with gcc using it? My OS is Ubuntu 20.04. I am running: ./...
Papaulo's user avatar
0 votes
0 answers
658 views

Howto convert mnemonic->seed->root key->derived addresses with c library (libWally)

I am trying to use the cryptowallet library LibWally to convert a 12-word mnemonic into a set of derived addresses. I believe my mistake is not with the library itself, but a process flow/algorithmic ...
Endymio's user avatar
0 votes
1 answer
91 views

In bitcoin-cli getpeerinf call what does "-1" mean as a "synced_headers" or "synced_blocks" value?

Sometimes I see this in getpeerinfo: "synced_headers": -1, "synced_blocks": -1, sometimes it's only synced blocks at -1. What does that mean?
Strob's user avatar
  • 21
1 vote
1 answer
313 views

Basic point multiplication with G in libsecp256k1

I'm trying to work out a minimal example with the bitcoin core secp256k1 library but am a bit lost due to the many options available. Concretely, I simply want to use libsecp256k1 to multiply the ...
fdffd's user avatar
  • 13
2 votes
2 answers
784 views

Bitcoin value as int64_t or as double

I want to do program that doing some calculations with bitcoin values. I know bitcoin have 8 digits after decimal point (please correct me). If I store the value as double I worry that I might lose ...
Nick's user avatar
  • 211
-1 votes
1 answer
198 views

Adding C library to Makefile

I am developing an altcoin using a new PoW algorithm which is written in C to test the algorithm. I get compilation errors related to compiling the C code when trying to compile. How can I properly ...
EndlessLoop's user avatar
0 votes
2 answers
162 views

blockchain official documentation

I am developing a system of administrative management. The project is migrating from PHP to C ++. With the new requirements we want to work with blockchain. But when looking for more about it, ...
Web Sailor's user avatar
1 vote
1 answer
151 views

call to bip39_mnemonic_from_bytes in libwally-core returns NULL

what am I doing wrong? it always returns with error -2... I included libwallycore to my project and my IDE tells me it it is available after I also did include <wally_bib39.h> I tried mainting ...
Rene Pickhardt's user avatar
1 vote
0 answers
239 views

Adding libraries to Makefile.am [closed]

I am trying to add already existing library below to dash source code : Jerasure I have included all the source and header files in a directory 'jerasure' inside 'src'. In the Makefile.am , I have ...
thenakulchawla's user avatar
-1 votes
2 answers
127 views

How to get crypto currency wallet balances

I am trying to build an app that will pull in all my wallet balances. I can easily do this with exchange apis, but how do I get balances that are stored in wallet? Do I need to set up bitcoind, ...
Positonic's user avatar
1 vote
1 answer
87 views

what is "forming a coinbase transaction"?

So based on this after getting the right information from the pool, you will form a coinbase transaction, But how is it done in C lang. Does the method above also works for altcoins?
user77556's user avatar
0 votes
2 answers
1k views

Implementation of the Variable length integer in C

Anyone can give me a idea of how implement in C this concept of Variable length integer which encoded the numer of transactions in a block? based on what is described here, I think is something lime ...
Kleber Mota's user avatar
1 vote
2 answers
4k views

How create / generate a coinbase transaction for a new block?

I am coding a miner program with C, and right now I need some info of how create / generate a coinbase transaction to add to the block before submit it to the bitcoin network. Someone can indicate any ...
Kleber Mota's user avatar
2 votes
1 answer
927 views

Question about retarget system bitcoin, add hardcodet block to exist blockchain

the standard values if (nActualTimespan < params.nPowTargetTimespan/4) nActualTimespan = params.nPowTargetTimespan/4; if (nActualTimespan > params.nPowTargetTimespan*4) ...
mraksoll's user avatar
1 vote
1 answer
269 views

C secp256k1 : ec_pubkey_parse successful on NULL context despite attribute

Looking at the main API file secp256k1.h of the C library, we have: SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse( const secp256k1_context* ctx, secp256k1_pubkey* ...
Sven Williamson's user avatar
1 vote
0 answers
351 views

make: *** No rule to make target 'all'. Stop. Stellar-core [closed]

I followed the instructions on how to install the stellar core but when I ran make install, I got this error: make: *** No rule to make target 'all'. Stop. I configured it and everything worked ...
Hugh Heimler's user avatar
2 votes
0 answers
1k views

Cannot build secp256k1 C library on Debian stretch

I was hoping that someone would be able to suggest something about this (the same process works perfectly fine on my Debian Jessy machine) $ uname -a Linux front 4.8.0-1-amd64 #1 SMP Debian 4.8.7-1 (...
Sven Williamson's user avatar
1 vote
0 answers
52 views

C Compilation Error Following README

I'm having an issue getting the local bitcoin client running on a Mac OS X machine. When installing berkeley-db4, and running the following command (per the README): brew install https://raw.github....
streetlight's user avatar
6 votes
1 answer
4k views

How to call JSON RPC API from C?

How do I make RPC calls from C? My question is related to the question: "How do I call JSON RPC API using C#?"
Geremia's user avatar
  • 4,704