airstack

package
v0.0.0-...-0c16c9c Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Airstack

type Airstack struct {
	*ac.Client
	// contains filtered or unexported fields
}

Airstack wraps all the required artifacts for interacting with the Airstack API

func NewAirstack

func NewAirstack(
	ctx context.Context,
	endpoint,
	apiKey,
	supportAPI string,
	supportedBlockchains,
	tokenWhitelist []string,
	maxHolders uint32,
) (*Airstack, error)

NewAirstack creates a new Airstack artifact with a reference to a MongoDB and an Airstack client that enables to make predefined queries to the Airstack GraphQL API.

func (*Airstack) MaxHolders

func (a *Airstack) MaxHolders() uint32

MaxHolders returns the maximum number of holders allowed to be retrieved from the Airstack API

func (*Airstack) NumHoldersByTokenAnkrAPI

func (a *Airstack) NumHoldersByTokenAnkrAPI(tokenAddress, blockchain string) (uint32, error)

func (*Airstack) TokenDecimalsByToken

func (a *Airstack) TokenDecimalsByToken(tokenAddress, blockchain string) (int, error)

func (*Airstack) TokenWhitelist

func (a *Airstack) TokenWhitelist() map[string]bool

TokenWhitelist returns the list of tokens to be considered for avoiding some checks

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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