client

package module
v0.0.0-...-22174df Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

README

open-api-sdk

Documentation

Overview

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

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

Index

Constants

View Source
const (
	ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewGetApiV1CommonBalanceRequest

func NewGetApiV1CommonBalanceRequest(server string, params *GetApiV1CommonBalanceParams) (*http.Request, error)

NewGetApiV1CommonBalanceRequest generates requests for GetApiV1CommonBalance

func NewGetApiV1CommonTxResultRequest

func NewGetApiV1CommonTxResultRequest(server string, params *GetApiV1CommonTxResultParams) (*http.Request, error)

NewGetApiV1CommonTxResultRequest generates requests for GetApiV1CommonTxResult

func NewGetApiV1DataTokenHoldersRequest

func NewGetApiV1DataTokenHoldersRequest(server string, params *GetApiV1DataTokenHoldersParams) (*http.Request, error)

NewGetApiV1DataTokenHoldersRequest generates requests for GetApiV1DataTokenHolders

func NewGetApiV1SwapPriceRequest

func NewGetApiV1SwapPriceRequest(server string, params *GetApiV1SwapPriceParams) (*http.Request, error)

NewGetApiV1SwapPriceRequest generates requests for GetApiV1SwapPrice

func NewPostApiV1CommonSubmitTxRequest

func NewPostApiV1CommonSubmitTxRequest(server string, body PostApiV1CommonSubmitTxJSONRequestBody) (*http.Request, error)

NewPostApiV1CommonSubmitTxRequest calls the generic PostApiV1CommonSubmitTx builder with application/json body

func NewPostApiV1CommonSubmitTxRequestWithBody

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

NewPostApiV1CommonSubmitTxRequestWithBody generates requests for PostApiV1CommonSubmitTx with any type of body

func NewPostApiV1PrimaryCreatePoolRequest

func NewPostApiV1PrimaryCreatePoolRequest(server string, body PostApiV1PrimaryCreatePoolJSONRequestBody) (*http.Request, error)

NewPostApiV1PrimaryCreatePoolRequest calls the generic PostApiV1PrimaryCreatePool builder with application/json body

func NewPostApiV1PrimaryCreatePoolRequestWithBody

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

NewPostApiV1PrimaryCreatePoolRequestWithBody generates requests for PostApiV1PrimaryCreatePool with any type of body

func NewPostApiV1PrimaryPrepareBorrowerWithdrawRequest

func NewPostApiV1PrimaryPrepareBorrowerWithdrawRequest(server string, body PostApiV1PrimaryPrepareBorrowerWithdrawJSONRequestBody) (*http.Request, error)

NewPostApiV1PrimaryPrepareBorrowerWithdrawRequest calls the generic PostApiV1PrimaryPrepareBorrowerWithdraw builder with application/json body

func NewPostApiV1PrimaryPrepareBorrowerWithdrawRequestWithBody

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

NewPostApiV1PrimaryPrepareBorrowerWithdrawRequestWithBody generates requests for PostApiV1PrimaryPrepareBorrowerWithdraw with any type of body

func NewPostApiV1PrimaryPrepareDepositRequest

func NewPostApiV1PrimaryPrepareDepositRequest(server string, body PostApiV1PrimaryPrepareDepositJSONRequestBody) (*http.Request, error)

NewPostApiV1PrimaryPrepareDepositRequest calls the generic PostApiV1PrimaryPrepareDeposit builder with application/json body

func NewPostApiV1PrimaryPrepareDepositRequestWithBody

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

NewPostApiV1PrimaryPrepareDepositRequestWithBody generates requests for PostApiV1PrimaryPrepareDeposit with any type of body

func NewPostApiV1PrimaryPrepareLaunchRequest

func NewPostApiV1PrimaryPrepareLaunchRequest(server string, body PostApiV1PrimaryPrepareLaunchJSONRequestBody) (*http.Request, error)

NewPostApiV1PrimaryPrepareLaunchRequest calls the generic PostApiV1PrimaryPrepareLaunch builder with application/json body

func NewPostApiV1PrimaryPrepareLaunchRequestWithBody

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

NewPostApiV1PrimaryPrepareLaunchRequestWithBody generates requests for PostApiV1PrimaryPrepareLaunch with any type of body

func NewPostApiV1PrimaryPrepareLiquidateRequest

func NewPostApiV1PrimaryPrepareLiquidateRequest(server string, body PostApiV1PrimaryPrepareLiquidateJSONRequestBody) (*http.Request, error)

NewPostApiV1PrimaryPrepareLiquidateRequest calls the generic PostApiV1PrimaryPrepareLiquidate builder with application/json body

func NewPostApiV1PrimaryPrepareLiquidateRequestWithBody

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

NewPostApiV1PrimaryPrepareLiquidateRequestWithBody generates requests for PostApiV1PrimaryPrepareLiquidate with any type of body

func NewPostApiV1PrimaryPrepareRedeemRequest

func NewPostApiV1PrimaryPrepareRedeemRequest(server string, body PostApiV1PrimaryPrepareRedeemJSONRequestBody) (*http.Request, error)

NewPostApiV1PrimaryPrepareRedeemRequest calls the generic PostApiV1PrimaryPrepareRedeem builder with application/json body

func NewPostApiV1PrimaryPrepareRedeemRequestWithBody

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

NewPostApiV1PrimaryPrepareRedeemRequestWithBody generates requests for PostApiV1PrimaryPrepareRedeem with any type of body

func NewPostApiV1PrimaryPrepareSettleRequest

func NewPostApiV1PrimaryPrepareSettleRequest(server string, body PostApiV1PrimaryPrepareSettleJSONRequestBody) (*http.Request, error)

NewPostApiV1PrimaryPrepareSettleRequest calls the generic PostApiV1PrimaryPrepareSettle builder with application/json body

func NewPostApiV1PrimaryPrepareSettleRequestWithBody

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

NewPostApiV1PrimaryPrepareSettleRequestWithBody generates requests for PostApiV1PrimaryPrepareSettle with any type of body

func NewPostApiV1SwapPrepareTxRequest

func NewPostApiV1SwapPrepareTxRequest(server string, body PostApiV1SwapPrepareTxJSONRequestBody) (*http.Request, error)

NewPostApiV1SwapPrepareTxRequest calls the generic PostApiV1SwapPrepareTx builder with application/json body

func NewPostApiV1SwapPrepareTxRequestWithBody

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

NewPostApiV1SwapPrepareTxRequestWithBody generates requests for PostApiV1SwapPrepareTx with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

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

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

func (*Client) GetApiV1CommonTxResult

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

func (*Client) GetApiV1DataTokenHolders

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

func (*Client) GetApiV1SwapPrice

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

func (*Client) PostApiV1CommonSubmitTx

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

func (*Client) PostApiV1CommonSubmitTxWithBody

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

func (*Client) PostApiV1PrimaryCreatePool

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

func (*Client) PostApiV1PrimaryCreatePoolWithBody

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

func (*Client) PostApiV1PrimaryPrepareBorrowerWithdraw

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

func (*Client) PostApiV1PrimaryPrepareBorrowerWithdrawWithBody

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

func (*Client) PostApiV1PrimaryPrepareDeposit

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

func (*Client) PostApiV1PrimaryPrepareDepositWithBody

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

func (*Client) PostApiV1PrimaryPrepareLaunch

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

func (*Client) PostApiV1PrimaryPrepareLaunchWithBody

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

func (*Client) PostApiV1PrimaryPrepareLiquidate

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

func (*Client) PostApiV1PrimaryPrepareLiquidateWithBody

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

func (*Client) PostApiV1PrimaryPrepareRedeem

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

func (*Client) PostApiV1PrimaryPrepareRedeemWithBody

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

func (*Client) PostApiV1PrimaryPrepareSettle

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

func (*Client) PostApiV1PrimaryPrepareSettleWithBody

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

func (*Client) PostApiV1SwapPrepareTx

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

func (*Client) PostApiV1SwapPrepareTxWithBody

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

type ClientInterface

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

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

	PostApiV1CommonSubmitTx(ctx context.Context, body PostApiV1CommonSubmitTxJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiV1CommonTxResult request
	GetApiV1CommonTxResult(ctx context.Context, params *GetApiV1CommonTxResultParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiV1DataTokenHolders request
	GetApiV1DataTokenHolders(ctx context.Context, params *GetApiV1DataTokenHoldersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostApiV1PrimaryCreatePool(ctx context.Context, body PostApiV1PrimaryCreatePoolJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostApiV1PrimaryPrepareBorrowerWithdraw(ctx context.Context, body PostApiV1PrimaryPrepareBorrowerWithdrawJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostApiV1PrimaryPrepareDeposit(ctx context.Context, body PostApiV1PrimaryPrepareDepositJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostApiV1PrimaryPrepareLaunch(ctx context.Context, body PostApiV1PrimaryPrepareLaunchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostApiV1PrimaryPrepareLiquidate(ctx context.Context, body PostApiV1PrimaryPrepareLiquidateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostApiV1PrimaryPrepareRedeem(ctx context.Context, body PostApiV1PrimaryPrepareRedeemJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostApiV1PrimaryPrepareSettle(ctx context.Context, body PostApiV1PrimaryPrepareSettleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostApiV1SwapPrepareTx(ctx context.Context, body PostApiV1SwapPrepareTxJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiV1SwapPrice request
	GetApiV1SwapPrice(ctx context.Context, params *GetApiV1SwapPriceParams, 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) GetApiV1CommonBalanceWithResponse

func (c *ClientWithResponses) GetApiV1CommonBalanceWithResponse(ctx context.Context, params *GetApiV1CommonBalanceParams, reqEditors ...RequestEditorFn) (*GetApiV1CommonBalanceResponse, error)

GetApiV1CommonBalanceWithResponse request returning *GetApiV1CommonBalanceResponse

func (*ClientWithResponses) GetApiV1CommonTxResultWithResponse

func (c *ClientWithResponses) GetApiV1CommonTxResultWithResponse(ctx context.Context, params *GetApiV1CommonTxResultParams, reqEditors ...RequestEditorFn) (*GetApiV1CommonTxResultResponse, error)

GetApiV1CommonTxResultWithResponse request returning *GetApiV1CommonTxResultResponse

func (*ClientWithResponses) GetApiV1DataTokenHoldersWithResponse

func (c *ClientWithResponses) GetApiV1DataTokenHoldersWithResponse(ctx context.Context, params *GetApiV1DataTokenHoldersParams, reqEditors ...RequestEditorFn) (*GetApiV1DataTokenHoldersResponse, error)

GetApiV1DataTokenHoldersWithResponse request returning *GetApiV1DataTokenHoldersResponse

func (*ClientWithResponses) GetApiV1SwapPriceWithResponse

func (c *ClientWithResponses) GetApiV1SwapPriceWithResponse(ctx context.Context, params *GetApiV1SwapPriceParams, reqEditors ...RequestEditorFn) (*GetApiV1SwapPriceResponse, error)

GetApiV1SwapPriceWithResponse request returning *GetApiV1SwapPriceResponse

func (*ClientWithResponses) PostApiV1CommonSubmitTxWithBodyWithResponse

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

PostApiV1CommonSubmitTxWithBodyWithResponse request with arbitrary body returning *PostApiV1CommonSubmitTxResponse

func (*ClientWithResponses) PostApiV1CommonSubmitTxWithResponse

func (c *ClientWithResponses) PostApiV1CommonSubmitTxWithResponse(ctx context.Context, body PostApiV1CommonSubmitTxJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1CommonSubmitTxResponse, error)

func (*ClientWithResponses) PostApiV1PrimaryCreatePoolWithBodyWithResponse

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

PostApiV1PrimaryCreatePoolWithBodyWithResponse request with arbitrary body returning *PostApiV1PrimaryCreatePoolResponse

func (*ClientWithResponses) PostApiV1PrimaryCreatePoolWithResponse

func (c *ClientWithResponses) PostApiV1PrimaryCreatePoolWithResponse(ctx context.Context, body PostApiV1PrimaryCreatePoolJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryCreatePoolResponse, error)

func (*ClientWithResponses) PostApiV1PrimaryPrepareBorrowerWithdrawWithBodyWithResponse

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

PostApiV1PrimaryPrepareBorrowerWithdrawWithBodyWithResponse request with arbitrary body returning *PostApiV1PrimaryPrepareBorrowerWithdrawResponse

func (*ClientWithResponses) PostApiV1PrimaryPrepareDepositWithBodyWithResponse

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

PostApiV1PrimaryPrepareDepositWithBodyWithResponse request with arbitrary body returning *PostApiV1PrimaryPrepareDepositResponse

func (*ClientWithResponses) PostApiV1PrimaryPrepareDepositWithResponse

func (c *ClientWithResponses) PostApiV1PrimaryPrepareDepositWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareDepositJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareDepositResponse, error)

func (*ClientWithResponses) PostApiV1PrimaryPrepareLaunchWithBodyWithResponse

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

PostApiV1PrimaryPrepareLaunchWithBodyWithResponse request with arbitrary body returning *PostApiV1PrimaryPrepareLaunchResponse

func (*ClientWithResponses) PostApiV1PrimaryPrepareLaunchWithResponse

func (c *ClientWithResponses) PostApiV1PrimaryPrepareLaunchWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareLaunchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareLaunchResponse, error)

func (*ClientWithResponses) PostApiV1PrimaryPrepareLiquidateWithBodyWithResponse

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

PostApiV1PrimaryPrepareLiquidateWithBodyWithResponse request with arbitrary body returning *PostApiV1PrimaryPrepareLiquidateResponse

func (*ClientWithResponses) PostApiV1PrimaryPrepareRedeemWithBodyWithResponse

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

PostApiV1PrimaryPrepareRedeemWithBodyWithResponse request with arbitrary body returning *PostApiV1PrimaryPrepareRedeemResponse

func (*ClientWithResponses) PostApiV1PrimaryPrepareRedeemWithResponse

func (c *ClientWithResponses) PostApiV1PrimaryPrepareRedeemWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareRedeemJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareRedeemResponse, error)

func (*ClientWithResponses) PostApiV1PrimaryPrepareSettleWithBodyWithResponse

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

PostApiV1PrimaryPrepareSettleWithBodyWithResponse request with arbitrary body returning *PostApiV1PrimaryPrepareSettleResponse

func (*ClientWithResponses) PostApiV1PrimaryPrepareSettleWithResponse

func (c *ClientWithResponses) PostApiV1PrimaryPrepareSettleWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareSettleJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareSettleResponse, error)

func (*ClientWithResponses) PostApiV1SwapPrepareTxWithBodyWithResponse

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

PostApiV1SwapPrepareTxWithBodyWithResponse request with arbitrary body returning *PostApiV1SwapPrepareTxResponse

func (*ClientWithResponses) PostApiV1SwapPrepareTxWithResponse

func (c *ClientWithResponses) PostApiV1SwapPrepareTxWithResponse(ctx context.Context, body PostApiV1SwapPrepareTxJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1SwapPrepareTxResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetApiV1CommonBalanceWithResponse request
	GetApiV1CommonBalanceWithResponse(ctx context.Context, params *GetApiV1CommonBalanceParams, reqEditors ...RequestEditorFn) (*GetApiV1CommonBalanceResponse, error)

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

	PostApiV1CommonSubmitTxWithResponse(ctx context.Context, body PostApiV1CommonSubmitTxJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1CommonSubmitTxResponse, error)

	// GetApiV1CommonTxResultWithResponse request
	GetApiV1CommonTxResultWithResponse(ctx context.Context, params *GetApiV1CommonTxResultParams, reqEditors ...RequestEditorFn) (*GetApiV1CommonTxResultResponse, error)

	// GetApiV1DataTokenHoldersWithResponse request
	GetApiV1DataTokenHoldersWithResponse(ctx context.Context, params *GetApiV1DataTokenHoldersParams, reqEditors ...RequestEditorFn) (*GetApiV1DataTokenHoldersResponse, error)

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

	PostApiV1PrimaryCreatePoolWithResponse(ctx context.Context, body PostApiV1PrimaryCreatePoolJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryCreatePoolResponse, error)

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

	PostApiV1PrimaryPrepareBorrowerWithdrawWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareBorrowerWithdrawJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareBorrowerWithdrawResponse, error)

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

	PostApiV1PrimaryPrepareDepositWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareDepositJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareDepositResponse, error)

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

	PostApiV1PrimaryPrepareLaunchWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareLaunchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareLaunchResponse, error)

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

	PostApiV1PrimaryPrepareLiquidateWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareLiquidateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareLiquidateResponse, error)

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

	PostApiV1PrimaryPrepareRedeemWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareRedeemJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareRedeemResponse, error)

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

	PostApiV1PrimaryPrepareSettleWithResponse(ctx context.Context, body PostApiV1PrimaryPrepareSettleJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1PrimaryPrepareSettleResponse, error)

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

	PostApiV1SwapPrepareTxWithResponse(ctx context.Context, body PostApiV1SwapPrepareTxJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiV1SwapPrepareTxResponse, error)

	// GetApiV1SwapPriceWithResponse request
	GetApiV1SwapPriceWithResponse(ctx context.Context, params *GetApiV1SwapPriceParams, reqEditors ...RequestEditorFn) (*GetApiV1SwapPriceResponse, error)
}

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

type CommonApiResp

type CommonApiResp struct {
	// Code Code is the response code
	// @Description 响应状态码
	Code *int `json:"code,omitempty"`

	// Data Data is the response data
	// @Description 响应数据
	Data interface{} `json:"data,omitempty"`

	// Message Message is the response message
	// @Description 响应消息
	Message *string `json:"message,omitempty"`
}

CommonApiResp API标准响应格式

type GetApiV1CommonBalanceParams

type GetApiV1CommonBalanceParams struct {
	ChainId string `form:"chain_id" json:"chain_id"`

	// Owner 账户地址
	Owner string `form:"owner" json:"owner"`

	// TokenAddress token地址,原生token无需赋值
	TokenAddress *string `form:"token_address,omitempty" json:"token_address,omitempty"`
}

GetApiV1CommonBalanceParams defines parameters for GetApiV1CommonBalance.

type GetApiV1CommonBalanceResponse

type GetApiV1CommonBalanceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int             `json:"code,omitempty"`
		Data *RestBalanceResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParseGetApiV1CommonBalanceResponse

func ParseGetApiV1CommonBalanceResponse(rsp *http.Response) (*GetApiV1CommonBalanceResponse, error)

ParseGetApiV1CommonBalanceResponse parses an HTTP response from a GetApiV1CommonBalanceWithResponse call

func (GetApiV1CommonBalanceResponse) Status

Status returns HTTPResponse.Status

func (GetApiV1CommonBalanceResponse) StatusCode

func (r GetApiV1CommonBalanceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiV1CommonTxResultParams

type GetApiV1CommonTxResultParams struct {
	ChainId string `form:"chain_id" json:"chain_id"`
	TxHash  string `form:"tx_hash" json:"tx_hash"`
}

GetApiV1CommonTxResultParams defines parameters for GetApiV1CommonTxResult.

type GetApiV1CommonTxResultResponse

type GetApiV1CommonTxResultResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int              `json:"code,omitempty"`
		Data *RestTxResultResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParseGetApiV1CommonTxResultResponse

func ParseGetApiV1CommonTxResultResponse(rsp *http.Response) (*GetApiV1CommonTxResultResponse, error)

ParseGetApiV1CommonTxResultResponse parses an HTTP response from a GetApiV1CommonTxResultWithResponse call

func (GetApiV1CommonTxResultResponse) Status

Status returns HTTPResponse.Status

func (GetApiV1CommonTxResultResponse) StatusCode

func (r GetApiV1CommonTxResultResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiV1DataTokenHoldersParams

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

GetApiV1DataTokenHoldersParams defines parameters for GetApiV1DataTokenHolders.

type GetApiV1DataTokenHoldersResponse

type GetApiV1DataTokenHoldersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int               `json:"code,omitempty"`
		Data *[]RestTokenHolder `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParseGetApiV1DataTokenHoldersResponse

func ParseGetApiV1DataTokenHoldersResponse(rsp *http.Response) (*GetApiV1DataTokenHoldersResponse, error)

ParseGetApiV1DataTokenHoldersResponse parses an HTTP response from a GetApiV1DataTokenHoldersWithResponse call

func (GetApiV1DataTokenHoldersResponse) Status

Status returns HTTPResponse.Status

func (GetApiV1DataTokenHoldersResponse) StatusCode

func (r GetApiV1DataTokenHoldersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiV1SwapPriceParams

type GetApiV1SwapPriceParams struct {
	Amount             string                                `form:"amount" json:"amount"`
	ChainId            string                                `form:"chain_id" json:"chain_id"`
	InputMintDecimals  *int                                  `form:"inputMintDecimals,omitempty" json:"inputMintDecimals,omitempty"`
	InputMint          string                                `form:"input_mint" json:"input_mint"`
	OutputMintDecimals *int                                  `form:"outputMintDecimals,omitempty" json:"outputMintDecimals,omitempty"`
	OutputMint         string                                `form:"output_mint" json:"output_mint"`
	Platform           GetApiV1SwapPriceParamsPlatform       `form:"platform" json:"platform"`
	SwapDirection      *GetApiV1SwapPriceParamsSwapDirection `form:"swap_direction,omitempty" json:"swap_direction,omitempty"`

	// VaultAddress vault地址
	VaultAddress string `form:"vault_address" json:"vault_address"`
}

GetApiV1SwapPriceParams defines parameters for GetApiV1SwapPrice.

type GetApiV1SwapPriceParamsPlatform

type GetApiV1SwapPriceParamsPlatform string

GetApiV1SwapPriceParamsPlatform defines parameters for GetApiV1SwapPrice.

const (
	Raydium     GetApiV1SwapPriceParamsPlatform = "Raydium"
	RaydiumCLMM GetApiV1SwapPriceParamsPlatform = "Raydium CLMM"
)

Defines values for GetApiV1SwapPriceParamsPlatform.

type GetApiV1SwapPriceParamsSwapDirection

type GetApiV1SwapPriceParamsSwapDirection int

GetApiV1SwapPriceParamsSwapDirection defines parameters for GetApiV1SwapPrice.

Defines values for GetApiV1SwapPriceParamsSwapDirection.

type GetApiV1SwapPriceResponse

type GetApiV1SwapPriceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int               `json:"code,omitempty"`
		Data *RestSwapPriceResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParseGetApiV1SwapPriceResponse

func ParseGetApiV1SwapPriceResponse(rsp *http.Response) (*GetApiV1SwapPriceResponse, error)

ParseGetApiV1SwapPriceResponse parses an HTTP response from a GetApiV1SwapPriceWithResponse call

func (GetApiV1SwapPriceResponse) Status

func (r GetApiV1SwapPriceResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiV1SwapPriceResponse) StatusCode

func (r GetApiV1SwapPriceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type PostApiV1CommonSubmitTxJSONRequestBody

type PostApiV1CommonSubmitTxJSONRequestBody = RestSubmitReq

PostApiV1CommonSubmitTxJSONRequestBody defines body for PostApiV1CommonSubmitTx for application/json ContentType.

type PostApiV1CommonSubmitTxResponse

type PostApiV1CommonSubmitTxResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int            `json:"code,omitempty"`
		Data *RestSubmitResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1CommonSubmitTxResponse

func ParsePostApiV1CommonSubmitTxResponse(rsp *http.Response) (*PostApiV1CommonSubmitTxResponse, error)

ParsePostApiV1CommonSubmitTxResponse parses an HTTP response from a PostApiV1CommonSubmitTxWithResponse call

func (PostApiV1CommonSubmitTxResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1CommonSubmitTxResponse) StatusCode

func (r PostApiV1CommonSubmitTxResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostApiV1PrimaryCreatePoolJSONRequestBody

type PostApiV1PrimaryCreatePoolJSONRequestBody = RestCreatePoolAndLiquidityReq

PostApiV1PrimaryCreatePoolJSONRequestBody defines body for PostApiV1PrimaryCreatePool for application/json ContentType.

type PostApiV1PrimaryCreatePoolResponse

type PostApiV1PrimaryCreatePoolResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int                            `json:"code,omitempty"`
		Data *RestCreatePoolAndLiquidityResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1PrimaryCreatePoolResponse

func ParsePostApiV1PrimaryCreatePoolResponse(rsp *http.Response) (*PostApiV1PrimaryCreatePoolResponse, error)

ParsePostApiV1PrimaryCreatePoolResponse parses an HTTP response from a PostApiV1PrimaryCreatePoolWithResponse call

func (PostApiV1PrimaryCreatePoolResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1PrimaryCreatePoolResponse) StatusCode

func (r PostApiV1PrimaryCreatePoolResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostApiV1PrimaryPrepareBorrowerWithdrawJSONRequestBody

type PostApiV1PrimaryPrepareBorrowerWithdrawJSONRequestBody = RestBorrowerWithdrawReq

PostApiV1PrimaryPrepareBorrowerWithdrawJSONRequestBody defines body for PostApiV1PrimaryPrepareBorrowerWithdraw for application/json ContentType.

type PostApiV1PrimaryPrepareBorrowerWithdrawResponse

type PostApiV1PrimaryPrepareBorrowerWithdrawResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int                      `json:"code,omitempty"`
		Data *RestBorrowerWithdrawResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1PrimaryPrepareBorrowerWithdrawResponse

func ParsePostApiV1PrimaryPrepareBorrowerWithdrawResponse(rsp *http.Response) (*PostApiV1PrimaryPrepareBorrowerWithdrawResponse, error)

ParsePostApiV1PrimaryPrepareBorrowerWithdrawResponse parses an HTTP response from a PostApiV1PrimaryPrepareBorrowerWithdrawWithResponse call

func (PostApiV1PrimaryPrepareBorrowerWithdrawResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1PrimaryPrepareBorrowerWithdrawResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostApiV1PrimaryPrepareDepositJSONRequestBody

type PostApiV1PrimaryPrepareDepositJSONRequestBody = RestDepositPrepareReq

PostApiV1PrimaryPrepareDepositJSONRequestBody defines body for PostApiV1PrimaryPrepareDeposit for application/json ContentType.

type PostApiV1PrimaryPrepareDepositResponse

type PostApiV1PrimaryPrepareDepositResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int                    `json:"code,omitempty"`
		Data *RestDepositPrepareResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1PrimaryPrepareDepositResponse

func ParsePostApiV1PrimaryPrepareDepositResponse(rsp *http.Response) (*PostApiV1PrimaryPrepareDepositResponse, error)

ParsePostApiV1PrimaryPrepareDepositResponse parses an HTTP response from a PostApiV1PrimaryPrepareDepositWithResponse call

func (PostApiV1PrimaryPrepareDepositResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1PrimaryPrepareDepositResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostApiV1PrimaryPrepareLaunchJSONRequestBody

type PostApiV1PrimaryPrepareLaunchJSONRequestBody = RestTokenLaunchReq

PostApiV1PrimaryPrepareLaunchJSONRequestBody defines body for PostApiV1PrimaryPrepareLaunch for application/json ContentType.

type PostApiV1PrimaryPrepareLaunchResponse

type PostApiV1PrimaryPrepareLaunchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int                   `json:"code,omitempty"`
		Data *RestLaunchPrepareResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1PrimaryPrepareLaunchResponse

func ParsePostApiV1PrimaryPrepareLaunchResponse(rsp *http.Response) (*PostApiV1PrimaryPrepareLaunchResponse, error)

ParsePostApiV1PrimaryPrepareLaunchResponse parses an HTTP response from a PostApiV1PrimaryPrepareLaunchWithResponse call

func (PostApiV1PrimaryPrepareLaunchResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1PrimaryPrepareLaunchResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostApiV1PrimaryPrepareLiquidateJSONRequestBody

type PostApiV1PrimaryPrepareLiquidateJSONRequestBody = RestLiquidateReq

PostApiV1PrimaryPrepareLiquidateJSONRequestBody defines body for PostApiV1PrimaryPrepareLiquidate for application/json ContentType.

type PostApiV1PrimaryPrepareLiquidateResponse

type PostApiV1PrimaryPrepareLiquidateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int               `json:"code,omitempty"`
		Data *RestLiquidateResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1PrimaryPrepareLiquidateResponse

func ParsePostApiV1PrimaryPrepareLiquidateResponse(rsp *http.Response) (*PostApiV1PrimaryPrepareLiquidateResponse, error)

ParsePostApiV1PrimaryPrepareLiquidateResponse parses an HTTP response from a PostApiV1PrimaryPrepareLiquidateWithResponse call

func (PostApiV1PrimaryPrepareLiquidateResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1PrimaryPrepareLiquidateResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostApiV1PrimaryPrepareRedeemJSONRequestBody

type PostApiV1PrimaryPrepareRedeemJSONRequestBody = RestRedeemReq

PostApiV1PrimaryPrepareRedeemJSONRequestBody defines body for PostApiV1PrimaryPrepareRedeem for application/json ContentType.

type PostApiV1PrimaryPrepareRedeemResponse

type PostApiV1PrimaryPrepareRedeemResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int                   `json:"code,omitempty"`
		Data *RestRedeemPrepareResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1PrimaryPrepareRedeemResponse

func ParsePostApiV1PrimaryPrepareRedeemResponse(rsp *http.Response) (*PostApiV1PrimaryPrepareRedeemResponse, error)

ParsePostApiV1PrimaryPrepareRedeemResponse parses an HTTP response from a PostApiV1PrimaryPrepareRedeemWithResponse call

func (PostApiV1PrimaryPrepareRedeemResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1PrimaryPrepareRedeemResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostApiV1PrimaryPrepareSettleJSONRequestBody

type PostApiV1PrimaryPrepareSettleJSONRequestBody = RestSettleReq

PostApiV1PrimaryPrepareSettleJSONRequestBody defines body for PostApiV1PrimaryPrepareSettle for application/json ContentType.

type PostApiV1PrimaryPrepareSettleResponse

type PostApiV1PrimaryPrepareSettleResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int            `json:"code,omitempty"`
		Data *RestSettleResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1PrimaryPrepareSettleResponse

func ParsePostApiV1PrimaryPrepareSettleResponse(rsp *http.Response) (*PostApiV1PrimaryPrepareSettleResponse, error)

ParsePostApiV1PrimaryPrepareSettleResponse parses an HTTP response from a PostApiV1PrimaryPrepareSettleWithResponse call

func (PostApiV1PrimaryPrepareSettleResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1PrimaryPrepareSettleResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type PostApiV1SwapPrepareTxJSONRequestBody

type PostApiV1SwapPrepareTxJSONRequestBody = RestSwapPrepareReq

PostApiV1SwapPrepareTxJSONRequestBody defines body for PostApiV1SwapPrepareTx for application/json ContentType.

type PostApiV1SwapPrepareTxResponse

type PostApiV1SwapPrepareTxResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Code Code is the response code
		// @Description 响应状态码
		Code *int                 `json:"code,omitempty"`
		Data *RestSwapPrepareResp `json:"data,omitempty"`

		// Message Message is the response message
		// @Description 响应消息
		Message *string `json:"message,omitempty"`
	}
}

func ParsePostApiV1SwapPrepareTxResponse

func ParsePostApiV1SwapPrepareTxResponse(rsp *http.Response) (*PostApiV1SwapPrepareTxResponse, error)

ParsePostApiV1SwapPrepareTxResponse parses an HTTP response from a PostApiV1SwapPrepareTxWithResponse call

func (PostApiV1SwapPrepareTxResponse) Status

Status returns HTTPResponse.Status

func (PostApiV1SwapPrepareTxResponse) StatusCode

func (r PostApiV1SwapPrepareTxResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type RestBalanceResp

type RestBalanceResp struct {
	Balance      *string `json:"balance,omitempty"`
	ChainId      *string `json:"chain_id,omitempty"`
	Owner        *string `json:"owner,omitempty"`
	TokenAddress *string `json:"token_address,omitempty"`
}

RestBalanceResp defines model for rest.BalanceResp.

type RestBorrowerWithdrawReq

type RestBorrowerWithdrawReq struct {
	// Amount 提取数额
	Amount  int    `json:"amount"`
	ChainId string `json:"chain_id"`

	// VaultAddress vault地址
	VaultAddress string `json:"vault_address"`

	// Withdrawer 提款人
	Withdrawer string `json:"withdrawer"`
}

RestBorrowerWithdrawReq defines model for rest.BorrowerWithdrawReq.

type RestBorrowerWithdrawResp

type RestBorrowerWithdrawResp struct {
	TxMsgBase64 string `json:"tx_msg_base64"`
}

RestBorrowerWithdrawResp defines model for rest.BorrowerWithdrawResp.

type RestCreatePoolAndLiquidityReq

type RestCreatePoolAndLiquidityReq struct {
	ChainId string `json:"chain_id"`

	// VaultAddress vault地址
	VaultAddress string `json:"vault_address"`
}

RestCreatePoolAndLiquidityReq defines model for rest.CreatePoolAndLiquidityReq.

type RestCreatePoolAndLiquidityResp

type RestCreatePoolAndLiquidityResp struct {
	TxMsgBase64 string `json:"tx_msg_base64"`
}

RestCreatePoolAndLiquidityResp defines model for rest.CreatePoolAndLiquidityResp.

type RestDEXPlatform

type RestDEXPlatform string

RestDEXPlatform defines model for rest.DEX_Platform.

const (
	DexRaydium     RestDEXPlatform = "Raydium"
	DexRaydiumCLMM RestDEXPlatform = "Raydium CLMM"
)

Defines values for RestDEXPlatform.

type RestDepositPrepareReq

type RestDepositPrepareReq struct {
	// Amount 投资额(以vault融资货币计价)
	Amount  int    `json:"amount"`
	ChainId string `json:"chain_id"`

	// Investor 投资人地址
	Investor string `json:"investor"`

	// VaultAddress vault地址
	VaultAddress string `json:"vault_address"`
}

RestDepositPrepareReq defines model for rest.DepositPrepareReq.

type RestDepositPrepareResp

type RestDepositPrepareResp struct {
	TxMsgBase64 string `json:"tx_msg_base64"`
}

RestDepositPrepareResp defines model for rest.DepositPrepareResp.

type RestFinancingRule

type RestFinancingRule struct {
	// ExcessFundraisingRatioBps 超募比例bps
	ExcessFundraisingRatioBps *int `json:"excess_fundraising_ratio_bps,omitempty"`

	// FinancingCurrencyAddr 融资货币地址
	FinancingCurrencyAddr string `json:"financing_currency_addr"`
	FinancingDeadline     *int   `json:"financing_deadline,omitempty"`
	FinancingStartTime    *int   `json:"financing_start_time,omitempty"`

	// MinInvestmentBaseFinancingCurrency 最小投资额
	MinInvestmentBaseFinancingCurrency int `json:"min_investment_base_financing_currency"`

	// PriceBaseFinancingCurrency 融资货币计价
	PriceBaseFinancingCurrency int `json:"price_base_financing_currency"`

	// TargetAmountBaseFinancingCurrency 目标融资额
	TargetAmountBaseFinancingCurrency int `json:"target_amount_base_financing_currency"`
}

RestFinancingRule defines model for rest.FinancingRule.

type RestLaunchPrepareResp

type RestLaunchPrepareResp struct {
	// AssetMintAddr asset mint
	AssetMintAddr *string `json:"asset_mint_addr,omitempty"`

	// AssetTreasuryAddr asset treasury
	AssetTreasuryAddr *string `json:"asset_treasury_addr,omitempty"`

	// GlobalConfigAddr 全局配置信息
	GlobalConfigAddr *string `json:"global_config_addr,omitempty"`

	// TxMsgBase64 待签名信息
	TxMsgBase64 string `json:"tx_msg_base64"`

	// VaultAddr vault地址
	VaultAddr *string `json:"vault_addr,omitempty"`

	// VaultAuthAddr vault auth
	VaultAuthAddr *string `json:"vault_auth_addr,omitempty"`

	// VaultMintAddr vault mint
	VaultMintAddr *string `json:"vault_mint_addr,omitempty"`

	// VaultTreasuryAddr vault treasury
	VaultTreasuryAddr *string `json:"vault_treasury_addr,omitempty"`
}

RestLaunchPrepareResp defines model for rest.LaunchPrepareResp.

type RestLiquidateReq

type RestLiquidateReq struct {
	ChainId      string `json:"chain_id"`
	VaultAddress string `json:"vault_address"`
}

RestLiquidateReq defines model for rest.LiquidateReq.

type RestLiquidateResp

type RestLiquidateResp struct {
	TxMsgBase64 string `json:"tx_msg_base64"`
}

RestLiquidateResp defines model for rest.LiquidateResp.

type RestRedeemPrepareResp

type RestRedeemPrepareResp struct {
	TxMsgBase64 string `json:"tx_msg_base64"`
}

RestRedeemPrepareResp defines model for rest.RedeemPrepareResp.

type RestRedeemReq

type RestRedeemReq struct {
	// Amount 提取数额
	Amount  int    `json:"amount"`
	ChainId string `json:"chain_id"`

	// Investor 投资人地址
	Investor string `json:"investor"`

	// VaultAddress vault地址
	VaultAddress string `json:"vault_address"`
}

RestRedeemReq defines model for rest.RedeemReq.

type RestSenderBalanceChange

type RestSenderBalanceChange struct {
	// NativeBalanceChange 原生代币余额变化
	NativeBalanceChange *int `json:"native_balance_change,omitempty"`

	// NativeDecimals 原生代币decimals
	NativeDecimals *int `json:"native_decimals,omitempty"`

	// TokenBalanceChange 代币余额变化列表
	TokenBalanceChange *[]RestTokenBalanceChange `json:"token_balance_change,omitempty"`
}

RestSenderBalanceChange defines model for rest.SenderBalanceChange.

type RestSettleReq

type RestSettleReq struct {
	// Amount 数量
	Amount  int    `json:"amount"`
	ChainId string `json:"chain_id"`

	// VaultAddress vault地址
	VaultAddress string `json:"vault_address"`
}

RestSettleReq defines model for rest.SettleReq.

type RestSettleResp

type RestSettleResp struct {
	TxMsgBase64 string `json:"tx_msg_base64"`
}

RestSettleResp defines model for rest.SettleResp.

type RestSubmitReq

type RestSubmitReq struct {
	ChainId string `json:"chain_id"`

	// Sender 提交人地址
	Sender string `json:"sender"`

	// SignTxBase64 签名交易体字符串 base64编码
	SignTxBase64 string `json:"sign_tx_base64"`

	// TxMsgBase64 待签名数据
	TxMsgBase64 string `json:"tx_msg_base64"`
}

RestSubmitReq defines model for rest.SubmitReq.

type RestSubmitResp

type RestSubmitResp struct {
	FailedMsg *string `json:"failed_msg,omitempty"`

	// SenderBalanceChange 交易发送者余额变化,交易失败时为nil
	SenderBalanceChange *RestSenderBalanceChange `json:"sender_balance_change,omitempty"`
	Success             *bool                    `json:"success,omitempty"`
	TxHash              *string                  `json:"tx_hash,omitempty"`
}

RestSubmitResp defines model for rest.SubmitResp.

type RestSwapPrepareReq

type RestSwapPrepareReq struct {
	// Amount 存入数量/兑换出的数量
	Amount  string `json:"amount"`
	ChainId string `json:"chain_id"`

	// InputMint 存入代币地址
	InputMint string `json:"input_mint"`

	// MaxInAmount 限制最大可存入的数量, MinOutAmount为空时该字段生效
	MaxInAmount *string `json:"max_in_amount,omitempty"`

	// MinOutAmount 限制最小可兑换出的数量
	MinOutAmount *string `json:"min_out_amount,omitempty"`

	// OutputMint 兑换出的代币地址
	OutputMint string          `json:"output_mint"`
	Platform   RestDEXPlatform `json:"platform"`

	// Sender 发送人地址
	Sender string `json:"sender"`

	// VaultAddress vault地址
	VaultAddress string `json:"vault_address"`
}

RestSwapPrepareReq defines model for rest.SwapPrepareReq.

type RestSwapPrepareResp

type RestSwapPrepareResp struct {
	TxMsgBase64 string `json:"tx_msg_base64"`
}

RestSwapPrepareResp defines model for rest.SwapPrepareResp.

type RestSwapPriceResp

type RestSwapPriceResp struct {
	InputMint       *string `json:"input_mint,omitempty"`
	InputMintAmount *string `json:"input_mint_amount,omitempty"`
	OutputMint      *string `json:"output_mint,omitempty"`

	// OutputMintAmount 预计可兑换出来的数量(已考虑raydium手续费和滑点)
	OutputMintAmount *string `json:"output_mint_amount,omitempty"`

	// Price 理论上一个单位的input可以兑换多少output(已除以各自decimals,不考虑手续费和滑点)
	Price *float32 `json:"price,omitempty"`

	// SlippageBps 本次交易预计产生的滑点(bps)
	SlippageBps *int `json:"slippage_bps,omitempty"`
}

RestSwapPriceResp defines model for rest.SwapPriceResp.

type RestTokenBalanceChange

type RestTokenBalanceChange struct {
	// BalanceChange 余额变化
	BalanceChange *string `json:"balance_change,omitempty"`

	// Decimals decimals
	Decimals *int `json:"decimals,omitempty"`

	// TokenMint 代币地址
	TokenMint *string `json:"token_mint,omitempty"`
}

RestTokenBalanceChange defines model for rest.TokenBalanceChange.

type RestTokenHolder

type RestTokenHolder struct {
	Address *string `json:"address,omitempty"`
	Balance *string `json:"balance,omitempty"`
}

RestTokenHolder defines model for rest.TokenHolder.

type RestTokenLaunchReq

type RestTokenLaunchReq struct {
	ChainId string `json:"chain_id"`

	// FinancingRuleData 融资信息
	FinancingRuleData RestFinancingRule `json:"financing_rule_data"`

	// ManagementData 管理信息
	ManagementData RestTokenManage `json:"management_data"`

	// TokenMetaData token元数据信息
	TokenMetaData RestTokenMeta `json:"token_meta_data"`
}

RestTokenLaunchReq defines model for rest.TokenLaunchReq.

type RestTokenManage

type RestTokenManage struct {
	// Borrower 融资成功后的提款人
	Borrower string `json:"borrower"`

	// Deployer 发行人
	Deployer string `json:"deployer"`

	// Manager 管理员
	Manager string `json:"manager"`
}

RestTokenManage defines model for rest.TokenManage.

type RestTokenMeta

type RestTokenMeta struct {
	TokenDecimals int    `json:"token_decimals"`
	TokenName     string `json:"token_name"`
	TokenSymbol   string `json:"token_symbol"`
	TokenUri      string `json:"token_uri"`
}

RestTokenMeta defines model for rest.TokenMeta.

type RestTxResultResp

type RestTxResultResp struct {
	FailedMsg *string `json:"failed_msg,omitempty"`
	Success   *bool   `json:"success,omitempty"`
	TxHash    *string `json:"tx_hash,omitempty"`
}

RestTxResultResp defines model for rest.TxResultResp.

Jump to

Keyboard shortcuts

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