Ruby Gem

How difficult would it be to create a Ruby Gem to interact with Interledger?

In what capacity do you want to interact with interledger, and how much of what you’re doing needs to be in Ruby?

If you can run some javascript but want to be able to send payments using Ruby, then you’d need to run moneyd as a JS shell and translate ilp-spsp to ruby.

If you can’t run any javascript, you’ll need to translate both moneyd and ilp-spsp to ruby.

Another alternative to explore is to use someting like execjs which lets you execute JavaScript from Ruby (though at that point, why not just use JavaScript?).

All good points. In the end, we want to create a method to pay for an order like in the summit video.


Got it. In this case, you’d need at least SPSP implemented in Ruby. You’d need to be connected to moneyd, but hopefully you can use one of the existing moneyd implementations. If you need to implement moneyd in ruby also, this likely increases the difficulty and complexity significantly. I’m not sure how to advise on your first step, maybe @sharafian or @sabinebertram can weigh in.

Relevant reading:

  1. SPSP repo
  2. SPSP specs
  3. SPSP pull payment specs

Hi @captproton ,

I briefly looked into this and it is like going down a rabbit hole. Like @AJ58O said, I think you need to at least implement ilp-protocol-spsp, however, this depends on ilp-protocol-stream and some functions require an instance of ilp-plugin as input. ilp-protocol-stream itself has ilp-specific dependencies as well and so the spiral unfolds. Good news, I don’t think you have to re-implement moneyd.

@AJ58O has already pointed you towards some specs, here are the others:

I’m not the expert here so @sharafian, correct me if I’m wrong.