From 4d14abbd049563d80d9a3c33ac65e6283cd5833f Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 25 Jul 2019 17:19:49 -0700 Subject: [PATCH] Document getSlot --- book/src/jsonrpc-api.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/book/src/jsonrpc-api.md b/book/src/jsonrpc-api.md index 2bd681a486..e55228677e 100644 --- a/book/src/jsonrpc-api.md +++ b/book/src/jsonrpc-api.md @@ -30,6 +30,7 @@ Methods * [getProgramAccounts](#getprogramaccounts) * [getRecentBlockhash](#getrecentblockhash) * [getSignatureStatus](#getsignaturestatus) +* [getSlot](#getslot) * [getSlotLeader](#getslotleader) * [getSlotsPerSegment](#getslotspersegment) * [getStorageTurn](#getstorageturn) @@ -293,6 +294,25 @@ curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0", "id":1, " ----- +### getSlot +Returns the current slot the node is processing + +##### Parameters: +None + +##### Results: +* `u64` - Current slot + +##### Example: +```bash +// Request +curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getSlot"}' http://localhost:8899 + +// Result +{"jsonrpc":"2.0","result":"1234","id":1} +``` +----- + ### getSlotLeader Returns the current slot leader