This repository holds the source code for the Climate Wallet in the Climate Tokenization Suite. Related programs are:
Note this wallet is an independent plugin to the latest official Chia Wallet.
Note: Version 1.1.0 contains breaking changes. Configuration variables are renamed in the config.yaml file and are best handled by taking a backup of the Climate Wallet config.yaml file, unistalling the Climate Wallet and deleting the climate-wallet config.yaml file, then reinstalling and reconfiguring.
The Climate Wallet connects with the official Chia Wallet running on localhost. The Climate Wallet also needs to connect to a CADT node, which could be a publicly available observer node.
Precompiled binaries and installers are available for x86 and ARM versions of MacOS, Windows, and Debian-based Linux distros (Ubuntu, Mint, PopOS, etc) on the releases page.
The Climate Wallet can be installed with apt
.
- Start by updating apt and allowing repository download over HTTPS:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
- Add Chia's official GPG Key (if you have installed Chia with
apt
, you'll have this key already and will get a message about overwriting the existing key, which is safe to do):
curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg
- Use the following command to setup the repository.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/climate-tokenization/debian/ stable main" | sudo tee /etc/apt/sources.list.d/climate-tokenization.list > /dev/null
- Install the Climate Wallet
sudo apt-get update
sudo apt-get install climate-wallet
- Run the Climate Wallet from your OS launcher or at the command line with
climate-wallet
.
A config.yaml file located at ./chia/mainnet/climate-wallet
. This config file is created when the application is first run. When configuration changes are made, the application must be restarted before they take effect. The default values in this file:
cadtApiServerHosts
: List of CADT API serversapiTimeout
: API request timeoutcadtUiHost
: CADT UI hostversion
: Climate Wallet version
src
:assets
: fonts and imagescomponents
: react componentsconfig
: this project configs (env locales)constants
: this project constantselectron
: electron start codehooks
: react custom hookspages
: react pageservices
: rtk query service for apistore
: redux storetheme
: material-ui theme settingtypes
: typescript typesutil
: this project utilities
You will need a running instance of Chia Wallet before the next steps.
-
Setup submodule and follow submodule readme to stepup env
git submodule update --init --recursive
-
copy
.env
for submodulecp .env.submodule climate-token-driver/.env
-
package submodule for dev and production
npm run package-submodule
submodule used
Climate Token Driver Suite
client service port31314
-
Make a
.env
file for your enviroment variablescp .env.example .env # change variables in .env
-
Run main script
npm i npm run dev
-
Windows
#Build react and electron npm run build #Build submodule npm run package-submodule #Package the app npm run package-windows
-
Mac
#Build react and electron npm run build #Build submodule npm run package-submodule #Package the app npm run package-mac
Updating the Climate Token Driver is done with standard git commands and is documented here for easy reference:
- Create new branch
git checkout -b update-token-driver
- Change into climate-token-driver directory
cd climate-token-driver
git pull
- Checkout a commit or a tag. Tagged releases preferable
git checkout 1.0.40
cd ..
git add climate-token-driver
- Commit the updated submodule
git commit -m "chore: update climate token driver submodule"
git push
Signed commits are required.
This repo uses a commit convention. A typical commit message might read:
fix: correct home screen layout
The first part of this is the commit "type". The most common types are "feat" for new features, and "fix" for bugfixes. Using these commit types helps us correctly manage our version numbers and changelogs. Since our release process calculates new version numbers from our commits it is very important to get this right.
feat
is for introducing a new featurefix
is for bug fixesdocs
for documentation only changesstyle
is for code formatting onlyrefactor
is for changes to code which should not be detectable by users or testersperf
is for a code change that improves performancetest
is for changes which only touch test files or related toolingbuild
is for changes which only touch our develop/release toolsci
is for changes to the continuous integration files and scriptschore
is for changes that don't modify code, like a version bumprevert
is for reverting a previous commit
After the type and scope there should be a colon. The "subject" of the commit follows. It should be a short indication of the change. The commit convention prefers that this is written in the present-imperative tense.
All pull requests should be made against the develop
branch. Commits to the main
branch will trigger a release, so the main
branch is always the code in the latest release.