All URIs are relative to https://api-mainnet.celenium.io/v1
Method | HTTP request | Description |
---|---|---|
GetTransaction | Get /tx/{hash} | Get transaction by hash |
GetTransactionEvents | Get /tx/{hash}/events | Get transaction events |
GetTransactionMessages | Get /tx/{hash}/messages | Get transaction messages |
GetTransactionsCount | Get /tx/count | Get count of transactions in network |
ListGenesisTransactions | Get /tx/genesis | List genesis transactions info |
ListTransactionBlobs | Get /tx/{hash}/blobs | List blobs which was pushed by transaction |
ListTransactions | Get /tx | List transactions info |
TransactionBlobsCount | Get /tx/{hash}/blobs/count | Count of blobs which was pushed by transaction |
ResponsesTx GetTransaction(ctx, hash).Execute()
Get transaction by hash
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
hash := "hash_example" // string | Transaction hash in hexadecimal
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsAPI.GetTransaction(context.Background(), hash).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.GetTransaction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTransaction`: ResponsesTx
fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.GetTransaction`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
hash | string | Transaction hash in hexadecimal |
Other parameters are passed through a pointer to a apiGetTransactionRequest 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]
[]ResponsesEvent GetTransactionEvents(ctx, hash).Limit(limit).Offset(offset).Execute()
Get transaction events
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
hash := "hash_example" // string | Transaction hash in hexadecimal
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.TransactionsAPI.GetTransactionEvents(context.Background(), hash).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.GetTransactionEvents``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTransactionEvents`: []ResponsesEvent
fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.GetTransactionEvents`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
hash | string | Transaction hash in hexadecimal |
Other parameters are passed through a pointer to a apiGetTransactionEventsRequest 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 GetTransactionMessages(ctx, hash).Limit(limit).Offset(offset).Execute()
Get transaction messages
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
hash := "hash_example" // string | Transaction hash in hexadecimal
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.TransactionsAPI.GetTransactionMessages(context.Background(), hash).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.GetTransactionMessages``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTransactionMessages`: []ResponsesMessage
fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.GetTransactionMessages`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
hash | string | Transaction hash in hexadecimal |
Other parameters are passed through a pointer to a apiGetTransactionMessagesRequest 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]
int32 GetTransactionsCount(ctx).Execute()
Get count of transactions 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.TransactionsAPI.GetTransactionsCount(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.GetTransactionsCount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTransactionsCount`: int32
fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.GetTransactionsCount`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetTransactionsCountRequest 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]
[]ResponsesTx ListGenesisTransactions(ctx).Limit(limit).Offset(offset).Sort(sort).Execute()
List genesis transactions 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 (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsAPI.ListGenesisTransactions(context.Background()).Limit(limit).Offset(offset).Sort(sort).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.ListGenesisTransactions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListGenesisTransactions`: []ResponsesTx
fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.ListGenesisTransactions`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListGenesisTransactionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | Count of requested entities | |
offset | int32 | Offset | |
sort | string | Sort order |
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 ListTransactionBlobs(ctx, hash).Limit(limit).Offset(offset).Sort(sort).SortBy(sortBy).Execute()
List blobs which was pushed by transaction
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
hash := "hash_example" // string | Transaction hash in hexadecimal
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.TransactionsAPI.ListTransactionBlobs(context.Background(), hash).Limit(limit).Offset(offset).Sort(sort).SortBy(sortBy).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.ListTransactionBlobs``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListTransactionBlobs`: []ResponsesBlobLog
fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.ListTransactionBlobs`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
hash | string | Transaction hash in hexadecimal |
Other parameters are passed through a pointer to a apiListTransactionBlobsRequest 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]
[]ResponsesTx ListTransactions(ctx).Limit(limit).Offset(offset).Sort(sort).Status(status).MsgType(msgType).ExcludedMsgType(excludedMsgType).From(from).To(to).Height(height).Messages(messages).Execute()
List transactions 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 (optional)
status := "status_example" // string | Comma-separated status list (optional)
msgType := "msgType_example" // string | Comma-separated message types list (optional)
excludedMsgType := "excludedMsgType_example" // string | Comma-separated message types list which should be excluded (optional)
from := int32(56) // int32 | Time from in unix timestamp (optional)
to := int32(56) // int32 | Time to in unix timestamp (optional)
height := int32(56) // int32 | Block number (optional)
messages := true // bool | If true join messages (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsAPI.ListTransactions(context.Background()).Limit(limit).Offset(offset).Sort(sort).Status(status).MsgType(msgType).ExcludedMsgType(excludedMsgType).From(from).To(to).Height(height).Messages(messages).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.ListTransactions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListTransactions`: []ResponsesTx
fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.ListTransactions`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListTransactionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | Count of requested entities | |
offset | int32 | Offset | |
sort | string | Sort order | |
status | string | Comma-separated status list | |
msgType | string | Comma-separated message types list | |
excludedMsgType | string | Comma-separated message types list which should be excluded | |
from | int32 | Time from in unix timestamp | |
to | int32 | Time to in unix timestamp | |
height | int32 | Block number | |
messages | bool | If true join messages |
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 TransactionBlobsCount(ctx, hash).Execute()
Count of blobs which was pushed by transaction
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/celenium-io/celenium-api-go"
)
func main() {
hash := "hash_example" // string | Transaction hash in hexadecimal
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TransactionsAPI.TransactionBlobsCount(context.Background(), hash).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.TransactionBlobsCount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TransactionBlobsCount`: int32
fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.TransactionBlobsCount`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
hash | string | Transaction hash in hexadecimal |
Other parameters are passed through a pointer to a apiTransactionBlobsCountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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]