A Kotlin Multiplatform crypto wallet SDK that provides a unified abstraction layer for multiple blockchain networks.
Chameleon solves the integration complexity of working with multiple blockchain SDKs by providing a consistent architecture across different blockchain networks. Instead of learning and maintaining separate SDKs for each blockchain, Chameleon offers a single, unified API.
- Unified Wallet Management: Create, import, and manage wallets across multiple blockchains with a consistent API
- BIP39/BIP32 Support: Full implementation of mnemonic generation and hierarchical deterministic (HD) wallet derivation
- Message Signing & Verification: Sign and verify messages using blockchain-specific cryptographic algorithms
- Multi-Language Mnemonic Support: Supports 8 languages for mnemonic phrases (English, Korean, Japanese, Chinese Simplified, Chinese Traditional, French, Spanish, Italian)
- Transaction Building & Broadcasting: Comprehensive tools for creating, signing, and broadcasting transactions
- Multiple Client Protocols: Support for both gRPC and REST/LCD APIs for Cosmos-based chains
- Multiplatform: The wallet module supports JVM, iOS (arm64, simulator), and JavaScript/Node.js is in development
- Cosmos
- Terra
- Terra Classic
- Sei
- Injective
- Initia
- Inertia
Chameleon is organized into modular components:
chameleon/
├── core/ # Core wallet, crypto, and type abstractions
│ ├── crypto/ # Cryptographic primitives
│ ├── wallet/ # Wallet, key management, BIP39/BIP32
│ ├── tool/ # Transaction signer, broadcaster interfaces
│ └── type/ # Common blockchain types
├── cosmos/ # Cosmos SDK implementation
│ ├── wallet/ # Cosmos wallet implementation
│ ├── type/ # Cosmos-specific types
│ ├── tool/ # Transaction tools
│ ├── client-grpc/ # gRPC client
│ └── client-grpc-gateway/ # REST/LCD client
├── terra/ # Terra-specific implementations
├── sei/ # Sei-specific implementations
├── injective/ # Injective-specific implementations
└── initia/ # Initia-specific implementations
Add the following to your build.gradle.kts:
repositories {
mavenCentral()
}
dependencies {
// Core wallet functionality
implementation("kr.jadekim:chameleon-core-wallet:$chameleonVersion")
// For Cosmos blockchain
implementation("kr.jadekim:chameleon-cosmos-wallet:$chameleonVersion")
implementation("kr.jadekim:chameleon-cosmos-tool:$chameleonVersion")
// For Terra blockchain
implementation("kr.jadekim:chameleon-terra-wallet:$chameleonVersion")
// Add other blockchain modules as needed
}<dependency>
<groupId>kr.jadekim</groupId>
<artifactId>chameleon-core-wallet</artifactId>
<version>${chameleonVersion}</version>
</dependency>import kr.jadekim.chameleon.cosmos.wallet.CosmosWallet
import kr.jadekim.chameleon.core.mnemonic.Mnemonic
// Generate a new 24-word mnemonic and create a wallet
val (wallet, key) = CosmosWallet.create(
mnemonic = Mnemonic.generate(Mnemonic.Strength.WORD_24),
account = 0u,
index = 0u
)
println("Address: ${wallet.address.text}")
println("Mnemonic: ${key.mnemonic}")val (wallet, key) = CosmosWallet.fromMnemonic(
mnemonic = "your twelve or twenty four word mnemonic phrase here...",
account = 0u,
index = 0u
)val privateKeyBytes = hexStringToByteArray("your_private_key_hex")
val wallet = CosmosWallet.fromKeyPair(privateKeyBytes)// Sign a message
val message = "Hello, Blockchain!".encodeToByteArray()
val signature = wallet.sign(message).await()
// Verify a signature
val isValid = wallet.verify(message, signature)
println("Signature valid: $isValid")import kr.jadekim.chameleon.cosmos.Cosmos
import kr.jadekim.chameleon.cosmos.CosmosOptions
import cosmos.tx.v1beta1.Tx
import cosmos.tx.v1beta1.TxBody
import cosmos.base.v1beta1.Coin
// Create client
val options = CosmosOptions(
chainId = "cosmoshub-4",
client = CosmosGrpcClient("[grpc host]"),
)
val cosmos = Cosmos(options)
// Build transaction
val tx = Tx(
body = TxBody(
messages = listOf(/* your messages */),
memo = "Sent via Chameleon"
),
authInfo = AuthInfo(/* fee and signer info */)
)
// Sign and Broadcast transaction
val transactionResult = cosmos.broadcast(tx, wallet)import kr.jadekim.chameleon.core.mnemonic.Mnemonic
import kr.jadekim.chameleon.core.mnemonic.wordlist.Wordlist
// Generate mnemonic (default language is English)
val mnemonic = Mnemonic.generate(strength = Mnemonic.Strength.WORD_12)
// Generate Korean mnemonic
val koreanMnemonic = Mnemonic.generate(
strength = Mnemonic.Strength.WORD_12,
wordlist = Wordlist.KOREAN
)
// Generate Japanese mnemonic
val japaneseMnemonic = Mnemonic.generate(
strength = Mnemonic.Strength.WORD_24,
wordlist = Wordlist.JAPANESE
)- JVM: Full support (Java 11+)
- iOS: arm64, simulator arm64
- JavaScript/Node.js: In development
- JDK 11 or higher
- Kotlin 2.3.0+
- Gradle 8.11+
# Clone the repository
git clone https://github.com/jdekim43/chameleon.git
cd chameleon
# Build all modules
./gradlew build
# Run tests
./gradlew test
# Publish to local Maven repository
./gradlew publishToMavenLocalContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.