{"_id":"council","_rev":"3-33f8d055c5bf3b60073e767e80a61b6e","name":"council","description":"> Fetch suitable hosts for any protocol","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"council","version":"1.0.0","description":"> Fetch suitable hosts for any protocol","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/justmoon/decided.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/justmoon/decided/issues"},"homepage":"https://github.com/justmoon/decided#readme","dependencies":{"koa":"^2.3.0","koa-ilp":"0.0.1","koa-router":"^7.2.1","superagent-ilp":"0.0.1"},"gitHead":"7277d7e4505cd56e59a3d799021c15499eea9d95","_id":"council@1.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.4.0","_npmUser":{"name":"interledger","email":"standards+npm@ripple.com"},"dist":{"integrity":"sha512-FMQd/tBHnrfF9zL77hwLDS8mRUrYKG1xA1bvCAezJpEhu84//M8OREl9KEYiFI3tTWM/heSqjK2YsSAIKXliig==","shasum":"3c264dba90173e5244585d71e6237ed744151e1f","tarball":"https://registry.npmjs.org/council/-/council-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjG4/yZ2LvQtAFopwFbJi30tWbavXb/yK06+tnIkmnWQIhAM3B3OwSFxsbPa7NTGGJTqM9YzpMKBvbu9t4b9be3vlp"}]},"maintainers":[{"name":"interledger","email":"standards+npm@ripple.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/council-1.0.0.tgz_1509745201102_0.20874715060926974"}},"2.0.0":{"name":"council","version":"2.0.0","description":"> Fetch suitable hosts for any protocol","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/justmoon/decided.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/justmoon/decided/issues"},"homepage":"https://github.com/justmoon/decided#readme","dependencies":{"ilp-plugin":"0.0.1","koa":"^2.3.0","koa-ilp":"git+ssh://git@github.com/interledgerjs/koa-ilp.git","koa-router":"^7.2.1","superagent-ilp":"0.0.1"},"gitHead":"bd26853317e48575be684b59920eccfc8e68054f","_id":"council@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.8.1","_npmUser":{"name":"interledger","email":"standards+npm@ripple.com"},"dist":{"integrity":"sha512-fMzyz5OVKB0bh7NyWTKIE9a2xwdGR5DmzueS4ENOXXxB3ipkQyc7dvtfYiMelisIjcx91IdLrqTTjTeVetNk5g==","shasum":"f982ca588d24fbe6ff7565f06b07f869d147d4c5","tarball":"https://registry.npmjs.org/council/-/council-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAWYxPaCSsh6NqfuABmwCAaa3JP/FcxpOjzEKSC1etinAiBWPN4VbA+8EKnJaukeT4elBHl7BViR/8436765UJWEMw=="}]},"maintainers":[{"name":"interledger","email":"standards+npm@ripple.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/council-2.0.0.tgz_1510175697740_0.3568041571415961"}},"2.0.1":{"name":"council","version":"2.0.1","description":"> Fetch suitable hosts for any protocol","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/justmoon/decided.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/justmoon/decided/issues"},"homepage":"https://github.com/justmoon/decided#readme","dependencies":{"ilp-plugin":"0.0.1","koa":"^2.3.0","koa-ilp":"^0.1.2","koa-router":"^7.2.1","superagent-ilp":"0.0.1"},"gitHead":"7fb444d565569a81ebb92c99082983c9942bc7f3","_id":"council@2.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.8.1","_npmUser":{"name":"interledger","email":"standards+npm@ripple.com"},"dist":{"integrity":"sha512-dlpL2yC9q0CGQIZzAYCWEruPXH/ARBfDUP9umOHwBwiGERWt8x9RfYgtKtO7lKQ/24YEUT2uMtd8SXqYpjQFsg==","shasum":"bc5766e143afc49ca2616129b877e6df758bf06b","tarball":"https://registry.npmjs.org/council/-/council-2.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBoCtowwonHJSwBS+n/3E+g3H6IKWMLMEr5fYov71iGgIhALCSHGkh+URUkaKzqmfHDJqNe/iTftKUAA8aZ9oda3Zb"}]},"maintainers":[{"name":"interledger","email":"standards+npm@ripple.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/council-2.0.1.tgz_1510176925619_0.8220676069613546"}}},"readme":"# Council\n> Fetch suitable hosts for any protocol\n\n![council of ricks](https://www.thewrap.com/wp-content/uploads/2017/08/council-of-ricks.jpg)\n\n## Client\n\n```js\nconst plugin = require('ilp-plugin')()\nconst council = require('council')({ plugin })\n\nasync function run () {\n  console.log('hosts for org.codius:', await council('org.codius'))\n}\n\nrun()\n```\n\nThe client will take `COUNCIL_HOSTS` from the environment (containing a\ncomma-separated list of hosts), or the module can take a second `hosts`\nparameter alongside `plugin`. `hosts` must be an array.\n\n## Server\n\n```sh\n# Set up two servers; The first server falls back to the second\n$ DEBUG=* COUNCIL_CONFIG=../example-config.json COUNCIL_PORT=8002 node ./server/index.js &\n$ 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 &\n\n$ ilp-curl -X GET localhost:8002/hosts/org.codius\n[ { host: 'codius.org', depth: 1 } ]\n\n$ ilp-curl -X GET localhost:8001/hosts/com.sharafian.sms\n[ { host: 'twilio.com', depth: 1 },\n  { host: 'google.com', depth: 1 } ]\n\n# In this case, server 1 will pay server 2 for its hosts\n$ ilp-curl -X GET localhost:8002/hosts/com.sharafian.sms\n[ { host: 'twilio.com', depth: 2 },\n  { host: 'google.com', depth: 2 } ]\n```\n","maintainers":[{"name":"interledger","email":"standards+npm@ripple.com"}],"time":{"modified":"2022-04-27T18:20:49.060Z","created":"2017-11-03T21:40:01.190Z","1.0.0":"2017-11-03T21:40:01.190Z","2.0.0":"2017-11-08T21:14:57.822Z","2.0.1":"2017-11-08T21:35:25.728Z"},"homepage":"https://github.com/justmoon/decided#readme","repository":{"type":"git","url":"git+https://github.com/justmoon/decided.git"},"bugs":{"url":"https://github.com/justmoon/decided/issues"},"license":"ISC","readmeFilename":"README.md"}