covalent

package
v0.0.0-...-d2182b9 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BalanceItemType = "nft"
	ERC721Type      = "erc721"
	ERC1155Type     = "erc1155"
)

Variables

This section is empty.

Functions

func New

func New(opt Options) (web3mod.Web3, error)

Types

type BalanceData

type BalanceData struct {
	Items []BalanceItem `json:"items"`
}

type BalanceItem

type BalanceItem struct {
	ContractName         string    `json:"contract_name"`
	ContractTickerSymbol string    `json:"contract_ticker_symbol"`
	ContractAddress      string    `json:"contract_address"`
	LogoURL              string    `json:"logo_url"`
	Type                 string    `json:"type"`
	SupportsERC          []string  `json:"supports_erc"`
	NFTData              []NFTData `json:"nft_data"`
}

type ExternalData

type ExternalData struct {
	Items []ExternalItem `json:"items"`
}

type ExternalItem

type ExternalItem struct {
	NFTData []NFTData `json:"nft_data"`
}

type ExternalNFTData

type ExternalNFTData struct {
	TokenID  string `json:"token_id"`
	TokenURL string `json:"token_url"`
}

type GetBalanceOut

type GetBalanceOut struct {
	Data         *BalanceData `json:"data"`
	Error        bool         `json:"error"`
	ErrorMessage string       `json:"error_message"`
	ErrorCode    string       `json:"error_code"`
}

type GetExternalMetadataIn

type GetExternalMetadataIn struct {
	ContractAddress string
	NFTID           string
	ChainID         int
}

type GetExternalMetadataOut

type GetExternalMetadataOut struct {
	Data         *ExternalData `json:"data"`
	Error        bool          `json:"error"`
	ErrorMessage string        `json:"error_message"`
	ErrorCode    string        `json:"error_code"`
}

type NFTData

type NFTData struct {
	TokenID      string `json:"token_id"`
	TokenBalance string `json:"token_balance"`
	TokenURL     string `json:"token_url"`
}

type Options

type Options struct {
	APIURL     string
	APIKey     string
	HTTPHelper httphelper.Client
}

func (*Options) SetDefault

func (o *Options) SetDefault()

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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