Post
Topic
Board Announcements (Altcoins)
Re: [ANN][DRK] Darkcoin | First Anonymous Coin | Inventor of X11, DGW and Darksend | Instant TX
by
thelonecrouton
on 24/09/2014, 05:07:02 UTC
Not at all. I am not talking about RPC calls that need a specific port to be open or something.
I am talking about direct commandline communication between Frontend and darkcoind.

Frontend.exe and darkcoind.exe would best be in the same folder.

It's like when you type commandline commands by hand, but now the frontend.exe makes this for you (with the darkcoind running in the background invisible)

You still need to generate an RPC user/pwd and stick it in the conf file for that to work. At least I had to.

It has nothing to do with RPC. It's not remote at all.
It's direct communication with the daemon, adding any command and parameters you need to, and reading the return the darkcoind itself gives back.

An example:

Suppose this is the folder where the darkcoind resides:

Code:
E:\darkcoin/darkcoind

Now I simply start it by making a Commandcall

Code:
>E:\darkcoin/darkcoind

and the daemon starts.

I can even start it with parameters, for example:

Code:
>E:\darkcoin/darkcoind -datadir=E:\blockchains/drk/

this tells the darkcoind where to look for the blockchain and wallet.dat. WITHOUT the need for any conf file telling it to do that.

Everything you put in a conf file can also be added as a parameter when you start the darkcoin daemon. A conf file is not needed if you work like that.

So... after the darkcoind is ready, I can make calls to it, for example getblockcount, and it will return the JSON string.

Code:
>E:\darkcoin/darkcoind -datadir=E:\blockchains/drk/ getblockcount
(not that all previous parameters must be repeated)

etc.

I can start the darkcoind in testnet mode by making the call like that:
Code:
>E:\darkcoin/darkcoind -testnet=1

I can combine any parameters:
Code:
>E:\darkcoin/darkcoind -datadir=E:\blockchains/drk/ -testnet=1

and so forth.

By using Adobe Air's native extensions functionality I can use ANY external executables I like and trigger their functions and pass the results/data back to the frontend.
This would also work with multiple coins at the same time.  Shocked

Try it.  Wink

You're going to be seeing this:
Code:
Error: To use darkcoind, you must set a rpcpassword in the configuration file:
/home/stu/.darkcoin/darkcoin.conf
It is recommended you use the following random password:
rpcuser=darkcoinrpc
rpcpassword=FgS1HunBZZjp71789svfbkDB56gvzdiuygEq7QxedJgtro6Sw47L
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "DarkCoin Alert" admin@foo.com