repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | name: pump-shell-scripts |
| #3 | description: "Production-quality Bash scripts for Solana vanity generation, keypair verification, batch operations, dependency auditing, and test orchestration — with security-hardened patterns including file permissions, input validation, and cleanup traps." |
| #4 | metadata: |
| #5 | openclaw: |
| #6 | homepage: https://github.com/nirholas/pump-fun-sdk |
| #7 | requires: |
| #8 | bins: |
| #9 | - bash |
| #10 | - solana-keygen |
| #11 | --- |
| #12 | |
| #13 | # Shell Scripting & CLI Tools — Production Bash Scripts |
| #14 | |
| #15 | Production-quality Bash scripts for vanity generation, keypair verification, batch operations, dependency auditing, and test orchestration with security-hardened patterns. |
| #16 | |
| #17 | ## Scripts Overview |
| #18 | |
| #19 | | Script | Purpose | |
| #20 | |--------|---------| |
| #21 | | `scripts/utils.sh` | Shared library (colors, logging, validation, cleanup) | |
| #22 | | `scripts/generate-vanity.sh` | Vanity address generation via solana-keygen | |
| #23 | | `scripts/batch-generate.sh` | Parallel batch generation | |
| #24 | | `scripts/verify-keypair.sh` | 7-point keypair verification | |
| #25 | | `scripts/test-rust.sh` | 10-step Rust test orchestration | |
| #26 | | `tools/audit-dependencies.sh` | Dependency security audit | |
| #27 | | `tools/check-file-permissions.sh` | File permission validation | |
| #28 | | `tools/verify-keypair.ts` | TypeScript 9-point verifier | |
| #29 | |
| #30 | ## Keypair Verification (7 Points) |
| #31 | |
| #32 | ```bash |
| #33 | verify_keypair() { |
| #34 | # 1. File exists |
| #35 | # 2. Valid JSON array |
| #36 | # 3. Exactly 64 bytes |
| #37 | # 4. File permissions are 0600 |
| #38 | # 5. solana-keygen verify passes |
| #39 | # 6. Public key matches filename |
| #40 | # 7. Re-derive public key from secret matches |
| #41 | } |
| #42 | ``` |
| #43 | |
| #44 | ## Security Patterns |
| #45 | |
| #46 | ```bash |
| #47 | # Cleanup trap |
| #48 | trap 'cleanup_temp_files' EXIT ERR INT TERM |
| #49 | |
| #50 | # File permissions |
| #51 | chmod 600 "$keypair_file" |
| #52 | |
| #53 | # Input validation |
| #54 | validate_base58() { |
| #55 | [[ "$1" =~ ^[1-9A-HJ-NP-Za-km-z]+$ ]] || die "Invalid Base58" |
| #56 | } |
| #57 | |
| #58 | # No shell injection |
| #59 | # Use "$var" (quoted) everywhere, never $var |
| #60 | ``` |
| #61 | |
| #62 | ## Makefile Integration |
| #63 | |
| #64 | | Target | Description | |
| #65 | |--------|-------------| |
| #66 | | `make test-rust` | Run Rust test suite | |
| #67 | | `make bench` | Run Criterion benchmarks | |
| #68 | | `make generate` | Generate a vanity address | |
| #69 | | `make verify` | Verify a keypair file | |
| #70 | | `make audit` | Audit dependencies | |
| #71 | |
| #72 | ## Patterns to Follow |
| #73 | |
| #74 | - Source `scripts/utils.sh` in all scripts for shared utilities |
| #75 | - Use `set -euo pipefail` at the top of every script |
| #76 | - Quote all variable expansions: `"$var"` not `$var` |
| #77 | - Use `trap` for cleanup of temporary files |
| #78 | - Validate all user input (Base58, paths, integers) |
| #79 | - Set `chmod 600` on any keypair file immediately after creation |
| #80 | |
| #81 | ## Common Pitfalls |
| #82 | |
| #83 | - `solana-keygen verify` expects the address as the first argument, not the file |
| #84 | - `shred` is not available on all systems — check with `command -v` |
| #85 | - `mktemp` patterns differ between macOS and Linux |
| #86 | - `read -r` is essential to prevent backslash interpretation |
| #87 | - Always use `[[ ]]` over `[ ]` for conditionals |
| #88 | |
| #89 |