Documentation ¶
Overview ¶
Package tokens provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT.
Index ¶
- type BadRequestErrorDto
- type Client
- func (api *Client) GetCustomToken(ctx context.Context, params CustomTokensControllerGetTokenInfoParams) (*ProviderTokenDtoFixed, error)
- func (api *Client) GetCustomTokens(ctx context.Context, params CustomTokensControllerGetTokensInfoParams) (map[string]ProviderTokenDto, error)
- func (api *Client) SearchTokenAllChains(ctx context.Context, params SearchControllerSearchAllChainsParams) ([]ProviderTokenDtoFixed, error)
- func (api *Client) SearchTokenSingleChain(ctx context.Context, params SearchControllerSearchSingleChainParams) ([]ProviderTokenDtoFixed, error)
- func (api *Client) WhitelistedTokens(ctx context.Context, params TokenListControllerTokensParams) (map[string]ProviderTokenDto, error)
- func (api *Client) WhitelistedTokensAsList(ctx context.Context, params TokenListControllerTokensParams) (*TokenListResponseDto, error)
- type Configuration
- type ConfigurationParams
- type CustomTokensControllerGetTokenInfoParams
- type CustomTokensControllerGetTokensInfoParams
- type ProviderTokenDto
- type ProviderTokenDtoFixed
- type SearchControllerSearchAllChainsParams
- type SearchControllerSearchSingleChainParams
- type TagDto
- type TokenDto
- type TokenInfoDto
- type TokenInfoDtoFixed
- type TokenListControllerTokensListParams
- type TokenListControllerTokensParams
- type TokenListResponseDto
- type VersionDto
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadRequestErrorDto ¶
type BadRequestErrorDto struct { Error string `json:"error"` Message string `json:"message"` StatusCode float32 `json:"statusCode"` }
BadRequestErrorDto defines model for BadRequestErrorDto.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(cfg *Configuration) (*Client, error)
func (*Client) GetCustomToken ¶
func (api *Client) GetCustomToken(ctx context.Context, params CustomTokensControllerGetTokenInfoParams) (*ProviderTokenDtoFixed, error)
func (*Client) GetCustomTokens ¶
func (api *Client) GetCustomTokens(ctx context.Context, params CustomTokensControllerGetTokensInfoParams) (map[string]ProviderTokenDto, error)
func (*Client) SearchTokenAllChains ¶
func (api *Client) SearchTokenAllChains(ctx context.Context, params SearchControllerSearchAllChainsParams) ([]ProviderTokenDtoFixed, error)
SearchTokenAllChains Get Tokens that match the provided search criteria across all chains
func (*Client) SearchTokenSingleChain ¶
func (api *Client) SearchTokenSingleChain(ctx context.Context, params SearchControllerSearchSingleChainParams) ([]ProviderTokenDtoFixed, error)
SearchTokenSingleChain Get Tokens that match the provided search criteria on a specfic chain
func (*Client) WhitelistedTokens ¶
func (api *Client) WhitelistedTokens(ctx context.Context, params TokenListControllerTokensParams) (map[string]ProviderTokenDto, error)
func (*Client) WhitelistedTokensAsList ¶
func (api *Client) WhitelistedTokensAsList(ctx context.Context, params TokenListControllerTokensParams) (*TokenListResponseDto, error)
type Configuration ¶
func NewConfiguration ¶
func NewConfiguration(params ConfigurationParams) (*Configuration, error)
type ConfigurationParams ¶
type CustomTokensControllerGetTokenInfoParams ¶
type CustomTokensControllerGetTokenInfoParams struct {
Address string `url:"address" json:"address"`
}
func (*CustomTokensControllerGetTokenInfoParams) Validate ¶
func (params *CustomTokensControllerGetTokenInfoParams) Validate() error
type CustomTokensControllerGetTokensInfoParams ¶
type CustomTokensControllerGetTokensInfoParams struct {
Addresses []string `url:"addresses" json:"addresses"`
}
CustomTokensControllerGetTokensInfoParams defines parameters for CustomTokensControllerGetTokensInfo.
func (*CustomTokensControllerGetTokensInfoParams) Validate ¶
func (params *CustomTokensControllerGetTokensInfoParams) Validate() error
type ProviderTokenDto ¶
type ProviderTokenDto struct { Address string `json:"address"` ChainId float32 `json:"chainId"` Decimals float32 `json:"decimals"` DisplayedSymbol *string `json:"displayedSymbol,omitempty"` Eip2612 *bool `json:"eip2612,omitempty"` IsFoT *bool `json:"isFoT,omitempty"` LogoURI *string `json:"logoURI,omitempty"` Name string `json:"name"` Providers []string `json:"providers"` Symbol string `json:"symbol"` Tags []string `json:"tags"` }
ProviderTokenDto defines model for ProviderTokenDto.
type ProviderTokenDtoFixed ¶
type ProviderTokenDtoFixed struct { Address string `json:"address"` ChainId float32 `json:"chainId"` Decimals float32 `json:"decimals"` DisplayedSymbol *string `json:"displayedSymbol,omitempty"` Eip2612 *bool `json:"eip2612,omitempty"` IsFoT *bool `json:"isFoT,omitempty"` LogoURI *string `json:"logoURI,omitempty"` Name string `json:"name"` Providers []string `json:"providers"` Symbol string `json:"symbol"` Tags []TagDto `json:"tags"` }
ProviderTokenDtoFixed uses the Tag struct for Tags
type SearchControllerSearchAllChainsParams ¶
type SearchControllerSearchAllChainsParams struct { // Query Text to search for in token address, token symbol, or description Query *string `url:"query,omitempty" json:"query,omitempty"` // IgnoreListed Whether to ignore listed tokens IgnoreListed *bool `url:"ignore_listed,omitempty" json:"ignore_listed,omitempty"` OnlyPositiveRating bool `url:"only_positive_rating" json:"only_positive_rating"` // Limit Maximum number of tokens to return Limit *float32 `url:"limit,omitempty" json:"limit,omitempty"` }
SearchControllerSearchAllChainsParams defines parameters for SearchControllerSearchAllChains.
func (*SearchControllerSearchAllChainsParams) Validate ¶
func (params *SearchControllerSearchAllChainsParams) Validate() error
type SearchControllerSearchSingleChainParams ¶
type SearchControllerSearchSingleChainParams struct { // Query Text to search for in token address, token symbol, or description Query *string `url:"query,omitempty" json:"query,omitempty"` // IgnoreListed Whether to ignore listed tokens IgnoreListed *bool `url:"ignore_listed,omitempty" json:"ignore_listed,omitempty"` OnlyPositiveRating bool `url:"only_positive_rating" json:"only_positive_rating"` // Limit Maximum number of tokens to return Limit *float32 `url:"limit,omitempty" json:"limit,omitempty"` }
SearchControllerSearchSingleChainParams defines parameters for SearchControllerSearchSingleChain.
func (*SearchControllerSearchSingleChainParams) Validate ¶
func (params *SearchControllerSearchSingleChainParams) Validate() error
type TokenDto ¶
type TokenDto struct { Address string `json:"address"` ChainId float32 `json:"chainId"` Decimals float32 `json:"decimals"` Eip2612 *bool `json:"eip2612,omitempty"` IsFoT *bool `json:"isFoT,omitempty"` LogoURI *string `json:"logoURI,omitempty"` Name string `json:"name"` Providers []string `json:"providers"` Rating float32 `json:"rating"` Symbol string `json:"symbol"` Tags []TagDto `json:"tags"` }
TokenDto defines model for TokenDto.
type TokenInfoDto ¶
type TokenInfoDto struct { Address string `json:"address"` ChainId float32 `json:"chainId"` Decimals float32 `json:"decimals"` Extensions *map[string]interface{} `json:"extensions,omitempty"` LogoURI string `json:"logoURI"` Name string `json:"name"` Symbol string `json:"symbol"` Tags []string `json:"tags"` }
TokenInfoDto defines model for TokenInfoDto.
type TokenInfoDtoFixed ¶
type TokenInfoDtoFixed struct { Address string `json:"address"` ChainId float32 `json:"chainId"` Decimals float32 `json:"decimals"` Extensions *map[string]interface{} `json:"extensions,omitempty"` LogoURI string `json:"logoURI"` Name string `json:"name"` Symbol string `json:"symbol"` Tags []TagDto `json:"tags"` }
TokenInfoDtoFixed uses the Tag struct for Tags
type TokenListControllerTokensListParams ¶
type TokenListControllerTokensListParams struct { // Provider Provider code. Default value is "1inch" Provider *string `url:"provider,omitempty" json:"provider,omitempty"` // Country Country code Country *string `url:"country,omitempty" json:"country,omitempty"` }
TokenListControllerTokensListParams defines parameters for TokenListControllerTokensList.
type TokenListControllerTokensParams ¶
type TokenListControllerTokensParams struct { // Provider Provider code. Default value is 1inch Provider *string `url:"provider,omitempty" json:"provider,omitempty"` // Country Country code Country *string `url:"country,omitempty" json:"country,omitempty"` }
TokenListControllerTokensParams defines parameters for TokenListControllerTokens.
func (*TokenListControllerTokensParams) Validate ¶
func (params *TokenListControllerTokensParams) Validate() error
type TokenListResponseDto ¶
type TokenListResponseDto struct { Keywords []string `json:"keywords"` LogoURI string `json:"logoURI"` Name string `json:"name"` Tags map[string]TagDto `json:"tags"` TagsOrder []string `json:"tags_order"` Timestamp string `json:"timestamp"` Tokens []TokenInfoDto `json:"tokens"` Version VersionDto `json:"version"` }
TokenListResponseDto defines model for TokenListResponseDto.
type VersionDto ¶
type VersionDto struct { Major float32 `json:"major"` Minor float32 `json:"minor"` Patch float32 `json:"patch"` }
VersionDto defines model for VersionDto.