This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// filtering with IOU symbol, negative balance, and dividend limit | |
lines = lines.filter(function(element){ return (element.balance < 0 && element.currency === IOU && element.filled === false); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Bitnation = require('./bitnation.core.js'); | |
require('./bitnation.horizon.js'); | |
var jQuery = require('jquery'); | |
(function (Bitnation, $) { | |
/** | |
* DApp service class | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Bitnation = require('./bitnation.core.js'); | |
require('./bitnation.horizon.js'); | |
var jQuery = require('jquery'); | |
(function (Bitnation, $) { | |
/** | |
* Basicincome.co service class | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
// generate a wallet. The smart-wallet manages this wallet, and the user can only control it via the smart-wallet. | |
// The wallet is bound to the rules of the 'resilience network'. It will automatically send dividends based on the rate that the user has set. | |
var RippleWallet = require('ripple-wallet') | |
var wallet = RippleWallet.generate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
var request = require('request') | |
var keyGenerator = require('key-generator') | |
var Oracle_key = keyGenerator.generate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
var request = require('request') | |
var blockchainOracle = require('blockchain-oracle') | |
// the Oracle would require a Horizon javascript library | |
var horizon = require('horizon-lib') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
var bodyParser = require('body-parser') | |
// parse application/x-www-form-urlencoded | |
app.use(bodyParser.urlencoded({ extended: false })) | |
// parse application/json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a first draft for an ethereum implementation of this: | |
# www.resilience.world/#!whitepaper/c21xm | |
# It's meant to be an introduction of the 'smart-wallet' concept | |
# A smart-wallet is a wallet with rules. They can be used for auto-debit, etc. | |
# Resilience Network | |
# msg.data[0] == destination | |
# msg.data[1] == amount | |
# msg.data[2] == editDividendRate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var fs = require('fs'); | |
var app = express(); | |
var bodyParser = require('body-parser') | |
// parse application/x-www-form-urlencoded | |
app.use(bodyParser.urlencoded({ extended: false })) | |
// parse application/json | |
app.use(bodyParser.json()) |
OlderNewer