Giter Site home page Giter Site logo

mdenisov / ilp-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from interledger-deprecated/ilp-kit

0.0 2.0 0.0 5.98 MB

Everything needed to create a ledger and connect it to the Interledger

Home Page: https://interledger.org/ilp-kit/apidoc

License: Other

JavaScript 42.61% HTML 1.03% CSS 56.36%

ilp-kit's Introduction

ILP kit circle

Table of contents

Environment variables

Required
Name Example Description
API_HOSTNAME wallet.com API public hostname.
API_PORT 3000 API private port (used as both public and private port if API_PUBLIC_PORT is not specified).
API_DB_URI postgres://localhost/wallet URI for connecting to a database.
API_LEDGER_ADMIN_USER admin Ledger admin username.
API_LEDGER_ADMIN_PASS pass Ledger admin pass.
CLIENT_HOST wallet.com Publicly visible hostname.
CLIENT_PORT 4000 Client port.
LEDGER_ILP_PREFIX wallet. This is required if the API_LEDGER_URI is not specified
Optional
Name Example Description
API_PUBLIC_HTTPS Whether or not the publicly visible instance of ILP kit is using HTTPS.
API_PRIVATE_HOSTNAME localhost Private API hostname.
API_PUBLIC_PORT Api public port.
API_SECRET qO2UX+fdl+tg0a1bYt Api secret. Used to generate the session, oauth and condition secrets.
API_RELOAD true Turn on/off the reload endpoint.
API_LEDGER_URI http://wallet.com:2000 Ledger URI: requests go to this uri (a ledger instance will be started by the wallet if this is not specified).
API_LEDGER_PUBLIC_URI http://wallet.com/ledger Ledger public URI (used in account URIs). Specified if different from the API_LEDGER_URI.
API_TRACK_GA UA-XXXXX-X Google Analytics Tracking ID.
API_TRACK_MIXPANEL Mixpanel Tracking ID.
API_GITHUB_CLIENT_ID Github application client id (used for github oauth).
API_GITHUB_CLIENT_SECRET Github application client secret (used for github oauth).
API_MAILGUN_API_KEY Mailgun api key (for sending emails).
API_MAILGUN_DOMAIN wallet.com One of the domains attached to the Mailgun account.
API_ANTIFRAUD_SERVICE_URL antifraud.wallet.com Anti fraud service url. This will enable an additional step in registration that asks for personal details
API_ANTIFRAUD_MAX_RISK 20 Maximum tolerable risk level for the registration
API_EMAIL_SENDER_NAME info Email sender name
API_EMAIL_SENDER_ADDRESS [email protected] Email sender address
API_REGISTRATION true Enable/Disable registration
WALLET_FORCE_HTTPS true Force all connections to use HTTPS.
WALLET_TRUST_XFP_HEADER true Trust the X-Forwarded-Proto header.
CONNECTOR_ENABLE false Run a connector instance
CLIENT_PUBLIC_PORT 80 Client public port (if different from CLIENT_PORT)
CLIENT_TITLE ILP Kit Browser title and logo
Default five-bells-ledger environment variables

(used if the API_LEDGER_URI is not specified). You can read more about these variables in the five-bells-ledger readme.

Name Default
LEDGER_DB_URI API_DB_URI
LEDGER_ADMIN_USER API_LEDGER_ADMIN_USER
LEDGER_ADMIN_PASS API_LEDGER_ADMIN_PASS
LEDGER_HOSTNAME API_HOSTNAME
LEDGER_PORT API_PORT + 1
LEDGER_PUBLIC_PORT CLIENT_PORT
LEDGER_PUBLIC_PATH ledger
LEDGER_CURRENCY_CODE USD
LEDGER_CURRENCY_SYMBOL $
LEDGER_PUBLIC_HTTPS API_PUBLIC_HTTPS

Advanced Mode

ILP kit UI comes with an "advanced mode" for developers and advanced users. You can activate it with a hot-key: option+d on Mac or alt+d on Windows.

Architecture

ILP kit consists of a Node.js (developed on v6.9.1) backend (REST API) and a client built using React.

Backend (REST API)

The backend is responsible for communicating with the ILP ledger, creating accounts, sending payments and keeping the payment history.

API docs

http://interledger.org/ilp-kit/apidoc

SPSP

The wallet implements SPSP for initiating and receiving payments.

Webfinger

Webfinger is used to lookup account/user identifiers.

Example request

curl -X GET
https://wallet.example/.well-known/webfinger?resource=acct:[email protected]

Example response

HTTP/1.1 200 OK
{
  "subject": "acct:[email protected]",
  "links": [
    {
      "rel": "https://interledger.org/rel/ledgerUri",
      "href": "https://red.ilpdemo.org/ledger"
    },
    {
      "rel": "https://interledger.org/rel/socketIOUri",
      "href": "https://red.ilpdemo.org/api/socket.io"
    },
    {
      "rel": "https://interledger.org/rel/ledgerAccount",
      "href": "https://red.ilpdemo.org/ledger/accounts/alice"
    },
    {
      "rel": "https://interledger.org/rel/sender/payment",
      "href": "https://red.ilpdemo.org/api/payments"
    },
    {
      "rel": "https://interledger.org/rel/sender/pathfind",
      "href": "https://red.ilpdemo.org/api/payments/findPath"
    },
    {
      "rel": "https://interledger.org/rel/receiver",
      "href": "https://red.ilpdemo.org/api/receivers/alice"
    }
  ]
}

Client

The client is a web app built on React that implements user signup/signin, sending payments and payment history.

Client state management is handled by Redux.

Theme Customization

npm install generates a src/theme/variables.scss which contains the theme colors. You can manually edit it.

Database has two tables: Users and Payments.

ilp-kit's People

Contributors

vhpoet avatar erikras avatar greenkeeperio-bot avatar stevoland avatar leonli avatar korczis avatar justingreenberg avatar justmoon avatar quicksnap avatar nicolabortignon avatar catamphetamine avatar swordsreversed avatar benoitvallon avatar mhodgson avatar trueter avatar gaearon avatar arkist avatar markus-ipse avatar nogsmpls avatar snowcxt avatar standuprey avatar lemoncms avatar b2whats avatar istravis avatar msikma avatar yuters avatar mrajvanshy avatar guilhermesad avatar bdefore avatar austinpray avatar

Watchers

James Cloos avatar Maxim Denisov 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.