diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7df198f..2ecb142 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,7 @@ jobs: docker: runs-on: ubuntu-latest + needs: github steps: - uses: actions/checkout@v4 with: diff --git a/README.md b/README.md index 7ddb978..3bb98d1 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ Although a complex change might deserve a larger award than a minor typo fix, amount starts out small and increases over time as they make more contributions. This incentivizes contributors to stick around and break their changes up into -smaller chunks (which is a good thing for other reasons too). +smaller chunks (which is often good for other reasons too). It's up to the discretion of the person that merges PRs to make sure contributors -aren't unfairly boosting their rewards. In the event that such an injustice +aren't unfairly boosting their rewards. In the unbelievable event that such an injustice occurs, maintainers can cancel payouts or ban contributors. ### What if the `turbine` owner steals the project's funds? @@ -38,17 +38,30 @@ Since `turbine` is self-hosted, the crypto wallet is fully under control of the project owner. We have to trust them not to misuse funds deposited in `turbine`, just like we have to trust them not to include a backdoor in the software (for example). -## Using `turbine` as a contributor +### Funding directly impacts development + +When you fund a project's `turbine`, those funds directly support further development +of that project. It's entirely up to the maintainer what issues get worked on, +unlike the bug bounty model. + +## Using `turbine` as a funder First, you need to find a repository that's hosting a `turbine`. Here are some examples: -- `https://github.com/fossable/goldboot` +- https://github.com/fossable/goldboot + +The `turbine` homepage has the crypto wallet address that allows you to add funds. + +## Using `turbine` as a contributor + +All contributor commits must be GPG signed (because otherwise someone could +impersonate your name in git history). ### Generate a GPG keypair If you don't already have a GPG keypair, generate a new one: -``` +```sh gpg --full-generate-key ``` @@ -58,7 +71,7 @@ Make sure to use the same email address as your git config: `git config user.ema Turn on commit signing globally (or on a per-repo basis): -``` +```sh git config --global commit.gpgsign true git config --global user.signingkey ``` @@ -68,7 +81,7 @@ git config --global user.signingkey To allow `turbine` to find your public key and verify commits, upload it to this keyserver: -``` +```sh gpg --keyserver hkp://keys.gnupg.net --send-keys ``` @@ -78,7 +91,7 @@ Add your payment address to a signed commit message so `turbine` knows who to pa If you ever update your GPG key or wallet address, this commit can be made multiple times and the last one takes effect. -``` +```sh git commit --allow-empty -m "turbine: XMR " ``` @@ -92,7 +105,7 @@ Contribute as normal and `turbine` will pay you automatically. ### Monero -``` +```sh docker run \ -e MONERO_WALLET_ADDRESS=
\ -e MONERO_WALLET_SPENDKEY= \ diff --git a/src/cli.rs b/src/cli.rs index ac7a1e1..d57712b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -79,10 +79,10 @@ pub async fn serve(args: &ServeArgs) -> Result { .route("/assets/*file", get(crate::api::assets)); #[cfg(feature = "monero")] - let app = app.route("/xmr/balance", get(crate::currency::monero::balance)); - - #[cfg(feature = "monero")] - let app = app.route("/xmr/payouts", get(crate::currency::monero::payouts)); + let app = app + .route("/xmr/balance", get(crate::currency::monero::balance)) + .route("/xmr/payouts", get(crate::currency::monero::payouts)) + .route("/xmr/address", get(crate::currency::monero::address)); let address = args.bind.clone().unwrap_or("0.0.0.0:80".to_string()); diff --git a/src/currency/monero.rs b/src/currency/monero.rs index 7437009..d59309b 100644 --- a/src/currency/monero.rs +++ b/src/currency/monero.rs @@ -226,3 +226,14 @@ pub async fn payouts(State(state): State) -> impl IntoResponse { ), ) } + +/// Return an SVG badge with the wallet address. +pub async fn address(State(state): State) -> impl IntoResponse { + ( + [(header::CONTENT_TYPE, "image/svg+xml")], + crate::badge::generate( + "XMR", + &format!("{}", state.monero.wallet_address.to_string()), + ), + ) +}