tokens

package
v0.0.6-developer-preview Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 5 Imported by: 0

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

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

type Configuration struct {
	ApiKey string
	ApiURL string
	API    api
}

func NewConfiguration

func NewConfiguration(params ConfigurationParams) (*Configuration, error)

type ConfigurationParams

type ConfigurationParams struct {
	ChainId uint64
	ApiUrl  string
	ApiKey  string
}

type CustomTokensControllerGetTokenInfoParams

type CustomTokensControllerGetTokenInfoParams struct {
	Address string `url:"address" json:"address"`
}

func (*CustomTokensControllerGetTokenInfoParams) Validate

type CustomTokensControllerGetTokensInfoParams

type CustomTokensControllerGetTokensInfoParams struct {
	Addresses []string `url:"addresses" json:"addresses"`
}

CustomTokensControllerGetTokensInfoParams defines parameters for CustomTokensControllerGetTokensInfo.

func (*CustomTokensControllerGetTokensInfoParams) Validate

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

type TagDto

type TagDto struct {
	Provider string `json:"provider"`
	Value    string `json:"value"`
}

TagDto defines model for TagDto.

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.

Jump to

Keyboard shortcuts

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