From e3b79a912c090774ab92ec8d02f3e4714a128e16 Mon Sep 17 00:00:00 2001
From: Galaxy <30950645+GalaxySciTech@users.noreply.github.com>
Date: Fri, 1 May 2026 01:01:51 +0600
Subject: [PATCH] docs: simplify onboarding with 30-second quick start
---
README.md | 216 ++++++++++++++++--------------------------------------
1 file changed, 63 insertions(+), 153 deletions(-)
diff --git a/README.md b/README.md
index 781537d..8051513 100644
--- a/README.md
+++ b/README.md
@@ -11,54 +11,72 @@
-
-
-
-
-
-
-
-
-
-
-
-
- Supported Chains • - Quick Start • + Quick Start (30s) • Integration • - Offline Signing • - Contact + Recommended Minimum • + Supported Chains
--- ## Introduction -Tokencore is a lightweight Java library that provides core wallet functionality for multiple blockchains. It handles HD wallet derivation, encrypted keystore management, and offline transaction signing — making it the ideal building block for exchange backends and custodial wallet services. +Tokencore is a lightweight Java library for wallet fundamentals: HD derivation, encrypted keystore management, and offline signing. -For a complete exchange wallet backend built on top of Tokencore, see [java-wallet](https://github.com/galaxyscitech/java-wallet). +If your goal is "install and use immediately", start with the 30-second quick start below and only enable additional chains/features later. -## Supported Chains +## Quick Start (30 seconds) -| Chain | Token Standards | Features | -|-------|----------------|----------| -| **Bitcoin** | BTC, OMNI | UTXO management, SegWit (P2WPKH) | -| **Ethereum** | ETH, ERC-20 | Offline signing, nonce management | -| **TRON** | TRX, TRC-20 | Transaction signing | -| **Bitcoin Cash** | BCH | CashAddr format | -| **Bitcoin SV** | BSV | Transaction signing | -| **Litecoin** | LTC | Transaction signing | -| **Dogecoin** | DOGE | Transaction signing | -| **Dash** | DASH | Transaction signing | -| **Filecoin** | FIL | Transaction signing | +### 1) Add dependency + +```gradle +repositories { + maven { url 'https://jitpack.io' } +} +dependencies { + implementation 'com.github.galaxyscitech:tokencore:1.3.0' +} +``` + +### 2) Copy this minimal bootstrap code + +```java +WalletManager.storage = () -> new File("./keystore"); +WalletManager.scanWallets(); + +String password = "change_me"; +Identity identity = Identity.getCurrentIdentity(); +if (identity == null) { + identity = Identity.createIdentity("default", password, "", Network.MAINNET, Metadata.P2WPKH); +} + +Wallet wallet = identity.deriveWalletByMnemonics( + ChainType.ETHEREUM, + password, + MnemonicUtil.randomMnemonicCodes()); + +System.out.println("Address = " + wallet.getAddress()); +``` + +### 3) Verify locally + +```bash +./gradlew test +``` -## Requirements +## Core Features (Recommended Minimum) -- **Java** 8 or higher -- **Gradle** 8.5+ (included via wrapper, no manual install needed) +For new integrators, keep the initial rollout small: + +1. **Identity + keystore only** (account generation + secure storage) +2. **Single chain first** (recommend: ETH or BTC) +3. **Offline signing only** (avoid online key usage) +4. **No multi-chain abstraction in v1 API surface** + +This reduces integration complexity and speeds up first successful deployment. ## Integration @@ -90,135 +108,27 @@ dependencies { ``` -## Quick Start - -### 1. Initialize Keystore & Identity - -```java -WalletManager.storage = new KeystoreStorage() { - @Override - public File getKeystoreDir() { - return new File("/path/to/keystore"); - } -}; -WalletManager.scanWallets(); - -String password = "your_password"; -Identity identity = Identity.getCurrentIdentity(); - -if (identity == null) { - identity = Identity.createIdentity( - "token", password, "", Network.MAINNET, Metadata.P2WPKH); -} -``` - -### 2. Derive a Wallet - -```java -Identity identity = Identity.getCurrentIdentity(); -Wallet wallet = identity.deriveWalletByMnemonics( - ChainType.BITCOIN, "your_password", MnemonicUtil.randomMnemonicCodes()); -System.out.println(wallet.getAddress()); -``` - -## Offline Signing - -Offline signing creates a digital signature without ever exposing private keys to an online environment. - -### Bitcoin - -```java -// 1. Define transaction parameters -String toAddress = "33sXfhCBPyHqeVsVthmyYonCBshw5XJZn9"; -int changeIdx = 0; -long amount = 1000L; -long fee = 555L; - -// 2. Collect UTXOs (from your node or a third-party API) -ArrayList