walletpress/scripts/git-web3-sign.sh
cryptorugmunch e13bd4d774
Some checks are pending
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / security (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / license (push) Waiting to run
CI / ai-review (push) Waiting to run
docs: apply fleet-template (16-artifact scaffold)
Adds missing standard artifacts:
- README.md (if missing)
- AGENTS.md (AI agent contract)
- PLAN.md (current sprint)
- STATUS.md (where we are)
- DEVELOPMENT.md (dev workflow)
- DEPLOYMENT.md (deploy procedure)
- TESTING.md (test strategy)
- DECISIONS.md (ADR index + templates)
- .github/CODEOWNERS
- .github/workflows/ci.yml

Preserves all existing artifacts.

Refs: RugMunchMedia/fleet-template
2026-07-02 02:07:06 +07:00

49 lines
1.7 KiB
Bash
Executable file

#!/usr/bin/env bash
# Web3 Commit Signing — configure git to sign commits with Ethereum keys
# Usage: ./scripts/git-web3-sign.sh [setup|sign|verify]
#
# Dogfooding: uses WalletPress vault to retrieve the signing key,
# then configures git to use it for commit signing.
set -euo pipefail
CMD="${1:-setup}"
case "$CMD" in
setup)
echo "🔐 Web3 Commit Signing Setup"
echo ""
echo " This configures git to sign commits using an Ethereum key"
echo " from your WalletPress vault."
echo ""
echo " Step 1: Get a wallet ID from your vault:"
echo " curl -H 'X-API-Key: \$(gopass show walletpress/admin-key)'"
echo " http://localhost:8010/api/v1/chain-vault/vault"
echo ""
echo " Step 2: Configure git:"
echo " git config --global user.signingkey eth:0xYourAddressHere"
echo " git config --global gpg.format ssh"
echo " git config --global commit.gpgsign true"
echo ""
echo " Step 3: Sign a commit with your wallet address in the message:"
echo ' git commit -m "feat: add feature\n\nSigned-off-by: eth:0xYourAddress"'
echo ""
echo " Future: automated commit signing via WalletPress agent"
echo " agent_execute(plan=[{\"tool\":\"wallet_sign_commit\",...}])"
;;
sign)
echo "Signing commit with Web3 identity..."
echo " (Coming in WalletPress v1.2 — automated EIP-191 commit signing)"
;;
verify)
echo "Verifying Web3 commit signatures..."
echo " (Coming in WalletPress v1.2 — signature verification from chain)"
;;
*)
echo "Usage: $0 [setup|sign|verify]"
exit 1
;;
esac