{"id":18557993,"url":"https://github.com/zh/slpswap-node","last_synced_at":"2025-05-15T14:30:52.637Z","repository":{"id":57363363,"uuid":"372825777","full_name":"zh/slpswap-node","owner":"zh","description":"Simple SLP swap (CLI version)","archived":false,"fork":false,"pushed_at":"2021-06-16T16:55:15.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-18T14:12:09.967Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zh.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":"2021-06-01T12:41:21.000Z","updated_at":"2021-06-16T16:55:18.000Z","dependencies_parsed_at":"2022-09-06T22:21:29.372Z","dependency_job_id":null,"html_url":"https://github.com/zh/slpswap-node","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/zh%2Fslpswap-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh%2Fslpswap-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh%2Fslpswap-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh%2Fslpswap-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zh","download_url":"https://codeload.github.com/zh/slpswap-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254358545,"owners_count":22057938,"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-06T21:38:36.970Z","updated_at":"2025-05-15T14:30:52.585Z","avatar_url":"https://github.com/zh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple SLP Swap\n\nThe project started as a repackaging of Vin Armani's [slpswap-client](https://github.com/vinarmani/slpswap-client) project.\n\nThis is the CLI version of the project. It depends from the non-broswer version of [BCH gRPC library](https://github.com/simpleledgerinc/grpc-bchrpc-node/).\n\nChanges from the original:\n\n- Original monolithic exchange code split\n- Some common functions moved to separate module (Utils etc.)\n- Command line arguments removed from the main code\n\n## Usage\n\n* Installation\n\n```sh\ngit clone https://github.com/zh/slpswap-node\ncd slpswap-node\nnpm install\nnpm link slpswap-node\n```\n\n[npm package](https://www.npmjs.com/package/slpswap-node) for easy include is also available.\n\n* Using in projects\n\n```js\nconst SLPSwap = require('slpswap-node');\n\nconst swapConfig = {\n  to: 'tokens receiver SLP address',\n  wif: 'tokens sender private key',\n  amount: 'send tokens amount',\n  send: 'send tokens token ID',\n  receive: 'receive tokens token ID',\n  postage: 'use PostOffice protocol (true/false)',\n};\n\nconst slpSwap = new SLPSwap();\nconst result = await slpSwap.exchange(swapConfig);\n\n```\n\n* CLI SLP swap exchange\n\nresult should be same as the original project\n\n```sh\ngit clone https://github.com/zh/slpswap-node\ncd slpswap-node\nnpm install\n\nnode ./examples/exchange_tokens.js -h\nOptions:\n      --version  Show version number                                   [boolean]\n  -t, --to       send token to that address                             [string]\n  -w, --wif      token sender private key                               [string]\n  -s, --send     Send tokens                                            [string]\n  -r, --receive  Receive tokens                                         [string]\n  -a, --amount   Amount of tokens to send                               [string]\n  -p, --postage  Use postage protocol (pay with tokens)\n                                                      [boolean] [default: false]\n  -h, --help     Show help                                             [boolean]\n\nnode ./examples/exchange_tokens.js ...some params...\n```\nSee [examples directory](./example/) for more code usage examples.\n\n## Disclaimer\n\nTHIS WALLET IS CONSIDERED [ALPHA SOFTWARE](https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha). USE AT YOUR OWN RISK! WE ASSUME NO RESPONSIBILITY NOR LIABILITY IF THERE IS A BUG IN THIS IMPLEMENTATION.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzh%2Fslpswap-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzh%2Fslpswap-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzh%2Fslpswap-node/lists"}