Skip to content

hirosystems/platform-template-lightning-swaps

Repository files navigation

Lightning Swaps

Submarine swaps are common use cases in a blockchain.

In Stacks, the LNSwap protocol provides submarine swaps between Stacks and Bitcoin, including interoperability with on-chain and Lightning Network.

Know your Contract

For more details about this production running protocol in Stacks, please refer to LNSwap's GitHub and the learning guide.

The stxswap_v10.clar contract includes the following functionality.

  • lockStx locks the STX for a swap in the contract
  • claimStx claims the STX locked in a contract
  • refundStx refunds the STX locked in a contract

To add a new contract, use Clarinet.

Test your Contract

  • You can manually test your your contracts in the Clarinet console.
  • You can programmatically test your contracts with unit tests.

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published