Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TokensServiceName rest.ServiceName = "tokens"
TokensServiceName defines the service name for the Tokens service.
Functions ¶
func RegisterGetTokenByContractHandler ¶
RegisterGetTokenByContractHandler registers the endpoint to retrieve a token by contract address
func RegisterGetTokensBySymbolHandler ¶
RegisterGetTokensBySymbolHandler registers the endpoint to retrieve tokens by symbol
func RegisterListTokensHandler ¶
RegisterListTokensHandler registers the endpoint to retrieve tokens
Types ¶
type InputNetworkAddress ¶
type InputNetworkAddress struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Address common.Address `` // Address specifies the account address /* 135-byte string literal not displayed */ }
InputNetworkAddress represents the input parameters required to specify a network and address.
type InputNetworkPaginated ¶
type InputNetworkPaginated struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Limit uint `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of tokens to return"` // Limit specifies the number of accounts to return Offset uint `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkPaginated represents the input parameters required to specify a network, limit and offset.
type InputNetworkSymbolPaginated ¶
type InputNetworkSymbolPaginated struct { NetworkId utils.NetworkID `json:"networkId" path:"networkId" default:"1" example:"1" doc:"Network ID"` // Network ID specifies the blockchain network (e.g., 1 for Ethereum Mainnet) Symbol string `json:"symbol" path:"symbol" example:"[\"USDT\"]" uniqueItems:"true" minItems:"1" doc:"Token symbol"` // Symbol specifies the token symbol Limit uint `json:"limit" query:"limit" example:"10" default:"10" doc:"Limit for the number of tokens to return"` // Limit specifies the number of tokens to return Offset uint `json:"offset" query:"offset" example:"0" default:"0" doc:"Offset for pagination"` // Offset specifies the offset for pagination }
InputNetworkSymbolPaginated represents the input parameters required to specify a network, symbol, and pagination.
type Namespace ¶
Namespace represents a service namespace containing configuration and dependencies for the Tokens service.
func NewNamespace ¶
func NewNamespace(server *rest.Server, db db.Adapter, pool *clients.ClientPool, nats *nats.Conn, cache *cache.Redis) *Namespace
NewNamespace creates a new instance of Namespace with the provided server, database adapter, client pool, NATS connection, and Redis cache.
func (*Namespace) GetName ¶
func (s *Namespace) GetName() rest.ServiceName
GetName returns the service name for the Tokens namespace.
func (*Namespace) RegisterHandlers ¶
RegisterHandlers registers all the necessary handlers for the Accounts namespace.