{"id":43223751,"url":"https://github.com/interledger-deprecated/five-bells-ledger","last_synced_at":"2026-02-01T09:17:49.854Z","repository":{"id":57237579,"uuid":"30608771","full_name":"interledger-deprecated/five-bells-ledger","owner":"interledger-deprecated","description":"Open-source reference ledger optimized for use with the Interledger protocol","archived":false,"fork":false,"pushed_at":"2018-03-06T15:39:45.000Z","size":2439,"stargazers_count":28,"open_issues_count":26,"forks_count":21,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-08-19T19:32:29.894Z","etag":null,"topics":["ledger"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interledger-deprecated.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-10T18:59:20.000Z","updated_at":"2025-07-10T18:05:06.000Z","dependencies_parsed_at":"2022-08-26T14:04:21.532Z","dependency_job_id":null,"html_url":"https://github.com/interledger-deprecated/five-bells-ledger","commit_stats":null,"previous_names":["interledgerjs/five-bells-ledger","interledger/five-bells-ledger"],"tags_count":90,"template":false,"template_full_name":null,"purl":"pkg:github/interledger-deprecated/five-bells-ledger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-ledger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-ledger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-ledger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-ledger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledger-deprecated","download_url":"https://codeload.github.com/interledger-deprecated/five-bells-ledger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger-deprecated%2Ffive-bells-ledger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ledger"],"created_at":"2026-02-01T09:17:49.269Z","updated_at":"2026-02-01T09:17:49.849Z","avatar_url":"https://github.com/interledger-deprecated.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Five Bells Ledger [![npm][npm-image]][npm-url] [![circle][circle-image]][circle-url] [![codecov][codecov-image]][codecov-url] [![Known Vulnerabilities][snyk-image]][snyk-url] \n \n[npm-image]: https://img.shields.io/npm/v/five-bells-ledger.svg?style=flat\n[npm-url]: https://npmjs.org/package/five-bells-ledger\n[circle-image]: https://circleci.com/gh/interledgerjs/five-bells-ledger.svg?style=shield\u0026circle-token=e31b3ba89c015bf7f1c6de9f5156e7daa32fd793\n[circle-url]: https://circleci.com/gh/interledgerjs/five-bells-ledger\n[codecov-image]: https://codecov.io/gh/interledgerjs/five-bells-ledger/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/interledgerjs/five-bells-ledger\n[snyk-image]: https://snyk.io/test/github/interledgerjs/five-bells-ledger/badge.svg\n[snyk-url]: https://snyk.io/test/github/interledgerjs/five-bells-ledger\n\n\u003e A reference implementation of the Five Bells Ledger API\n\n\n## Usage\n\nYou can see the ledger in action as part of the [`five-bells-demo`](https://github.com/interledgerjs/five-bells-demo)!\n\nTo run the ledger as a standalone server:\n\n### Step 1: Clone repo\n\n``` sh\ngit clone https://github.com/interledgerjs/five-bells-ledger.git\ncd five-bells-ledger\n```\n\n### Step 2: Install dependencies\n\n``` sh\nnpm install\n```\n\n### Step 3: Run it!\n\nTo run it using an in-memory database (the simplest option), run:\n\n``` sh\nLEDGER_ADMIN_PASS=mypassword LEDGER_DB_URI=sqlite://:memory: npm start\n```\n\nOr run:\n\n```sh\nnpm start\n```\n\nSee \"Environment Variables\" in the generated documentation for config options.\n\n## Building Docs\n\nAfter installation:\n\n```sh\nnpm run docs\n```\n\nOpen `apidocs-out/index.html` in a web browser to see the generated API documentation.\n\n## Running with Docker (Alternative Method)\n\nThis project can be run in a [Docker](https://www.docker.com/) container.\n\nYou need to start a postgres container:\n\n``` sh\ndocker run --name five-bells-ledger-db -e POSTGRES_PASSWORD=password -d postgres\n```\n\nAfter giving postgres a few seconds to start up, you can run a five-bells-ledger Docker container, linking to that database:\n\n``` sh\ndocker run -d -e LEDGER_PORT=1337 -e LEDGER_ADMIN_PASS=admin -e LEDGER_DB_URI=postgres://postgres:password@db --link five-bells-ledger-db:db -p 1337:1337 -h localhost --name fivebells interledger/five-bells-ledger\n```\n\nBreaking down that command:\n\n* `-d` Run in the background\n* `-e LEDGER_PORT=1337` Set the ledger's port to 1337. This is just an example for how to set a config option.\n* `-e LEDGER_ADMIN_PASS=admin` Create an \"admin\" user with password \"admin\" at startup\n* `-e LEDGER_DB_URI=postgres://postgres:password@db` Set the database URL. Here, 'db' is a host that is Docker-linked:\n* `--link five-bells-ledger-db:db` This allows Five Bells Ledger to see the database that we set up above.\n* `-p 1337:1337` Expose port 1337 to localhost\n* `-h localhost` makes the ledger use 'localhost' as its hostname in the endpoint URLs it announces\n* `--name fivebells` This allows you to refer to this container in for instance `docker inspect fivebells`\n* `interledger/five-bells-ledger` Use the [`five-bells-ledger` Docker image](https://hub.docker.com/r/interledger/five-bells-ledger/)\n\nNow open http://localhost:1337/health in your browser.\n\nTo create a user, you can run:\n\n```sh\ncurl -i -sS -X PUT --user admin:admin -H \"Content-Type: application/json\" -d'{ \"name\" : \"alice\", \"password\" : \"alice\", \"balance\" : \"20000\" }' http://localhost:1337/accounts/alice\n```\n\nTo see the database contents, you can create a postgres container that interactively runs psql:\n```sh\ndocker run -it --rm --link five-bells-ledger-db:db postgres psql postgres://postgres:password@db\n```\n\nYou can then use [`ilp-plugin-bells`](https://github.com/interledgerjs/ilp-plugin-bells) to develop a client that connects to this ledger. Make sure you use the matching plugin version to connect to the ledger.\n\nIn particular, ledger version 20 can be accessed using `ilp-plugin-bells` version 12.\n\n## Running tests\n\nTo run tests using an in-memory database, run:\n\n``` sh\nnpm test\n```\n\nBy default, stdout from the app process is buffered up, and only shown after a test fails. That way, you can easily debug a failing test:\n\n```sh\nDEBUG=ledger:* npm test\n```\n\nIf you want to see the output for passing tests as well, and not buffered until the test is over, use the `SHOW_STDOUT` environment variable for this:\n\n```sh\nSHOW_STDOUT=true DEBUG=ledger:transfers npm test\n```\n\nIf you wish to specify the database against which the tests are run, use the `LEDGER_UNIT_DB_URI` environment variable.\n\n``` sh\nLEDGER_UNIT_DB_URI=postgres://root:password@localhost:5432/ledger_test_db npm test\n```\n\nFor example, to run against a Postgres instance in Docker, first start the database server:\n\n``` sh\ndocker run -it --rm --name fbl-pg-test postgres\n```\n\nThen, in another terminal, run the tests:\n\n``` sh\nLEDGER_UNIT_DB_URI=postgres://postgres@`docker inspect --format '{{ .NetworkSettings.IPAddress }}' fbl-pg-test`/postgres npm test\n```\n\n## A word of warning\n\nThis software is under development and no guarantees are made regarding reliability.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger-deprecated%2Ffive-bells-ledger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledger-deprecated%2Ffive-bells-ledger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger-deprecated%2Ffive-bells-ledger/lists"}