C is a general-purpose programming language whose constructs map efficiently to typical machine instructions.
Questions tagged [c]
21 questions
6
votes
1 answer
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
- 4,469
- 4
- 37
- 75
3
votes
1 answer
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 buffer s used instead of copying directly from the…
r_comma_s
- 35
- 4
2
votes
2 answers
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 precision when I do the calculations.
Shall I use…
Nick
- 211
- 2
- 10
2
votes
1 answer
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)
nActualTimespan = params.nPowTargetTimespan*4;
but if i…
mraksoll
- 37
- 6
2
votes
0 answers
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 (2016-11-13) x86_64 GNU/Linux
$ git config --get…
Sven Williamson
- 1,524
- 10
- 23
1
vote
1 answer
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 generator point G as defined by the standard with an…
fdffd
- 13
- 3
1
vote
1 answer
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
I tried mainting a wordlist myself but then I run into even more mistakes…
Rene Pickhardt
- 11,670
- 8
- 35
1
vote
0 answers
Adding libraries to Makefile.am
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 added the below lines:
libbitcoin_server_a_SOURCES =…
thenakulchawla
- 261
- 2
- 8
1
vote
1 answer
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
- 11
- 1
1
vote
2 answers
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 article / tutorial explaining this (i am…
Kleber Mota
- 131
- 2
- 9
1
vote
1 answer
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* pubkey,
const unsigned char *input,
size_t…
Sven Williamson
- 1,524
- 10
- 23
1
vote
0 answers
make: *** No rule to make target 'all'. Stop. Stellar-core
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 out fine until this point. I'm using Fedora to run…
Hugh Heimler
- 11
- 2
1
vote
0 answers
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…
streetlight
- 111
- 3
1
vote
1 answer
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 random nonce number and G - is the generator point,…
Maltoon Yezi
- 47
- 3
0
votes
0 answers
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 one, so even if you don't aren't familiar with…
Endymio
- 1
- 1