All Projects â†’ horizontalsystems â†’ atomic-swap-kit-android

horizontalsystems / atomic-swap-kit-android

Licence: other
Atomic Swap Android library for Bitcoin (BTC) and Bitcoin Cash (BCH) swaps in decentralized manner. Implemented on Kotlin.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to atomic-swap-kit-android

uniswap-python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 533 (+3035.29%)
Mutual labels:  dex, decentralized-exchange
BarterDEX
DEPRECATED/OUTDATED!!! Do not use!
Stars: ✭ 189 (+1011.76%)
Mutual labels:  dex, atomicswaps
tomox-sdk-ui
SDK UI to build a Decentralized Exchange on TomoX protocol
Stars: ✭ 24 (+41.18%)
Mutual labels:  dex, decentralized-exchange
every-eos
Decentralized exchange based on eos.io
Stars: ✭ 20 (+17.65%)
Mutual labels:  dex, decentralized-exchange
atomicDEX-API
This is the official AtomicAPI (atomicDEX API) repository
Stars: ✭ 65 (+282.35%)
Mutual labels:  dex, atomic-swap
atomic-markets
Generalized atomic swap marketplaces for ERC-777(advanced token standard) and ERC-721 (non-fungible tokens)
Stars: ✭ 30 (+76.47%)
Mutual labels:  atomic-swap, decentralized-exchange
rainbow
DeFi options comparator to detect market opportunities with CLI (Go) and web (Vue3).
Stars: ✭ 40 (+135.29%)
Mutual labels:  dex, decentralized-exchange
bitflyer
âš¡ bitFlyer API wrapper for Ruby
Stars: ✭ 25 (+47.06%)
Mutual labels:  bitcoin-cash
dex
docker executables - run applications without installing them or their dependencies
Stars: ✭ 31 (+82.35%)
Mutual labels:  dex
dex-parser
Rust parser for Android's dex format
Stars: ✭ 26 (+52.94%)
Mutual labels:  dex
binance-node-docker
Docker image for Binance full and light nodes
Stars: ✭ 24 (+41.18%)
Mutual labels:  dex
sprawl
Alpha implementation of the Sprawl distributed marketplace protocol.
Stars: ✭ 27 (+58.82%)
Mutual labels:  decentralized-exchange
dalvikgate
Lightweight dex / odex / apk to jar converter
Stars: ✭ 32 (+88.24%)
Mutual labels:  dex
jitana
A graph-based static-dynamic hybrid DEX code analysis tool
Stars: ✭ 35 (+105.88%)
Mutual labels:  dex
exchange
simple decentralized exchange using eos smart contract
Stars: ✭ 24 (+41.18%)
Mutual labels:  dex
cashaddress
Python tool for convert bitcoin cash legacy addresses
Stars: ✭ 40 (+135.29%)
Mutual labels:  bitcoin-cash
bitcoin-transactions
Javascript implementation of the Bitcoin protocol for any Bitcoin based coins, on server and inside browsers, discover and move/manage your coins by yourself: Bitcoin transactions made simple for standard or multisig wallets, segwit and bech32 are supported, create and send by your own your Bitcoin, Bitcoin Cash, Zcash, Litecoin, DOGE, Dash, etc…
Stars: ✭ 97 (+470.59%)
Mutual labels:  bitcoin-cash
v2-periphery
🎚 Peripheral smart contracts for interacting with Uniswap V2
Stars: ✭ 900 (+5194.12%)
Mutual labels:  decentralized-exchange
osprey
Kubernetes OIDC CLI login
Stars: ✭ 49 (+188.24%)
Mutual labels:  dex
NinjaDroid
Ninja Reverse Engineering on Android APK packages
Stars: ✭ 224 (+1217.65%)
Mutual labels:  dex

Overview

This is the android library that allows Atomic Swap, decentralized crypto currency exchange, between 2 parties. The implementation based on Hash Time Locked Contracts.

Usage

Initialization

The primary class to use is SwapKit.

val swapKit = SwapKit(context)

swapKit.registerSwapBlockchainCreator("BTC", BitcoinSwapBlockchainCreator(bitcoinKit))
swapKit.registerSwapBlockchainCreator("BCH", BitcoinSwapBlockchainCreator(bitcoinCashKit))

It takes context as constructor parameter. The supported coins should be registered to SwapKit.

Exchanging crypto-curencies

There are 2 sides that take part in the process: Initiator and Responder. The process consists of the following steps:

Request for a swap

Initiator creates swap request:

val swapRequest = swapKit.createSwapRequest(coinHave, coinWant, rate, amount)

Response to a swap

Responder creates response for this request:

val swapResponse = swapKit.createSwapResponse(swapRequest)

Creating response also starts the swap process in the Responder side.

Initiate swap

Initiator takes response and starts the swap

swapKit.initiateSwap(swapResponse)

Initiator and Responder Communication

The Swap Request and Swap Response are the simple data objects. They can be easily serialized into/parsed from strings and interchanged via standard apps, like messenger or email.

Prerequisites

  • JDK >= 1.8
  • Android 6 (minSdkVersion 23) or greater

Installation

Add the JitPack to module build.gradle

repositories {
    maven { url 'https://jitpack.io' }
}

Add the following dependency to your build.gradle file:

dependencies {
    implementation 'com.github.horizontalsystems:atomic-swap-kit-android:master-SNAPSHOT'
}

Example App

All features of the library are used in example project. It can be referred as a starting point for usage of the library.

Dependencies

  • Bitcoin Kit Android - Full SPV wallet toolkit implementation for Bitcoin, Bitcoin Cash and Dash blockchains

License

The Atomic Swap Kit is open source and available under the terms of the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].