rollup

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package rollup provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.

This package contains the bindings for the rollup OpenAPI spec.

Index

Constants

View Source
const FinishPollInterval = time.Millisecond * 100
View Source
const FinishRetries = 50

Variables

This section is empty.

Functions

func NewAddNoticeRequest

func NewAddNoticeRequest(server string, body AddNoticeJSONRequestBody) (*http.Request, error)

NewAddNoticeRequest calls the generic AddNotice builder with application/json body

func NewAddNoticeRequestWithBody

func NewAddNoticeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddNoticeRequestWithBody generates requests for AddNotice with any type of body

func NewAddReportRequest

func NewAddReportRequest(server string, body AddReportJSONRequestBody) (*http.Request, error)

NewAddReportRequest calls the generic AddReport builder with application/json body

func NewAddReportRequestWithBody

func NewAddReportRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddReportRequestWithBody generates requests for AddReport with any type of body

func NewAddVoucherRequest

func NewAddVoucherRequest(server string, body AddVoucherJSONRequestBody) (*http.Request, error)

NewAddVoucherRequest calls the generic AddVoucher builder with application/json body

func NewAddVoucherRequestWithBody

func NewAddVoucherRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddVoucherRequestWithBody generates requests for AddVoucher with any type of body

func NewFinishRequest

func NewFinishRequest(server string, body FinishJSONRequestBody) (*http.Request, error)

NewFinishRequest calls the generic Finish builder with application/json body

func NewFinishRequestWithBody

func NewFinishRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewFinishRequestWithBody generates requests for Finish with any type of body

func NewGioRequest

func NewGioRequest(server string, body GioJSONRequestBody) (*http.Request, error)

NewGioRequest calls the generic Gio builder with application/json body

func NewGioRequestWithBody

func NewGioRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewGioRequestWithBody generates requests for Gio with any type of body

func NewRegisterExceptionRequest

func NewRegisterExceptionRequest(server string, body RegisterExceptionJSONRequestBody) (*http.Request, error)

NewRegisterExceptionRequest calls the generic RegisterException builder with application/json body

func NewRegisterExceptionRequestWithBody

func NewRegisterExceptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewRegisterExceptionRequestWithBody generates requests for RegisterException with any type of body

func Register

func Register(e *echo.Echo, model *mdl.NonodoModel, sequencer Sequencer)

Register the rollup API to echo

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type AddNoticeJSONRequestBody

type AddNoticeJSONRequestBody = Notice

AddNoticeJSONRequestBody defines body for AddNotice for application/json ContentType.

type AddNoticeResponse

type AddNoticeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *IndexResponse
}

func ParseAddNoticeResponse

func ParseAddNoticeResponse(rsp *http.Response) (*AddNoticeResponse, error)

ParseAddNoticeResponse parses an HTTP response from a AddNoticeWithResponse call

func (AddNoticeResponse) Status

func (r AddNoticeResponse) Status() string

Status returns HTTPResponse.Status

func (AddNoticeResponse) StatusCode

func (r AddNoticeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddReportJSONRequestBody

type AddReportJSONRequestBody = Report

AddReportJSONRequestBody defines body for AddReport for application/json ContentType.

type AddReportResponse

type AddReportResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseAddReportResponse

func ParseAddReportResponse(rsp *http.Response) (*AddReportResponse, error)

ParseAddReportResponse parses an HTTP response from a AddReportWithResponse call

func (AddReportResponse) Status

func (r AddReportResponse) Status() string

Status returns HTTPResponse.Status

func (AddReportResponse) StatusCode

func (r AddReportResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddVoucherJSONRequestBody

type AddVoucherJSONRequestBody = Voucher

AddVoucherJSONRequestBody defines body for AddVoucher for application/json ContentType.

type AddVoucherResponse

type AddVoucherResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *IndexResponse
}

func ParseAddVoucherResponse

func ParseAddVoucherResponse(rsp *http.Response) (*AddVoucherResponse, error)

ParseAddVoucherResponse parses an HTTP response from a AddVoucherWithResponse call

func (AddVoucherResponse) Status

func (r AddVoucherResponse) Status() string

Status returns HTTPResponse.Status

func (AddVoucherResponse) StatusCode

func (r AddVoucherResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Advance

type Advance struct {
	Metadata Metadata `json:"metadata"`

	// Payload The payload is in the Ethereum hex binary format.
	// The first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.
	// For instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175.
	// An empty payload is represented by the string '0x'.
	Payload Payload `json:"payload"`
}

Advance defines model for Advance.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AddNotice

func (c *Client) AddNotice(ctx context.Context, body AddNoticeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddNoticeWithBody

func (c *Client) AddNoticeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddReport

func (c *Client) AddReport(ctx context.Context, body AddReportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddReportWithBody

func (c *Client) AddReportWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddVoucher

func (c *Client) AddVoucher(ctx context.Context, body AddVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddVoucherWithBody

func (c *Client) AddVoucherWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Finish

func (c *Client) Finish(ctx context.Context, body FinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) FinishWithBody

func (c *Client) FinishWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Gio

func (c *Client) Gio(ctx context.Context, body GioJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GioWithBody

func (c *Client) GioWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RegisterException

func (c *Client) RegisterException(ctx context.Context, body RegisterExceptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RegisterExceptionWithBody

func (c *Client) RegisterExceptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// RegisterExceptionWithBody request with any body
	RegisterExceptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RegisterException(ctx context.Context, body RegisterExceptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// FinishWithBody request with any body
	FinishWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Finish(ctx context.Context, body FinishJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GioWithBody request with any body
	GioWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Gio(ctx context.Context, body GioJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddNoticeWithBody request with any body
	AddNoticeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddNotice(ctx context.Context, body AddNoticeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddReportWithBody request with any body
	AddReportWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddReport(ctx context.Context, body AddReportJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddVoucherWithBody request with any body
	AddVoucherWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddVoucher(ctx context.Context, body AddVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AddNoticeWithBodyWithResponse

func (c *ClientWithResponses) AddNoticeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddNoticeResponse, error)

AddNoticeWithBodyWithResponse request with arbitrary body returning *AddNoticeResponse

func (*ClientWithResponses) AddNoticeWithResponse

func (c *ClientWithResponses) AddNoticeWithResponse(ctx context.Context, body AddNoticeJSONRequestBody, reqEditors ...RequestEditorFn) (*AddNoticeResponse, error)

func (*ClientWithResponses) AddReportWithBodyWithResponse

func (c *ClientWithResponses) AddReportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddReportResponse, error)

AddReportWithBodyWithResponse request with arbitrary body returning *AddReportResponse

func (*ClientWithResponses) AddReportWithResponse

func (c *ClientWithResponses) AddReportWithResponse(ctx context.Context, body AddReportJSONRequestBody, reqEditors ...RequestEditorFn) (*AddReportResponse, error)

func (*ClientWithResponses) AddVoucherWithBodyWithResponse

func (c *ClientWithResponses) AddVoucherWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddVoucherResponse, error)

AddVoucherWithBodyWithResponse request with arbitrary body returning *AddVoucherResponse

func (*ClientWithResponses) AddVoucherWithResponse

func (c *ClientWithResponses) AddVoucherWithResponse(ctx context.Context, body AddVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*AddVoucherResponse, error)

func (*ClientWithResponses) FinishWithBodyWithResponse

func (c *ClientWithResponses) FinishWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinishResponse, error)

FinishWithBodyWithResponse request with arbitrary body returning *FinishResponse

func (*ClientWithResponses) FinishWithResponse

func (c *ClientWithResponses) FinishWithResponse(ctx context.Context, body FinishJSONRequestBody, reqEditors ...RequestEditorFn) (*FinishResponse, error)

func (*ClientWithResponses) GioWithBodyWithResponse

func (c *ClientWithResponses) GioWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GioResponse, error)

GioWithBodyWithResponse request with arbitrary body returning *GioResponse

func (*ClientWithResponses) GioWithResponse

func (c *ClientWithResponses) GioWithResponse(ctx context.Context, body GioJSONRequestBody, reqEditors ...RequestEditorFn) (*GioResponse, error)

func (*ClientWithResponses) RegisterExceptionWithBodyWithResponse

func (c *ClientWithResponses) RegisterExceptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterExceptionResponse, error)

RegisterExceptionWithBodyWithResponse request with arbitrary body returning *RegisterExceptionResponse

func (*ClientWithResponses) RegisterExceptionWithResponse

func (c *ClientWithResponses) RegisterExceptionWithResponse(ctx context.Context, body RegisterExceptionJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterExceptionResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// RegisterExceptionWithBodyWithResponse request with any body
	RegisterExceptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RegisterExceptionResponse, error)

	RegisterExceptionWithResponse(ctx context.Context, body RegisterExceptionJSONRequestBody, reqEditors ...RequestEditorFn) (*RegisterExceptionResponse, error)

	// FinishWithBodyWithResponse request with any body
	FinishWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FinishResponse, error)

	FinishWithResponse(ctx context.Context, body FinishJSONRequestBody, reqEditors ...RequestEditorFn) (*FinishResponse, error)

	// GioWithBodyWithResponse request with any body
	GioWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GioResponse, error)

	GioWithResponse(ctx context.Context, body GioJSONRequestBody, reqEditors ...RequestEditorFn) (*GioResponse, error)

	// AddNoticeWithBodyWithResponse request with any body
	AddNoticeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddNoticeResponse, error)

	AddNoticeWithResponse(ctx context.Context, body AddNoticeJSONRequestBody, reqEditors ...RequestEditorFn) (*AddNoticeResponse, error)

	// AddReportWithBodyWithResponse request with any body
	AddReportWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddReportResponse, error)

	AddReportWithResponse(ctx context.Context, body AddReportJSONRequestBody, reqEditors ...RequestEditorFn) (*AddReportResponse, error)

	// AddVoucherWithBodyWithResponse request with any body
	AddVoucherWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddVoucherResponse, error)

	AddVoucherWithResponse(ctx context.Context, body AddVoucherJSONRequestBody, reqEditors ...RequestEditorFn) (*AddVoucherResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type Error

type Error = string

Error Detailed error message.

type Exception

type Exception struct {
	// Payload The payload is in the Ethereum hex binary format.
	// The first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.
	// For instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175.
	// An empty payload is represented by the string '0x'.
	Payload Payload `json:"payload"`
}

Exception defines model for Exception.

type Finish

type Finish struct {
	Status FinishStatus `json:"status"`
}

Finish defines model for Finish.

type FinishJSONRequestBody

type FinishJSONRequestBody = Finish

FinishJSONRequestBody defines body for Finish for application/json ContentType.

type FinishResponse

type FinishResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RollupRequest
}

func ParseFinishResponse

func ParseFinishResponse(rsp *http.Response) (*FinishResponse, error)

ParseFinishResponse parses an HTTP response from a FinishWithResponse call

func (FinishResponse) Status

func (r FinishResponse) Status() string

Status returns HTTPResponse.Status

func (FinishResponse) StatusCode

func (r FinishResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type FinishStatus

type FinishStatus string

FinishStatus defines model for Finish.Status.

const (
	Accept FinishStatus = "accept"
	Reject FinishStatus = "reject"
)

Defines values for FinishStatus.

type GioJSONRequestBody

type GioJSONRequestBody = GioRequest

GioJSONRequestBody defines body for Gio for application/json ContentType.

type GioRequest

type GioRequest struct {
	// Domain An arbitrary number representing the request domain. Domains less then 0x10 are reserved.
	Domain uint16 `json:"domain"`

	// Id Domain-specific information identifying the request.
	Id string `json:"id"`
}

GioRequest defines model for GioRequest.

type GioResponse

type GioResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GioResponseRollup
}

func ParseGioResponse

func ParseGioResponse(rsp *http.Response) (*GioResponse, error)

ParseGioResponse parses an HTTP response from a GioWithResponse call

func (GioResponse) Status

func (r GioResponse) Status() string

Status returns HTTPResponse.Status

func (GioResponse) StatusCode

func (r GioResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GioResponseRollup

type GioResponseRollup struct {
	// Code A number representing the response code.
	Code uint16 `json:"code"`

	// Data The response data.
	Data string `json:"data"`
}

GioResponseRollup defines model for GioResponseRollup.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type IndexResponse

type IndexResponse struct {
	// Index Position in the Merkle tree.
	Index uint64 `json:"index"`
}

IndexResponse defines model for IndexResponse.

type Inspect

type Inspect struct {
	// Payload The payload contains arbitrary hex-encoded binary data.
	// The first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.
	// For instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175.
	// An empty payload is represented by the string '0x'.
	Payload string `json:"payload"`
}

Inspect defines model for Inspect.

type Metadata added in v1.3.0

type Metadata struct {
	// AppContract 20-byte address of the application contract.
	AppContract string `json:"app_contract"`

	// BlockNumber Block number when input was posted.
	BlockNumber uint64 `json:"block_number"`

	// BlockTimestamp Unix timestamp of block in milliseconds.
	BlockTimestamp uint64 `json:"block_timestamp"`

	// ChainId Network identifier.
	ChainId uint64 `json:"chain_id"`

	// InputIndex Input index starting from genesis.
	InputIndex uint64 `json:"input_index"`

	// MsgSender 20-byte address of the account that submitted the input.
	MsgSender string `json:"msg_sender"`

	// PrevRandao The latest RANDAO mix of the post beacon state of the previous block.
	PrevRandao string `json:"prev_randao"`
}

Metadata defines model for Metadata.

type Notice

type Notice struct {
	// Payload The payload is in the Ethereum hex binary format.
	// The first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.
	// For instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175.
	// An empty payload is represented by the string '0x'.
	Payload Payload `json:"payload"`
}

Notice defines model for Notice.

type Payload

type Payload = string

Payload The payload is in the Ethereum hex binary format. The first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte. For instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175. An empty payload is represented by the string '0x'.

type RegisterExceptionJSONRequestBody

type RegisterExceptionJSONRequestBody = Exception

RegisterExceptionJSONRequestBody defines body for RegisterException for application/json ContentType.

type RegisterExceptionResponse

type RegisterExceptionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseRegisterExceptionResponse

func ParseRegisterExceptionResponse(rsp *http.Response) (*RegisterExceptionResponse, error)

ParseRegisterExceptionResponse parses an HTTP response from a RegisterExceptionWithResponse call

func (RegisterExceptionResponse) Status

func (r RegisterExceptionResponse) Status() string

Status returns HTTPResponse.Status

func (RegisterExceptionResponse) StatusCode

func (r RegisterExceptionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Report

type Report struct {
	// Payload The payload is in the Ethereum hex binary format.
	// The first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.
	// For instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175.
	// An empty payload is represented by the string '0x'.
	Payload Payload `json:"payload"`
}

Report defines model for Report.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RollupAPI added in v1.3.0

type RollupAPI struct {
	// contains filtered or unexported fields
}

Shared struct for request handlers.

func (*RollupAPI) AddNotice added in v1.3.0

func (r *RollupAPI) AddNotice(c echo.Context) error

Handle requests to /notice.

func (*RollupAPI) AddReport added in v1.3.0

func (r *RollupAPI) AddReport(c echo.Context) error

Handle requests to /report.

func (*RollupAPI) AddVoucher added in v1.3.0

func (r *RollupAPI) AddVoucher(c echo.Context) error

Handle requests to /voucher.

func (*RollupAPI) Fetcher added in v1.3.0

func (r *RollupAPI) Fetcher(ctx echo.Context, request GioJSONRequestBody) (*GioResponseRollup, *DA.HttpCustomError)

func (*RollupAPI) Finish added in v1.3.0

func (r *RollupAPI) Finish(c echo.Context) error

Handle requests to /finish.

func (*RollupAPI) Gio added in v1.3.0

func (r *RollupAPI) Gio(ctx echo.Context) error

Gio implements ServerInterface.

func (*RollupAPI) RegisterException added in v1.3.0

func (r *RollupAPI) RegisterException(c echo.Context) error

Handle requests to /exception.

type RollupRequest

type RollupRequest struct {
	Data        RollupRequest_Data       `json:"data"`
	RequestType RollupRequestRequestType `json:"request_type"`
}

RollupRequest defines model for RollupRequest.

type RollupRequestRequestType

type RollupRequestRequestType string

RollupRequestRequestType defines model for RollupRequest.RequestType.

const (
	AdvanceState RollupRequestRequestType = "advance_state"
	InspectState RollupRequestRequestType = "inspect_state"
)

Defines values for RollupRequestRequestType.

type RollupRequest_Data

type RollupRequest_Data struct {
	// contains filtered or unexported fields
}

RollupRequest_Data defines model for RollupRequest.Data.

func (RollupRequest_Data) AsAdvance

func (t RollupRequest_Data) AsAdvance() (Advance, error)

AsAdvance returns the union data inside the RollupRequest_Data as a Advance

func (RollupRequest_Data) AsInspect

func (t RollupRequest_Data) AsInspect() (Inspect, error)

AsInspect returns the union data inside the RollupRequest_Data as a Inspect

func (*RollupRequest_Data) FromAdvance

func (t *RollupRequest_Data) FromAdvance(v Advance) error

FromAdvance overwrites any union data inside the RollupRequest_Data as the provided Advance

func (*RollupRequest_Data) FromInspect

func (t *RollupRequest_Data) FromInspect(v Inspect) error

FromInspect overwrites any union data inside the RollupRequest_Data as the provided Inspect

func (RollupRequest_Data) MarshalJSON

func (t RollupRequest_Data) MarshalJSON() ([]byte, error)

func (*RollupRequest_Data) MergeAdvance

func (t *RollupRequest_Data) MergeAdvance(v Advance) error

MergeAdvance performs a merge with any union data inside the RollupRequest_Data, using the provided Advance

func (*RollupRequest_Data) MergeInspect

func (t *RollupRequest_Data) MergeInspect(v Inspect) error

MergeInspect performs a merge with any union data inside the RollupRequest_Data, using the provided Inspect

func (*RollupRequest_Data) UnmarshalJSON

func (t *RollupRequest_Data) UnmarshalJSON(b []byte) error

type Sequencer added in v1.3.0

type Sequencer interface {
	FinishAndGetNext(accept bool) (cModel.Input, error)
}

type ServerInterface

type ServerInterface interface {
	// Register an exception
	// (POST /exception)
	RegisterException(ctx echo.Context) error
	// Finish and get next request
	// (POST /finish)
	Finish(ctx echo.Context) error
	// Generic Input/Output
	// (POST /gio)
	Gio(ctx echo.Context) error
	// Add a new notice
	// (POST /notice)
	AddNotice(ctx echo.Context) error
	// Add a new report
	// (POST /report)
	AddReport(ctx echo.Context) error
	// Add a new voucher
	// (POST /voucher)
	AddVoucher(ctx echo.Context) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) AddNotice

func (w *ServerInterfaceWrapper) AddNotice(ctx echo.Context) error

AddNotice converts echo context to params.

func (*ServerInterfaceWrapper) AddReport

func (w *ServerInterfaceWrapper) AddReport(ctx echo.Context) error

AddReport converts echo context to params.

func (*ServerInterfaceWrapper) AddVoucher

func (w *ServerInterfaceWrapper) AddVoucher(ctx echo.Context) error

AddVoucher converts echo context to params.

func (*ServerInterfaceWrapper) Finish

func (w *ServerInterfaceWrapper) Finish(ctx echo.Context) error

Finish converts echo context to params.

func (*ServerInterfaceWrapper) Gio

func (w *ServerInterfaceWrapper) Gio(ctx echo.Context) error

Gio converts echo context to params.

func (*ServerInterfaceWrapper) RegisterException

func (w *ServerInterfaceWrapper) RegisterException(ctx echo.Context) error

RegisterException converts echo context to params.

type Voucher

type Voucher struct {
	// Destination 20-byte address of the destination contract for which the payload will be sent.
	Destination string `json:"destination"`

	// Payload String in Ethereum hex binary format describing a method call to be executed by the destination contract.
	// The first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.
	// For instance, '0xcdcd77c0' corresponds to a payload with length 4 and bytes 205, 205, 119, 192.
	// To describe the method call, the payload should consist of a function selector (method identifier) followed
	// by its ABI-encoded arguments.
	// ref: https://docs.soliditylang.org/en/v0.8.19/abi-spec.html
	Payload string `json:"payload"`

	// Value A big-endian 32-byte unsigned integer in hex.
	Value string `json:"value"`
}

Voucher defines model for Voucher.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL