# tokencore
**Repository Path**: heheiscool/tokencore
## Basic Information
- **Project Name**: tokencore
- **Description**: 区块链钱包后台核心组件,数字货币交易所 钱包后台组件 ,钱包后台搭建,支持(BTC,OMNI,ETH,ERC20,TRX,TRC20,BCH,BSV,DOGE,DASH,LTC)的充归提功能,微信pai01234
- **Primary Language**: Java
- **License**: GPL-3.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 28
- **Created**: 2021-01-15
- **Last Updated**: 2021-01-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
tokencore
-en [English](README_en.md)
-zh_CN [Simplified Chinese](README.md)
# tokencore introduction
##### The core components of the blockchain wallet backend, support BTC, OMNI, ETH, ERC20, TRX, TRC20, BCH, BSV, DOGE, DASH, LTC
# tokencore usage
#### Introducing this library
gradle way
In your build.gradle
```
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compile 'com.github.pai01234:tokencore:1.0.8.3'
}
```
#### Initialize identity
```java
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
```java
Identity identity = Identity. GetCurrentIdentity ()
String password ="123456";
List chainTypes = new ArrayList();
chainTypes.add(ChainType.BITCOIN);
List wallets = identity. DeriveWalletsByMnemonics (
chainTypes,
password,
MnemonicUtil.randomMnemonicCodes()
);
```
#### Offline signature
```java
String password ="123456";
String toAddress ="dsadsadsadsa";
int changeIdx =0;
long amount =1000L;
long fee =555L;
//utxos needs to go to the node or external api to get
ArrayList utxos = new ArrayList();
BitcoinTransaction bitcoinTransaction = BitcoinTransaction (
toAddress,
changeIdx,
amount,
fee,
utxos
);
TxSignResult txSignResult = bitcoinTransaction. SignTransaction (
ChainId.BITCOIN_MAINNET.toString(),
password,
wallet
);
```
#### Note: This is just a functional component of a digital currency! ! ! It is only for learning and does not provide complete blockchain business functions. If you need business backends, look down
# The project described below is not open source and has nothing to do with this project
### Blockchain java wallet introduction:
- #### The business backend is a more powerful business system constructed based on the functional components of the digital currency, which can obtain different public chain blockchain addresses at any time, and supports (BTC, OMNI, ETH, ERC20, TRX, TRC20) , BCH, BSV, DOGE, DASH, LTC) deposit and withdrawal functions
- ###### Background management demo

- ###### API interface demo

#### Complete system architecture situation:
- Use springboot framework
- The language is java, kotlin
- Use rabbitmq message queue
- mysql cloud database
- xxl-job distributed timing task framework
#### The entire system is developed by myself, and has run hundreds of millions of dollars in the production environment. It has sufficient reliability, scalability, and practicality, and can be used with confidence.
### Cooperation contact WeChat: pai01234
## pay attention
Anyone who uses this source code to engage in commercial activities and causes losses to others and yourself, I am not responsible for it!