{"id":17109147,"url":"https://github.com/dkackman/swap-utils","last_synced_at":"2025-04-13T03:19:50.368Z","repository":{"id":181112310,"uuid":"666241861","full_name":"dkackman/swap-utils","owner":"dkackman","description":"Info about your wallets activity on TibetSwap","archived":false,"fork":false,"pushed_at":"2025-04-07T14:05:00.000Z","size":567,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T07:02:17.725Z","etag":null,"topics":["chia-blockchain","tibetswap"],"latest_commit_sha":null,"homepage":"","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/dkackman.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":"2023-07-14T03:36:03.000Z","updated_at":"2025-03-24T14:53:01.000Z","dependencies_parsed_at":"2023-07-14T04:38:50.531Z","dependency_job_id":"99b54bb0-d436-4a35-ad27-7558a47b4495","html_url":"https://github.com/dkackman/swap-utils","commit_stats":null,"previous_names":["dkackman/swap-utils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkackman%2Fswap-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkackman%2Fswap-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkackman%2Fswap-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkackman%2Fswap-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkackman","download_url":"https://codeload.github.com/dkackman/swap-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248658247,"owners_count":21140908,"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":["chia-blockchain","tibetswap"],"created_at":"2024-10-14T16:22:16.953Z","updated_at":"2025-04-13T03:19:50.350Z","avatar_url":"https://github.com/dkackman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swap-utils\n\nA small utility to show swap details, estimated xch value, and estimated impermanent loss for liquidity swaps on the [tibet swap liquidity provider](https://v2.tibetswap.io/).\n\n### Thanks [yakuhito.xch](https://twitter.com/yakuh1t0)\n\n## Install\n\n[Node](https://nodejs.org) is a prerequisite.\n\n```bash\n# in the repo root\nnpm install\n```\n\n## Usage\n\nIt's not published on npmjs, so you'll need to run it from the repo root with `npx .`\n\n```bash\nchia swap-utils\n\n  Shows summarized swaps and estimated impermanent loss for the given wallet\n  fingerprints. The wallet must be running and unlocked.\n\nCommands\n\n  --command string   The command to run:\n                     swaps  Show liquidity swaps.\n                     imp    Show estimated impermanent loss.\n                     xch    Show the estimated XCH value of current liquidity.\n                     names  Set wallet names from the tibet list.\n\nOptions (defaults to Tibet production and localhost chia)\n\n  -n, --token (token symbol)             Limit the output to this token.\n  -v, --verbose                          Show verbose details.\n  -d, --host string                      The chia daemon host. (localhost)\n  -p, --port number                      The chia daemon port. (55400)\n  -k, --key_path string                  The path to the daemon private key.\n  -c, --cert_path string                 The path to the daemon certificate.\n  -f, --wallet_fingerprints number[]     Optional list of wallet fingerprints.\n  -a, --tibet_api_uri string             The uri of the tibet api\n  -i, --tibet_analytics_api_uri string   The uri of the tibet analytics api\n  -t, --timeout_seconds number           The timeout for the wallet connection.\n  -j, --json                             Return results as json.\n  -h, --help                             Display this usage guide.\n\n  Project home: https://github.com/dkackman/swap-utils\n```\n\n## Examples\n\n```bash\n# from the repo root\n\n# shows summarized swaps for the default wallet\n$ npx . swaps\n\nSwapped 0.000612042913 XCH and 0.42 POTT for 0.355 TIBET-POTT-XCH\nSwapped 0.429211636061 XCH and 1.061 CH21 for 1.061 TIBET-CH21-XCH\n\n# shows impermanent loss for swaps across two wallets\n$ npx . imp --wallet_fingerprints 1234567890 0987654321 --verbose\n\nSwapped 0.000612042913 XCH and 0.42 POTT for 0.355 TIBET-POTT-XCH\nNow worth 0.000507019827 XCH and 0.518555709146 POTT\nNet -0.000105023086 XCH and 0.098555709146 POTT\n--------------------------------------------------\nSwapped 0.429211636061 XCH and 1.061 CH21 for 1.061 TIBET-CH21-XCH\nNow worth 0.44743417566 XCH and 1.043509175739 CH21\nNet 0.018222539599 XCH and -0.017490824261 CH21\n--------------------------------------------------\nTotal net 0.018117516513 XCH\n\n# shows the estimated XCH value of current liquidity\n$ npx . xch --token ALGOLD\nALGOLD: 0.00006835841 XCH\nTotal: 0.00006835841 XCH\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkackman%2Fswap-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkackman%2Fswap-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkackman%2Fswap-utils/lists"}