Geyser gRPC - Bắt đầu nhanh
Cài đặt SLV
bash
curl -fsSL https://storage.slv.dev/slv/install | shcurl -fsSL https://storage.slv.dev/slv/install | sh$ slv b init

Chỉ với một lệnh duy nhất,
slv b init, bạn có thể ngay lập tức scaffolding môi trường phát triển cho Solana bot sử dụng dữ liệu dựa trên stream hiệu suất cao.bash
slv b initslv b init- Sử dụng
geyser-tsnếu bạn thích bot Geyser TypeScript - Sử dụng
geyser-rustnếu bạn thích bot Geyser Rust
Ví dụ Geyser Client – TypeScript
- Đổi tên
.env.samplethành.env - Chỉnh sửa
.envvới các giá trị thực tế của bạn:
ini
X_TOKEN=YOUR_X_TOKEN_OR_API_KEY
GEYSER_ENDPOINT=https://grpc-ams.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"X_TOKEN=YOUR_X_TOKEN_OR_API_KEY
GEYSER_ENDPOINT=https://grpc-ams.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"Xin lưu ý:
Endpoint này là mẫu và không thể sử dụng nguyên trạng. Vui lòng lấy và cấu hình endpoint phù hợp cho môi trường của bạn.
- Cài đặt dependency và khởi động development server:
bash
pnpm i
pnpm devpnpm i
pnpm dev
Ví dụ Geyser Client – Rust
- Đổi tên
.env.samplethành.env - Chỉnh sửa
.envvới các giá trị thực tế của bạn:
ini
X_TOKEN=YOUR_X_TOKEN_OR_API_KEY
GEYSER_ENDPOINT=https://grpc-ams.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"X_TOKEN=YOUR_X_TOKEN_OR_API_KEY
GEYSER_ENDPOINT=https://grpc-ams.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"Xin lưu ý:
Endpoint này là mẫu và không thể sử dụng nguyên trạng. Vui lòng lấy và cấu hình endpoint phù hợp cho môi trường của bạn.
- Build và chạy client:
bash
RUST_LOG=info cargo runRUST_LOG=info cargo run
✅ Dùng thử miễn phí 1 ngày
Cả Geyser và Shreds bot đều có thể được thử nghiệm miễn phí trong 1 ngày thông qua server Discord chính thức của Validators DAO.
Tham gia tại đây: https://discord.gg/C7ZQSrCkYR