All URIs are relative to https://api-mainnet.celenium.io/v1
| Method | HTTP request | Description |
|---|---|---|
| GetValidator | Get /validators/{id} | Get validator info |
| GetValidatorBlocks | Get /validators/{id}/blocks | Get blocks which was proposed by validator |
| GetValidatorUptime | Get /validators/{id}/uptime | Get validator's uptime and history of signed block |
| ListValidator | Get /validators | List validators |
| ValidatorCount | Get /validators/count | Get validator's count by status |
| ValidatorDelegators | Get /validators/{id}/delegators | Get validator's delegators |
| ValidatorJails | Get /validators/{id}/jails | Get validator's jails |
| ValidatorMessages | Get /validators/{id}/messages | Get validator messages |
| ValidatorMetrics | Get /validators/{id}/metrics | Get validator's metrics |
| ValidatorVotes | Get /validators/{id}/votes | Get list of votes for validator |
| ValidatorsMetrics | Get /validators/metrics | Get validators metrics |
ResponsesValidator GetValidator(ctx, id).Execute()
Get validator info
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal validator id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.GetValidator(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.GetValidator``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetValidator`: ResponsesValidator
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.GetValidator`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal validator id |
Other parameters are passed through a pointer to a apiGetValidatorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesBlock GetValidatorBlocks(ctx, id).Limit(limit).Offset(offset).Execute()
Get blocks which was proposed by validator
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal validator id
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.GetValidatorBlocks(context.Background(), id).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.GetValidatorBlocks``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetValidatorBlocks`: []ResponsesBlock
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.GetValidatorBlocks`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal validator id |
Other parameters are passed through a pointer to a apiGetValidatorBlocksRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
limit | int32 | Count of requested entities | offset | int32 | Offset |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponsesValidatorUptime GetValidatorUptime(ctx, id).Limit(limit).Execute()
Get validator's uptime and history of signed block
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal validator id
limit := int32(56) // int32 | Count of requested blocks (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.GetValidatorUptime(context.Background(), id).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.GetValidatorUptime``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetValidatorUptime`: ResponsesValidatorUptime
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.GetValidatorUptime`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal validator id |
Other parameters are passed through a pointer to a apiGetValidatorUptimeRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
limit | int32 | Count of requested blocks |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesValidator ListValidator(ctx).Limit(limit).Offset(offset).Jailed(jailed).Version(version).Execute()
List validators
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
jailed := true // bool | Return only jailed validators (optional)
version := int32(56) // int32 | Current validator app version (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.ListValidator(context.Background()).Limit(limit).Offset(offset).Jailed(jailed).Version(version).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.ListValidator``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListValidator`: []ResponsesValidator
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.ListValidator`: %v\n", resp)
}Other parameters are passed through a pointer to a apiListValidatorRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int32 | Count of requested entities | |
| offset | int32 | Offset | |
| jailed | bool | Return only jailed validators | |
| version | int32 | Current validator app version |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponsesValidatorCount ValidatorCount(ctx).Execute()
Get validator's count by status
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.ValidatorCount(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.ValidatorCount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ValidatorCount`: ResponsesValidatorCount
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.ValidatorCount`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiValidatorCountRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesDelegation ValidatorDelegators(ctx, id).Limit(limit).Offset(offset).ShowZero(showZero).Execute()
Get validator's delegators
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal validator id
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
showZero := true // bool | Show zero delegations (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.ValidatorDelegators(context.Background(), id).Limit(limit).Offset(offset).ShowZero(showZero).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.ValidatorDelegators``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ValidatorDelegators`: []ResponsesDelegation
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.ValidatorDelegators`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal validator id |
Other parameters are passed through a pointer to a apiValidatorDelegatorsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
limit | int32 | Count of requested entities | offset | int32 | Offset | showZero | bool | Show zero delegations |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesJail ValidatorJails(ctx, id).Limit(limit).Offset(offset).Execute()
Get validator's jails
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal validator id
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.ValidatorJails(context.Background(), id).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.ValidatorJails``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ValidatorJails`: []ResponsesJail
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.ValidatorJails`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal validator id |
Other parameters are passed through a pointer to a apiValidatorJailsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
limit | int32 | Count of requested entities | offset | int32 | Offset |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesMessage ValidatorMessages(ctx, id).Limit(limit).Offset(offset).Sort(sort).From(from).To(to).Execute()
Get validator messages
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal validator id
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
sort := "sort_example" // string | Sort order (optional)
from := int32(56) // int32 | Time from in unix timestamp (optional)
to := int32(56) // int32 | Time to in unix timestamp (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.ValidatorMessages(context.Background(), id).Limit(limit).Offset(offset).Sort(sort).From(from).To(to).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.ValidatorMessages``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ValidatorMessages`: []ResponsesMessage
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.ValidatorMessages`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal validator id |
Other parameters are passed through a pointer to a apiValidatorMessagesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
limit | int32 | Count of requested entities | offset | int32 | Offset | sort | string | Sort order | from | int32 | Time from in unix timestamp | to | int32 | Time to in unix timestamp |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponsesMetrics ValidatorMetrics(ctx, id).Execute()
Get validator's metrics
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal validator id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.ValidatorMetrics(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.ValidatorMetrics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ValidatorMetrics`: ResponsesMetrics
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.ValidatorMetrics`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal validator id |
Other parameters are passed through a pointer to a apiValidatorMetricsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesVote ValidatorVotes(ctx, id).Limit(limit).Offset(offset).Execute()
Get list of votes for validator
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := int32(56) // int32 | Internal validator id
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.ValidatorVotes(context.Background(), id).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.ValidatorVotes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ValidatorVotes`: []ResponsesVote
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.ValidatorVotes`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | Internal validator id |
Other parameters are passed through a pointer to a apiValidatorVotesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
limit | int32 | Count of requested entities | offset | int32 | Offset |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponsesTopNMetrics ValidatorsMetrics(ctx).Count(count).Execute()
Get validators metrics
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
count := int32(56) // int32 | Count of aggregated entities (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ValidatorAPI.ValidatorsMetrics(context.Background()).Count(count).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ValidatorAPI.ValidatorsMetrics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ValidatorsMetrics`: ResponsesTopNMetrics
fmt.Fprintf(os.Stdout, "Response from `ValidatorAPI.ValidatorsMetrics`: %v\n", resp)
}Other parameters are passed through a pointer to a apiValidatorsMetricsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| count | int32 | Count of aggregated entities |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]