New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

council

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

council

> Fetch suitable hosts for any protocol

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Council

Fetch suitable hosts for any protocol

council of ricks

Client

const plugin = require('ilp-plugin')()
const council = require('council')({ plugin })

async function run () {
  console.log('hosts for org.codius:', await council('org.codius'))
}

run()

The client will take COUNCIL_HOSTS from the environment (containing a comma-separated list of hosts), or the module can take a second hosts parameter alongside plugin. hosts must be an array.

Server

# Set up two servers; The first server falls back to the second
$ DEBUG=* COUNCIL_CONFIG=../example-config.json COUNCIL_PORT=8002 node ./server/index.js &
$ ILP_CREDENTIALS='{"secret":"spkemkgDWHwZrJ88HNs7xd1wjT6Xu","server":"wss://s.altnet.rippletest.net:51233"}' DEBUG=* COUNCIL_CONFIG=../example-config-2.json COUNCIL_PORT=8001 node ./server/index.js &

$ ilp-curl -X GET localhost:8002/hosts/org.codius
[ { host: 'codius.org', depth: 1 } ]

$ ilp-curl -X GET localhost:8001/hosts/com.sharafian.sms
[ { host: 'twilio.com', depth: 1 },
  { host: 'google.com', depth: 1 } ]

# In this case, server 1 will pay server 2 for its hosts
$ ilp-curl -X GET localhost:8002/hosts/com.sharafian.sms
[ { host: 'twilio.com', depth: 2 },
  { host: 'google.com', depth: 2 } ]

FAQs

Package last updated on 08 Nov 2017

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