Solana RPC API手册

在线工具推荐: Three.js AI纹理开发包 - YOLO合成数据生成器 - GLTF/GLB在线编辑 - 3D模型格式在线转换 - 可编程3D场景编辑器

getSlot

getSlot方法返回节点当前正在处理的槽位。

请求参数

  • <object> - (可选) Commitment

响应结果

  • <u64> - Current slot

示例代码

请求:

curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
  {"jsonrpc":"2.0","id":1, "method":"getSlot"}

响应:

{"jsonrpc":"2.0","result":1234,"id":1}