external

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidJSON = errors.New("invalid json")
View Source
var ErrMetadataURLNotFound = errors.New("metadata url not found")

Functions

func GetBlurPoolBalance added in v0.6.2

func GetBlurPoolBalance(walletAddress common.Address) (*big.Int, error)

func GetEstimatedGasPrice added in v0.2.0

func GetEstimatedGasPrice() *big.Int

func GetTokenBalance added in v0.2.0

func GetTokenBalance(walletAddress common.Address, tokenAddress common.Address) (*big.Int, error)

func GetWETHBalance added in v0.2.0

func GetWETHBalance(walletAddress common.Address) (*big.Int, error)

Types

type AccountBalance added in v0.2.0

type AccountBalance struct {
	Account         string   `json:"account"`
	BalanceETH      *big.Int `json:"balance"`
	BalanceWETH     *big.Int `json:"balance_weth"`
	BalanceBlurPool *big.Int `json:"balance_blurpool"`
}

func GetBalances added in v0.2.0

func GetBalances(wallets *wallet.Wallets) ([]*AccountBalance, error)

func MultiAccountBalance added in v0.2.0

func MultiAccountBalance(wallets *wallet.Wallets) []*AccountBalance

type AccountBalancesResponse added in v0.2.0

type AccountBalancesResponse struct {
	Response
	Result []struct {
		Account string `json:"account"`
		Balance string `json:"balance"`
	} `json:"result"`
}

type ENSMetadata

type ENSMetadata struct {
	Attributes      []ENSMetadataAttribute `json:"attributes"`
	BackgroundImage string                 `json:"background_image"`
	Description     string                 `json:"description"`
	ImageURL        string                 `json:"image_url"`
	Name            string                 `json:"name"`
	NameLength      int                    `json:"name_length"`
	SegmentLength   int                    `json:"segment_length"`
	URL             string                 `json:"url"`
	Version         int                    `json:"version"`
}

ENSMetadata defines model for ENSMetadata.

func GetENSMetadataForTokenID

func GetENSMetadataForTokenID(tokenID *big.Int) (*ENSMetadata, error)

type ENSMetadataAttribute

type ENSMetadataAttribute struct {
	TraitType   string      `json:"trait_type"`
	DisplayType string      `json:"display_type"`
	Value       interface{} `json:"value"`
}

type ERC1155Metadata

type ERC1155Metadata struct {
	Name         string                      `json:"name"`
	CreatedBy    string                      `json:"created_by"`
	ExternalURL  string                      `json:"external_url"`
	Description  string                      `json:"description"`
	Attributes   []ERC1155MetadataAttribute  `json:"attributes"`
	ImageDetails ERC1155MetadataImageDetails `json:"image_details"`
	Image        string                      `json:"image"`
	ImageURL     string                      `json:"image_url"`
}

func GetERC1155MetadataForURI

func GetERC1155MetadataForURI(ctx context.Context, url string, tokenID *big.Int) (*ERC1155Metadata, error)

type ERC1155MetadataAttribute

type ERC1155MetadataAttribute struct {
	TraitType   string `json:"trait_type"`
	Value       string `json:"value"`
	DisplayType string `json:"display_type,omitempty"`
	MaxValue    string `json:"max_value,omitempty"`
}

type ERC1155MetadataImageDetails

type ERC1155MetadataImageDetails struct {
	Bytes  int    `json:"bytes"`
	Format string `json:"format"`
	Sha256 string `json:"sha256"`
	Width  int    `json:"width"`
	Height int    `json:"height"`
}

type EventSignature added in v0.6.0

type EventSignature struct {
	ID             int       `json:"id"`
	CreatedAt      time.Time `json:"created_at"`
	TextSignature  string    `json:"text_signature"`
	HexSignature   string    `json:"hex_signature"`
	BytesSignature string    `json:"bytes_signature"`
}

func GetEventSignature added in v0.6.0

func GetEventSignature(hexSignature common.Hash) (EventSignature, error)

type EventSignatureResponse added in v0.6.0

type EventSignatureResponse struct {
	Count    int              `json:"count"`
	Next     interface{}      `json:"next"`
	Previous interface{}      `json:"previous"`
	Results  []EventSignature `json:"results"`
}

type FloorPriceAlchemyData added in v0.7.1

type FloorPriceAlchemyData struct {
	FloorPrice    float64 `json:"floorPrice"`
	PriceCurrency string  `json:"priceCurrency"`
	CollectionURL string  `json:"collectionUrl"`
	RetrievedAt   string  `json:"retrievedAt"`
	Error         string  `json:"error"`
}

type GasOracle added in v0.2.0

type GasOracle struct {
	LastBlock       string `json:"LastBlock"`
	SafeGasPrice    string `json:"SafeGasPrice"`
	ProposeGasPrice string `json:"ProposeGasPrice"`
	FastGasPrice    string `json:"FastGasPrice"`
	SuggestBaseFee  string `json:"suggestBaseFee"`
	GasUsedRatio    string `json:"gasUsedRatio"`
}

func GetGasOracle added in v0.2.0

func GetGasOracle() *GasOracle

type GasOracleResponse added in v0.2.0

type GasOracleResponse struct {
	Response
	Result GasOracle `json:"result"`
}

type GetFloorPriceAlchemyResponse added in v0.7.1

type GetFloorPriceAlchemyResponse struct {
	Opensea   FloorPriceAlchemyData `json:"openSea"`
	Looksrare FloorPriceAlchemyData `json:"looksRare"`
}

func GetFloorPriceFromAlchemy added in v0.7.1

func GetFloorPriceFromAlchemy(contract string) *GetFloorPriceAlchemyResponse

type Response added in v0.2.0

type Response struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type Token added in v0.2.0

type Token string

type TokenBalancesResponse added in v0.2.0

type TokenBalancesResponse struct {
	Response
	Result string `json:"result"`
}

Jump to

Keyboard shortcuts

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