All Projects → galaxyzxcv → tokencore

galaxyzxcv / tokencore

Licence: GPL-3.0 license
The core components of the blockchain wallet backend, support a variety of blockchain address generation and offline signatures

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to tokencore

paper-wallet-generator
Paper Wallet Generator for Bitcoin & Altcoins
Stars: ✭ 35 (-91.5%)
Mutual labels:  btc, doge, eth, ltc
gdax bot
gdax_bot - Micro dollar cost averaging for crypto
Stars: ✭ 57 (-86.17%)
Mutual labels:  btc, eth, bch, ltc
carrot-pool-stratum
Bitcoin Stratum Pool Plugin ⛏ 📦 🔌
Stars: ✭ 22 (-94.66%)
Mutual labels:  btc, bsv, bch
carrot-pool
Mining Pools Made Easy. ⛏ 📦 🏆
Stars: ✭ 53 (-87.14%)
Mutual labels:  btc, bsv, bch
coinmarketcap-icons-cryptos
Repository of all crypto icons, and allows you to download all images of icons of crypto currencies listed on the coinmarketcap site 9129 icons
Stars: ✭ 17 (-95.87%)
Mutual labels:  btc, eth, ltc
evian
www.balletcrypto.org/
Stars: ✭ 21 (-94.9%)
Mutual labels:  bsv, bch, ltc
MugglePay
Make Crypto Payment Easy 让数字货币支付更简单
Stars: ✭ 176 (-57.28%)
Mutual labels:  btc, bch, ltc
Cryptolist
Curated collection of blockchain & cryptocurrency resources.
Stars: ✭ 3,501 (+749.76%)
Mutual labels:  btc, eth
Ccxt
A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
Stars: ✭ 22,501 (+5361.41%)
Mutual labels:  btc, eth
Kschart
k线图/kline/kchart,已经集成MA/EMA/MACD/KDJ/BOLL/RSI/WR/AVG等指标,新增指标及其方便。适用于股票/区块链交易所等种类App。Swift5编写,CPU/内存占用率极低,60FPS稳定运行。示例集成websocket,并接入币安数据(需VPN)。
Stars: ✭ 909 (+120.63%)
Mutual labels:  btc, eth
Coinbin.org
₿ A Human–Friendly API Service for Crypto Currency Information.
Stars: ✭ 253 (-38.59%)
Mutual labels:  btc, eth
Optimal Buy Cbpro
Scheduled buying of BTC, ETH, and LTC from Coinbase Pro, optimally!
Stars: ✭ 288 (-30.1%)
Mutual labels:  btc, eth
Coinpricebar
💰 Cryptocurrency prices on MacBook Touch Bar
Stars: ✭ 290 (-29.61%)
Mutual labels:  btc, eth
Go Binance
A Go SDK for Binance API
Stars: ✭ 441 (+7.04%)
Mutual labels:  btc, eth
Pywallet
Dead-simple BIP32 (HD) wallet creation for BTC, BTG, BCH, LTC, DASH, USDT, QTUM and DOGE
Stars: ✭ 286 (-30.58%)
Mutual labels:  btc, eth
Openapi
DragonEx OpenAPI
Stars: ✭ 54 (-86.89%)
Mutual labels:  btc, eth
ChainWallet
一个以研究技术为目地的基础项目,也只有最基本 Bitcoin、Ethereum 、EOS 相关的加密算法。
Stars: ✭ 26 (-93.69%)
Mutual labels:  btc, eth
Donate
Cryptocurrency donation daemon
Stars: ✭ 34 (-91.75%)
Mutual labels:  btc, eth
hd-address
An extensible HD Wallet Address management utility
Stars: ✭ 22 (-94.66%)
Mutual labels:  trx, btc
Phptrader
A simple php powered Bitcoin and Ethereum trading bot
Stars: ✭ 131 (-68.2%)
Mutual labels:  btc, eth

tokencore

Contact information

Language

Use Cases

Exchange wallet backend https://github.com/tradergalax/java-wallet

tokencore introduction

The core components of the blockchain wallet backend, support BTC, OMNI, ETH, ERC20, TRX, TRC20, BCH, BSV, DOGE, DASH, LTC,FILECOIN

tokencore usage

Introducing this library

  • gradle way In your build.gradle
    repositories {
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        compile 'com.github.tradergalax:tokencore:1.2.7'
    }
  • maven way
	<repositories>
		<repository>
		    <id>tronj</id>
		    <url>https://dl.bintray.com/tronj/tronj</url>
		</repository>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>
	
	<dependency>
	    <groupId>com.github.galaxyzxcv</groupId>
	    <artifactId>tokencore</artifactId>
	    <version>1.2.7</version>
	</dependency>

Test sample

https://github.com/tradergalax/tokencore/blob/master/src/test/java/org/consenlabs/tokencore/Test.java

Initialize identity

    try{
        Files.createDirectories(Paths.get("${keyStoreProperties.dir}/wallets"))
        }catch(Throwable ignored){
        }
        //KeystoreStorage is an interface that implements its getdir method
        WalletManager.storage=KeystoreStorage();
        WalletManager.scanWallets();
        String password="123456";
        Identity identity=Identity.getCurrentIdentity();
        if(identity==null){
        Identity.createIdentity(
        "token",
        password,
        "",
        Network.MAINNET,
        Metadata.P2WPKH
        );
        }

Generate wallet

        Identity identity = Identity.getCurrentIdentity();
        String password = "123456";
        Wallet wallet = identity.deriveWalletByMnemonics(
        ChainType.BITCOIN,
        password,
        MnemonicUtil.randomMnemonicCodes()
        );
        System.out.println(wallet.getAddress());

Offline signature

  • Bitcoin
        String password = "123456";
        String toAddress = "33sXfhCBPyHqeVsVthmyYonCBshw5XJZn9";
        int changeIdx = 0;
        long amount = 1000L;
        long fee = 555L;
        //utxos needs to go to the node or external api to get
        ArrayList<BitcoinTransaction.UTXO> utxos = new ArrayList();
        BitcoinTransaction bitcoinTransaction = new BitcoinTransaction(
        toAddress,
        changeIdx,
        amount,
        fee,
        utxos
        );
        Wallet wallet = WalletManager.findWalletByAddress(ChainType.BITCOIN, "33sXfhCBPyHqeVsVthmyYonCBshw5XJZn9");
        TxSignResult txSignResult = bitcoinTransaction.signTransaction(
        String.valueOf(ChainId.BITCOIN_MAINNET),
        password,
        wallet
        );
        System.out.println(txSignResult);
  • TRON
        String from = "TJRabPrwbZy45sbavfcjinPJC18kjpRTv8";
        String to = "TF17BgPaZYbz8oxbjhriubPDsA7ArKoLX3";
        long amount = 1;
        String password = "123456";
        Wallet wallet = WalletManager.findWalletByAddress(ChainType.BITCOIN, "TJRabPrwbZy45sbavfcjinPJC18kjpRTv8");
        TronTransaction transaction = new TronTransaction(from, to, amount);
        //Offline signature, it is not recommended to sign and broadcast together
        TxSignResult txSignResult = transaction.signTransaction(String.valueOf(ChainId.BITCOIN_MAINNET), password, wallet);

        System.out.println(txSignResult);

Note: This is just a functional component of a digital currency! ! ! It is only for learning and does not provide complete blockchain business functions

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].