oneclick

package module
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 20 Imported by: 0

README

Go API client for oneclick

API for One-Click Swaps

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 0.1.8
  • Package version: 1.0.0
  • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import oneclick "github.com/defuse-protocol/one-click-sdk-go"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value oneclick.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), oneclick.ContextServerIndex, 1)
Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value oneclick.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), oneclick.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using oneclick.ContextOperationServerIndices and oneclick.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), oneclick.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), oneclick.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://1click.chaindefuser.com

Class Method HTTP request Description
OneClickAPI GetExecutionStatus Get /v0/status Check swap execution status
OneClickAPI GetQuote Post /v0/quote Request a swap quote
OneClickAPI GetTokens Get /v0/tokens Get supported tokens
OneClickAPI SubmitDepositTx Post /v0/deposit/submit Submit deposit transaction hash

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

JWT-auth
  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), oneclick.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
	XmlCheck  = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
)
View Source
var (
	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextServerIndex uses a server configuration from the index.
	ContextServerIndex = contextKey("serverIndex")

	// ContextOperationServerIndices uses a server configuration from the index mapping.
	ContextOperationServerIndices = contextKey("serverOperationIndices")

	// ContextServerVariables overrides a server configuration variables.
	ContextServerVariables = contextKey("serverVariables")

	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
	ContextOperationServerVariables = contextKey("serverOperationVariables")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func IsNil

func IsNil(i interface{}) bool

IsNil checks if an input is nil

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

Types

type APIClient

type APIClient struct {
	OneClickAPI *OneClickAPIService
	// contains filtered or unexported fields
}

APIClient manages communication with the 1Click Swap API API v0.1.8 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResponse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type ApiGetExecutionStatusRequest

type ApiGetExecutionStatusRequest struct {
	ApiService *OneClickAPIService
	// contains filtered or unexported fields
}

func (ApiGetExecutionStatusRequest) DepositAddress

func (r ApiGetExecutionStatusRequest) DepositAddress(depositAddress string) ApiGetExecutionStatusRequest

func (ApiGetExecutionStatusRequest) Execute

type ApiGetQuoteRequest

type ApiGetQuoteRequest struct {
	ApiService *OneClickAPIService
	// contains filtered or unexported fields
}

func (ApiGetQuoteRequest) Execute

func (ApiGetQuoteRequest) QuoteRequest

func (r ApiGetQuoteRequest) QuoteRequest(quoteRequest QuoteRequest) ApiGetQuoteRequest

type ApiGetTokensRequest

type ApiGetTokensRequest struct {
	ApiService *OneClickAPIService
	// contains filtered or unexported fields
}

func (ApiGetTokensRequest) Execute

type ApiSubmitDepositTxRequest

type ApiSubmitDepositTxRequest struct {
	ApiService *OneClickAPIService
	// contains filtered or unexported fields
}

func (ApiSubmitDepositTxRequest) Execute

func (ApiSubmitDepositTxRequest) SubmitDepositTxRequest

func (r ApiSubmitDepositTxRequest) SubmitDepositTxRequest(submitDepositTxRequest SubmitDepositTxRequest) ApiSubmitDepositTxRequest

type AppFee

type AppFee struct {
	// Intents Account ID where this fee will be transferred to
	Recipient string `json:"recipient"`
	// Fee for this recipient as part of amountIn in basis points (1/100th of a percent), e.g. 100 for 1% fee
	Fee float32 `json:"fee"`
}

AppFee struct for AppFee

func NewAppFee

func NewAppFee(recipient string, fee float32) *AppFee

NewAppFee instantiates a new AppFee object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewAppFeeWithDefaults

func NewAppFeeWithDefaults() *AppFee

NewAppFeeWithDefaults instantiates a new AppFee object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*AppFee) GetFee

func (o *AppFee) GetFee() float32

GetFee returns the Fee field value

func (*AppFee) GetFeeOk

func (o *AppFee) GetFeeOk() (*float32, bool)

GetFeeOk returns a tuple with the Fee field value and a boolean to check if the value has been set.

func (*AppFee) GetRecipient

func (o *AppFee) GetRecipient() string

GetRecipient returns the Recipient field value

func (*AppFee) GetRecipientOk

func (o *AppFee) GetRecipientOk() (*string, bool)

GetRecipientOk returns a tuple with the Recipient field value and a boolean to check if the value has been set.

func (AppFee) MarshalJSON

func (o AppFee) MarshalJSON() ([]byte, error)

func (*AppFee) SetFee

func (o *AppFee) SetFee(v float32)

SetFee sets field value

func (*AppFee) SetRecipient

func (o *AppFee) SetRecipient(v string)

SetRecipient sets field value

func (AppFee) ToMap

func (o AppFee) ToMap() (map[string]interface{}, error)

func (*AppFee) UnmarshalJSON

func (o *AppFee) UnmarshalJSON(data []byte) (err error)

type BadRequestResponse

type BadRequestResponse struct {
	Message string `json:"message"`
}

BadRequestResponse struct for BadRequestResponse

func NewBadRequestResponse

func NewBadRequestResponse(message string) *BadRequestResponse

NewBadRequestResponse instantiates a new BadRequestResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewBadRequestResponseWithDefaults

func NewBadRequestResponseWithDefaults() *BadRequestResponse

NewBadRequestResponseWithDefaults instantiates a new BadRequestResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*BadRequestResponse) GetMessage

func (o *BadRequestResponse) GetMessage() string

GetMessage returns the Message field value

func (*BadRequestResponse) GetMessageOk

func (o *BadRequestResponse) GetMessageOk() (*string, bool)

GetMessageOk returns a tuple with the Message field value and a boolean to check if the value has been set.

func (BadRequestResponse) MarshalJSON

func (o BadRequestResponse) MarshalJSON() ([]byte, error)

func (*BadRequestResponse) SetMessage

func (o *BadRequestResponse) SetMessage(v string)

SetMessage sets field value

func (BadRequestResponse) ToMap

func (o BadRequestResponse) ToMap() (map[string]interface{}, error)

func (*BadRequestResponse) UnmarshalJSON

func (o *BadRequestResponse) UnmarshalJSON(data []byte) (err error)

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	Host             string            `json:"host,omitempty"`
	Scheme           string            `json:"scheme,omitempty"`
	DefaultHeader    map[string]string `json:"defaultHeader,omitempty"`
	UserAgent        string            `json:"userAgent,omitempty"`
	Debug            bool              `json:"debug,omitempty"`
	Servers          ServerConfigurations
	OperationServers map[string]ServerConfigurations
	HTTPClient       *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerURL

func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)

ServerURL returns URL based on server settings

func (*Configuration) ServerURLWithContext

func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)

ServerURLWithContext returns a new server URL given an endpoint

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetExecutionStatusResponse

type GetExecutionStatusResponse struct {
	// Quote response from original request
	QuoteResponse QuoteResponse `json:"quoteResponse"`
	Status        string        `json:"status"`
	// Last time the state was updated
	UpdatedAt time.Time `json:"updatedAt"`
	// Details of actual swaps and withdrawals
	SwapDetails SwapDetails `json:"swapDetails"`
}

GetExecutionStatusResponse struct for GetExecutionStatusResponse

func NewGetExecutionStatusResponse

func NewGetExecutionStatusResponse(quoteResponse QuoteResponse, status string, updatedAt time.Time, swapDetails SwapDetails) *GetExecutionStatusResponse

NewGetExecutionStatusResponse instantiates a new GetExecutionStatusResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewGetExecutionStatusResponseWithDefaults

func NewGetExecutionStatusResponseWithDefaults() *GetExecutionStatusResponse

NewGetExecutionStatusResponseWithDefaults instantiates a new GetExecutionStatusResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*GetExecutionStatusResponse) GetQuoteResponse

func (o *GetExecutionStatusResponse) GetQuoteResponse() QuoteResponse

GetQuoteResponse returns the QuoteResponse field value

func (*GetExecutionStatusResponse) GetQuoteResponseOk

func (o *GetExecutionStatusResponse) GetQuoteResponseOk() (*QuoteResponse, bool)

GetQuoteResponseOk returns a tuple with the QuoteResponse field value and a boolean to check if the value has been set.

func (*GetExecutionStatusResponse) GetStatus

func (o *GetExecutionStatusResponse) GetStatus() string

GetStatus returns the Status field value

func (*GetExecutionStatusResponse) GetStatusOk

func (o *GetExecutionStatusResponse) GetStatusOk() (*string, bool)

GetStatusOk returns a tuple with the Status field value and a boolean to check if the value has been set.

func (*GetExecutionStatusResponse) GetSwapDetails

func (o *GetExecutionStatusResponse) GetSwapDetails() SwapDetails

GetSwapDetails returns the SwapDetails field value

func (*GetExecutionStatusResponse) GetSwapDetailsOk

func (o *GetExecutionStatusResponse) GetSwapDetailsOk() (*SwapDetails, bool)

GetSwapDetailsOk returns a tuple with the SwapDetails field value and a boolean to check if the value has been set.

func (*GetExecutionStatusResponse) GetUpdatedAt

func (o *GetExecutionStatusResponse) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field value

func (*GetExecutionStatusResponse) GetUpdatedAtOk

func (o *GetExecutionStatusResponse) GetUpdatedAtOk() (*time.Time, bool)

GetUpdatedAtOk returns a tuple with the UpdatedAt field value and a boolean to check if the value has been set.

func (GetExecutionStatusResponse) MarshalJSON

func (o GetExecutionStatusResponse) MarshalJSON() ([]byte, error)

func (*GetExecutionStatusResponse) SetQuoteResponse

func (o *GetExecutionStatusResponse) SetQuoteResponse(v QuoteResponse)

SetQuoteResponse sets field value

func (*GetExecutionStatusResponse) SetStatus

func (o *GetExecutionStatusResponse) SetStatus(v string)

SetStatus sets field value

func (*GetExecutionStatusResponse) SetSwapDetails

func (o *GetExecutionStatusResponse) SetSwapDetails(v SwapDetails)

SetSwapDetails sets field value

func (*GetExecutionStatusResponse) SetUpdatedAt

func (o *GetExecutionStatusResponse) SetUpdatedAt(v time.Time)

SetUpdatedAt sets field value

func (GetExecutionStatusResponse) ToMap

func (o GetExecutionStatusResponse) ToMap() (map[string]interface{}, error)

func (*GetExecutionStatusResponse) UnmarshalJSON

func (o *GetExecutionStatusResponse) UnmarshalJSON(data []byte) (err error)

type MappedNullable

type MappedNullable interface {
	ToMap() (map[string]interface{}, error)
}

type NullableAppFee

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

func NewNullableAppFee

func NewNullableAppFee(val *AppFee) *NullableAppFee

func (NullableAppFee) Get

func (v NullableAppFee) Get() *AppFee

func (NullableAppFee) IsSet

func (v NullableAppFee) IsSet() bool

func (NullableAppFee) MarshalJSON

func (v NullableAppFee) MarshalJSON() ([]byte, error)

func (*NullableAppFee) Set

func (v *NullableAppFee) Set(val *AppFee)

func (*NullableAppFee) UnmarshalJSON

func (v *NullableAppFee) UnmarshalJSON(src []byte) error

func (*NullableAppFee) Unset

func (v *NullableAppFee) Unset()

type NullableBadRequestResponse

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

func NewNullableBadRequestResponse

func NewNullableBadRequestResponse(val *BadRequestResponse) *NullableBadRequestResponse

func (NullableBadRequestResponse) Get

func (NullableBadRequestResponse) IsSet

func (v NullableBadRequestResponse) IsSet() bool

func (NullableBadRequestResponse) MarshalJSON

func (v NullableBadRequestResponse) MarshalJSON() ([]byte, error)

func (*NullableBadRequestResponse) Set

func (*NullableBadRequestResponse) UnmarshalJSON

func (v *NullableBadRequestResponse) UnmarshalJSON(src []byte) error

func (*NullableBadRequestResponse) Unset

func (v *NullableBadRequestResponse) Unset()

type NullableBool

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

func NewNullableBool

func NewNullableBool(val *bool) *NullableBool

func (NullableBool) Get

func (v NullableBool) Get() *bool

func (NullableBool) IsSet

func (v NullableBool) IsSet() bool

func (NullableBool) MarshalJSON

func (v NullableBool) MarshalJSON() ([]byte, error)

func (*NullableBool) Set

func (v *NullableBool) Set(val *bool)

func (*NullableBool) UnmarshalJSON

func (v *NullableBool) UnmarshalJSON(src []byte) error

func (*NullableBool) Unset

func (v *NullableBool) Unset()

type NullableFloat32

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

func NewNullableFloat32

func NewNullableFloat32(val *float32) *NullableFloat32

func (NullableFloat32) Get

func (v NullableFloat32) Get() *float32

func (NullableFloat32) IsSet

func (v NullableFloat32) IsSet() bool

func (NullableFloat32) MarshalJSON

func (v NullableFloat32) MarshalJSON() ([]byte, error)

func (*NullableFloat32) Set

func (v *NullableFloat32) Set(val *float32)

func (*NullableFloat32) UnmarshalJSON

func (v *NullableFloat32) UnmarshalJSON(src []byte) error

func (*NullableFloat32) Unset

func (v *NullableFloat32) Unset()

type NullableFloat64

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

func NewNullableFloat64

func NewNullableFloat64(val *float64) *NullableFloat64

func (NullableFloat64) Get

func (v NullableFloat64) Get() *float64

func (NullableFloat64) IsSet

func (v NullableFloat64) IsSet() bool

func (NullableFloat64) MarshalJSON

func (v NullableFloat64) MarshalJSON() ([]byte, error)

func (*NullableFloat64) Set

func (v *NullableFloat64) Set(val *float64)

func (*NullableFloat64) UnmarshalJSON

func (v *NullableFloat64) UnmarshalJSON(src []byte) error

func (*NullableFloat64) Unset

func (v *NullableFloat64) Unset()

type NullableGetExecutionStatusResponse

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

func (NullableGetExecutionStatusResponse) Get

func (NullableGetExecutionStatusResponse) IsSet

func (NullableGetExecutionStatusResponse) MarshalJSON

func (v NullableGetExecutionStatusResponse) MarshalJSON() ([]byte, error)

func (*NullableGetExecutionStatusResponse) Set

func (*NullableGetExecutionStatusResponse) UnmarshalJSON

func (v *NullableGetExecutionStatusResponse) UnmarshalJSON(src []byte) error

func (*NullableGetExecutionStatusResponse) Unset

type NullableInt

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

func NewNullableInt

func NewNullableInt(val *int) *NullableInt

func (NullableInt) Get

func (v NullableInt) Get() *int

func (NullableInt) IsSet

func (v NullableInt) IsSet() bool

func (NullableInt) MarshalJSON

func (v NullableInt) MarshalJSON() ([]byte, error)

func (*NullableInt) Set

func (v *NullableInt) Set(val *int)

func (*NullableInt) UnmarshalJSON

func (v *NullableInt) UnmarshalJSON(src []byte) error

func (*NullableInt) Unset

func (v *NullableInt) Unset()

type NullableInt32

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

func NewNullableInt32

func NewNullableInt32(val *int32) *NullableInt32

func (NullableInt32) Get

func (v NullableInt32) Get() *int32

func (NullableInt32) IsSet

func (v NullableInt32) IsSet() bool

func (NullableInt32) MarshalJSON

func (v NullableInt32) MarshalJSON() ([]byte, error)

func (*NullableInt32) Set

func (v *NullableInt32) Set(val *int32)

func (*NullableInt32) UnmarshalJSON

func (v *NullableInt32) UnmarshalJSON(src []byte) error

func (*NullableInt32) Unset

func (v *NullableInt32) Unset()

type NullableInt64

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

func NewNullableInt64

func NewNullableInt64(val *int64) *NullableInt64

func (NullableInt64) Get

func (v NullableInt64) Get() *int64

func (NullableInt64) IsSet

func (v NullableInt64) IsSet() bool

func (NullableInt64) MarshalJSON

func (v NullableInt64) MarshalJSON() ([]byte, error)

func (*NullableInt64) Set

func (v *NullableInt64) Set(val *int64)

func (*NullableInt64) UnmarshalJSON

func (v *NullableInt64) UnmarshalJSON(src []byte) error

func (*NullableInt64) Unset

func (v *NullableInt64) Unset()

type NullableQuote

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

func NewNullableQuote

func NewNullableQuote(val *Quote) *NullableQuote

func (NullableQuote) Get

func (v NullableQuote) Get() *Quote

func (NullableQuote) IsSet

func (v NullableQuote) IsSet() bool

func (NullableQuote) MarshalJSON

func (v NullableQuote) MarshalJSON() ([]byte, error)

func (*NullableQuote) Set

func (v *NullableQuote) Set(val *Quote)

func (*NullableQuote) UnmarshalJSON

func (v *NullableQuote) UnmarshalJSON(src []byte) error

func (*NullableQuote) Unset

func (v *NullableQuote) Unset()

type NullableQuoteRequest

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

func NewNullableQuoteRequest

func NewNullableQuoteRequest(val *QuoteRequest) *NullableQuoteRequest

func (NullableQuoteRequest) Get

func (NullableQuoteRequest) IsSet

func (v NullableQuoteRequest) IsSet() bool

func (NullableQuoteRequest) MarshalJSON

func (v NullableQuoteRequest) MarshalJSON() ([]byte, error)

func (*NullableQuoteRequest) Set

func (v *NullableQuoteRequest) Set(val *QuoteRequest)

func (*NullableQuoteRequest) UnmarshalJSON

func (v *NullableQuoteRequest) UnmarshalJSON(src []byte) error

func (*NullableQuoteRequest) Unset

func (v *NullableQuoteRequest) Unset()

type NullableQuoteResponse

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

func NewNullableQuoteResponse

func NewNullableQuoteResponse(val *QuoteResponse) *NullableQuoteResponse

func (NullableQuoteResponse) Get

func (NullableQuoteResponse) IsSet

func (v NullableQuoteResponse) IsSet() bool

func (NullableQuoteResponse) MarshalJSON

func (v NullableQuoteResponse) MarshalJSON() ([]byte, error)

func (*NullableQuoteResponse) Set

func (v *NullableQuoteResponse) Set(val *QuoteResponse)

func (*NullableQuoteResponse) UnmarshalJSON

func (v *NullableQuoteResponse) UnmarshalJSON(src []byte) error

func (*NullableQuoteResponse) Unset

func (v *NullableQuoteResponse) Unset()

type NullableString

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

func NewNullableString

func NewNullableString(val *string) *NullableString

func (NullableString) Get

func (v NullableString) Get() *string

func (NullableString) IsSet

func (v NullableString) IsSet() bool

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

func (*NullableString) Set

func (v *NullableString) Set(val *string)

func (*NullableString) UnmarshalJSON

func (v *NullableString) UnmarshalJSON(src []byte) error

func (*NullableString) Unset

func (v *NullableString) Unset()

type NullableSubmitDepositTxRequest

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

func (NullableSubmitDepositTxRequest) Get

func (NullableSubmitDepositTxRequest) IsSet

func (NullableSubmitDepositTxRequest) MarshalJSON

func (v NullableSubmitDepositTxRequest) MarshalJSON() ([]byte, error)

func (*NullableSubmitDepositTxRequest) Set

func (*NullableSubmitDepositTxRequest) UnmarshalJSON

func (v *NullableSubmitDepositTxRequest) UnmarshalJSON(src []byte) error

func (*NullableSubmitDepositTxRequest) Unset

func (v *NullableSubmitDepositTxRequest) Unset()

type NullableSubmitDepositTxResponse

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

func (NullableSubmitDepositTxResponse) Get

func (NullableSubmitDepositTxResponse) IsSet

func (NullableSubmitDepositTxResponse) MarshalJSON

func (v NullableSubmitDepositTxResponse) MarshalJSON() ([]byte, error)

func (*NullableSubmitDepositTxResponse) Set

func (*NullableSubmitDepositTxResponse) UnmarshalJSON

func (v *NullableSubmitDepositTxResponse) UnmarshalJSON(src []byte) error

func (*NullableSubmitDepositTxResponse) Unset

type NullableSwapDetails

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

func NewNullableSwapDetails

func NewNullableSwapDetails(val *SwapDetails) *NullableSwapDetails

func (NullableSwapDetails) Get

func (NullableSwapDetails) IsSet

func (v NullableSwapDetails) IsSet() bool

func (NullableSwapDetails) MarshalJSON

func (v NullableSwapDetails) MarshalJSON() ([]byte, error)

func (*NullableSwapDetails) Set

func (v *NullableSwapDetails) Set(val *SwapDetails)

func (*NullableSwapDetails) UnmarshalJSON

func (v *NullableSwapDetails) UnmarshalJSON(src []byte) error

func (*NullableSwapDetails) Unset

func (v *NullableSwapDetails) Unset()

type NullableTime

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

func NewNullableTime

func NewNullableTime(val *time.Time) *NullableTime

func (NullableTime) Get

func (v NullableTime) Get() *time.Time

func (NullableTime) IsSet

func (v NullableTime) IsSet() bool

func (NullableTime) MarshalJSON

func (v NullableTime) MarshalJSON() ([]byte, error)

func (*NullableTime) Set

func (v *NullableTime) Set(val *time.Time)

func (*NullableTime) UnmarshalJSON

func (v *NullableTime) UnmarshalJSON(src []byte) error

func (*NullableTime) Unset

func (v *NullableTime) Unset()

type NullableTokenResponse

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

func NewNullableTokenResponse

func NewNullableTokenResponse(val *TokenResponse) *NullableTokenResponse

func (NullableTokenResponse) Get

func (NullableTokenResponse) IsSet

func (v NullableTokenResponse) IsSet() bool

func (NullableTokenResponse) MarshalJSON

func (v NullableTokenResponse) MarshalJSON() ([]byte, error)

func (*NullableTokenResponse) Set

func (v *NullableTokenResponse) Set(val *TokenResponse)

func (*NullableTokenResponse) UnmarshalJSON

func (v *NullableTokenResponse) UnmarshalJSON(src []byte) error

func (*NullableTokenResponse) Unset

func (v *NullableTokenResponse) Unset()

type NullableTransactionDetails

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

func NewNullableTransactionDetails

func NewNullableTransactionDetails(val *TransactionDetails) *NullableTransactionDetails

func (NullableTransactionDetails) Get

func (NullableTransactionDetails) IsSet

func (v NullableTransactionDetails) IsSet() bool

func (NullableTransactionDetails) MarshalJSON

func (v NullableTransactionDetails) MarshalJSON() ([]byte, error)

func (*NullableTransactionDetails) Set

func (*NullableTransactionDetails) UnmarshalJSON

func (v *NullableTransactionDetails) UnmarshalJSON(src []byte) error

func (*NullableTransactionDetails) Unset

func (v *NullableTransactionDetails) Unset()

type OneClickAPIService

type OneClickAPIService service

OneClickAPIService OneClickAPI service

func (*OneClickAPIService) GetExecutionStatus

GetExecutionStatus Check swap execution status

Retrieves the current status of a swap using the unique deposit address from the quote.

The response includes the state of the swap (e.g., pending, processing, success, refunded) and any associated swap and transaction details.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetExecutionStatusRequest

func (*OneClickAPIService) GetExecutionStatusExecute

Execute executes the request

@return GetExecutionStatusResponse

func (*OneClickAPIService) GetQuote

GetQuote Request a swap quote

Generates a swap quote based on input parameters such as the assets, amount, slippage tolerance, and recipient/refund information.

Returns pricing details, estimated time, and a unique **deposit address** to which tokens must be transferred to initiate the swap.

You can set the `dry` parameter to `true` to simulate the quote request **without generating a deposit address** or initiating the swap process. This is useful for previewing swap parameters or validating input data without committing to an actual swap.

This endpoint is the first required step in the swap process.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetQuoteRequest

func (*OneClickAPIService) GetQuoteExecute

Execute executes the request

@return QuoteResponse

func (*OneClickAPIService) GetTokens

GetTokens Get supported tokens

Retrieves a list of tokens currently supported by the 1Click API for asset swaps.

Each token entry includes its blockchain, contract address (if available), price in USD, and other metadata such as symbol and decimals.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetTokensRequest

func (*OneClickAPIService) GetTokensExecute

Execute executes the request

@return []TokenResponse

func (*OneClickAPIService) SubmitDepositTx

SubmitDepositTx Submit deposit transaction hash

Optionally notifies the 1Click service that a deposit has been sent to the specified address, using the blockchain transaction hash.

This step can speed up swap processing by allowing the system to preemptively verify the deposit.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiSubmitDepositTxRequest

func (*OneClickAPIService) SubmitDepositTxExecute

Execute executes the request

@return SubmitDepositTxResponse

type Quote

type Quote struct {
	// The deposit address on the chain of `originAsset` in case if `depositType` is `ORIGIN_CHAIN`.  The deposit address inside of near intents (the verifier smart contract) in case if `depositType` is `INTENTS`.
	DepositAddress *string `json:"depositAddress,omitempty"`
	// Amount of the origin asset
	AmountIn string `json:"amountIn"`
	// Amount of the origin asset in readable format
	AmountInFormatted string `json:"amountInFormatted"`
	// Amount of the origin assets equivalent in USD
	AmountInUsd string `json:"amountInUsd"`
	// Minimum amount of the origin asset that will be used for swap
	MinAmountIn string `json:"minAmountIn"`
	// Amount of the destination asset
	AmountOut string `json:"amountOut"`
	// Amount of the destination asset in readable format
	AmountOutFormatted string `json:"amountOutFormatted"`
	// Amount of the destination asset equivalent in USD
	AmountOutUsd string `json:"amountOutUsd"`
	// Minimum amount with slippage taken into account
	MinAmountOut string `json:"minAmountOut"`
	// Time when the deposit address will become inactive and funds might be lost
	Deadline *time.Time `json:"deadline,omitempty"`
	// Time when the deposit address will become cold and swap processing will take more time
	TimeWhenInactive *time.Time `json:"timeWhenInactive,omitempty"`
	// Estimated time in seconds for swap to be executed after the deposit transaction is confirmed
	TimeEstimate float32 `json:"timeEstimate"`
	// EVM address of a transfer recipient in a virtual chain
	VirtualChainRecipient *string `json:"virtualChainRecipient,omitempty"`
	// EVM address of a refund recipient in a virtual chain
	VirtualChainRefundRecipient *string `json:"virtualChainRefundRecipient,omitempty"`
}

Quote struct for Quote

func NewQuote

func NewQuote(amountIn string, amountInFormatted string, amountInUsd string, minAmountIn string, amountOut string, amountOutFormatted string, amountOutUsd string, minAmountOut string, timeEstimate float32) *Quote

NewQuote instantiates a new Quote object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewQuoteWithDefaults

func NewQuoteWithDefaults() *Quote

NewQuoteWithDefaults instantiates a new Quote object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Quote) GetAmountIn

func (o *Quote) GetAmountIn() string

GetAmountIn returns the AmountIn field value

func (*Quote) GetAmountInFormatted

func (o *Quote) GetAmountInFormatted() string

GetAmountInFormatted returns the AmountInFormatted field value

func (*Quote) GetAmountInFormattedOk

func (o *Quote) GetAmountInFormattedOk() (*string, bool)

GetAmountInFormattedOk returns a tuple with the AmountInFormatted field value and a boolean to check if the value has been set.

func (*Quote) GetAmountInOk

func (o *Quote) GetAmountInOk() (*string, bool)

GetAmountInOk returns a tuple with the AmountIn field value and a boolean to check if the value has been set.

func (*Quote) GetAmountInUsd

func (o *Quote) GetAmountInUsd() string

GetAmountInUsd returns the AmountInUsd field value

func (*Quote) GetAmountInUsdOk

func (o *Quote) GetAmountInUsdOk() (*string, bool)

GetAmountInUsdOk returns a tuple with the AmountInUsd field value and a boolean to check if the value has been set.

func (*Quote) GetAmountOut

func (o *Quote) GetAmountOut() string

GetAmountOut returns the AmountOut field value

func (*Quote) GetAmountOutFormatted

func (o *Quote) GetAmountOutFormatted() string

GetAmountOutFormatted returns the AmountOutFormatted field value

func (*Quote) GetAmountOutFormattedOk

func (o *Quote) GetAmountOutFormattedOk() (*string, bool)

GetAmountOutFormattedOk returns a tuple with the AmountOutFormatted field value and a boolean to check if the value has been set.

func (*Quote) GetAmountOutOk

func (o *Quote) GetAmountOutOk() (*string, bool)

GetAmountOutOk returns a tuple with the AmountOut field value and a boolean to check if the value has been set.

func (*Quote) GetAmountOutUsd

func (o *Quote) GetAmountOutUsd() string

GetAmountOutUsd returns the AmountOutUsd field value

func (*Quote) GetAmountOutUsdOk

func (o *Quote) GetAmountOutUsdOk() (*string, bool)

GetAmountOutUsdOk returns a tuple with the AmountOutUsd field value and a boolean to check if the value has been set.

func (*Quote) GetDeadline

func (o *Quote) GetDeadline() time.Time

GetDeadline returns the Deadline field value if set, zero value otherwise.

func (*Quote) GetDeadlineOk

func (o *Quote) GetDeadlineOk() (*time.Time, bool)

GetDeadlineOk returns a tuple with the Deadline field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Quote) GetDepositAddress

func (o *Quote) GetDepositAddress() string

GetDepositAddress returns the DepositAddress field value if set, zero value otherwise.

func (*Quote) GetDepositAddressOk

func (o *Quote) GetDepositAddressOk() (*string, bool)

GetDepositAddressOk returns a tuple with the DepositAddress field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Quote) GetMinAmountIn

func (o *Quote) GetMinAmountIn() string

GetMinAmountIn returns the MinAmountIn field value

func (*Quote) GetMinAmountInOk

func (o *Quote) GetMinAmountInOk() (*string, bool)

GetMinAmountInOk returns a tuple with the MinAmountIn field value and a boolean to check if the value has been set.

func (*Quote) GetMinAmountOut

func (o *Quote) GetMinAmountOut() string

GetMinAmountOut returns the MinAmountOut field value

func (*Quote) GetMinAmountOutOk

func (o *Quote) GetMinAmountOutOk() (*string, bool)

GetMinAmountOutOk returns a tuple with the MinAmountOut field value and a boolean to check if the value has been set.

func (*Quote) GetTimeEstimate

func (o *Quote) GetTimeEstimate() float32

GetTimeEstimate returns the TimeEstimate field value

func (*Quote) GetTimeEstimateOk

func (o *Quote) GetTimeEstimateOk() (*float32, bool)

GetTimeEstimateOk returns a tuple with the TimeEstimate field value and a boolean to check if the value has been set.

func (*Quote) GetTimeWhenInactive

func (o *Quote) GetTimeWhenInactive() time.Time

GetTimeWhenInactive returns the TimeWhenInactive field value if set, zero value otherwise.

func (*Quote) GetTimeWhenInactiveOk

func (o *Quote) GetTimeWhenInactiveOk() (*time.Time, bool)

GetTimeWhenInactiveOk returns a tuple with the TimeWhenInactive field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Quote) GetVirtualChainRecipient added in v0.1.7

func (o *Quote) GetVirtualChainRecipient() string

GetVirtualChainRecipient returns the VirtualChainRecipient field value if set, zero value otherwise.

func (*Quote) GetVirtualChainRecipientOk added in v0.1.7

func (o *Quote) GetVirtualChainRecipientOk() (*string, bool)

GetVirtualChainRecipientOk returns a tuple with the VirtualChainRecipient field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Quote) GetVirtualChainRefundRecipient added in v0.1.7

func (o *Quote) GetVirtualChainRefundRecipient() string

GetVirtualChainRefundRecipient returns the VirtualChainRefundRecipient field value if set, zero value otherwise.

func (*Quote) GetVirtualChainRefundRecipientOk added in v0.1.7

func (o *Quote) GetVirtualChainRefundRecipientOk() (*string, bool)

GetVirtualChainRefundRecipientOk returns a tuple with the VirtualChainRefundRecipient field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Quote) HasDeadline

func (o *Quote) HasDeadline() bool

HasDeadline returns a boolean if a field has been set.

func (*Quote) HasDepositAddress

func (o *Quote) HasDepositAddress() bool

HasDepositAddress returns a boolean if a field has been set.

func (*Quote) HasTimeWhenInactive

func (o *Quote) HasTimeWhenInactive() bool

HasTimeWhenInactive returns a boolean if a field has been set.

func (*Quote) HasVirtualChainRecipient added in v0.1.7

func (o *Quote) HasVirtualChainRecipient() bool

HasVirtualChainRecipient returns a boolean if a field has been set.

func (*Quote) HasVirtualChainRefundRecipient added in v0.1.7

func (o *Quote) HasVirtualChainRefundRecipient() bool

HasVirtualChainRefundRecipient returns a boolean if a field has been set.

func (Quote) MarshalJSON

func (o Quote) MarshalJSON() ([]byte, error)

func (*Quote) SetAmountIn

func (o *Quote) SetAmountIn(v string)

SetAmountIn sets field value

func (*Quote) SetAmountInFormatted

func (o *Quote) SetAmountInFormatted(v string)

SetAmountInFormatted sets field value

func (*Quote) SetAmountInUsd

func (o *Quote) SetAmountInUsd(v string)

SetAmountInUsd sets field value

func (*Quote) SetAmountOut

func (o *Quote) SetAmountOut(v string)

SetAmountOut sets field value

func (*Quote) SetAmountOutFormatted

func (o *Quote) SetAmountOutFormatted(v string)

SetAmountOutFormatted sets field value

func (*Quote) SetAmountOutUsd

func (o *Quote) SetAmountOutUsd(v string)

SetAmountOutUsd sets field value

func (*Quote) SetDeadline

func (o *Quote) SetDeadline(v time.Time)

SetDeadline gets a reference to the given time.Time and assigns it to the Deadline field.

func (*Quote) SetDepositAddress

func (o *Quote) SetDepositAddress(v string)

SetDepositAddress gets a reference to the given string and assigns it to the DepositAddress field.

func (*Quote) SetMinAmountIn

func (o *Quote) SetMinAmountIn(v string)

SetMinAmountIn sets field value

func (*Quote) SetMinAmountOut

func (o *Quote) SetMinAmountOut(v string)

SetMinAmountOut sets field value

func (*Quote) SetTimeEstimate

func (o *Quote) SetTimeEstimate(v float32)

SetTimeEstimate sets field value

func (*Quote) SetTimeWhenInactive

func (o *Quote) SetTimeWhenInactive(v time.Time)

SetTimeWhenInactive gets a reference to the given time.Time and assigns it to the TimeWhenInactive field.

func (*Quote) SetVirtualChainRecipient added in v0.1.7

func (o *Quote) SetVirtualChainRecipient(v string)

SetVirtualChainRecipient gets a reference to the given string and assigns it to the VirtualChainRecipient field.

func (*Quote) SetVirtualChainRefundRecipient added in v0.1.7

func (o *Quote) SetVirtualChainRefundRecipient(v string)

SetVirtualChainRefundRecipient gets a reference to the given string and assigns it to the VirtualChainRefundRecipient field.

func (Quote) ToMap

func (o Quote) ToMap() (map[string]interface{}, error)

func (*Quote) UnmarshalJSON

func (o *Quote) UnmarshalJSON(data []byte) (err error)

type QuoteRequest

type QuoteRequest struct {
	// Flag indicating whether this is a dry run request. If `true`, the response will **NOT** contain the following fields: - `depositAddress` - `timeWhenInactive` - `deadline`
	Dry bool `json:"dry"`
	// Whether to use the amount as the output or the input for the basis of the swap: - `EXACT_INPUT` - request output amount for exact input. - `EXACT_OUTPUT` - request output amount for exact output. The `refundTo` address will always receive excess tokens back even after the swap is complete. - `FLEX_INPUT` - flexible input amount that allows for partial deposits and variable amounts.
	SwapType string `json:"swapType"`
	// Slippage tolerance for the swap. This value is in basis points (1/100th of a percent), e.g. 100 for 1% slippage.
	SlippageTolerance float32 `json:"slippageTolerance"`
	// ID of the origin asset.
	OriginAsset string `json:"originAsset"`
	// Type of the deposit address: - `ORIGIN_CHAIN` - deposit address on the origin chain - `INTENTS` - **account ID** inside near intents to which you should transfer assets inside intents.
	DepositType string `json:"depositType"`
	// ID of the destination asset.
	DestinationAsset string `json:"destinationAsset"`
	// Amount to swap as the base amount (can be switched to exact input/output using the dedicated flag), denoted in the smallest unit of the specified currency (e.g., wei for ETH).
	Amount string `json:"amount"`
	// Address for user refund.
	RefundTo string `json:"refundTo"`
	// Type of refund address: - `ORIGIN_CHAIN` - assets will be refunded to `refundTo` address on the origin chain - `INTENTS` - assets will be refunded to `refundTo` intents account
	RefundType string `json:"refundType"`
	// Recipient address. The format should match `recipientType`.
	Recipient string `json:"recipient"`
	// EVM address of a transfer recipient in a virtual chain
	VirtualChainRecipient *string `json:"virtualChainRecipient,omitempty"`
	// EVM address of a refund recipient in a virtual chain
	VirtualChainRefundRecipient *string `json:"virtualChainRefundRecipient,omitempty"`
	// Type of recipient address: - `DESTINATION_CHAIN` - assets will be transferred to chain of `destinationAsset` - `INTENTS` - assets will be transferred to account inside intents
	RecipientType string `json:"recipientType"`
	// Timestamp in ISO format, that identifies when user refund will begin if the swap isn't completed by then. It needs to exceed the time required for the deposit tx to be minted, e.g. for Bitcoin it might require ~1h depending on the gas fees paid.
	Deadline time.Time `json:"deadline"`
	// Referral identifier(lower case only). It will be reflected in the on-chain data and displayed on public analytics platforms.
	Referral *string `json:"referral,omitempty"`
	// Time in milliseconds user is willing to wait for quote from relay.
	QuoteWaitingTimeMs *float32 `json:"quoteWaitingTimeMs,omitempty"`
	// List of recipients and their fees
	AppFees []AppFee `json:"appFees,omitempty"`
}

QuoteRequest struct for QuoteRequest

func NewQuoteRequest

func NewQuoteRequest(dry bool, swapType string, slippageTolerance float32, originAsset string, depositType string, destinationAsset string, amount string, refundTo string, refundType string, recipient string, recipientType string, deadline time.Time) *QuoteRequest

NewQuoteRequest instantiates a new QuoteRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewQuoteRequestWithDefaults

func NewQuoteRequestWithDefaults() *QuoteRequest

NewQuoteRequestWithDefaults instantiates a new QuoteRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*QuoteRequest) GetAmount

func (o *QuoteRequest) GetAmount() string

GetAmount returns the Amount field value

func (*QuoteRequest) GetAmountOk

func (o *QuoteRequest) GetAmountOk() (*string, bool)

GetAmountOk returns a tuple with the Amount field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetAppFees

func (o *QuoteRequest) GetAppFees() []AppFee

GetAppFees returns the AppFees field value if set, zero value otherwise.

func (*QuoteRequest) GetAppFeesOk

func (o *QuoteRequest) GetAppFeesOk() ([]AppFee, bool)

GetAppFeesOk returns a tuple with the AppFees field value if set, nil otherwise and a boolean to check if the value has been set.

func (*QuoteRequest) GetDeadline

func (o *QuoteRequest) GetDeadline() time.Time

GetDeadline returns the Deadline field value

func (*QuoteRequest) GetDeadlineOk

func (o *QuoteRequest) GetDeadlineOk() (*time.Time, bool)

GetDeadlineOk returns a tuple with the Deadline field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetDepositType

func (o *QuoteRequest) GetDepositType() string

GetDepositType returns the DepositType field value

func (*QuoteRequest) GetDepositTypeOk

func (o *QuoteRequest) GetDepositTypeOk() (*string, bool)

GetDepositTypeOk returns a tuple with the DepositType field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetDestinationAsset

func (o *QuoteRequest) GetDestinationAsset() string

GetDestinationAsset returns the DestinationAsset field value

func (*QuoteRequest) GetDestinationAssetOk

func (o *QuoteRequest) GetDestinationAssetOk() (*string, bool)

GetDestinationAssetOk returns a tuple with the DestinationAsset field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetDry

func (o *QuoteRequest) GetDry() bool

GetDry returns the Dry field value

func (*QuoteRequest) GetDryOk

func (o *QuoteRequest) GetDryOk() (*bool, bool)

GetDryOk returns a tuple with the Dry field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetOriginAsset

func (o *QuoteRequest) GetOriginAsset() string

GetOriginAsset returns the OriginAsset field value

func (*QuoteRequest) GetOriginAssetOk

func (o *QuoteRequest) GetOriginAssetOk() (*string, bool)

GetOriginAssetOk returns a tuple with the OriginAsset field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetQuoteWaitingTimeMs

func (o *QuoteRequest) GetQuoteWaitingTimeMs() float32

GetQuoteWaitingTimeMs returns the QuoteWaitingTimeMs field value if set, zero value otherwise.

func (*QuoteRequest) GetQuoteWaitingTimeMsOk

func (o *QuoteRequest) GetQuoteWaitingTimeMsOk() (*float32, bool)

GetQuoteWaitingTimeMsOk returns a tuple with the QuoteWaitingTimeMs field value if set, nil otherwise and a boolean to check if the value has been set.

func (*QuoteRequest) GetRecipient

func (o *QuoteRequest) GetRecipient() string

GetRecipient returns the Recipient field value

func (*QuoteRequest) GetRecipientOk

func (o *QuoteRequest) GetRecipientOk() (*string, bool)

GetRecipientOk returns a tuple with the Recipient field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetRecipientType

func (o *QuoteRequest) GetRecipientType() string

GetRecipientType returns the RecipientType field value

func (*QuoteRequest) GetRecipientTypeOk

func (o *QuoteRequest) GetRecipientTypeOk() (*string, bool)

GetRecipientTypeOk returns a tuple with the RecipientType field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetReferral

func (o *QuoteRequest) GetReferral() string

GetReferral returns the Referral field value if set, zero value otherwise.

func (*QuoteRequest) GetReferralOk

func (o *QuoteRequest) GetReferralOk() (*string, bool)

GetReferralOk returns a tuple with the Referral field value if set, nil otherwise and a boolean to check if the value has been set.

func (*QuoteRequest) GetRefundTo

func (o *QuoteRequest) GetRefundTo() string

GetRefundTo returns the RefundTo field value

func (*QuoteRequest) GetRefundToOk

func (o *QuoteRequest) GetRefundToOk() (*string, bool)

GetRefundToOk returns a tuple with the RefundTo field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetRefundType

func (o *QuoteRequest) GetRefundType() string

GetRefundType returns the RefundType field value

func (*QuoteRequest) GetRefundTypeOk

func (o *QuoteRequest) GetRefundTypeOk() (*string, bool)

GetRefundTypeOk returns a tuple with the RefundType field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetSlippageTolerance

func (o *QuoteRequest) GetSlippageTolerance() float32

GetSlippageTolerance returns the SlippageTolerance field value

func (*QuoteRequest) GetSlippageToleranceOk

func (o *QuoteRequest) GetSlippageToleranceOk() (*float32, bool)

GetSlippageToleranceOk returns a tuple with the SlippageTolerance field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetSwapType

func (o *QuoteRequest) GetSwapType() string

GetSwapType returns the SwapType field value

func (*QuoteRequest) GetSwapTypeOk

func (o *QuoteRequest) GetSwapTypeOk() (*string, bool)

GetSwapTypeOk returns a tuple with the SwapType field value and a boolean to check if the value has been set.

func (*QuoteRequest) GetVirtualChainRecipient added in v0.1.7

func (o *QuoteRequest) GetVirtualChainRecipient() string

GetVirtualChainRecipient returns the VirtualChainRecipient field value if set, zero value otherwise.

func (*QuoteRequest) GetVirtualChainRecipientOk added in v0.1.7

func (o *QuoteRequest) GetVirtualChainRecipientOk() (*string, bool)

GetVirtualChainRecipientOk returns a tuple with the VirtualChainRecipient field value if set, nil otherwise and a boolean to check if the value has been set.

func (*QuoteRequest) GetVirtualChainRefundRecipient added in v0.1.7

func (o *QuoteRequest) GetVirtualChainRefundRecipient() string

GetVirtualChainRefundRecipient returns the VirtualChainRefundRecipient field value if set, zero value otherwise.

func (*QuoteRequest) GetVirtualChainRefundRecipientOk added in v0.1.7

func (o *QuoteRequest) GetVirtualChainRefundRecipientOk() (*string, bool)

GetVirtualChainRefundRecipientOk returns a tuple with the VirtualChainRefundRecipient field value if set, nil otherwise and a boolean to check if the value has been set.

func (*QuoteRequest) HasAppFees

func (o *QuoteRequest) HasAppFees() bool

HasAppFees returns a boolean if a field has been set.

func (*QuoteRequest) HasQuoteWaitingTimeMs

func (o *QuoteRequest) HasQuoteWaitingTimeMs() bool

HasQuoteWaitingTimeMs returns a boolean if a field has been set.

func (*QuoteRequest) HasReferral

func (o *QuoteRequest) HasReferral() bool

HasReferral returns a boolean if a field has been set.

func (*QuoteRequest) HasVirtualChainRecipient added in v0.1.7

func (o *QuoteRequest) HasVirtualChainRecipient() bool

HasVirtualChainRecipient returns a boolean if a field has been set.

func (*QuoteRequest) HasVirtualChainRefundRecipient added in v0.1.7

func (o *QuoteRequest) HasVirtualChainRefundRecipient() bool

HasVirtualChainRefundRecipient returns a boolean if a field has been set.

func (QuoteRequest) MarshalJSON

func (o QuoteRequest) MarshalJSON() ([]byte, error)

func (*QuoteRequest) SetAmount

func (o *QuoteRequest) SetAmount(v string)

SetAmount sets field value

func (*QuoteRequest) SetAppFees

func (o *QuoteRequest) SetAppFees(v []AppFee)

SetAppFees gets a reference to the given []AppFee and assigns it to the AppFees field.

func (*QuoteRequest) SetDeadline

func (o *QuoteRequest) SetDeadline(v time.Time)

SetDeadline sets field value

func (*QuoteRequest) SetDepositType

func (o *QuoteRequest) SetDepositType(v string)

SetDepositType sets field value

func (*QuoteRequest) SetDestinationAsset

func (o *QuoteRequest) SetDestinationAsset(v string)

SetDestinationAsset sets field value

func (*QuoteRequest) SetDry

func (o *QuoteRequest) SetDry(v bool)

SetDry sets field value

func (*QuoteRequest) SetOriginAsset

func (o *QuoteRequest) SetOriginAsset(v string)

SetOriginAsset sets field value

func (*QuoteRequest) SetQuoteWaitingTimeMs

func (o *QuoteRequest) SetQuoteWaitingTimeMs(v float32)

SetQuoteWaitingTimeMs gets a reference to the given float32 and assigns it to the QuoteWaitingTimeMs field.

func (*QuoteRequest) SetRecipient

func (o *QuoteRequest) SetRecipient(v string)

SetRecipient sets field value

func (*QuoteRequest) SetRecipientType

func (o *QuoteRequest) SetRecipientType(v string)

SetRecipientType sets field value

func (*QuoteRequest) SetReferral

func (o *QuoteRequest) SetReferral(v string)

SetReferral gets a reference to the given string and assigns it to the Referral field.

func (*QuoteRequest) SetRefundTo

func (o *QuoteRequest) SetRefundTo(v string)

SetRefundTo sets field value

func (*QuoteRequest) SetRefundType

func (o *QuoteRequest) SetRefundType(v string)

SetRefundType sets field value

func (*QuoteRequest) SetSlippageTolerance

func (o *QuoteRequest) SetSlippageTolerance(v float32)

SetSlippageTolerance sets field value

func (*QuoteRequest) SetSwapType

func (o *QuoteRequest) SetSwapType(v string)

SetSwapType sets field value

func (*QuoteRequest) SetVirtualChainRecipient added in v0.1.7

func (o *QuoteRequest) SetVirtualChainRecipient(v string)

SetVirtualChainRecipient gets a reference to the given string and assigns it to the VirtualChainRecipient field.

func (*QuoteRequest) SetVirtualChainRefundRecipient added in v0.1.7

func (o *QuoteRequest) SetVirtualChainRefundRecipient(v string)

SetVirtualChainRefundRecipient gets a reference to the given string and assigns it to the VirtualChainRefundRecipient field.

func (QuoteRequest) ToMap

func (o QuoteRequest) ToMap() (map[string]interface{}, error)

func (*QuoteRequest) UnmarshalJSON

func (o *QuoteRequest) UnmarshalJSON(data []byte) (err error)

type QuoteResponse

type QuoteResponse struct {
	// Timestamp in ISO format that took part in the deposit address derivation
	Timestamp time.Time `json:"timestamp"`
	// Signature of the 1Click service confirming the quote for the specific deposit address. Must be saved on the client side (along with the whole quote) in order to resolve any disputes or mistakes.
	Signature string `json:"signature"`
	// User request
	QuoteRequest QuoteRequest `json:"quoteRequest"`
	// Response that contains the deposit address to send \"amount\" of `originAsset` and possible output amount.
	Quote Quote `json:"quote"`
}

QuoteResponse struct for QuoteResponse

func NewQuoteResponse

func NewQuoteResponse(timestamp time.Time, signature string, quoteRequest QuoteRequest, quote Quote) *QuoteResponse

NewQuoteResponse instantiates a new QuoteResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewQuoteResponseWithDefaults

func NewQuoteResponseWithDefaults() *QuoteResponse

NewQuoteResponseWithDefaults instantiates a new QuoteResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*QuoteResponse) GetQuote

func (o *QuoteResponse) GetQuote() Quote

GetQuote returns the Quote field value

func (*QuoteResponse) GetQuoteOk

func (o *QuoteResponse) GetQuoteOk() (*Quote, bool)

GetQuoteOk returns a tuple with the Quote field value and a boolean to check if the value has been set.

func (*QuoteResponse) GetQuoteRequest

func (o *QuoteResponse) GetQuoteRequest() QuoteRequest

GetQuoteRequest returns the QuoteRequest field value

func (*QuoteResponse) GetQuoteRequestOk

func (o *QuoteResponse) GetQuoteRequestOk() (*QuoteRequest, bool)

GetQuoteRequestOk returns a tuple with the QuoteRequest field value and a boolean to check if the value has been set.

func (*QuoteResponse) GetSignature

func (o *QuoteResponse) GetSignature() string

GetSignature returns the Signature field value

func (*QuoteResponse) GetSignatureOk

func (o *QuoteResponse) GetSignatureOk() (*string, bool)

GetSignatureOk returns a tuple with the Signature field value and a boolean to check if the value has been set.

func (*QuoteResponse) GetTimestamp

func (o *QuoteResponse) GetTimestamp() time.Time

GetTimestamp returns the Timestamp field value

func (*QuoteResponse) GetTimestampOk

func (o *QuoteResponse) GetTimestampOk() (*time.Time, bool)

GetTimestampOk returns a tuple with the Timestamp field value and a boolean to check if the value has been set.

func (QuoteResponse) MarshalJSON

func (o QuoteResponse) MarshalJSON() ([]byte, error)

func (*QuoteResponse) SetQuote

func (o *QuoteResponse) SetQuote(v Quote)

SetQuote sets field value

func (*QuoteResponse) SetQuoteRequest

func (o *QuoteResponse) SetQuoteRequest(v QuoteRequest)

SetQuoteRequest sets field value

func (*QuoteResponse) SetSignature

func (o *QuoteResponse) SetSignature(v string)

SetSignature sets field value

func (*QuoteResponse) SetTimestamp

func (o *QuoteResponse) SetTimestamp(v time.Time)

SetTimestamp sets field value

func (QuoteResponse) ToMap

func (o QuoteResponse) ToMap() (map[string]interface{}, error)

func (*QuoteResponse) UnmarshalJSON

func (o *QuoteResponse) UnmarshalJSON(data []byte) (err error)

type ServerConfiguration

type ServerConfiguration struct {
	URL         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerConfigurations

type ServerConfigurations []ServerConfiguration

ServerConfigurations stores multiple ServerConfiguration items

func (ServerConfigurations) URL

func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error)

URL formats template on a index using given variables

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type SubmitDepositTxRequest

type SubmitDepositTxRequest struct {
	// Transaction hash of your deposit
	TxHash string `json:"txHash"`
	// Deposit address for the quote
	DepositAddress string `json:"depositAddress"`
}

SubmitDepositTxRequest struct for SubmitDepositTxRequest

func NewSubmitDepositTxRequest

func NewSubmitDepositTxRequest(txHash string, depositAddress string) *SubmitDepositTxRequest

NewSubmitDepositTxRequest instantiates a new SubmitDepositTxRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSubmitDepositTxRequestWithDefaults

func NewSubmitDepositTxRequestWithDefaults() *SubmitDepositTxRequest

NewSubmitDepositTxRequestWithDefaults instantiates a new SubmitDepositTxRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*SubmitDepositTxRequest) GetDepositAddress

func (o *SubmitDepositTxRequest) GetDepositAddress() string

GetDepositAddress returns the DepositAddress field value

func (*SubmitDepositTxRequest) GetDepositAddressOk

func (o *SubmitDepositTxRequest) GetDepositAddressOk() (*string, bool)

GetDepositAddressOk returns a tuple with the DepositAddress field value and a boolean to check if the value has been set.

func (*SubmitDepositTxRequest) GetTxHash

func (o *SubmitDepositTxRequest) GetTxHash() string

GetTxHash returns the TxHash field value

func (*SubmitDepositTxRequest) GetTxHashOk

func (o *SubmitDepositTxRequest) GetTxHashOk() (*string, bool)

GetTxHashOk returns a tuple with the TxHash field value and a boolean to check if the value has been set.

func (SubmitDepositTxRequest) MarshalJSON

func (o SubmitDepositTxRequest) MarshalJSON() ([]byte, error)

func (*SubmitDepositTxRequest) SetDepositAddress

func (o *SubmitDepositTxRequest) SetDepositAddress(v string)

SetDepositAddress sets field value

func (*SubmitDepositTxRequest) SetTxHash

func (o *SubmitDepositTxRequest) SetTxHash(v string)

SetTxHash sets field value

func (SubmitDepositTxRequest) ToMap

func (o SubmitDepositTxRequest) ToMap() (map[string]interface{}, error)

func (*SubmitDepositTxRequest) UnmarshalJSON

func (o *SubmitDepositTxRequest) UnmarshalJSON(data []byte) (err error)

type SubmitDepositTxResponse

type SubmitDepositTxResponse struct {
	// Quote response from original request
	QuoteResponse QuoteResponse `json:"quoteResponse"`
	Status        string        `json:"status"`
	// Last time the state was updated
	UpdatedAt time.Time `json:"updatedAt"`
	// Details of actual swaps and withdrawals
	SwapDetails SwapDetails `json:"swapDetails"`
}

SubmitDepositTxResponse struct for SubmitDepositTxResponse

func NewSubmitDepositTxResponse

func NewSubmitDepositTxResponse(quoteResponse QuoteResponse, status string, updatedAt time.Time, swapDetails SwapDetails) *SubmitDepositTxResponse

NewSubmitDepositTxResponse instantiates a new SubmitDepositTxResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSubmitDepositTxResponseWithDefaults

func NewSubmitDepositTxResponseWithDefaults() *SubmitDepositTxResponse

NewSubmitDepositTxResponseWithDefaults instantiates a new SubmitDepositTxResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*SubmitDepositTxResponse) GetQuoteResponse

func (o *SubmitDepositTxResponse) GetQuoteResponse() QuoteResponse

GetQuoteResponse returns the QuoteResponse field value

func (*SubmitDepositTxResponse) GetQuoteResponseOk

func (o *SubmitDepositTxResponse) GetQuoteResponseOk() (*QuoteResponse, bool)

GetQuoteResponseOk returns a tuple with the QuoteResponse field value and a boolean to check if the value has been set.

func (*SubmitDepositTxResponse) GetStatus

func (o *SubmitDepositTxResponse) GetStatus() string

GetStatus returns the Status field value

func (*SubmitDepositTxResponse) GetStatusOk

func (o *SubmitDepositTxResponse) GetStatusOk() (*string, bool)

GetStatusOk returns a tuple with the Status field value and a boolean to check if the value has been set.

func (*SubmitDepositTxResponse) GetSwapDetails

func (o *SubmitDepositTxResponse) GetSwapDetails() SwapDetails

GetSwapDetails returns the SwapDetails field value

func (*SubmitDepositTxResponse) GetSwapDetailsOk

func (o *SubmitDepositTxResponse) GetSwapDetailsOk() (*SwapDetails, bool)

GetSwapDetailsOk returns a tuple with the SwapDetails field value and a boolean to check if the value has been set.

func (*SubmitDepositTxResponse) GetUpdatedAt

func (o *SubmitDepositTxResponse) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field value

func (*SubmitDepositTxResponse) GetUpdatedAtOk

func (o *SubmitDepositTxResponse) GetUpdatedAtOk() (*time.Time, bool)

GetUpdatedAtOk returns a tuple with the UpdatedAt field value and a boolean to check if the value has been set.

func (SubmitDepositTxResponse) MarshalJSON

func (o SubmitDepositTxResponse) MarshalJSON() ([]byte, error)

func (*SubmitDepositTxResponse) SetQuoteResponse

func (o *SubmitDepositTxResponse) SetQuoteResponse(v QuoteResponse)

SetQuoteResponse sets field value

func (*SubmitDepositTxResponse) SetStatus

func (o *SubmitDepositTxResponse) SetStatus(v string)

SetStatus sets field value

func (*SubmitDepositTxResponse) SetSwapDetails

func (o *SubmitDepositTxResponse) SetSwapDetails(v SwapDetails)

SetSwapDetails sets field value

func (*SubmitDepositTxResponse) SetUpdatedAt

func (o *SubmitDepositTxResponse) SetUpdatedAt(v time.Time)

SetUpdatedAt sets field value

func (SubmitDepositTxResponse) ToMap

func (o SubmitDepositTxResponse) ToMap() (map[string]interface{}, error)

func (*SubmitDepositTxResponse) UnmarshalJSON

func (o *SubmitDepositTxResponse) UnmarshalJSON(data []byte) (err error)

type SwapDetails

type SwapDetails struct {
	// All intent hashes that took part in this swap
	IntentHashes []string `json:"intentHashes"`
	// All Near transactions executed for this swap
	NearTxHashes []string `json:"nearTxHashes"`
	// Exact amount of `originToken` after trade was settled
	AmountIn *string `json:"amountIn,omitempty"`
	// Exact amount of `originToken` after trade was settled in readable format
	AmountInFormatted *string `json:"amountInFormatted,omitempty"`
	// Exact amount of `originToken` equivalent in USD
	AmountInUsd *string `json:"amountInUsd,omitempty"`
	// Exact amount of `destinationToken` after trade was settled
	AmountOut *string `json:"amountOut,omitempty"`
	// Exact amount of `destinationToken` in readable format
	AmountOutFormatted *string `json:"amountOutFormatted,omitempty"`
	// Exact amount of `destinationToken` equivalent in USD
	AmountOutUsd *string `json:"amountOutUsd,omitempty"`
	// Actual slippage
	Slippage *float32 `json:"slippage,omitempty"`
	// Hashes and explorer URLs for all transactions on the origin chain
	OriginChainTxHashes []TransactionDetails `json:"originChainTxHashes"`
	// Hashes and explorer URLs for all transactions on the destination chain
	DestinationChainTxHashes []TransactionDetails `json:"destinationChainTxHashes"`
	// Amount of `originAsset` that got transferred to `refundTo`
	RefundedAmount *string `json:"refundedAmount,omitempty"`
	// Refunded amount in readable format
	RefundedAmountFormatted *string `json:"refundedAmountFormatted,omitempty"`
	// Refunded amount equivalent in USD
	RefundedAmountUsd *string `json:"refundedAmountUsd,omitempty"`
}

SwapDetails struct for SwapDetails

func NewSwapDetails

func NewSwapDetails(intentHashes []string, nearTxHashes []string, originChainTxHashes []TransactionDetails, destinationChainTxHashes []TransactionDetails) *SwapDetails

NewSwapDetails instantiates a new SwapDetails object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSwapDetailsWithDefaults

func NewSwapDetailsWithDefaults() *SwapDetails

NewSwapDetailsWithDefaults instantiates a new SwapDetails object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*SwapDetails) GetAmountIn

func (o *SwapDetails) GetAmountIn() string

GetAmountIn returns the AmountIn field value if set, zero value otherwise.

func (*SwapDetails) GetAmountInFormatted

func (o *SwapDetails) GetAmountInFormatted() string

GetAmountInFormatted returns the AmountInFormatted field value if set, zero value otherwise.

func (*SwapDetails) GetAmountInFormattedOk

func (o *SwapDetails) GetAmountInFormattedOk() (*string, bool)

GetAmountInFormattedOk returns a tuple with the AmountInFormatted field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetAmountInOk

func (o *SwapDetails) GetAmountInOk() (*string, bool)

GetAmountInOk returns a tuple with the AmountIn field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetAmountInUsd

func (o *SwapDetails) GetAmountInUsd() string

GetAmountInUsd returns the AmountInUsd field value if set, zero value otherwise.

func (*SwapDetails) GetAmountInUsdOk

func (o *SwapDetails) GetAmountInUsdOk() (*string, bool)

GetAmountInUsdOk returns a tuple with the AmountInUsd field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetAmountOut

func (o *SwapDetails) GetAmountOut() string

GetAmountOut returns the AmountOut field value if set, zero value otherwise.

func (*SwapDetails) GetAmountOutFormatted

func (o *SwapDetails) GetAmountOutFormatted() string

GetAmountOutFormatted returns the AmountOutFormatted field value if set, zero value otherwise.

func (*SwapDetails) GetAmountOutFormattedOk

func (o *SwapDetails) GetAmountOutFormattedOk() (*string, bool)

GetAmountOutFormattedOk returns a tuple with the AmountOutFormatted field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetAmountOutOk

func (o *SwapDetails) GetAmountOutOk() (*string, bool)

GetAmountOutOk returns a tuple with the AmountOut field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetAmountOutUsd

func (o *SwapDetails) GetAmountOutUsd() string

GetAmountOutUsd returns the AmountOutUsd field value if set, zero value otherwise.

func (*SwapDetails) GetAmountOutUsdOk

func (o *SwapDetails) GetAmountOutUsdOk() (*string, bool)

GetAmountOutUsdOk returns a tuple with the AmountOutUsd field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetDestinationChainTxHashes

func (o *SwapDetails) GetDestinationChainTxHashes() []TransactionDetails

GetDestinationChainTxHashes returns the DestinationChainTxHashes field value

func (*SwapDetails) GetDestinationChainTxHashesOk

func (o *SwapDetails) GetDestinationChainTxHashesOk() ([]TransactionDetails, bool)

GetDestinationChainTxHashesOk returns a tuple with the DestinationChainTxHashes field value and a boolean to check if the value has been set.

func (*SwapDetails) GetIntentHashes

func (o *SwapDetails) GetIntentHashes() []string

GetIntentHashes returns the IntentHashes field value

func (*SwapDetails) GetIntentHashesOk

func (o *SwapDetails) GetIntentHashesOk() ([]string, bool)

GetIntentHashesOk returns a tuple with the IntentHashes field value and a boolean to check if the value has been set.

func (*SwapDetails) GetNearTxHashes

func (o *SwapDetails) GetNearTxHashes() []string

GetNearTxHashes returns the NearTxHashes field value

func (*SwapDetails) GetNearTxHashesOk

func (o *SwapDetails) GetNearTxHashesOk() ([]string, bool)

GetNearTxHashesOk returns a tuple with the NearTxHashes field value and a boolean to check if the value has been set.

func (*SwapDetails) GetOriginChainTxHashes

func (o *SwapDetails) GetOriginChainTxHashes() []TransactionDetails

GetOriginChainTxHashes returns the OriginChainTxHashes field value

func (*SwapDetails) GetOriginChainTxHashesOk

func (o *SwapDetails) GetOriginChainTxHashesOk() ([]TransactionDetails, bool)

GetOriginChainTxHashesOk returns a tuple with the OriginChainTxHashes field value and a boolean to check if the value has been set.

func (*SwapDetails) GetRefundedAmount

func (o *SwapDetails) GetRefundedAmount() string

GetRefundedAmount returns the RefundedAmount field value if set, zero value otherwise.

func (*SwapDetails) GetRefundedAmountFormatted

func (o *SwapDetails) GetRefundedAmountFormatted() string

GetRefundedAmountFormatted returns the RefundedAmountFormatted field value if set, zero value otherwise.

func (*SwapDetails) GetRefundedAmountFormattedOk

func (o *SwapDetails) GetRefundedAmountFormattedOk() (*string, bool)

GetRefundedAmountFormattedOk returns a tuple with the RefundedAmountFormatted field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetRefundedAmountOk

func (o *SwapDetails) GetRefundedAmountOk() (*string, bool)

GetRefundedAmountOk returns a tuple with the RefundedAmount field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetRefundedAmountUsd

func (o *SwapDetails) GetRefundedAmountUsd() string

GetRefundedAmountUsd returns the RefundedAmountUsd field value if set, zero value otherwise.

func (*SwapDetails) GetRefundedAmountUsdOk

func (o *SwapDetails) GetRefundedAmountUsdOk() (*string, bool)

GetRefundedAmountUsdOk returns a tuple with the RefundedAmountUsd field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) GetSlippage

func (o *SwapDetails) GetSlippage() float32

GetSlippage returns the Slippage field value if set, zero value otherwise.

func (*SwapDetails) GetSlippageOk

func (o *SwapDetails) GetSlippageOk() (*float32, bool)

GetSlippageOk returns a tuple with the Slippage field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SwapDetails) HasAmountIn

func (o *SwapDetails) HasAmountIn() bool

HasAmountIn returns a boolean if a field has been set.

func (*SwapDetails) HasAmountInFormatted

func (o *SwapDetails) HasAmountInFormatted() bool

HasAmountInFormatted returns a boolean if a field has been set.

func (*SwapDetails) HasAmountInUsd

func (o *SwapDetails) HasAmountInUsd() bool

HasAmountInUsd returns a boolean if a field has been set.

func (*SwapDetails) HasAmountOut

func (o *SwapDetails) HasAmountOut() bool

HasAmountOut returns a boolean if a field has been set.

func (*SwapDetails) HasAmountOutFormatted

func (o *SwapDetails) HasAmountOutFormatted() bool

HasAmountOutFormatted returns a boolean if a field has been set.

func (*SwapDetails) HasAmountOutUsd

func (o *SwapDetails) HasAmountOutUsd() bool

HasAmountOutUsd returns a boolean if a field has been set.

func (*SwapDetails) HasRefundedAmount

func (o *SwapDetails) HasRefundedAmount() bool

HasRefundedAmount returns a boolean if a field has been set.

func (*SwapDetails) HasRefundedAmountFormatted

func (o *SwapDetails) HasRefundedAmountFormatted() bool

HasRefundedAmountFormatted returns a boolean if a field has been set.

func (*SwapDetails) HasRefundedAmountUsd

func (o *SwapDetails) HasRefundedAmountUsd() bool

HasRefundedAmountUsd returns a boolean if a field has been set.

func (*SwapDetails) HasSlippage

func (o *SwapDetails) HasSlippage() bool

HasSlippage returns a boolean if a field has been set.

func (SwapDetails) MarshalJSON

func (o SwapDetails) MarshalJSON() ([]byte, error)

func (*SwapDetails) SetAmountIn

func (o *SwapDetails) SetAmountIn(v string)

SetAmountIn gets a reference to the given string and assigns it to the AmountIn field.

func (*SwapDetails) SetAmountInFormatted

func (o *SwapDetails) SetAmountInFormatted(v string)

SetAmountInFormatted gets a reference to the given string and assigns it to the AmountInFormatted field.

func (*SwapDetails) SetAmountInUsd

func (o *SwapDetails) SetAmountInUsd(v string)

SetAmountInUsd gets a reference to the given string and assigns it to the AmountInUsd field.

func (*SwapDetails) SetAmountOut

func (o *SwapDetails) SetAmountOut(v string)

SetAmountOut gets a reference to the given string and assigns it to the AmountOut field.

func (*SwapDetails) SetAmountOutFormatted

func (o *SwapDetails) SetAmountOutFormatted(v string)

SetAmountOutFormatted gets a reference to the given string and assigns it to the AmountOutFormatted field.

func (*SwapDetails) SetAmountOutUsd

func (o *SwapDetails) SetAmountOutUsd(v string)

SetAmountOutUsd gets a reference to the given string and assigns it to the AmountOutUsd field.

func (*SwapDetails) SetDestinationChainTxHashes

func (o *SwapDetails) SetDestinationChainTxHashes(v []TransactionDetails)

SetDestinationChainTxHashes sets field value

func (*SwapDetails) SetIntentHashes

func (o *SwapDetails) SetIntentHashes(v []string)

SetIntentHashes sets field value

func (*SwapDetails) SetNearTxHashes

func (o *SwapDetails) SetNearTxHashes(v []string)

SetNearTxHashes sets field value

func (*SwapDetails) SetOriginChainTxHashes

func (o *SwapDetails) SetOriginChainTxHashes(v []TransactionDetails)

SetOriginChainTxHashes sets field value

func (*SwapDetails) SetRefundedAmount

func (o *SwapDetails) SetRefundedAmount(v string)

SetRefundedAmount gets a reference to the given string and assigns it to the RefundedAmount field.

func (*SwapDetails) SetRefundedAmountFormatted

func (o *SwapDetails) SetRefundedAmountFormatted(v string)

SetRefundedAmountFormatted gets a reference to the given string and assigns it to the RefundedAmountFormatted field.

func (*SwapDetails) SetRefundedAmountUsd

func (o *SwapDetails) SetRefundedAmountUsd(v string)

SetRefundedAmountUsd gets a reference to the given string and assigns it to the RefundedAmountUsd field.

func (*SwapDetails) SetSlippage

func (o *SwapDetails) SetSlippage(v float32)

SetSlippage gets a reference to the given float32 and assigns it to the Slippage field.

func (SwapDetails) ToMap

func (o SwapDetails) ToMap() (map[string]interface{}, error)

func (*SwapDetails) UnmarshalJSON

func (o *SwapDetails) UnmarshalJSON(data []byte) (err error)

type TokenResponse

type TokenResponse struct {
	// Unique asset identifier
	AssetId string `json:"assetId"`
	// Number of decimals for the token
	Decimals float32 `json:"decimals"`
	// Blockchain associated with the token
	Blockchain string `json:"blockchain"`
	// Token symbol (e.g. BTC, ETH)
	Symbol string `json:"symbol"`
	// Current price of the token in USD
	Price float32 `json:"price"`
	// Date when the token price was last updated
	PriceUpdatedAt time.Time `json:"priceUpdatedAt"`
	// Contract address of the token
	ContractAddress *string `json:"contractAddress,omitempty"`
}

TokenResponse struct for TokenResponse

func NewTokenResponse

func NewTokenResponse(assetId string, decimals float32, blockchain string, symbol string, price float32, priceUpdatedAt time.Time) *TokenResponse

NewTokenResponse instantiates a new TokenResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewTokenResponseWithDefaults

func NewTokenResponseWithDefaults() *TokenResponse

NewTokenResponseWithDefaults instantiates a new TokenResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*TokenResponse) GetAssetId

func (o *TokenResponse) GetAssetId() string

GetAssetId returns the AssetId field value

func (*TokenResponse) GetAssetIdOk

func (o *TokenResponse) GetAssetIdOk() (*string, bool)

GetAssetIdOk returns a tuple with the AssetId field value and a boolean to check if the value has been set.

func (*TokenResponse) GetBlockchain

func (o *TokenResponse) GetBlockchain() string

GetBlockchain returns the Blockchain field value

func (*TokenResponse) GetBlockchainOk

func (o *TokenResponse) GetBlockchainOk() (*string, bool)

GetBlockchainOk returns a tuple with the Blockchain field value and a boolean to check if the value has been set.

func (*TokenResponse) GetContractAddress

func (o *TokenResponse) GetContractAddress() string

GetContractAddress returns the ContractAddress field value if set, zero value otherwise.

func (*TokenResponse) GetContractAddressOk

func (o *TokenResponse) GetContractAddressOk() (*string, bool)

GetContractAddressOk returns a tuple with the ContractAddress field value if set, nil otherwise and a boolean to check if the value has been set.

func (*TokenResponse) GetDecimals

func (o *TokenResponse) GetDecimals() float32

GetDecimals returns the Decimals field value

func (*TokenResponse) GetDecimalsOk

func (o *TokenResponse) GetDecimalsOk() (*float32, bool)

GetDecimalsOk returns a tuple with the Decimals field value and a boolean to check if the value has been set.

func (*TokenResponse) GetPrice

func (o *TokenResponse) GetPrice() float32

GetPrice returns the Price field value

func (*TokenResponse) GetPriceOk

func (o *TokenResponse) GetPriceOk() (*float32, bool)

GetPriceOk returns a tuple with the Price field value and a boolean to check if the value has been set.

func (*TokenResponse) GetPriceUpdatedAt

func (o *TokenResponse) GetPriceUpdatedAt() time.Time

GetPriceUpdatedAt returns the PriceUpdatedAt field value

func (*TokenResponse) GetPriceUpdatedAtOk

func (o *TokenResponse) GetPriceUpdatedAtOk() (*time.Time, bool)

GetPriceUpdatedAtOk returns a tuple with the PriceUpdatedAt field value and a boolean to check if the value has been set.

func (*TokenResponse) GetSymbol

func (o *TokenResponse) GetSymbol() string

GetSymbol returns the Symbol field value

func (*TokenResponse) GetSymbolOk

func (o *TokenResponse) GetSymbolOk() (*string, bool)

GetSymbolOk returns a tuple with the Symbol field value and a boolean to check if the value has been set.

func (*TokenResponse) HasContractAddress

func (o *TokenResponse) HasContractAddress() bool

HasContractAddress returns a boolean if a field has been set.

func (TokenResponse) MarshalJSON

func (o TokenResponse) MarshalJSON() ([]byte, error)

func (*TokenResponse) SetAssetId

func (o *TokenResponse) SetAssetId(v string)

SetAssetId sets field value

func (*TokenResponse) SetBlockchain

func (o *TokenResponse) SetBlockchain(v string)

SetBlockchain sets field value

func (*TokenResponse) SetContractAddress

func (o *TokenResponse) SetContractAddress(v string)

SetContractAddress gets a reference to the given string and assigns it to the ContractAddress field.

func (*TokenResponse) SetDecimals

func (o *TokenResponse) SetDecimals(v float32)

SetDecimals sets field value

func (*TokenResponse) SetPrice

func (o *TokenResponse) SetPrice(v float32)

SetPrice sets field value

func (*TokenResponse) SetPriceUpdatedAt

func (o *TokenResponse) SetPriceUpdatedAt(v time.Time)

SetPriceUpdatedAt sets field value

func (*TokenResponse) SetSymbol

func (o *TokenResponse) SetSymbol(v string)

SetSymbol sets field value

func (TokenResponse) ToMap

func (o TokenResponse) ToMap() (map[string]interface{}, error)

func (*TokenResponse) UnmarshalJSON

func (o *TokenResponse) UnmarshalJSON(data []byte) (err error)

type TransactionDetails

type TransactionDetails struct {
	// Transaction hash
	Hash string `json:"hash"`
	// Explorer URL for the transaction
	ExplorerUrl string `json:"explorerUrl"`
}

TransactionDetails struct for TransactionDetails

func NewTransactionDetails

func NewTransactionDetails(hash string, explorerUrl string) *TransactionDetails

NewTransactionDetails instantiates a new TransactionDetails object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewTransactionDetailsWithDefaults

func NewTransactionDetailsWithDefaults() *TransactionDetails

NewTransactionDetailsWithDefaults instantiates a new TransactionDetails object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*TransactionDetails) GetExplorerUrl

func (o *TransactionDetails) GetExplorerUrl() string

GetExplorerUrl returns the ExplorerUrl field value

func (*TransactionDetails) GetExplorerUrlOk

func (o *TransactionDetails) GetExplorerUrlOk() (*string, bool)

GetExplorerUrlOk returns a tuple with the ExplorerUrl field value and a boolean to check if the value has been set.

func (*TransactionDetails) GetHash

func (o *TransactionDetails) GetHash() string

GetHash returns the Hash field value

func (*TransactionDetails) GetHashOk

func (o *TransactionDetails) GetHashOk() (*string, bool)

GetHashOk returns a tuple with the Hash field value and a boolean to check if the value has been set.

func (TransactionDetails) MarshalJSON

func (o TransactionDetails) MarshalJSON() ([]byte, error)

func (*TransactionDetails) SetExplorerUrl

func (o *TransactionDetails) SetExplorerUrl(v string)

SetExplorerUrl sets field value

func (*TransactionDetails) SetHash

func (o *TransactionDetails) SetHash(v string)

SetHash sets field value

func (TransactionDetails) ToMap

func (o TransactionDetails) ToMap() (map[string]interface{}, error)

func (*TransactionDetails) UnmarshalJSON

func (o *TransactionDetails) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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