{"id":25716327,"url":"https://github.com/interledgerjs/ilp-protocol-spsp","last_synced_at":"2025-05-05T20:45:39.679Z","repository":{"id":67177236,"uuid":"117405007","full_name":"interledgerjs/ilp-protocol-spsp","owner":"interledgerjs","description":"SPSP client for ILPv4","archived":false,"fork":false,"pushed_at":"2019-06-10T18:35:07.000Z","size":42,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T23:31:34.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/interledgerjs.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":"2018-01-14T05:39:04.000Z","updated_at":"2022-10-25T03:36:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5869ddd-16fa-4cea-9463-338682063f2a","html_url":"https://github.com/interledgerjs/ilp-protocol-spsp","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Filp-protocol-spsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Filp-protocol-spsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Filp-protocol-spsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledgerjs%2Filp-protocol-spsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledgerjs","download_url":"https://codeload.github.com/interledgerjs/ilp-protocol-spsp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252574461,"owners_count":21770405,"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:53:00.115Z","updated_at":"2025-05-05T20:45:39.672Z","avatar_url":"https://github.com/interledgerjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ILP Protocol SPSP\n\n## Description\n\nImplements version 4 of the [Simple Payment Setup Protocol](https://github.com/interledger/rfcs/pull/447).\n\n## Example\n\n### Simple Usage\n\nSends a single-chunk PSK payment or a STREAM payment, if the server supports\nit. Great for micro-payments or micro-donations inside of a script.\n\n```js\ntry {\n  const resp = await SPSP.pay(plugin, {\n    pointer: '$bob.example.com',\n    sourceAmount: '1000'\n  })\n  console.log(`sent \"${resp.totalSent}\"`)\n} catch (e) {\n  console.log(`sent \"${e instanceof SPSP.PaymentError ? e.totalSent : 0}\"`)\n}\n```\n\nMake a pull payment from a designated pull payment pointer.\n\n```js\ntry {\n  const resp = await SPSP.pull(plugin, {\n    pointer: '$bob.example.com/4139fb24-3ab6-4ea1-a6de-e8d761ff7569',\n    amount: '1000'\n  })\n  console.log(`pulled \"${resp.totalReceived}\"`)\n} catch (e) {\n  console.log(`pulled \"${e instanceof SPSP.PaymentError ? e.totalReceived : 0}\"`)\n}\n```\n\n### Advanced Usage\n\nQuery the endpoint manually to construct a STREAM or PSK2 payment.\n```js\nconst query = await SPSP.query('$bob.example.com')\nconsole.log(query)\n// {\n//   destination_account: \"test.example.bob.LwNAw4ZEjlOwkc8xmaQRaRd37YRl8sixSCBPgEEqo8I\",\n//   shared_secret: \"RvqL/HJO3GinYIeujez/OEsBtX6+NtxJwabh7KthfOI=\",\n//   content_type: \"application/spsp4+json\"\n// }\n```\n\nThe query may contain additional information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledgerjs%2Filp-protocol-spsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledgerjs%2Filp-protocol-spsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledgerjs%2Filp-protocol-spsp/lists"}