diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..865807a --- /dev/null +++ b/.gitignore @@ -0,0 +1,74 @@ +# Built application files +*.apk +*.ap_ +*.aab + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ +release/ +releases/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# Keystore files +# Uncomment the following lines if you do not want to check your keystore files in. +#*.jks +#*.keystore + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild + +# Google Services (e.g. APIs or Firebase) +# google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md + +# Version control +vcs.xml + +# lint +lint/intermediates/ +lint/generated/ +lint/outputs/ +lint/tmp/ +# lint/reports/ + +.idea +*.iml + +.DS_Store diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e4873df --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "proto"] + path = app/src/main/proto + url = git@github.com:CoboVault/crypto-coin-message-protocol.git diff --git a/README.md b/README.md new file mode 100644 index 0000000..f57ddbb --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# Cobo Vault + +Cobo Vault is an air-gapped & open source hardware wallet that uses completely transparent QR code data transmissions.Visit [Cobo Vault official website]( https://cobo.com/hardware-wallet/cobo-vault) to know more information about Cobo Vault. + +Follow [@Cobo Vault](https://twitter.com/CoboVault) on Twitter. + +
+ +## Contents + +- [Introduction](#introduction) +- [Clone](#clone) +- [Build](#build) +- [Test](#test) +- [Code Structure](#code-structure) +- [Core Dependencies](#core-dependencies) +- [Issues and PRS](#issues-and-prs) +- [License](#license) + + +## Introduction +Cobo Vault runs as a standalone application on customized hardware and Android 8.1 Oreo (Go Edition). This app performs: +1. Interaction with user. +2. Interaction with mobile application [Cobo Vault Mobile](https://cobo.com/hardware-wallet/cobo-vault-app) via QR code. +3. Interaction with Secure Element (SE) via serial port, the firmware of SE is opensourced at [cobo-vault-se-firmware](https://github.com/CoboVault/cobo-vault-se-firmware). The transaction data will be signed by this SE and the generated signature will be send back to this application. This signature and other necessary message will be displayed to user via QR code. Users use their mobile or desktop application to acquire signed transaction and broadcast it. + +The application of this hardware wallet is programmed with Java language. The transaction related work is done by Typescript opensourced at [crypto-coin-kit](https://github.com/CoboVault/crypto-coin-kit). The framework, J2V8 is used as the bridge between Java and Typescript. + + +## Clone + + git clone git@github.com:CoboVault/cobo-vault-cold.git --recursive + +## Build + cd cobo-vault-cold + ./gradlew assembleVault_v2Release +or you can build with IDEs, such as `Android Studio`,`intelliJ` + +## Test + ./gradlew test + +## Code Structure +Modules: + +`app` the main application module + +`coinlib` the module for supported blockchains, currently included 12 blockchains + +`encryption-core` module for Secure Element, include commands, protocol, serialize/deserialize, serial port communication + +## Core Dependencies +1. [crypto-coin-message-protocol](https://github.com/CoboVault/crypto-coin-message-protocol) - protocol buffer of communication with mobile application +2. [crypto-coin-kit](https://github.com/CoboVault/crypto-coin-kit) - crypto-coin libraries +3. [cobo-vault-se-firmware](https://github.com/CoboVault/cobo-vault-se-firmware) - the firmware of SE + +## Issues and PRS +any issues please submit at [issues](https://github.com/CoboVault/cobo-vault-cold/issues). and PRS are welcome! + +## License +[![GPLv3 License](https://img.shields.io/badge/License-GPL%20v3-green.svg)](https://opensource.org/licenses/) +This project is licensed under the GPL License - see the [LICENSE](LICENSE) file for details diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 0000000..1a00008 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2020 Cobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * in the file COPYING. If not, see