gRPC API Overview
Surflux provides authenticated access to Sui's gRPC API. This is a high-performance alternative to JSON-RPC, offering lower latency through binary Protocol Buffers, type safety via .proto definitions, and support for streaming real-time data.
Endpoint
grpc.surflux.dev:443
Authentication
All requests require your API key in the request metadata:
| Metadata Key | Value |
|---|---|
x-api-key | Your API key from the Surflux dashboard |
Example Request
grpcurl -H "x-api-key: YOUR_API_KEY" \
-d '{"sequence_number": "1000"}' \
grpc.surflux.dev:443 \
sui.rpc.v2.LedgerService/GetCheckpoint
Available Services
The API is organized into domain-specific services:
- StateService - Query on-chain state, object ownership, and coin balances
- LedgerService - Access blockchain history, checkpoints, and transactions
- TransactionExecutionService - Submit and simulate transactions
- MovePackageService - Inspect Move packages, modules, and functions
- NameService - Resolve SuiNS names to addresses
- SignatureVerificationService - Verify cryptographic signatures
Field Masks
Use field masks to request only specific fields, reducing bandwidth:
{
"digest": "TxDigest123...",
"read_mask": {
"paths": ["digest", "timestamp"]
}
}
Client Libraries
Generate client code using the official Sui proto definitions:
- TypeScript/Node.js:
@mysten/sui(recommended),@grpc/grpc-js, orgrpc-web - Go:
grpc-go - Python:
grpcio - Rust:
tonic
See our Integration guides for language-specific setup instructions.