{"id":29124844,"url":"https://github.com/hirosystems/platform-template-lightning-swaps","last_synced_at":"2025-06-29T21:06:59.209Z","repository":{"id":273951932,"uuid":"920794568","full_name":"hirosystems/platform-template-lightning-swaps","owner":"hirosystems","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-09T14:52:25.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-26T11:56:55.365Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hirosystems.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":"2025-01-22T19:31:48.000Z","updated_at":"2025-05-09T14:52:29.000Z","dependencies_parsed_at":"2025-01-24T00:33:34.270Z","dependency_job_id":null,"html_url":"https://github.com/hirosystems/platform-template-lightning-swaps","commit_stats":null,"previous_names":["hiro-platform-templates/lightning-swaps","hirosystems/platform-template-lightning-swaps"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/hirosystems/platform-template-lightning-swaps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fplatform-template-lightning-swaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fplatform-template-lightning-swaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fplatform-template-lightning-swaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fplatform-template-lightning-swaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirosystems","download_url":"https://codeload.github.com/hirosystems/platform-template-lightning-swaps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fplatform-template-lightning-swaps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262667299,"owners_count":23345534,"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-06-29T21:06:57.029Z","updated_at":"2025-06-29T21:06:59.119Z","avatar_url":"https://github.com/hirosystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lightning Swaps\n\nSubmarine swaps are common use cases in a blockchain. \n\nIn Stacks, the [LNSwap](https://www.lnswap.org/) protocol provides submarine swaps between Stacks and Bitcoin, including interoperability with on-chain and [Lightning Network](https://lightning.network/).\n\n## Know your Contract\n\nFor more details about this production running protocol in Stacks, please refer to [LNSwap's GitHub](https://github.com/LNSwap/lnstxbridge) and the [learning guide](https://www.lnswap.org/learn/how-lnswap-bitcoin-stacks-swaps-work).\n\nThe [stxswap_v10.clar](/examples/lightning-swaps/contracts/stxswap_v10.clar) contract includes the following functionality.\n\n+ `lockStx` locks the STX for a swap in the contract\n+ `claimStx` claims the STX locked in a contract\n+ `refundStx` refunds the STX locked in a contract\n\nTo add a new contract, use [Clarinet](https://docs.hiro.so/stacks/clarinet).\n\n## Test your Contract\n\n+ You can manually test your your contracts in the [Clarinet console](https://docs.hiro.so/clarinet/how-to-guides/how-to-test-contract#load-contracts-in-a-console).\n+ You can programmatically test your contracts with [unit tests](https://docs.hiro.so/clarinet/how-to-guides/how-to-test-contract).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fplatform-template-lightning-swaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirosystems%2Fplatform-template-lightning-swaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fplatform-template-lightning-swaps/lists"}