GithubHelp home page GithubHelp logo

interledger-ripple / ilp-plugin-outgoing-settle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from interledgerjs/ilp-plugin-outgoing-settle

0.0 0.0 0.0 112 KB

Outgoing-only plugin that sends XRP settlements.

JavaScript 100.00%

ilp-plugin-outgoing-settle's Introduction

ILP Plugin Outgoing Settle

Outgoing-only plugin that sends XRP settlements. Edit

Description

This plugin allows users to connect dynamically (similar to mini-accounts), and then fulfill incoming payments. They cannot send outgoing payments from this plugin, so all balance logic is one-way. The plugin buffers their incoming ILP payments and periodically settles them on-chain via XRP.

Although it is not included in this plugin, this 'accumulate and settle' model can be written for other systems. For systems more expensive than XRP, the fee should be taken into account when sending settlements.

Once the receiver has accumulated settleThreshold drops, (by default 1000 drops if the account exists, or 25 XRP if it doesn't), this plugin will trigger an XRP payment to that address.

Example

const plugin = new IlpPluginOutgoingSettle({
  port: 8080,
  secret: 's...',
  address: 'r...',
  xrpServer: 'wss://s1.ripple.com',
  settleThreshold: 1000, // default 1000 drops for accounts that exist, 25 XRP for new accounts
  _store: new Store() // passed in by connector automatically
})

Clients connecting to this plugin should connect with a server url of:

"btp+ws://:<token>@localhost:8080/<ripple_address>"

The <ripple_address> in the URL determines where settlements are sent. Once you have authenticated with a <token> and a <ripple_address>, you cannot supply any other <ripple_address> when connecting to that account. This is to prevent funds from being diverted if anyone should find out your <token>.

ilp-plugin-outgoing-settle's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.