ShredStream - 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
shreds-tsnếu bạn thích bot Shreds dựa trên TypeScript - Sử dụng
shreds-rustcho bot dựa trên Rust sử dụng Shreds
Ví dụ Shreds Client – TypeScript
- Đổi tên file
.env.samplethành.env. - Cập nhật các giá trị trong file
.envvới endpoint thực tế của bạn:
ini
SHREDS_ENDPOINT=https://shreds-ams.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"SHREDS_ENDPOINT=https://shreds-ams.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"⚠️ Lưu ý quan trọng: Endpoint này được cung cấp làm ví dụ và không thể sử dụng trực tiếp. Hãy lấy và thiết lập endpoint thực tế của bạn.
- Cài đặt dependency và chạy script:
bash
pnpm i
pnpm devpnpm i
pnpm dev
Ví dụ Shreds Client – Rust
- Đổi tên
.env.samplethành.env - Chỉnh sửa
.envvới endpoint Shreds thực tế của bạn:
ini
SHREDS_ENDPOINT=https://shreds-ams.erpc.global
SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY"SHREDS_ENDPOINT=https://shreds-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
Shreds endpoint 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