All Projects → sealedtx → bitcoin-cash-converter

sealedtx / bitcoin-cash-converter

Licence: Apache-2.0 License
Java converter from legacy address to new bitcoincash format and vice versa

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to bitcoin-cash-converter

copernicus
Golang bitcoin library
Stars: ✭ 18 (-18.18%)
Mutual labels:  bitcoin-cash
bitsnpicas
Bits'N'Picas - Bitmap & Emoji Font Creation & Conversion Tools
Stars: ✭ 171 (+677.27%)
Mutual labels:  converter
dbf2sql
DBF 2 SQL is small command line tool for converting DBF files to MySQL dump format.
Stars: ✭ 12 (-45.45%)
Mutual labels:  converter
md2review
a converter from Markdown into Re:VIEW, using redcarpet
Stars: ✭ 74 (+236.36%)
Mutual labels:  converter
obsidian-link-converter
Obsidian Plugin to scan all your links in your vault and convert them to your desired format.
Stars: ✭ 44 (+100%)
Mutual labels:  converter
pytorch2keras
PyTorch to Keras model convertor
Stars: ✭ 788 (+3481.82%)
Mutual labels:  converter
Essentia-iOS
All in One Blockchain solution
Stars: ✭ 50 (+127.27%)
Mutual labels:  bitcoin-cash
dftools
Tools for Star Wars: Dark Forces assets.
Stars: ✭ 18 (-18.18%)
Mutual labels:  converter
xbytes
Parse bytes to human readable sizes (4747) → ('4.75 KB') and vice versa.
Stars: ✭ 17 (-22.73%)
Mutual labels:  converter
json2xml
json to xml converter in python3
Stars: ✭ 76 (+245.45%)
Mutual labels:  converter
OpenDriver2Tools
Driver 1 and Driver 2 tools
Stars: ✭ 25 (+13.64%)
Mutual labels:  converter
wana kana rust
Utility library for checking and converting between Japanese characters - Hiragana, Katakana - and Romaji
Stars: ✭ 46 (+109.09%)
Mutual labels:  converter
wasm2kt
Web Assembly to Kotlin and Java converter. Allows to compile a C or C++ program/library, and generate a Kotlin or Java program/library.
Stars: ✭ 20 (-9.09%)
Mutual labels:  converter
bitcoin-kit-android
Comprehensive Bitcoin development library for iOS, implemented on Swift. SPV wallet implementation for Bitcoin, Bitcoin Cash, Litecoin and Dash blockchains. Fully compliant with existing standards and BIPs.
Stars: ✭ 102 (+363.64%)
Mutual labels:  bitcoin-cash
behave2cucumber
Behave to Cucumber converter
Stars: ✭ 21 (-4.55%)
Mutual labels:  converter
osm2xodr
converter for OpenStreetMaps to OpenDrive roads - for use with Carla or other things
Stars: ✭ 90 (+309.09%)
Mutual labels:  converter
mous
Lightweight audio player & converter for FreeBSD/Linux/macOS
Stars: ✭ 65 (+195.45%)
Mutual labels:  converter
tex-equation-to-svg
Convert a TeX or LaTeX string to an SVG.
Stars: ✭ 34 (+54.55%)
Mutual labels:  converter
entium
A helper for converting entwine tile data into cesium tiles
Stars: ✭ 21 (-4.55%)
Mutual labels:  converter
gb-convert
Gameboy tile conversion and map editor tool
Stars: ✭ 26 (+18.18%)
Mutual labels:  converter

bitcoin-cash-converter

Build Status

Simple address converter from legacy to new bitcoincash format and vice versa. It is fully covered by unit tests.

Usage

The class AddressConverter is the entrypoint to the bitcoin-cash-converter API, use it to convert addresses.

Legacy -> Bitcoincash

You can convert legacy address from a String to new bitcoincash format:

String bitcoincash_address = AddressConverter.toCashAddress(legacy_address);

Bitcoincash -> Legacy

You can convert bitcoincash address from a String with format "bitcoincash:${your_address}" to legacy fomat:

String legacy_address = AddressConverter.toLegacyAddress(bitcoincash_address);

Example:

String legacy_address = "18uzj5qpkmg88uF3R4jKTQRVV3NiQ5SBPf";
String bitcoincash_address = AddressConverter.toCashAddress(legacy_address);
System.out.println(bitcoincash_address); // output: bitcoincash:qptvav58e40tcrcwuvufr94u7enkjk6s2qlxy5uf9j

String cash_address = "bitcoincash:qptvav58e40tcrcwuvufr94u7enkjk6s2qlxy5uf9j";
String legacy_address = AddressConverter.toLegacyAddress(cash_address);
System.out.println(legacy_address); // output: 18uzj5qpkmg88uF3R4jKTQRVV3NiQ5SBPf

Include

Maven

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>
<dependency>
  <groupId>com.github.sealedtx</groupId>
  <artifactId>bitcoin-cash-converter</artifactId>
  <version>1.0</version>
</dependency>

Gradle

allprojects {
  repositories {
  ...
  maven { url 'https://jitpack.io' }
  }
}
  
dependencies {
  implementation 'com.github.sealedtx:bitcoin-cash-converter:1.0'
}
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].