GithubHelp home page GithubHelp logo

interledger-ripple / ilp-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from interledgerjs/ilp-plugin

0.0 0.0 0.0 59 KB

This has been moved to the monorepo https://github.com/interledgerjs/interledgerjs

JavaScript 100.00%

ilp-plugin's Introduction

A generic handle to ILP

NPM Package CircleCI JavaScript Style Guide Known Vulnerabilities

The script below will get ILP credentials with no setup whatsoever. You can use this anywhere that you need an ILP plugin created from details in the environment.

const plugin = require('ilp-plugin')()

async function run () {
  await plugin.connect()
  await plugin.sendData(/* ... */)
  process.exit(0)
}

run()

First, the script checks whether ILP_CREDENTIALS is defined in the environment. ILP_CREDENTIALS must contain a JSON object with the options passed into the constructor of ilp-plugin-btp or the module name in ILP_PLUGIN.

Next, the script checks for the ILP_BTP_SERVER environment variable. ILP_BTP_SERVER must be a URI with a protocol and host (e.g. "btp+ws://localhost:7768"). Using ILP_BTP_SERVER instead of ILP_CREDENTIALS ensures that each plugin gets a unique, random secret.

By default, a random secret will be generated and the plugin will connect to btp+ws://localhost:7768.

ilp-plugin's People

Contributors

sentientwaffle avatar traviscrist avatar adrianhopebailie avatar emschwartz avatar michielbdejong avatar njlie avatar davidgilbertson avatar

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.