This directory contains runnable examples for integrating Shield with different programming languages.
Download the Shield binary for your platform from GitHub Releases:
# Linux (x64)
curl -L https://github.com/stakekit/shield/releases/latest/download/shield-linux-x64 -o shield
chmod +x shield
# macOS (Apple Silicon)
curl -L https://github.com/stakekit/shield/releases/latest/download/shield-darwin-arm64 -o shield
chmod +x shield
# macOS (Intel)
curl -L https://github.com/stakekit/shield/releases/latest/download/shield-darwin-x64 -o shield
chmod +x shield
# Windows (PowerShell)
Invoke-WebRequest -Uri https://github.com/stakekit/shield/releases/latest/download/shield-windows-x64.exe -OutFile shield.exeAlways verify the SHA256 checksum before using the binary:
# Download checksum (use the same platform as your binary)
curl -LO https://github.com/stakekit/shield/releases/latest/download/shield-darwin-arm64.sha256
# Verify
shasum -a 256 -c shield-darwin-arm64.sha256
# Expected output: shield-darwin-arm64: OKcd python
cp /path/to/shield ./shield # Copy binary here
python shield_example.pycd go
cp /path/to/shield ./shield # Copy binary here
go run main.gocd rust
cp /path/to/shield ./shield # Copy binary here
cargo runEach example demonstrates:
getSupportedYieldIds- Lists all supported yield integration IDsvalidate- Validates a sample Ethereum Lido staking transaction
Supported yields: ["solana-sol-native-multivalidator-staking", "ethereum-eth-lido-staking", "tron-trx-native-staking"]
❌ Invalid: Transaction validation failed: ...
The validation fails because the example uses a sample transaction that doesn't match the expected pattern. In real usage, you would pass actual unsigned transactions from your staking flow.