[BREAKGLASS] MIT-licensed C implementation of getblocktemplate
Go to file
2016-12-01 23:30:13 +00:00
.gitignore gitignore: Various development-related files 2016-08-12 04:55:56 +00:00
AUTHORS AUTHORS: Add myself 2014-11-21 23:47:44 +00:00
autogen.sh No longer call configure from autogen.sh 2014-08-22 17:43:04 +00:00
base58.c base58: Remove now-unused b58digits array 2014-08-29 15:50:01 +00:00
blkmaker_jansson.c Merge branch '0.4.x' into 0.5.x 2016-08-11 07:43:37 +00:00
blkmaker_jansson.h Make new BIP 9 features public 2016-05-25 03:55:31 +00:00
blkmaker.c Merge branch '0.4.x' into 0.5.x 2016-12-01 23:30:13 +00:00
blkmaker.h Make new BIP 9 features public 2016-05-25 03:55:31 +00:00
blktemplate.c Merge branch '0.4.x' into 0.5.x 2016-08-11 07:43:37 +00:00
blktemplate.h Merge branch '0.4.x' into 0.5.x 2016-08-13 08:26:02 +00:00
configure.ac Bump versions for 0.5.3 2016-03-25 18:36:16 +00:00
COPYING COPYING: Update copyright year to 2014 2014-01-19 04:36:06 +00:00
example.c Bugfix: example: Set b58_sha256_impl 2014-09-02 17:13:36 +00:00
hex.c Add missing copyright headers 2013-06-13 07:25:49 +00:00
libblkmaker_jansson.pc.in pc: Add libbase58 to Requires.private 2014-11-21 23:10:39 +00:00
Makefile.am Use libbase58 for base58 decoding 2014-08-29 01:46:08 +00:00
private.h Make new BIP 9 features public 2016-05-25 03:55:31 +00:00
README blkmk_get_mdata: Accept can_roll_ntime as an argument 2014-05-03 22:37:08 +00:00
testinput.c Add missing copyright headers 2013-06-13 07:25:49 +00:00

Dependencies:
	Jansson 2.0 with 'long long' support

Example dependencies:
	Jansson 2.1 (to read JSON from stdin)
	libgcrypt (for SHA256)

For usage, check out example.c
Note that you must assign blkmk_sha256_impl to a function pointer:
	bool mysha256(void *hash_out, const void *data, size_t datasz)
hash_out must be able to overlap with data!

Also note that you should NOT roll ntime for data retrieved without explicitly
checking that it falls within the template's limitations (mintime, maxtime,
mintimeoff, and maxtimeoff); read the BIP 23 specification in detail to
understand how they work. It is usually best to simply get more data as often
as it is needed. For blkmk_get_mdata, you may specify that you intend to roll
the ntime header exactly once per second past usetime - it will then set
*out_expires such that the expiration occurs before you roll beyond any ntime
limits. If you are rolling ntime at any rate other than once per second, you
should NOT specify can_roll_ntime to blkmk_get_mdata, and must check that your
usage falls within the explicit template limits yourself.