Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

five-bells-routing

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

five-bells-routing

ILP routing layer utilities

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

five-bells-routing

ILP routing table implementation

API Reference

Route

RouteData refers to the Routes schema in five-bells-shared.

new Route(curve, hops, info)
Route.fromData(routeData) ⇒ Route
route.amountAt(x) ⇒ Number

Given a source amount, look up the corresponding destination amount.

route.amountReverse(y) ⇒ Number

Given a destination amount, look up the corresponding source amount.

route.getPoints(y) ⇒ Point[]
route.combine(alternateRoute) ⇒ Route

Combine two parallel routes.

route.join(tailRoute) ⇒ Route

Join two routes end-to-end.

route.shiftY(dy) ⇒ Route

Shift a route's curve up or down.

route.simplify(maxPoints) ⇒ Route

Simplify a route.

route.isExpired() ⇒ Boolean

Check if a route has expired.

route.toJSON() ⇒ RouteData

RoutingTables

new RoutingTables(baseURI, localRoutes, expiryDuration)
tables.addLocalRoutes(localRouteObjects)
tables.addRoute(routeObject) ⇒ Boolean

Returns whether or not a new route was created (updates don't count).

tables.removeExpiredRoutes()
tables.toJSON(maxPoints) ⇒ RouteData[]
tables.findBestHopForDestinationAmount(ledgerA, ledgerC, finalAmount) ⇒ Hop
tables.findBestHopForSourceAmount(ledgerA, ledgerC, sourceAmount) ⇒ Hop

Keywords

FAQs

Package last updated on 16 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc