64 lines
1.0 KiB
Plaintext
64 lines
1.0 KiB
Plaintext
import {
|
|
DocBlock,
|
|
DocSideBySide,
|
|
CodeParams,
|
|
Parameter,
|
|
Field,
|
|
Values,
|
|
CodeSnippets,
|
|
} from "../../../components/CodeDocBlock";
|
|
|
|
<DocBlock>
|
|
|
|
## getTransactionCount
|
|
|
|
Returns the current Transaction count from the ledger
|
|
|
|
<DocSideBySide>
|
|
<CodeParams>
|
|
|
|
### Parameters:
|
|
|
|
<Parameter type={"object"} optional={true}>
|
|
|
|
Configuration object containing the following fields:
|
|
|
|
<Field
|
|
name="commitment"
|
|
type="string"
|
|
optional={true}
|
|
href="/api/http#configuring-state-commitment"
|
|
></Field>
|
|
|
|
<Field name="minContextSlot" type="number" optional={true}>
|
|
The minimum slot that the request can be evaluated at
|
|
</Field>
|
|
|
|
</Parameter>
|
|
|
|
### Result:
|
|
|
|
`<u64>` - the current Transaction count from the ledger
|
|
|
|
</CodeParams>
|
|
|
|
<CodeSnippets>
|
|
|
|
### Code sample:
|
|
|
|
```bash
|
|
curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d '
|
|
{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}
|
|
'
|
|
```
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{ "jsonrpc": "2.0", "result": 268, "id": 1 }
|
|
```
|
|
|
|
</CodeSnippets>
|
|
</DocSideBySide>
|
|
</DocBlock>
|