Add CONTRIBUTING.md; fix README prep-script ref

CONTRIBUTING.md explains the fork relationship, branch model, generated-
code workflow, and what changes we will and won't accept (no re-enabling
Solana/Tron/Zano/Decred/Zcash, no Cake-domain endpoints, no Lightning
yet, no telemetry).

README.md: removed the stale ./scripts/prepare_zcash.sh reference (file
doesn't exist) and added a link to CONTRIBUTING.

.gitignore: untrack docs/UPSTREAM_SYNC.md (internal merge-strategy
playbook, kept locally alongside docs/links.md).
This commit is contained in:
jwinterm
2026-05-17 10:50:18 -04:00
parent ef895994ae
commit ac7830e181
3 changed files with 82 additions and 4 deletions
+2 -1
View File
@@ -230,5 +230,6 @@ scripts/android/yttrium
scripts/bitbox_flutter
scripts/reown_flutter
# Hash Wallet: untracked notes
# Hash Wallet: untracked notes / internal playbooks
docs/links.md
docs/UPSTREAM_SYNC.md
+78
View File
@@ -0,0 +1,78 @@
# Contributing to Hash Wallet
Thanks for the interest. Before opening a PR, please read this.
## Project shape
Hash Wallet is a **friendly fork** of [Cake Wallet](https://github.com/cake-tech/cake_wallet). We periodically merge upstream changes and try to keep our divergence narrow. Every change you propose should be evaluated through that lens: will this make future upstream syncs harder, and if so, is the value worth the cost?
## Branch model
- `dev` is the integration branch — open PRs against `dev`.
- `main` is reserved for tagged releases.
- We do not use long-lived feature branches. Iterate on `dev` directly via small focused PRs.
## Build environment
See the build section of [`README.md`](README.md). Flutter version is pinned (`.tool-versions` + `Dockerfile`). Don't use a newer Flutter SDK — Cake's `hive_generator` / `build_resolvers` deps fail on Dart 3.10+ because the `_macros` pseudo-package was removed.
If you use `mise` or `asdf`, the right Flutter version will activate automatically.
## Generated code
Several layers use code generation (MobX stores, Hive type adapters, JSON serializers, configure.dart-generated wallet entry points). Regenerate with:
```bash
dart pub run build_runner build --delete-conflicting-outputs
```
For the wallet-types and pubspec generation:
```bash
dart run tool/configure.dart --monero --wownero --bitcoin --bitcoinCash \
--ethereum --polygon --base --arbitrum --bsc --nano --dogecoin
```
(That's the canonical Hash Wallet build flag set. Don't pass `--solana`, `--tron`, `--zano`, `--decred`, or `--zcash` — those packages were deleted.)
## Code style
- Match the surrounding style. We have not introduced new lints beyond Cake's.
- New observable state goes through MobX; persisted state through Hive.
- Don't add new top-level analytics. Hash Wallet ships with no telemetry by design.
- Don't import `package:cw_zano/`, `package:cw_tron/`, `package:cw_solana/`, `package:cw_decred/` — those packages are deleted. The corresponding `WalletType.*` enum values still exist in `cw_core/lib/wallet_type.dart` for backwards-compat but are never instantiated.
- Avoid adding `cake_*`-prefixed file or symbol names in new code. Use `hash_wallet`-prefixed where the symbol is ours, and leave Cake-prefixed names alone where they're inherited (so upstream merges still apply cleanly).
## What we generally won't accept
- Re-enabling Solana, Tron, Zano, Decred, or Zcash. The fork exists in part to drop these — opening that door defeats the purpose.
- New buy/sell provider integrations that require routing through Cake's `exchange-helper.cakewallet.com` proxy. Direct provider APIs are fine if we can register Hash Wallet / Such Software LLC as the partner.
- Lightning Network integration. Greenlight (and self-hosted alternatives) require running infrastructure we're not in a position to operate yet.
- Cake Pay re-enable. The infrastructure is Cake Labs's; we can't run it.
- New defaults that point at `cakewallet.com` hosts. We're moving away from depending on Cake's infrastructure — community nodes, our own proxies (`exchange-helper.such.software`, `prices.neroswap.com`), or both, are preferred.
- Anything that adds telemetry, push notifications via third-party SDKs, or remote bulletin services that the user can't audit.
## What we want
- Wownero polish (every paper cut counts — it's the reason this fork exists).
- Build reproducibility improvements (especially Docker / CI parity).
- Privacy-leaning defaults (own-node guidance, Tor/I2P integration improvements, fewer outbound calls).
- Wallet-core bug fixes — these we will happily upstream to Cake.
- Documentation, especially around the build pipeline and the Cake → Hash Wallet diff.
## Reporting bugs
Open an issue at https://github.com/Such-Software/hash-wallet/issues. Please include:
- Build artifact ID (the CI workflow names the artifact by commit SHA).
- Platform + OS version.
- Terminal output if you built and ran from a terminal — many error popups don't print to stderr; check `<appDir>/error.txt` (typically `~/.config/hash_wallet/error.txt` on Linux).
- Whether the bug also reproduces in the latest Cake Wallet build (so we know whether it's a Cake-upstream bug or a Hash Wallet regression).
## Security disclosures
See [`docs/SECURITY.md`](docs/SECURITY.md). Email `support@such.software` for anything sensitive; do not open a public issue for unpatched vulnerabilities.
## License
By contributing, you agree your contribution is licensed under the [MIT License](LICENSE.md), the same as the rest of Hash Wallet.
+2 -3
View File
@@ -58,10 +58,9 @@ flutter --version # confirm 3.32.0 / Dart 3.8.0
```bash
./scripts/prepare_torch.sh
./scripts/prepare_moneroc.sh
./scripts/prepare_zcash.sh # still required by build, even though Zcash is disabled
./scripts/build_bitbox_flutter.sh
# Then fetch the prebuilt reown_flutter tarball (CI does this; reproduce locally
# with the URL in .github/workflows/pr_test_build_linux.yml if you have it).
# with the URL in .github/workflows/build-linux.yml).
```
Then run the platform-specific configure script, e.g.:
@@ -72,7 +71,7 @@ APP_LINUX_TYPE=cakewallet ./configure_hash_wallet.sh linux
## Contributing
Issues and PRs welcome at https://github.com/Such-Software/hash-wallet.
Issues and PRs welcome at https://github.com/Such-Software/hash-wallet. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for ground rules.
## License