{"id":25716311,"url":"https://github.com/interledgerjs/wallet","last_synced_at":"2025-05-05T20:45:10.364Z","repository":{"id":40790822,"uuid":"170322677","full_name":"interledgerjs/wallet","owner":"interledgerjs","description":"Work In Progress: A demo ILP wallet being built by the interns at Coil","archived":false,"fork":false,"pushed_at":"2023-01-11T01:28:53.000Z","size":2224,"stargazers_count":3,"open_issues_count":78,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T23:31:34.246Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interledgerjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-12T13:27:10.000Z","updated_at":"2020-11-01T20:16:10.000Z","dependencies_parsed_at":"2023-02-08T21:15:42.491Z","dependency_job_id":null,"html_url":"https://github.com/interledgerjs/wallet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Fwallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Fwallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Fwallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Fwallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledgerjs","download_url":"https://codeload.github.com/interledgerjs/wallet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252574264,"owners_count":21770365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-02-25T14:52:55.351Z","updated_at":"2025-05-05T20:45:10.346Z","avatar_url":"https://github.com/interledgerjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A demo ILP wallet\n\n\u003e **This project is being built by the interns at Coil and is NOT ready to use. We'll make a release as soon as it is.**\n\n[![CircleCI](https://circleci.com/gh/interledgerjs/wallet.svg?style=shield)](https://circleci.com/gh/interledgerjs/wallet)\n\n\u003e If there are features you think are important feel free to log issues that will help us practice our agile workflow and product management.\n\n## Goal\n\nA working REST API that exposes the functions of a simple wallet system (accounts, users, transactions etc) and integrates the functions required of an ILSP or wallet that can peer with connectors on the Interledger.\n\n### Quickstart Guide\n\nPrerequisites: nodejs, typsecript, docker, docker-compose, mysql. \n\nTo run via docker:\n\nConfigure the environmental variables in *docker-compose.yml*.\nRun *npm run docker-run*. \nAPI requests can be sent to *0.0.0.0:3000*. \nTo get the first admin token, login in at *0.0.0.0:3000/post/token* with the following JSON { \"userName\": \"admin\", \"pssword\": \"admin\" }. \n\nTo run locally:\n\nAfter downloading the project, rename *sample.env* to *.env*.\nConfigure the options in *.env*. \nRun *npm install*.\nRun *npm run watch-node*. \nAPI requests can be sent to *127.0.0.1:3000*. \nTo get the first admin token, login in at *127.0.0.1:3000/post/token* with the following JSON { \"userName\": \"admin\", \"pssword\": \"admin\" }. \n\n### Folders\n\nAll source code is expected to be TypeScript and is placed in the `src` folder. Tests are put in the `test` folder.\n\nThe NPM package will not contain any TypeScript files (`*.ts`) but will have typings and source maps.\n\n### Environmental variables\nThe environmental variable file in the root folder is used to store and configure variables for database management, development, and deployment. This repo is supplied with an `example.env`.\n\nPlease change the example variables to suit your needs.\n\n## Scripts\n\n  - `clean` : Cleans the build folder and test output\n  - `build` : Builds the project\n  - `lint`  : Runs the linter over the project\n  - `test`  : Runs the unit tests and produces a code coverage report\n  - `loadtest` : Runs the loadtest and produces an artillery report afterwards\n\n## Endpoints\nPlease see the [wiki](https://github.com/interledgerjs/wallet/wiki) for a full breakdown on the individual endpoints.\n\n### Services\nServices used throughout the API  \n\nMethod | Path | Token Type | Description | Expected Body Input | Expected Output\n|-|-|-|-|-|-\n*post* | /token | Admin/User | User login and token signing | { userName, pssword } | { token }\n\nTokens are valid for one hour and have to be included as a bearer token in the request header. After deployment, this route can be accessed with username *admin* and password *admin*. \n\n### Users\nEndpoints for user data  \n\nMethod | Path | Token Type | Description | Expected Body Input | Expected Output\n|-|-|-|-|-|-\n*post* | /admin | Admin | Create new user with Admin privileges | { userName, pssword } | { id, userName, role, dateCreated, deletedAt }\n*post* | /users | None | Create new user with User privileges | { userName, pssword } | { id, userName, dateCreated }\n*get* | /users | Admin | Return all users as an array of objects | None | [ { id, userName, dateCreated, deletedAt, role, pssword }, ... ]\n*get* | /users/:id | Admin/User | Return a user specified by id | None | { id, userName, dateCreated }\n*put* | /users/:id | Admin | Update a user specified by id | At least one or any combination of { userName, deletedAt, role, pssword } | { id, userName, role, dateCreated, deletedAt }\n*put* | /users/:id | User | Update a user specified by id. User must the user to whom the token was issued | At least one or any combination of { userName, pssword } | { id, userName, dateCreated }\n*delete* | /users/:id | Admin/User | Soft delete a user specified by id | None | { id, userName, role, dateCreated, deletedAt }\n\nTo undelete a user with *.put(/users/:id)*, *deletedAt* must be specified as *false* in the body input.\n\nThe resource referenced by the route must be associated with the user to whom the User token was issued.\n\n### Accounts\nEndpoints for account data  \n\nMethod | Path | Token Type | Description | Expected Body Input | Expected Output\n|-|-|-|-|-|-\n*post* | /accounts | Admin/User | Add new account to db | { name, owner } | { id, name, owner, deletedAt, lastUpdated, balance }\n*get* | /accounts | Admin | Return all accounts as an array of objects | None | [ { id, name, owner, deletedAt, lastUpdated }, ... ]\n*get* | /accounts/?owner=[owner] | Admin/User | Return all accounts associated with specified owner as an array of objects | None | [ { id, name, owner, deletedAt, lastUpdated }, ... ]\n*get* | /accounts/:id | Admin/User | Return an account specified by id | None | { id, name, owner, deletedAt, lastUpdated, balance }\n*put* | /accounts/:id | Admin/User | Update an account specified by id | { name } | { id, name, owner, deletedAt, lastUpdated, balance }\n*delete* | /accounts/:id | Admin/User | Soft delete an account specified by id | None | { id, name, owner, deletedAt, lastUpdated, balance }\n\nThe resource referenced by the route must be associated with the user to whom the User token was issued.\n\n### Transactions\nEndpoints for transaction data\n\nMethod | Path | Token Type | Description | Expected Body Input | Expected Output\n-|-|-|-|-|-\n*post* | /transactions | Admin/User | Add transaction | { debitAccountId, creditAccountId, amount } | { id, debitAccountId, creditAccountId, amount, date }\n*get* | /transactions | Admin | Return all transactions as an array of objects | None | [ { id, debitAccountId, creditAccountId, amount, date }, ... ]\n*get* | /transaction/?account=[account] | Admin/User | Return all transactions associated with specified account as an array of objects | None | [ { id, debitAccountId, creditAccountId, amount, date }, ... ]\n*get* | /transactions/:id | Admin/User | Return transaction specified by id as an object | None | { id, debitAccountId, creditAccountId, amount, date }\n\nTo create a new transaction resource, the user to whom the User token was issued must be the owner of the account which will be debited. \n\nTo read a transaction resource, the user to whom the User token was issued must be the owner of the account being referenced by the transaction. \n\n*TODO*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledgerjs%2Fwallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledgerjs%2Fwallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledgerjs%2Fwallet/lists"}