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 | "skillId": "pump-ts-vanity", |
| #3 | "name": "pump-ts-vanity", |
| #4 | "description": "Educational single-threaded TypeScript vanity address generator for Solana using @solana/web3.js with async iteration, event-loop yielding, streaming generator API, and best-effort memory zeroization.", |
| #5 | "category": "typescript", |
| #6 | "path": "pump-ts-vanity/SKILL.md", |
| #7 | "url": "https://x402.wtf/api/skills/pump-ts-vanity", |
| #8 | "tags": [ |
| #9 | "pump", |
| #10 | "solana", |
| #11 | "ts", |
| #12 | "vanity" |
| #13 | ], |
| #14 | "requiredEnv": [], |
| #15 | "homepage": "https://github.com/nirholas/pump-fun-sdk", |
| #16 | "attestation": { |
| #17 | "status": "pending", |
| #18 | "isFormallyVerified": false, |
| #19 | "attestationPda": null, |
| #20 | "verificationTimestamp": null |
| #21 | }, |
| #22 | "markdown": "---\nname: pump-ts-vanity\ndescription: \"Educational single-threaded TypeScript vanity address generator for Solana using @solana/web3.js with async iteration, event-loop yielding, streaming generator API, and best-effort memory zeroization.\"\nmetadata:\n openclaw:\n homepage: https://github.com/nirholas/pump-fun-sdk\n---\n\n# TypeScript Vanity Generator — Educational Reference Implementation\n\nSingle-threaded TypeScript vanity address generator using @solana/web3.js with async iteration, event-loop yielding, and streaming generator API.\n\n## Architecture\n\n```\nCLI / Library API\n │\n VanityGenerator\n │\n async generator loop\n │\n Keypair.generate() per iteration\n │\n AddressMatcher.matches()\n │\n yield on match / yield progress\n```\n\n## Library API (3 Usage Patterns)\n\n```typescript\n// 1. Async generator (streaming)\nfor await (const result of generateVanityAddress({ prefix: 'pump' })) {\n console.log(result.address);\n break; // stop after first match\n}\n\n// 2. First match (promise)\nconst result = await findVanityAddress({ prefix: 'pump' });\n\n// 3. Batch generation\nconst results = await findVanityAddresses({ prefix: 'So', count: 5 });\n```\n\n## Event-Loop Yielding\n\n```typescript\nasync function* generateVanityAddress(config: VanityConfig) {\n let attempts = 0;\n while (true) {\n attempts++;\n if (attempts % 1000 === 0) {\n await new Promise(resolve => setImmediate(resolve));\n }\n const keypair = Keypair.generate();\n const address = keypair.publicKey.toBase58();\n if (matcher.matches(address)) {\n yield { keypair, address, attempts };\n }\n }\n}\n```\n\nYields to the event loop every 1,000 iterations to prevent blocking.\n\n## Performance Comparison\n\n| Feature | Rust | TypeScript |\n|---------|------|-----------|\n| Speed | 100K+ keys/sec | ~5K keys/sec |\n| Parallelism | Rayon (multi-core) | Single-threaded |\n| Memory safety | Zeroize trait | Best-effort fill(0) |\n| Use case | Production | Educational/prototyping |\n\n## Best-Effort Security\n\n```typescript\n// Zeroize secret key after use\nconst secretKey = keypair.secretKey;\ntry {\n // ... use keypair\n} finally {\n secretKey.fill(0);\n}\n```\n\nJavaScript's garbage collector may copy/relocate buffers, so `fill(0)` is best-effort.\n\n## Patterns to Follow\n\n- Use `@solana/web3.js` `Keypair.generate()` — never custom RNG\n- Yield to event loop periodically in async generators\n- Call `secretKey.fill(0)` after use (best-effort zeroization)\n- Validate Base58 patterns before starting generation\n- Use `setImmediate` or `setTimeout(0)` for yielding, not `process.nextTick`\n\n## Common Pitfalls\n\n- Single-threaded — orders of magnitude slower than Rust for long prefixes\n- GC may relocate buffers before `fill(0)` — no guaranteed memory cleanup in JS\n- Base58 is case-sensitive — validate user input patterns\n- `Keypair.generate()` returns 64-byte array (32 secret + 32 public)\n\n" |
| #23 | } |
| #24 |