Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bitcoinolog: Reason about Bitcoin addresses with Prolog

43 views
Skip to first unread message

Markus Triska

unread,
Jun 12, 2017, 2:35:46 PM6/12/17
to
Hi all,

here are Prolog definitions for reasoning over Bitcoin addresses:

https://www.metalevel.at/bitcoinolog/

Bitcoinolog works with the latest git version of SWI-Prolog. It uses:

-) CLP(FD) for reasoning over elliptic curves (see ecclog.pl)
-) library(crypto) to compute the various hashes that Bitcoin uses
-) a local OpenSSL installation to create Bitcoin private keys.

One important use case is offline creation of Bitcoin wallets.

Sample query, creating a sequence of Bitcoin addresses:

?- repeat,
new_private_key(PrivateKey),
private_key_to_public_key(PrivateKey, PublicKey),
public_key_to_address(PublicKey, Address),
portray_clause(Address),
false.

Yielding:

%@ '1FW7byVioVV3RZq8DdqiFt39qasXBxnRfF'.
%@ '19W72snScG3tZE6i3FASDaDx9s5htXEdEH'.
%@ '1JHGiDrhLfa6zfgw78kBxNNaZzaBJLq4fD'.
%@ '1FGV4gFcpHGMti4AQtFR767S2n92jpRGMH'.
%@ '1AuMaczcGqRuDTLNPTKWRswKKNaTQzi1ac'.
%@ etc.

Bitcoinolog is also available from a public git repository:

https://github.com/triska/bitcoinolog

Enjoy!

All the best,
Markus

--
comp.lang.prolog FAQ: http://www.logic.at/prolog/faq/
The Power of Prolog: https://www.metalevel.at/prolog

burs...@gmail.com

unread,
Jun 16, 2017, 2:12:46 PM6/16/17
to
Dennis Rodman media stunt got its footprint on potcoins:
https://coinmarketcap.com/currencies/potcoin/
0 new messages