Skip to content

Latest commit

 

History

History
210 lines (132 loc) · 5.01 KB

File metadata and controls

210 lines (132 loc) · 5.01 KB

\GasAPI

All URIs are relative to https://api-mainnet.celenium.io/v1

Method HTTP request Description
GasEstimateForPfb Get /gas/estimate_for_pfb Get estimated gas for pay for blob
GasPrice Get /gas/price Get estimated gas price
GasPricePriority Get /gas/price/{priority} Get estimated gas price with priority filter

GasEstimateForPfb

int32 GasEstimateForPfb(ctx).Sizes(sizes).Versions(versions).Execute()

Get estimated gas for pay for blob

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/celenium-io/celenium-api-go"
)

func main() {
	sizes := "sizes_example" // string | Comma-separated array of blob sizes
	versions := "versions_example" // string | Comma-separated array of share versions. Default is 0 (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.GasAPI.GasEstimateForPfb(context.Background()).Sizes(sizes).Versions(versions).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `GasAPI.GasEstimateForPfb``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GasEstimateForPfb`: int32
	fmt.Fprintf(os.Stdout, "Response from `GasAPI.GasEstimateForPfb`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGasEstimateForPfbRequest struct via the builder pattern

Name Type Description Notes
sizes string Comma-separated array of blob sizes
versions string Comma-separated array of share versions. Default is 0

Return type

int32

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GasPrice

ResponsesGasPrice GasPrice(ctx).Execute()

Get estimated gas price

Example

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.GasAPI.GasPrice(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `GasAPI.GasPrice``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GasPrice`: ResponsesGasPrice
	fmt.Fprintf(os.Stdout, "Response from `GasAPI.GasPrice`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGasPriceRequest struct via the builder pattern

Return type

ResponsesGasPrice

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GasPricePriority

string GasPricePriority(ctx, priority).Execute()

Get estimated gas price with priority filter

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/celenium-io/celenium-api-go"
)

func main() {
	priority := "priority_example" // string | Priority

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.GasAPI.GasPricePriority(context.Background(), priority).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `GasAPI.GasPricePriority``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GasPricePriority`: string
	fmt.Fprintf(os.Stdout, "Response from `GasAPI.GasPricePriority`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
priority string Priority

Other Parameters

Other parameters are passed through a pointer to a apiGasPricePriorityRequest struct via the builder pattern

Name Type Description Notes

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]