api

package
v0.0.0-...-88ef887 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigurationControllerGetConfigurationRequest

func NewConfigurationControllerGetConfigurationRequest(server string) (*http.Request, error)

NewConfigurationControllerGetConfigurationRequest generates requests for ConfigurationControllerGetConfiguration

func NewSwapInControllerCreateSwapRequest

func NewSwapInControllerCreateSwapRequest(server string, body SwapInControllerCreateSwapJSONRequestBody) (*http.Request, error)

NewSwapInControllerCreateSwapRequest calls the generic SwapInControllerCreateSwap builder with application/json body

func NewSwapInControllerCreateSwapRequestWithBody

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

NewSwapInControllerCreateSwapRequestWithBody generates requests for SwapInControllerCreateSwap with any type of body

func NewSwapInControllerGetRefundPsbtRequest

func NewSwapInControllerGetRefundPsbtRequest(server string, id string, params *SwapInControllerGetRefundPsbtParams) (*http.Request, error)

NewSwapInControllerGetRefundPsbtRequest generates requests for SwapInControllerGetRefundPsbt

func NewSwapInControllerGetSwapRequest

func NewSwapInControllerGetSwapRequest(server string, id string) (*http.Request, error)

NewSwapInControllerGetSwapRequest generates requests for SwapInControllerGetSwap

func NewSwapInControllerSendRefundTxRequest

func NewSwapInControllerSendRefundTxRequest(server string, id string, body SwapInControllerSendRefundTxJSONRequestBody) (*http.Request, error)

NewSwapInControllerSendRefundTxRequest calls the generic SwapInControllerSendRefundTx builder with application/json body

func NewSwapInControllerSendRefundTxRequestWithBody

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

NewSwapInControllerSendRefundTxRequestWithBody generates requests for SwapInControllerSendRefundTx with any type of body

func NewSwapOutControllerClaimSwapRequest

func NewSwapOutControllerClaimSwapRequest(server string, id string, body SwapOutControllerClaimSwapJSONRequestBody) (*http.Request, error)

NewSwapOutControllerClaimSwapRequest calls the generic SwapOutControllerClaimSwap builder with application/json body

func NewSwapOutControllerClaimSwapRequestWithBody

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

NewSwapOutControllerClaimSwapRequestWithBody generates requests for SwapOutControllerClaimSwap with any type of body

func NewSwapOutControllerCreateSwapRequest

func NewSwapOutControllerCreateSwapRequest(server string, body SwapOutControllerCreateSwapJSONRequestBody) (*http.Request, error)

NewSwapOutControllerCreateSwapRequest calls the generic SwapOutControllerCreateSwap builder with application/json body

func NewSwapOutControllerCreateSwapRequestWithBody

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

NewSwapOutControllerCreateSwapRequestWithBody generates requests for SwapOutControllerCreateSwap with any type of body

func NewSwapOutControllerGetClaimPsbtRequest

func NewSwapOutControllerGetClaimPsbtRequest(server string, id string, params *SwapOutControllerGetClaimPsbtParams) (*http.Request, error)

NewSwapOutControllerGetClaimPsbtRequest generates requests for SwapOutControllerGetClaimPsbt

func NewSwapOutControllerGetSwapRequest

func NewSwapOutControllerGetSwapRequest(server string, id string) (*http.Request, error)

NewSwapOutControllerGetSwapRequest generates requests for SwapOutControllerGetSwap

Types

type ChainDto

type ChainDto struct {
	Chain *ChainDtoChain `json:"chain,omitempty"`
}

ChainDto defines model for ChainDto.

type ChainDtoChain

type ChainDtoChain string

ChainDtoChain defines model for ChainDto.Chain.

const (
	ChainDtoChainBITCOIN ChainDtoChain = "BITCOIN"
	ChainDtoChainLIQUID  ChainDtoChain = "LIQUID"
)

Defines values for ChainDtoChain.

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) ConfigurationControllerGetConfiguration

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

func (*Client) SwapInControllerCreateSwap

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

func (*Client) SwapInControllerCreateSwapWithBody

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

func (*Client) SwapInControllerGetRefundPsbt

func (c *Client) SwapInControllerGetRefundPsbt(ctx context.Context, id string, params *SwapInControllerGetRefundPsbtParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SwapInControllerGetSwap

func (c *Client) SwapInControllerGetSwap(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SwapInControllerSendRefundTx

func (c *Client) SwapInControllerSendRefundTx(ctx context.Context, id string, body SwapInControllerSendRefundTxJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SwapInControllerSendRefundTxWithBody

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

func (*Client) SwapOutControllerClaimSwap

func (c *Client) SwapOutControllerClaimSwap(ctx context.Context, id string, body SwapOutControllerClaimSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SwapOutControllerClaimSwapWithBody

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

func (*Client) SwapOutControllerCreateSwap

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

func (*Client) SwapOutControllerCreateSwapWithBody

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

func (*Client) SwapOutControllerGetClaimPsbt

func (c *Client) SwapOutControllerGetClaimPsbt(ctx context.Context, id string, params *SwapOutControllerGetClaimPsbtParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SwapOutControllerGetSwap

func (c *Client) SwapOutControllerGetSwap(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ConfigurationControllerGetConfiguration request
	ConfigurationControllerGetConfiguration(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SwapInControllerCreateSwap(ctx context.Context, body SwapInControllerCreateSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SwapInControllerGetSwap request
	SwapInControllerGetSwap(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SwapInControllerGetRefundPsbt request
	SwapInControllerGetRefundPsbt(ctx context.Context, id string, params *SwapInControllerGetRefundPsbtParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SwapInControllerSendRefundTx(ctx context.Context, id string, body SwapInControllerSendRefundTxJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SwapOutControllerCreateSwap(ctx context.Context, body SwapOutControllerCreateSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SwapOutControllerGetSwap request
	SwapOutControllerGetSwap(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	SwapOutControllerClaimSwap(ctx context.Context, id string, body SwapOutControllerClaimSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SwapOutControllerGetClaimPsbt request
	SwapOutControllerGetClaimPsbt(ctx context.Context, id string, params *SwapOutControllerGetClaimPsbtParams, 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) ConfigurationControllerGetConfigurationWithResponse

func (c *ClientWithResponses) ConfigurationControllerGetConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ConfigurationControllerGetConfigurationResponse, error)

ConfigurationControllerGetConfigurationWithResponse request returning *ConfigurationControllerGetConfigurationResponse

func (*ClientWithResponses) SwapInControllerCreateSwapWithBodyWithResponse

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

SwapInControllerCreateSwapWithBodyWithResponse request with arbitrary body returning *SwapInControllerCreateSwapResponse

func (*ClientWithResponses) SwapInControllerCreateSwapWithResponse

func (c *ClientWithResponses) SwapInControllerCreateSwapWithResponse(ctx context.Context, body SwapInControllerCreateSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*SwapInControllerCreateSwapResponse, error)

func (*ClientWithResponses) SwapInControllerGetRefundPsbtWithResponse

func (c *ClientWithResponses) SwapInControllerGetRefundPsbtWithResponse(ctx context.Context, id string, params *SwapInControllerGetRefundPsbtParams, reqEditors ...RequestEditorFn) (*SwapInControllerGetRefundPsbtResponse, error)

SwapInControllerGetRefundPsbtWithResponse request returning *SwapInControllerGetRefundPsbtResponse

func (*ClientWithResponses) SwapInControllerGetSwapWithResponse

func (c *ClientWithResponses) SwapInControllerGetSwapWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SwapInControllerGetSwapResponse, error)

SwapInControllerGetSwapWithResponse request returning *SwapInControllerGetSwapResponse

func (*ClientWithResponses) SwapInControllerSendRefundTxWithBodyWithResponse

func (c *ClientWithResponses) SwapInControllerSendRefundTxWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SwapInControllerSendRefundTxResponse, error)

SwapInControllerSendRefundTxWithBodyWithResponse request with arbitrary body returning *SwapInControllerSendRefundTxResponse

func (*ClientWithResponses) SwapInControllerSendRefundTxWithResponse

func (c *ClientWithResponses) SwapInControllerSendRefundTxWithResponse(ctx context.Context, id string, body SwapInControllerSendRefundTxJSONRequestBody, reqEditors ...RequestEditorFn) (*SwapInControllerSendRefundTxResponse, error)

func (*ClientWithResponses) SwapOutControllerClaimSwapWithBodyWithResponse

func (c *ClientWithResponses) SwapOutControllerClaimSwapWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SwapOutControllerClaimSwapResponse, error)

SwapOutControllerClaimSwapWithBodyWithResponse request with arbitrary body returning *SwapOutControllerClaimSwapResponse

func (*ClientWithResponses) SwapOutControllerClaimSwapWithResponse

func (c *ClientWithResponses) SwapOutControllerClaimSwapWithResponse(ctx context.Context, id string, body SwapOutControllerClaimSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*SwapOutControllerClaimSwapResponse, error)

func (*ClientWithResponses) SwapOutControllerCreateSwapWithBodyWithResponse

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

SwapOutControllerCreateSwapWithBodyWithResponse request with arbitrary body returning *SwapOutControllerCreateSwapResponse

func (*ClientWithResponses) SwapOutControllerCreateSwapWithResponse

func (c *ClientWithResponses) SwapOutControllerCreateSwapWithResponse(ctx context.Context, body SwapOutControllerCreateSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*SwapOutControllerCreateSwapResponse, error)

func (*ClientWithResponses) SwapOutControllerGetClaimPsbtWithResponse

func (c *ClientWithResponses) SwapOutControllerGetClaimPsbtWithResponse(ctx context.Context, id string, params *SwapOutControllerGetClaimPsbtParams, reqEditors ...RequestEditorFn) (*SwapOutControllerGetClaimPsbtResponse, error)

SwapOutControllerGetClaimPsbtWithResponse request returning *SwapOutControllerGetClaimPsbtResponse

func (*ClientWithResponses) SwapOutControllerGetSwapWithResponse

func (c *ClientWithResponses) SwapOutControllerGetSwapWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SwapOutControllerGetSwapResponse, error)

SwapOutControllerGetSwapWithResponse request returning *SwapOutControllerGetSwapResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ConfigurationControllerGetConfigurationWithResponse request
	ConfigurationControllerGetConfigurationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ConfigurationControllerGetConfigurationResponse, error)

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

	SwapInControllerCreateSwapWithResponse(ctx context.Context, body SwapInControllerCreateSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*SwapInControllerCreateSwapResponse, error)

	// SwapInControllerGetSwapWithResponse request
	SwapInControllerGetSwapWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SwapInControllerGetSwapResponse, error)

	// SwapInControllerGetRefundPsbtWithResponse request
	SwapInControllerGetRefundPsbtWithResponse(ctx context.Context, id string, params *SwapInControllerGetRefundPsbtParams, reqEditors ...RequestEditorFn) (*SwapInControllerGetRefundPsbtResponse, error)

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

	SwapInControllerSendRefundTxWithResponse(ctx context.Context, id string, body SwapInControllerSendRefundTxJSONRequestBody, reqEditors ...RequestEditorFn) (*SwapInControllerSendRefundTxResponse, error)

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

	SwapOutControllerCreateSwapWithResponse(ctx context.Context, body SwapOutControllerCreateSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*SwapOutControllerCreateSwapResponse, error)

	// SwapOutControllerGetSwapWithResponse request
	SwapOutControllerGetSwapWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*SwapOutControllerGetSwapResponse, error)

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

	SwapOutControllerClaimSwapWithResponse(ctx context.Context, id string, body SwapOutControllerClaimSwapJSONRequestBody, reqEditors ...RequestEditorFn) (*SwapOutControllerClaimSwapResponse, error)

	// SwapOutControllerGetClaimPsbtWithResponse request
	SwapOutControllerGetClaimPsbtWithResponse(ctx context.Context, id string, params *SwapOutControllerGetClaimPsbtParams, reqEditors ...RequestEditorFn) (*SwapOutControllerGetClaimPsbtResponse, error)
}

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

type ConfigurationControllerGetConfigurationResponse

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

func ParseConfigurationControllerGetConfigurationResponse

func ParseConfigurationControllerGetConfigurationResponse(rsp *http.Response) (*ConfigurationControllerGetConfigurationResponse, error)

ParseConfigurationControllerGetConfigurationResponse parses an HTTP response from a ConfigurationControllerGetConfigurationWithResponse call

func (ConfigurationControllerGetConfigurationResponse) Status

Status returns HTTPResponse.Status

func (ConfigurationControllerGetConfigurationResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetSwapInResponseDto

type GetSwapInResponseDto struct {
	ContractAddress    string                       `json:"contractAddress"`
	CreatedAt          string                       `json:"createdAt"`
	InputAmount        float32                      `json:"inputAmount"`
	LockTx             *string                      `json:"lockTx,omitempty"`
	Outcome            *GetSwapInResponseDtoOutcome `json:"outcome,omitempty"`
	OutputAmount       float32                      `json:"outputAmount"`
	RedeemScript       string                       `json:"redeemScript"`
	Status             GetSwapInResponseDtoStatus   `json:"status"`
	SwapId             string                       `json:"swapId"`
	TimeoutBlockHeight float32                      `json:"timeoutBlockHeight"`
}

GetSwapInResponseDto defines model for GetSwapInResponseDto.

type GetSwapInResponseDtoOutcome

type GetSwapInResponseDtoOutcome string

GetSwapInResponseDtoOutcome defines model for GetSwapInResponseDto.Outcome.

const (
	EXPIRED  GetSwapInResponseDtoOutcome = "EXPIRED"
	REFUNDED GetSwapInResponseDtoOutcome = "REFUNDED"
	SUCCESS  GetSwapInResponseDtoOutcome = "SUCCESS"
)

Defines values for GetSwapInResponseDtoOutcome.

type GetSwapInResponseDtoStatus

type GetSwapInResponseDtoStatus string

GetSwapInResponseDtoStatus defines model for GetSwapInResponseDto.Status.

const (
	CONTRACTCLAIMEDUNCONFIRMED  GetSwapInResponseDtoStatus = "CONTRACT_CLAIMED_UNCONFIRMED"
	CONTRACTEXPIRED             GetSwapInResponseDtoStatus = "CONTRACT_EXPIRED"
	CONTRACTFUNDED              GetSwapInResponseDtoStatus = "CONTRACT_FUNDED"
	CONTRACTFUNDEDUNCONFIRMED   GetSwapInResponseDtoStatus = "CONTRACT_FUNDED_UNCONFIRMED"
	CONTRACTREFUNDEDUNCONFIRMED GetSwapInResponseDtoStatus = "CONTRACT_REFUNDED_UNCONFIRMED"
	CREATED                     GetSwapInResponseDtoStatus = "CREATED"
	DONE                        GetSwapInResponseDtoStatus = "DONE"
	INVOICEPAID                 GetSwapInResponseDtoStatus = "INVOICE_PAID"
)

Defines values for GetSwapInResponseDtoStatus.

type GetSwapOutResponseDto

type GetSwapOutResponseDto struct {
	Chain        GetSwapOutResponseDtoChain `json:"chain"`
	ClaimPubKey  string                     `json:"claimPubKey"`
	InputAmount  float32                    `json:"inputAmount"`
	PreImageHash string                     `json:"preImageHash"`
}

GetSwapOutResponseDto defines model for GetSwapOutResponseDto.

type GetSwapOutResponseDtoChain

type GetSwapOutResponseDtoChain string

GetSwapOutResponseDtoChain defines model for GetSwapOutResponseDto.Chain.

const (
	GetSwapOutResponseDtoChainBITCOIN GetSwapOutResponseDtoChain = "BITCOIN"
	GetSwapOutResponseDtoChainLIQUID  GetSwapOutResponseDtoChain = "LIQUID"
)

Defines values for GetSwapOutResponseDtoChain.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type PsbtResponseDto

type PsbtResponseDto struct {
	Psbt string `json:"psbt"`
}

PsbtResponseDto defines model for PsbtResponseDto.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type SwapInControllerCreateSwapJSONRequestBody

type SwapInControllerCreateSwapJSONRequestBody = SwapInRequestDto

SwapInControllerCreateSwapJSONRequestBody defines body for SwapInControllerCreateSwap for application/json ContentType.

type SwapInControllerCreateSwapResponse

type SwapInControllerCreateSwapResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *GetSwapInResponseDto
}

func ParseSwapInControllerCreateSwapResponse

func ParseSwapInControllerCreateSwapResponse(rsp *http.Response) (*SwapInControllerCreateSwapResponse, error)

ParseSwapInControllerCreateSwapResponse parses an HTTP response from a SwapInControllerCreateSwapWithResponse call

func (SwapInControllerCreateSwapResponse) Status

Status returns HTTPResponse.Status

func (SwapInControllerCreateSwapResponse) StatusCode

func (r SwapInControllerCreateSwapResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SwapInControllerGetRefundPsbtParams

type SwapInControllerGetRefundPsbtParams struct {
	Address string `form:"address" json:"address"`
}

SwapInControllerGetRefundPsbtParams defines parameters for SwapInControllerGetRefundPsbt.

type SwapInControllerGetRefundPsbtResponse

type SwapInControllerGetRefundPsbtResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PsbtResponseDto
}

func ParseSwapInControllerGetRefundPsbtResponse

func ParseSwapInControllerGetRefundPsbtResponse(rsp *http.Response) (*SwapInControllerGetRefundPsbtResponse, error)

ParseSwapInControllerGetRefundPsbtResponse parses an HTTP response from a SwapInControllerGetRefundPsbtWithResponse call

func (SwapInControllerGetRefundPsbtResponse) Status

Status returns HTTPResponse.Status

func (SwapInControllerGetRefundPsbtResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type SwapInControllerGetSwapResponse

type SwapInControllerGetSwapResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetSwapInResponseDto
}

func ParseSwapInControllerGetSwapResponse

func ParseSwapInControllerGetSwapResponse(rsp *http.Response) (*SwapInControllerGetSwapResponse, error)

ParseSwapInControllerGetSwapResponse parses an HTTP response from a SwapInControllerGetSwapWithResponse call

func (SwapInControllerGetSwapResponse) Status

Status returns HTTPResponse.Status

func (SwapInControllerGetSwapResponse) StatusCode

func (r SwapInControllerGetSwapResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SwapInControllerSendRefundTxJSONRequestBody

type SwapInControllerSendRefundTxJSONRequestBody = TxRequestDto

SwapInControllerSendRefundTxJSONRequestBody defines body for SwapInControllerSendRefundTx for application/json ContentType.

type SwapInControllerSendRefundTxResponse

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

func ParseSwapInControllerSendRefundTxResponse

func ParseSwapInControllerSendRefundTxResponse(rsp *http.Response) (*SwapInControllerSendRefundTxResponse, error)

ParseSwapInControllerSendRefundTxResponse parses an HTTP response from a SwapInControllerSendRefundTxWithResponse call

func (SwapInControllerSendRefundTxResponse) Status

Status returns HTTPResponse.Status

func (SwapInControllerSendRefundTxResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type SwapInRequestDto

type SwapInRequestDto struct {
	Chain           SwapInRequestDtoChain `json:"chain"`
	Invoice         string                `json:"invoice"`
	RefundPublicKey string                `json:"refundPublicKey"`
}

SwapInRequestDto defines model for SwapInRequestDto.

type SwapInRequestDtoChain

type SwapInRequestDtoChain string

SwapInRequestDtoChain defines model for SwapInRequestDto.Chain.

const (
	SwapInRequestDtoChainBITCOIN SwapInRequestDtoChain = "BITCOIN"
	SwapInRequestDtoChainLIQUID  SwapInRequestDtoChain = "LIQUID"
)

Defines values for SwapInRequestDtoChain.

type SwapOutControllerClaimSwapJSONRequestBody

type SwapOutControllerClaimSwapJSONRequestBody = TxRequestDto

SwapOutControllerClaimSwapJSONRequestBody defines body for SwapOutControllerClaimSwap for application/json ContentType.

type SwapOutControllerClaimSwapResponse

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

func ParseSwapOutControllerClaimSwapResponse

func ParseSwapOutControllerClaimSwapResponse(rsp *http.Response) (*SwapOutControllerClaimSwapResponse, error)

ParseSwapOutControllerClaimSwapResponse parses an HTTP response from a SwapOutControllerClaimSwapWithResponse call

func (SwapOutControllerClaimSwapResponse) Status

Status returns HTTPResponse.Status

func (SwapOutControllerClaimSwapResponse) StatusCode

func (r SwapOutControllerClaimSwapResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SwapOutControllerCreateSwapJSONRequestBody

type SwapOutControllerCreateSwapJSONRequestBody = SwapOutRequestDto

SwapOutControllerCreateSwapJSONRequestBody defines body for SwapOutControllerCreateSwap for application/json ContentType.

type SwapOutControllerCreateSwapResponse

type SwapOutControllerCreateSwapResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *GetSwapOutResponseDto
}

func ParseSwapOutControllerCreateSwapResponse

func ParseSwapOutControllerCreateSwapResponse(rsp *http.Response) (*SwapOutControllerCreateSwapResponse, error)

ParseSwapOutControllerCreateSwapResponse parses an HTTP response from a SwapOutControllerCreateSwapWithResponse call

func (SwapOutControllerCreateSwapResponse) Status

Status returns HTTPResponse.Status

func (SwapOutControllerCreateSwapResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type SwapOutControllerGetClaimPsbtParams

type SwapOutControllerGetClaimPsbtParams struct {
	Address string `form:"address" json:"address"`
}

SwapOutControllerGetClaimPsbtParams defines parameters for SwapOutControllerGetClaimPsbt.

type SwapOutControllerGetClaimPsbtResponse

type SwapOutControllerGetClaimPsbtResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PsbtResponseDto
}

func ParseSwapOutControllerGetClaimPsbtResponse

func ParseSwapOutControllerGetClaimPsbtResponse(rsp *http.Response) (*SwapOutControllerGetClaimPsbtResponse, error)

ParseSwapOutControllerGetClaimPsbtResponse parses an HTTP response from a SwapOutControllerGetClaimPsbtWithResponse call

func (SwapOutControllerGetClaimPsbtResponse) Status

Status returns HTTPResponse.Status

func (SwapOutControllerGetClaimPsbtResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type SwapOutControllerGetSwapResponse

type SwapOutControllerGetSwapResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GetSwapOutResponseDto
}

func ParseSwapOutControllerGetSwapResponse

func ParseSwapOutControllerGetSwapResponse(rsp *http.Response) (*SwapOutControllerGetSwapResponse, error)

ParseSwapOutControllerGetSwapResponse parses an HTTP response from a SwapOutControllerGetSwapWithResponse call

func (SwapOutControllerGetSwapResponse) Status

Status returns HTTPResponse.Status

func (SwapOutControllerGetSwapResponse) StatusCode

func (r SwapOutControllerGetSwapResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SwapOutRequestDto

type SwapOutRequestDto struct {
	Chain        SwapOutRequestDtoChain `json:"chain"`
	ClaimPubKey  string                 `json:"claimPubKey"`
	InputAmount  float32                `json:"inputAmount"`
	PreImageHash string                 `json:"preImageHash"`
}

SwapOutRequestDto defines model for SwapOutRequestDto.

type SwapOutRequestDtoChain

type SwapOutRequestDtoChain string

SwapOutRequestDtoChain defines model for SwapOutRequestDto.Chain.

const (
	SwapOutRequestDtoChainBITCOIN SwapOutRequestDtoChain = "BITCOIN"
	SwapOutRequestDtoChainLIQUID  SwapOutRequestDtoChain = "LIQUID"
)

Defines values for SwapOutRequestDtoChain.

type TxRequestDto

type TxRequestDto struct {
	Tx string `json:"tx"`
}

TxRequestDto defines model for TxRequestDto.

Jump to

Keyboard shortcuts

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