Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiServer ¶
type ApiServer struct {
// contains filtered or unexported fields
}
func NewApiServer ¶
func (*ApiServer) GetCirculatingSupply ¶
GetCirculatingSupply calculates and returns the current circulating supply.
type Option ¶
type Option func(*ApiServer)
func WithEstimatedSupply ¶
WithEstimatedSupply sets the estimated supply by day. The map keys are dates in "YYYY-MM-DD" format.
func WithListenAddr ¶
func WithLogger ¶
func WithRpcClient ¶
WithRpcClient sets the solana RPC client for the ApiServer.
type SolanaClient ¶
type SolanaClient struct {
// contains filtered or unexported fields
}
SolanaClient is an HTTP client for the Solana JSON-RPC API.
func NewSolanaClient ¶
func NewSolanaClient() *SolanaClient
NewSolanaClient creates a new client for the Solana JSON-RPC API.
func (*SolanaClient) GetTotalSupply ¶
func (c *SolanaClient) GetTotalSupply(ctx context.Context) (float64, error)
GetTotalSupply fetches the total supply of a token from the Solana RPC.
Click to show internal directories.
Click to hide internal directories.