All URIs are relative to https://api-mainnet.celenium.io/v1
Method | HTTP request | Description |
---|---|---|
GetBlob | Post /blob | Get namespace blob by commitment on height |
GetBlobLogs | Get /namespace/{id}/{version}/blobs | Get blob changes for namespace |
GetBlobMetadata | Post /blob/metadata | Get blob metadata by commitment on height |
GetBlobs | Get /blob | List all blobs with filters |
GetNamespace | Get /namespace/{id} | Get namespace info |
GetNamespaceActive | Get /namespace/active | Get last used namespace |
GetNamespaceBase64 | Get /namespace_by_hash/{hash} | Get namespace info by base64 |
GetNamespaceBlobs | Get /namespace_by_hash/{hash}/{height} | Get namespace blobs on height |
GetNamespaceByVersionAndId | Get /namespace/{id}/{version} | Get namespace info by id and version |
GetNamespaceCount | Get /namespace/count | Get count of namespaces in network |
GetNamespaceMessages | Get /namespace/{id}/{version}/messages | Get namespace messages by id and version |
GetNamespaceRollups | Get /namespace/{id}/{version}/rollups | List rollups using the namespace |
ListNamespace | Get /namespace | List namespace info |
ResponsesBlob GetBlob(ctx).Request(request).Execute()
Get namespace blob by commitment on height
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
request := *openapiclient.NewHandlerPostBlobRequest("vbGakK59+Non81TE3ULg5Ve5ufT9SFm/bCyY+WLR3gg=", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAs2bWWU6FOB0=", int32(123456)) // HandlerPostBlobRequest | Request body containing height, commitment and namespace hash
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetBlob(context.Background()).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetBlob``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBlob`: ResponsesBlob
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetBlob`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetBlobRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
request | HandlerPostBlobRequest | Request body containing height, commitment and namespace hash |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesBlobLog GetBlobLogs(ctx, id, version).Limit(limit).Offset(offset).Sort(sort).SortBy(sortBy).Commitment(commitment).From(from).To(to).Joins(joins).Signers(signers).Cursor(cursor).Execute()
Get blob changes for namespace
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := "id_example" // string | Namespace id in hexadecimal
version := int32(56) // int32 | Version of namespace
limit := int32(56) // int32 | Count of requested entities (optional)
offset := int32(56) // int32 | Offset (optional)
sort := "sort_example" // string | Sort order. Default: desc (optional)
sortBy := "sortBy_example" // string | Sort field. If it's empty internal id is used (optional)
commitment := "commitment_example" // string | Commitment value in URLbase64 format (optional)
from := int32(56) // int32 | Time from in unix timestamp (optional)
to := int32(56) // int32 | Time to in unix timestamp (optional)
joins := true // bool | Flag indicating whether entities of rollup, transaction and signer should be attached or not. Default: true (optional)
signers := "signers_example" // string | Comma-separated celestia addresses (optional)
cursor := int32(56) // int32 | Last entity id which is used for cursor pagination (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetBlobLogs(context.Background(), id, version).Limit(limit).Offset(offset).Sort(sort).SortBy(sortBy).Commitment(commitment).From(from).To(to).Joins(joins).Signers(signers).Cursor(cursor).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetBlobLogs``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBlobLogs`: []ResponsesBlobLog
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetBlobLogs`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Namespace id in hexadecimal | |
version | int32 | Version of namespace |
Other parameters are passed through a pointer to a apiGetBlobLogsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
limit | int32 | Count of requested entities | offset | int32 | Offset | sort | string | Sort order. Default: desc | sortBy | string | Sort field. If it's empty internal id is used | commitment | string | Commitment value in URLbase64 format | from | int32 | Time from in unix timestamp | to | int32 | Time to in unix timestamp | joins | bool | Flag indicating whether entities of rollup, transaction and signer should be attached or not. Default: true | signers | string | Comma-separated celestia addresses | cursor | int32 | Last entity id which is used for cursor pagination |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponsesBlobLog GetBlobMetadata(ctx).Request(request).Execute()
Get blob metadata by commitment on height
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
request := *openapiclient.NewHandlerPostBlobRequest("vbGakK59+Non81TE3ULg5Ve5ufT9SFm/bCyY+WLR3gg=", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAs2bWWU6FOB0=", int32(123456)) // HandlerPostBlobRequest | Request body containing height, commitment and namespace hash
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetBlobMetadata(context.Background()).Request(request).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetBlobMetadata``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBlobMetadata`: ResponsesBlobLog
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetBlobMetadata`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetBlobMetadataRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
request | HandlerPostBlobRequest | Request body containing height, commitment and namespace hash |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesLightBlobLog GetBlobs(ctx).Limit(limit).Offset(offset).Sort(sort).SortBy(sortBy).Commitment(commitment).From(from).To(to).Signers(signers).Namespaces(namespaces).Cursor(cursor).Execute()
List all blobs with filters
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)
sort := "sort_example" // string | Sort order. Default: desc (optional)
sortBy := "sortBy_example" // string | Sort field. If it's empty internal id is used (optional)
commitment := "commitment_example" // string | Commitment value in URLbase64 format (optional)
from := int32(56) // int32 | Time from in unix timestamp (optional)
to := int32(56) // int32 | Time to in unix timestamp (optional)
signers := "signers_example" // string | Comma-separated celestia addresses (optional)
namespaces := "namespaces_example" // string | Comma-separated celestia namespaces (optional)
cursor := int32(56) // int32 | Last entity id which is used for cursor pagination (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetBlobs(context.Background()).Limit(limit).Offset(offset).Sort(sort).SortBy(sortBy).Commitment(commitment).From(from).To(to).Signers(signers).Namespaces(namespaces).Cursor(cursor).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetBlobs``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBlobs`: []ResponsesLightBlobLog
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetBlobs`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetBlobsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | Count of requested entities | |
offset | int32 | Offset | |
sort | string | Sort order. Default: desc | |
sortBy | string | Sort field. If it's empty internal id is used | |
commitment | string | Commitment value in URLbase64 format | |
from | int32 | Time from in unix timestamp | |
to | int32 | Time to in unix timestamp | |
signers | string | Comma-separated celestia addresses | |
namespaces | string | Comma-separated celestia namespaces | |
cursor | int32 | Last entity id which is used for cursor pagination |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesNamespace GetNamespace(ctx, id).Execute()
Get namespace info
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := "id_example" // string | Namespace id in hexadecimal
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetNamespace(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetNamespace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNamespace`: []ResponsesNamespace
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetNamespace`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Namespace id in hexadecimal |
Other parameters are passed through a pointer to a apiGetNamespaceRequest 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]
[]ResponsesNamespace GetNamespaceActive(ctx).Sort(sort).Execute()
Get last used namespace
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
sort := "sort_example" // string | Sort field. Default: time (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetNamespaceActive(context.Background()).Sort(sort).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetNamespaceActive``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNamespaceActive`: []ResponsesNamespace
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetNamespaceActive`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetNamespaceActiveRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
sort | string | Sort field. Default: time |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponsesNamespace GetNamespaceBase64(ctx, hash).Execute()
Get namespace info by base64
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
hash := "hash_example" // string | Base64-encoded namespace id and version
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetNamespaceBase64(context.Background(), hash).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetNamespaceBase64``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNamespaceBase64`: ResponsesNamespace
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetNamespaceBase64`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
hash | string | Base64-encoded namespace id and version |
Other parameters are passed through a pointer to a apiGetNamespaceBase64Request 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]
[]ResponsesBlob GetNamespaceBlobs(ctx, hash, height).Execute()
Get namespace blobs on height
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
hash := "hash_example" // string | Base64-encoded namespace id and version
height := int32(56) // int32 | Block heigth
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetNamespaceBlobs(context.Background(), hash, height).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetNamespaceBlobs``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNamespaceBlobs`: []ResponsesBlob
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetNamespaceBlobs`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
hash | string | Base64-encoded namespace id and version | |
height | int32 | Block heigth |
Other parameters are passed through a pointer to a apiGetNamespaceBlobsRequest 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]
ResponsesNamespace GetNamespaceByVersionAndId(ctx, id, version).Execute()
Get namespace info by id and version
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := "id_example" // string | Namespace id in hexadecimal
version := int32(56) // int32 | Version of namespace
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.GetNamespaceByVersionAndId(context.Background(), id, version).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetNamespaceByVersionAndId``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNamespaceByVersionAndId`: ResponsesNamespace
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetNamespaceByVersionAndId`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Namespace id in hexadecimal | |
version | int32 | Version of namespace |
Other parameters are passed through a pointer to a apiGetNamespaceByVersionAndIdRequest 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]
int32 GetNamespaceCount(ctx).Execute()
Get count of namespaces in network
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.NamespaceAPI.GetNamespaceCount(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetNamespaceCount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNamespaceCount`: int32
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetNamespaceCount`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetNamespaceCountRequest struct via the builder pattern
int32
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ResponsesNamespaceMessage GetNamespaceMessages(ctx, id, version).Limit(limit).Offset(offset).Execute()
Get namespace messages by id and version
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := "id_example" // string | Namespace id in hexadecimal
version := int32(56) // int32 | Version of namespace
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.NamespaceAPI.GetNamespaceMessages(context.Background(), id, version).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetNamespaceMessages``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNamespaceMessages`: []ResponsesNamespaceMessage
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetNamespaceMessages`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Namespace id in hexadecimal | |
version | int32 | Version of namespace |
Other parameters are passed through a pointer to a apiGetNamespaceMessagesRequest 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]
[]ResponsesRollup GetNamespaceRollups(ctx, id, version).Limit(limit).Offset(offset).Execute()
List rollups using the namespace
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
id := "id_example" // string | Namespace id in hexadecimal
version := int32(56) // int32 | Version of namespace
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.NamespaceAPI.GetNamespaceRollups(context.Background(), id, version).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.GetNamespaceRollups``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNamespaceRollups`: []ResponsesRollup
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.GetNamespaceRollups`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Namespace id in hexadecimal | |
version | int32 | Version of namespace |
Other parameters are passed through a pointer to a apiGetNamespaceRollupsRequest 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]
[]ResponsesNamespace ListNamespace(ctx).Limit(limit).Offset(offset).Sort(sort).SortBy(sortBy).Execute()
List namespace info
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)
sort := "sort_example" // string | Sort order. Default: desc (optional)
sortBy := "sortBy_example" // string | Sort field. If it's empty internal id is used (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NamespaceAPI.ListNamespace(context.Background()).Limit(limit).Offset(offset).Sort(sort).SortBy(sortBy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NamespaceAPI.ListNamespace``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListNamespace`: []ResponsesNamespace
fmt.Fprintf(os.Stdout, "Response from `NamespaceAPI.ListNamespace`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListNamespaceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | Count of requested entities | |
offset | int32 | Offset | |
sort | string | Sort order. Default: desc | |
sortBy | string | Sort field. If it's empty internal id is used |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]