{"id":18245043,"url":"https://github.com/edgeapp/edge-rest-wallet","last_synced_at":"2025-07-10T01:09:52.941Z","repository":{"id":38179367,"uuid":"242815955","full_name":"EdgeApp/edge-rest-wallet","owner":"EdgeApp","description":"A REST API for storing \u0026 sending money, powered by Edge","archived":false,"fork":false,"pushed_at":"2023-10-10T22:28:41.000Z","size":1474,"stargazers_count":3,"open_issues_count":14,"forks_count":3,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-21T08:13:33.773Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EdgeApp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-24T18:51:08.000Z","updated_at":"2022-03-17T18:33:31.000Z","dependencies_parsed_at":"2023-10-11T00:59:25.867Z","dependency_job_id":null,"html_url":"https://github.com/EdgeApp/edge-rest-wallet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EdgeApp/edge-rest-wallet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-rest-wallet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-rest-wallet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-rest-wallet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-rest-wallet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdgeApp","download_url":"https://codeload.github.com/EdgeApp/edge-rest-wallet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdgeApp%2Fedge-rest-wallet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264507300,"owners_count":23619189,"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":"2024-11-05T09:18:42.833Z","updated_at":"2025-07-10T01:09:47.932Z","avatar_url":"https://github.com/EdgeApp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# edge-rest-wallet\n\n\u003e A REST API for storing \u0026 sending money, powered by Edge\n\nThis repository implements a simple API for accessing a wallet on a web server. This can be useful for automated payouts, promotions, e-commerce, and various similar things.\n\nWe make this code available for free, but it does require an Edge SDK API key. We recommend closing external ports for security to prevent outside access and should only be used on your local server. Please copy `config.sample.json` to `config.json` and add your API key in there.\n\n## Install production\n\nInstall Node\n\n```sh\nsudo apt update -y\nsudo apt install curl -y\ncurl -sL https://deb.nodesource.com/setup_10.x | sudo bash -\nsudo apt install -y nodejs\n```\n\nInstall Yarn\n\n```sh\ncurl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -\necho \"deb https://dl.yarnpkg.com/debian/ stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list\nsudo apt-get update \u0026\u0026 sudo apt-get install yarn\n```\n\nClone Repo\n\n```sh\ngit clone https://github.com/EdgeApp/edge-rest-wallet.git\n```\n\n## Manage server using forever-service\n\n You can then use `forever-service` or similar tools to install the software on your server machine.\n\n```sh\n# install:\nsudo forever-service install edgeRest --script lib/index.js --start\n\n# manage:\nsudo service edgeRest restart\nsudo service edgeRest stop\n\n# uninstall:\nsudo forever-service delete edgeRest\n```\n\n## Manual Testing\n\n`curl http://localhost:80/balances/?type=bitcoin`\n\n## API Docs\n\n## Get a balance for a wallet\n```sh\n# Make sure to add the right type of cryptocurrency wallet plugins to your config.json file so you can access the type (Ex: \"plugins\": {\"bitcoin\": true})\n$.get('http://localhost:$PORT/balances/?type=$TYPE')\n  .then(function(d) {console.log(d)})\n\n# balances example\nawait fetch('http://localhost:8008/balances/?type=bitcoin', { method: 'GET' })\n\n\n# balances result\n\u003e    {\"BTC\": \"1100\"}\n```\n## Get a list of transactions for a wallet\n```sh\n$.get('http://localhost:$PORT/transactions/?type=$TYPE')\n  .then(function(d) {console.log(d)})\n\n# transactions example\nawait fetch('http://localhost:8008/transactions/?type=bitcoin', { method: 'GET' })\n\n# transactions result\n\u003e  [{\n\u003e    [{\"blockHeight\":619132,\n\u003e    \"date\":1582751709.749,\n\u003e    \"ourReceiveAddresses\": [\n            \"3JVeTHattdtGBAzWskiLzjeuojTb4Rjuui\"\n        ]\n\u003e    \"txid\":\"6e7dcff41bd6176e3573249ef8e5a6a0be79e26a911ee1ac01669f04714aac23\",\n\u003e    \"nativeAmount\":\"1100\",\n\u003e    \"networkFee\":\"0\",\n\u003e    \"currencyCode\":\"BTC\"}]\n\u003e  }]\n```\n## Send cryptocurrency from a wallet to a public address\n```sh\n# nativeAmount is in satoshi so this will need to be multiplied by 100,000,000, see example for reference\n\n$.post('http://localhost:$PORT/spend/?type=$TYPE', ({ spendTargets: [{ nativeAmount, publicAddress }])\n\n# spend .000011 bitcoin to address 3JVeTHattdtGBAzWskiLzjeuojTb4Rjuui\nawait fetch('http://localhost:8008/spend/?type=bitcoin', {\n  body: JSON.stringify({ spendTargets: [{ \"1100\", \"3JVeTHattdtGBAzWskiLzjeuojTb4Rjuui\" }] }),\n  headers: {\n    'Content-Type': 'application/json'\n  },\n  method: 'POST'\n  })\n\n# spend result\n\u003e {\n\u003e     \"ourReceiveAddresses\": [\n\u003e        \"qqrzxway5u26205mzz5hk5mqerer9dxf8v0jqum5vf\"\n\u003e    ],\n\u003e    \"currencyCode\": \"BCH\",\n\u003e    \"txid\": \"2eea81e5bd42ad8ee5fde9a2923d3e8ec60914ae974071187aa197d4a45af341\",\n\u003e    \"date\": 1583270341.543,\n\u003e    \"blockHeight\": 0,\n\u003e    \"nativeAmount\": \"-11908\",\n\u003e    \"networkFee\": \"908\",\n\u003e    \"signedTx\": \"01000000011152fb90c4eeee7d97a7e4ec58647f0300c0d2a085e4cdfa291ae75865cebfd2010000006b48304502210099d8df18063a8ff865c7638bef8109e83067c8420cf06066bd6c93524392f01602202dc4e57174d3667b421afc3ae4ef1b1eaf12c23c3df74464f4ff3dbd18f118d04121020df58681fe35241fb04863933f47a148f72fab6040255d8059500968e1f5cb3cffffffff02f82a0000000000001976a9143a92370920c0a20f126a6778d1700eb9e970695b88ac355b1c00000000001976a91406233ba4a715a53e9b10a97b5360c8f232b4c93b88ac00000000\"\n\u003e}\n```\n\n## REST API\n\nTo launch the REST API, just type `yarn start`.\n\nYou can also build the server code by running `yarn build`, which puts its output in the `lib` folder.\n\n## Demo app\n\nRun `yarn demo` to launch the demo app in your web browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeapp%2Fedge-rest-wallet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgeapp%2Fedge-rest-wallet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeapp%2Fedge-rest-wallet/lists"}