node-primecoin is a simple wrapper for the primecoin client's JSON-RPC API.
npm install node-primecoin
var client =host: 'localhost'port: 15715user: 'username'pass: 'password';
Get balance across all accounts with minimum confirmations of 6
Getting the balance directly using
Batch multiple RPC calls into single HTTP request
var batch = ;for var i = 0; i < 10; ++ibatch;client;
If you're using this to connect to primecoind across a network it is highly
recommended to enable
ssl, otherwise an attacker may intercept your RPC credentials
resulting in theft of your primecoins.
ssl by setting the configuration option to
option (verifies the server certificate) will also be enabled by default. It is
highly recommended to specify the
sslCa as well, even if your primecoind has
a certificate signed by an actual CA, to ensure you are connecting
to your own primecoind.
var client =host: 'localhost'port: 15715user: 'username'pass: 'password'ssl: truesslStrict: truesslCa: fs;
If your using a self signed certificate generated with something like
openssl x509 -req -days 365 -in server.cert -signkey server.key -out server.cert
sslStrict should be set to
false because by defult node wont work with