moralis

package
v0.0.0-...-4028f8f Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(c *http.Client, opts *MoralisOptions) *Client

func (*Client) GetNFTsByAddr

func (mc *Client) GetNFTsByAddr(addr string)

func (*Client) GetOwnersByTokenId

func (mc *Client) GetOwnersByTokenId(contract string, tokenId string, limit int, cursor *string) (*NFTResult, error)

func (*Client) GetTransfersByContract

func (mc *Client) GetTransfersByContract(params *TransfersPrarams) (*NftTransferResult, error)

func (*Client) GetTransfersByTokenId

func (mc *Client) GetTransfersByTokenId(params *TransfersByTokenIdPrarams) (*NftTransferResult, error)

func (*Client) OwnersOfContract

func (mc *Client) OwnersOfContract(contract string, limit int, cursor *string) (*NFTResult, error)

type MoralisOptions

type MoralisOptions struct {
	ApiKey string
}

type NFTItem

type NFTItem struct {
	Address  string      `json:"token_address"`
	TokenId  string      `json:"token_id"`
	Amount   string      `json:"amount"`
	Metadata NFTMetadata `json:"normalized_metadata"`
	Name     string      `json:"name"`
	OwnerOf  string      `json:"owner_of"`
}

type NFTMetadata

type NFTMetadata struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	Image        string `json:"image"`
	ExternalLink string `json:"external_link"`
}

type NFTResult

type NFTResult struct {
	Total  int64     `json:"total"`
	Cursor string    `json:"cursor"`
	Result []NFTItem `json:"result"`
}

type NftTransfer

type NftTransfer struct {
	TokenAddress    string `json:"token_address"`
	TokenID         string `json:"token_id"`
	FromAddress     string `json:"from_address"`
	ToAddress       string `json:"to_address"`
	Value           string `json:"value"`
	Amount          string `json:"amount"`
	ContractType    string `json:"contract_type"`
	BlockNumber     string `json:"block_number"`
	BlockTimestamp  string `json:"block_timestamp"`
	TransactionHash string `json:"transaction_hash"`
	Operator        string `json:"operator"`
}

type NftTransferResult

type NftTransferResult struct {
	Total         int64         `json:"total"`
	Page          int64         `json:"page"`
	PageSize      int           `json:"page_size"`
	Cursor        *string       `json:"cursor"`
	BlockExists   bool          `json:"block_exists"`
	IndexComplete bool          `json:"index_complete"`
	Result        []NftTransfer `json:"result"`
}

type RequestParams

type RequestParams struct {
	Chain  *string `json:"chain"`
	Limit  *int    `json:"limit"`
	Cursor *string `json:"cursor"`
}

func (*RequestParams) Query

func (rp *RequestParams) Query() map[string]string

type SyncStatus

type SyncStatus string
const (
	StatusSyncing SyncStatus = "SYNCING"
	StatusSynced  SyncStatus = "SYNCED"
)

type TransfersByTokenIdPrarams

type TransfersByTokenIdPrarams struct {
	TransfersPrarams
	TokenId string
}

type TransfersPrarams

type TransfersPrarams struct {
	RequestParams
	Contract string
}

Jump to

Keyboard shortcuts

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