DEV Community

Carl Barrdahl
Carl Barrdahl

Posted on

Journey into Web Monetization - day 4

Yesterday I looked at setting up sending payments in the Interledger network. Still not fully grasping how everything works so did some more research.

Here's what I came up with:

ILP Connector (ilp-connector)

  • Also called Interledger Service Provider (ILSP) and routes packets from connected servers
  • Connectors work as decentralized exchanges
  • Configured with assetCode (XRP, ETH, BTC, eth) and uses plugins to transact with ledgers
  • This is what moneyd uses to connect to the network

ILP Stream (ilp-protocol-stream)

  • Creates a server with a connection to the Interledger network
  • Plugin configures which ILP Connector to connect to
  • Generates credentials for clients to establish stream and send payments to wallet

ILP Plugin (ilp-plugin-*)

  • Plugins handle the logic of how to perform the transactions by extending sendMoney and _handleMoney
  • You can write your own plugin to extend these and add custom behaviour to interact with other ledgers
  • For example ilp-plugin-ethereum uses ethers.io to manage an Ethereum Wallet and connecting to the ledger
  • Connectors, servers and clients can use these plugins to establish link between them

So basically, Controllers are the routers doing the actual transactions, ILP Streams are receiver (with createServer) and senders (with createConnection). Plugins are used to define how transactions are stored in ledgers.

Here are some ideas of code examples that would be helpful

  • Self-hosted multi-wallet to allow users to register and create payment pointers
  • Wallet with Stripe integration to handle subscription and payouts
  • Browser extension to establish stream to payment pointer in meta tag
  • Simple plugin to show integration with other libraries
  • Something to show transaction statistics

Top comments (2)

Collapse
 
chrislarry33 profile image
Chris Lawrence

Carl, your series is so valuable to people starting this work and for us at the GftW Program Team to be able to point people to. Thanks for the effort on the public documentation, much appreciated!

Collapse
 
carlbarrdahl profile image
Carl Barrdahl

Thank you for the encouraging feedback Chris! It's a fun way to learn by documenting the process.

Any ideas, suggestions or corrections are welcome.