Documentation
¶
Index ¶
- func ValidatePairSortBy(sortBy PairSortBy) bool
- func ValidateSortOrder(order SortOrder) bool
- func ValidateTokenSortBy(sortBy TokenSortBy) bool
- type BatchElem
- type BlockTimestamp
- type Chain
- type FindPairsParams
- type FindPairsRequest
- type FindPairsResponse
- type FindTokensParams
- type FindTokensRequest
- type FindTokensResponse
- type GetBlockAtTimestampParams
- type GetBlockAtTimestampRequest
- type GetBlockAtTimestampResponse
- type GetBlockNumberRequest
- type GetBlockNumberResponse
- type GetBlockTimestampsParams
- type GetBlockTimestampsRequest
- type GetBlockTimestampsResponse
- type GetChainsRequest
- type GetChainsResponse
- type GetHeightsRequest
- type GetHeightsResponse
- type GetPairCountRequest
- type GetPairCountResponse
- type GetTokenCountRequest
- type GetTokenCountResponse
- type Heights
- type JRPCError
- type JRPCRequest
- type JRPCResponse
- type Pair
- type PairFilter
- type PairOptions
- type PairSortBy
- type SortOrder
- type Token
- type TokenFilter
- type TokenOptions
- type TokenSortBy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePairSortBy ¶
func ValidatePairSortBy(sortBy PairSortBy) bool
func ValidateSortOrder ¶
func ValidateTokenSortBy ¶
func ValidateTokenSortBy(sortBy TokenSortBy) bool
Types ¶
type BlockTimestamp ¶
type Chain ¶
type Chain struct {
ChainID int `json:"chain_id"`
Name string `json:"name"`
ShortName string `json:"short_name"`
ExplorerURL string `json:"explorer_url"`
RouterV2 string `json:"router_v2"`
FactoryV2 string `json:"factory_v2"`
RouterV3 string `json:"router_v3"`
FactoryV3 string `json:"factory_v3"`
BlockDuration int64 `json:"block_duration"`
Http string `json:"-"`
}
type FindPairsParams ¶
type FindPairsParams struct {
ChainID int64
Filter *PairFilter
Options *PairOptions
}
type FindPairsRequest ¶
type FindPairsRequest struct {
ChainID *int64 `json:"chain_id"`
Filter *PairFilter `json:"filter,omitempty"`
Options *PairOptions `json:"options,omitempty"`
}
type FindPairsResponse ¶
type FindTokensParams ¶
type FindTokensParams struct {
ChainID int64
Filter *TokenFilter
Options *TokenOptions
}
type FindTokensRequest ¶
type FindTokensRequest struct {
ChainID *int64 `json:"chain_id"`
Filter *TokenFilter `json:"filter,omitempty"`
Options *TokenOptions `json:"options,omitempty"`
}
type FindTokensResponse ¶
type GetBlockAtTimestampResponse ¶
type GetBlockAtTimestampResponse struct {
ID string `json:"id"`
Method string `json:"method"`
Result *BlockTimestamp `json:"result,omitempty"`
Error *JRPCError `json:"error,omitempty"`
}
type GetBlockNumberRequest ¶
type GetBlockNumberRequest struct{}
type GetBlockNumberResponse ¶
type GetBlockTimestampsResponse ¶
type GetBlockTimestampsResponse struct {
ID string `json:"id"`
Method string `json:"method"`
Result []*BlockTimestamp `json:"result,omitempty"`
Error *JRPCError `json:"error,omitempty"`
}
type GetChainsRequest ¶
type GetChainsRequest struct{}
type GetChainsResponse ¶
type GetHeightsRequest ¶
type GetHeightsRequest struct {
ChainID *int64 `json:"chain_id"`
}
type GetHeightsResponse ¶
type GetPairCountRequest ¶
type GetPairCountRequest struct {
ChainID *int64 `json:"chain_id"`
}
type GetPairCountResponse ¶
type GetTokenCountRequest ¶
type GetTokenCountRequest struct {
ChainID *int64 `json:"chain_id"`
}
type GetTokenCountResponse ¶
type JRPCRequest ¶
type JRPCResponse ¶
type JRPCResponse struct {
ID string `json:"id"`
Method string `json:"method"`
Result json.RawMessage `json:"result,omitempty"`
Error *JRPCError `json:"error,omitempty"`
}
type Pair ¶
type Pair struct {
Token0Address string `json:"token0_address"`
Token1Address string `json:"token1_address"`
Fee int64 `json:"fee"`
TickSpacing int64 `json:"tick_spacing"`
PoolAddress string `json:"pool_address"`
PoolType uint8 `json:"pool_type"`
CreatedAt int64 `json:"created_at"`
Hash string `json:"hash"`
ChainID int16 `json:"chain_id"`
}
type PairFilter ¶
type PairFilter struct {
Token0Address *string `json:"token0_address,omitempty"`
Token1Address *string `json:"token1_address,omitempty"`
PoolAddress *string `json:"pool_address,omitempty"`
FromBlock *int64 `json:"from_block,omitempty"`
ToBlock *int64 `json:"to_block,omitempty"`
Fee *int64 `json:"fee,omitempty"`
TickSpacing *int64 `json:"tick_spacing,omitempty"`
Hash *string `json:"hash,omitempty"`
PoolType *uint8 `json:"pool_type,omitempty"`
Fuzzy bool `json:"fuzzy"`
}
type PairOptions ¶
type PairOptions struct {
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
SortBy PairSortBy `json:"sort_by"`
SortOrder SortOrder `json:"sort_order"`
}
type PairSortBy ¶
type PairSortBy string
const ( PairSortByToken0Address PairSortBy = "token0_address" PairSortByToken1Address PairSortBy = "token1_address" PairSortByPoolAddress PairSortBy = "pool_address" PairSortByFee PairSortBy = "fee" PairSortByTickSpacing PairSortBy = "tick_spacing" PairSortByHash PairSortBy = "hash" PairSortByPoolType PairSortBy = "pool_type" PairSortByCreatedAt PairSortBy = "created_at" )
type TokenFilter ¶
type TokenFilter struct {
Address *string `json:"address,omitempty"`
Creator *string `json:"creator,omitempty"`
FromBlock *int64 `json:"from_block,omitempty"`
ToBlock *int64 `json:"to_block,omitempty"`
Name *string `json:"name,omitempty"`
Symbol *string `json:"symbol,omitempty"`
Decimals *uint8 `json:"decimals,omitempty"`
Fuzzy bool `json:"fuzzy"`
}
type TokenOptions ¶
type TokenOptions struct {
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
SortBy TokenSortBy `json:"sort_by"`
SortOrder SortOrder `json:"sort_order"`
}
type TokenSortBy ¶
type TokenSortBy string
const ( TokenSortByAddress TokenSortBy = "address" TokenSortByCreator TokenSortBy = "creator" TokenSortByName TokenSortBy = "name" TokenSortBySymbol TokenSortBy = "symbol" TokenSortByDecimals TokenSortBy = "decimals" TokenSortByCreatedAt TokenSortBy = "created_at" TokenSortByHash TokenSortBy = "creation_hash" )
Click to show internal directories.
Click to hide internal directories.