Skip to content

Instantly share code, notes, and snippets.

View owenkellogg's full-sized avatar
🛩️
Deep house disco, hyper-efficient money.

Owen Kellogg owenkellogg

🛩️
Deep house disco, hyper-efficient money.
  • Andorra
View GitHub Profile
@owenkellogg
owenkellogg / connecting_crypto_currencies.md
Last active March 2, 2017 07:47
connecting crypto currencies outline.

Part 1: Bitcoin

@owenkellogg
owenkellogg / Berksfile
Last active August 29, 2015 14:07 — forked from amoslanka/Berksfile
vagrant, chef, berkshelf, graphite, statsd
site :opscode
cookbook 'apt'
cookbook 'statsd', git: 'https://github.com/librato/statsd-cookbook.git'
cookbook 'graphite', git: 'https://github.com/hw-cookbooks/graphite.git'
@owenkellogg
owenkellogg / gateway_services_protocol_astropay.md
Last active August 29, 2015 14:07
gateway services protocol -- astropay
@owenkellogg
owenkellogg / gatewayd_heroku.md
Last active August 29, 2015 14:06
gatewayd on heroku

Gatewayd is designed to work with Heroku:

git clone https://github.com/ripple/gatewayd.git
cd gatewayd
heroku create my-great-gateway-app
git push heroku master
heroku addons:add heroku-postgresql
heroku config:set KEY=mysup3rs3cr3t@ap!k3y
heroku ps:scale web=1

Gatewayd Improvement Proposal

Gatewayd is a transaction processing engine designed by engineers at Ripple Labs in order to build bridges in and out of the Ripple network.

The following is intended to be a complete proposal for version 4.0 of gatewayd, which is currently in use in several places as version 3.x. This proposal includes breaking changes but the spirit and many design features of gatewayd 3.x remain.

**** Please leave thoughts and suggestions in the comments below as we design the spec ****

@owenkellogg
owenkellogg / gatewayd_queues_spec.js
Created August 14, 2014 15:52
gatewayd queues javascript api spec
var gatewayd = require('gatewayd');
// process records in the postgres queue table one at a time forever, composed of records in:
// select * from external_transactions where status='queued' and deposit='false' limit 1;
gatewayd.queues.withdrawals.work(job);
function job(withdrawal, next) {
// do something with the withdrawal, like sending to Dogecoind
dogecoinClient.sendWithdrawal(withdrawal)
.then(function() {
@owenkellogg
owenkellogg / gatewayd_simple_guide.md
Last active August 29, 2015 14:05
basic gatewayd user guide

Simple Gatewayd User's Guide

Gatewayd connects transactions outside the ripple network to transactions on the ripple ledger. When you record a payment that occured external to the ripple ledger that payment sent as a corresponding ripple payment. To match an external payment from one of your users to a ripple payment, first register that user's ripple address in the system, and record the external payment in the external account for that user:

Command Line
bin/gateway register_user <username> <password> <ripple_address>
@owenkellogg
owenkellogg / gateway_errors_story.md
Created June 20, 2014 21:31
Gatewayd Errors Story

Gatewayd is an HTTP / JSON API server that provides functionality enabling any user of the software to operate a Ripple Gateway. The REST interface is composed of nearly forty endpoints, for which the required parameters and successful responses are documented. However there are very few if any appropriate error messages returned to the API caller when an invalid request is made, or when gatewayd experiences a software exception.

  1. Enumerate all the various errors that can be returned from the Gatewayd API.

  2. Write mocha specs for the HTTP API that test error cases and assert properly formatted errors.

  3. Implement proper error generation in the API Core layer, and propagate the errors to the HTTP API layer.

Error reporting of Gatewayd with as much robustness as provided by the tasks listed will dramatically improve the experience for engineers creating integrations with Gatewayd and plugin modules for additional Gatewayd functionality.

@owenkellogg
owenkellogg / ripple_account_listener.js
Created June 20, 2014 00:15
Ripple Account Listener Spec
describe('Ripple Account Listener', function() {
before(function() {
var coldWalletListener = new RippleAccountListener(coldWalletAccount);
var hotWalletListener = new RippleAccountListener(hotWalletAccount);
function onPayment(payment, callback) {
incomingPayment = new IncomingPayment(payment);
incomingPayment.save(callback);
@owenkellogg
owenkellogg / gateway_upstart
Created June 19, 2014 00:56
gateway startup script linux
#! /bin/sh
# If you wish the Daemon to be lauched at boot / stopped at shutdown:
# INSTALL : update-rc.d ripple-rest defaults
# UNINSTALL : update-rc.d -f ripple-rest remove
### BEGIN INIT INFO
# Provides: ripple-rest
# Required-Start: $remote_fs $named $syslog rippled
# Required-Stop: $remote_fs $named $syslog rippled