Wednesday, June 27, 2018

How to add FEDERATION_SERVER to stellar.toml

The important to define the FEDERATION_SERVER  before any others sections
# stellar.toml example asset
# Federation service provided by StellarID.io
FEDERATION_SERVER="https://stellarid.io/federation/"
[[CURRENCIES]]
code="GERSH"
issuer="GD5NE236O2MQTHADAU3T5JNDKAEV2HCCR75MBISLNMG6IRTKI3M26UCK"
display_decimals=8
name="Gershon Test"
desc="1 GERSH token entitles you to a share of revenue from Elkins Goat Farm."
conditions="There will only ever be 200000000 GERSH tokens in existence. The 100000000 will be distributed as 2500000 accross 5 years"
image="https://crypto-il.club/crypto_il-logo.png"

Wednesday, June 20, 2018

Node.js redis over SSL Connection Examples

var redis = require('redis');
var tls = require('tls');
var fs = require('fs');

var ssl = {
key: fs.readFileSync("private.key",encoding='ascii'),
cert: fs.readFileSync("user.crt",encoding='ascii'),
ca: [ fs.readFileSync("ca.pem",encoding='ascii') ],
rejectUnauthorized: false
};
var options = {
tls: ssl,
password:'xxxxxx'
};

var client = redis.createClient([the redis port], '[The redis url]', options);

try {
client.on('connect', function() {
console.log('Connected to Redis');
});
}
catch (e) {
console.log('1' + e)
}
console.log('here')

try{
client.set("foo", "bar", redis.print);
}
catch (e){
console.log('2' + e)
}
try{
client.get("foo", function (err, reply) {
if (err) throw err;
console.log(reply.toString());
});}
catch (e) {
console.log('3' + e)
}

try{
client.on('reconnecting', function() {
console.log('Connected to Redis');
});
}
catch (e) {
console.log('4' + e)
}

Thursday, June 14, 2018

Error when installing electron wallet on windows

The firs step is define the missing elements:
# npm list

npm ERR! peer dep missing: electron-builder-lib@~20.15.0, required by electron-builder-squirrel-windows@20.15.0
then install the missing
# npm install electron-builder-lib