If you wish to do an atomic swap on your machine or to integrate COMIT into an application (e.g. a DEX) please take a look at the Getting Started section of the COMIT documentation. If you have any questions, feel free to reach out to the team in our Gitter chat!
Below you find a short introduction into the SDK. For more detailed information please refer to the API-documentation in our documentation.
The fastest way to get started with the SDK is to take a look at examples using the SDK.
Create a project using create-comit-app and take a look at the generated
The SDK offers functionality to negotiate a trade and to execute the trade after the negotiation is finished.
Trade Negotiation vs. Execution
The SDK integrates a simple negotiation protocol that serves as a starting point for makers and takers to create and take orders.
The negotiation is currently only integrated into the SDK and does not concern the comit-network daemon (
cnd is only used for executing the trade, i.e. preparing transactions necessary for executing the atomic swap and monitoring the respective ledgers of the swap.
- Initiate a swap with another party.
- Receive the fund action from
- Send the fund transaction to a wallet.
- Receive the redeem transaction from
- Send the redeem transaction to a wallet.
(For a refund scenario you would of course be able to receive and send the refund transaction as well.)
These wallets are used to actually send the transactions necessary for the atomic swap to the respective ledger.
COMIT is designed in a non-custodial way, thus
cnd never holds your private key at any time.
The wallets integrated in the SDK show how the transaction information received from
cnd can be sent to the respective ledger.
Note that you can, of course, use different wallets than the above default wallets in your application.