Documentation ¶
Index ¶
- type Collection
- type ErrCollectionNotFoundByAddress
- type ErrTokenNotFoundByIdentifiers
- type Ownership
- type Provider
- func (p Provider) GetContractByAddress(ctx context.Context, chain persist.Chain, contractAddress persist.Address) (common.ChainAgnosticContract, error)
- func (p *Provider) GetTokenByTokenIdentifiersAndOwner(ctx context.Context, ti common.ChainAgnosticIdentifiers, ...) (common.ChainAgnosticToken, common.ChainAgnosticContract, error)
- func (p *Provider) GetTokenDescriptorsByTokenIdentifiers(ctx context.Context, ti common.ChainAgnosticIdentifiers) (common.ChainAgnosticTokenDescriptors, common.ChainAgnosticContractDescriptors, ...)
- func (p *Provider) GetTokenMetadataByTokenIdentifiers(ctx context.Context, ti common.ChainAgnosticIdentifiers) (persist.TokenMetadata, error)
- func (p *Provider) GetTokensByContractAddress(ctx context.Context, contractAddress persist.Address, limit int, offset int) ([]common.ChainAgnosticToken, common.ChainAgnosticContract, error)
- func (p Provider) GetTokensByTokenIdentifiersBatch(ctx context.Context, tIDs []common.ChainAgnosticIdentifiers) ([]common.ChainAgnosticToken, []error)
- func (p *Provider) GetTokensByWalletAddress(ctx context.Context, ownerAddress persist.Address) ([]common.ChainAgnosticToken, []common.ChainAgnosticContract, error)
- func (p *Provider) GetTokensIncrementallyByContractAddress(ctx context.Context, address persist.Address, maxLimit int) (<-chan common.ChainAgnosticTokensAndContracts, <-chan error)
- func (p *Provider) GetTokensIncrementallyByWalletAddress(ctx context.Context, ownerAddress persist.Address) (<-chan common.ChainAgnosticTokensAndContracts, <-chan error)
- type Token
- type TokenWithOwnership
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type ErrCollectionNotFoundByAddress ¶
func (ErrCollectionNotFoundByAddress) Error ¶
func (e ErrCollectionNotFoundByAddress) Error() string
type ErrTokenNotFoundByIdentifiers ¶
type ErrTokenNotFoundByIdentifiers struct { ContractAddress persist.Address TokenID persist.HexTokenID OwnerAddress persist.Address }
func (ErrTokenNotFoundByIdentifiers) Error ¶
func (e ErrTokenNotFoundByIdentifiers) Error() string
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is an the struct for retrieving data from the Ethereum blockchain
func NewProvider ¶
func NewProvider(ctx context.Context, httpClient *http.Client, chain persist.Chain, l retry.Limiter) (*Provider, func())
NewProvider creates a new Reservoir provider
func (Provider) GetContractByAddress ¶
func (*Provider) GetTokenByTokenIdentifiersAndOwner ¶
func (p *Provider) GetTokenByTokenIdentifiersAndOwner(ctx context.Context, ti common.ChainAgnosticIdentifiers, ownerAddress persist.Address) (common.ChainAgnosticToken, common.ChainAgnosticContract, error)
func (*Provider) GetTokenDescriptorsByTokenIdentifiers ¶
func (p *Provider) GetTokenDescriptorsByTokenIdentifiers(ctx context.Context, ti common.ChainAgnosticIdentifiers) (common.ChainAgnosticTokenDescriptors, common.ChainAgnosticContractDescriptors, error)
func (*Provider) GetTokenMetadataByTokenIdentifiers ¶
func (p *Provider) GetTokenMetadataByTokenIdentifiers(ctx context.Context, ti common.ChainAgnosticIdentifiers) (persist.TokenMetadata, error)
func (*Provider) GetTokensByContractAddress ¶
func (Provider) GetTokensByTokenIdentifiersBatch ¶
func (p Provider) GetTokensByTokenIdentifiersBatch(ctx context.Context, tIDs []common.ChainAgnosticIdentifiers) ([]common.ChainAgnosticToken, []error)
GetTokensByTokenIdentifiersBatch returns a slice tokens from a list of token identifiers Data is returned in the same order as the input. If a token is not found, the zero-value is used instead.
func (*Provider) GetTokensByWalletAddress ¶
func (p *Provider) GetTokensByWalletAddress(ctx context.Context, ownerAddress persist.Address) ([]common.ChainAgnosticToken, []common.ChainAgnosticContract, error)
func (*Provider) GetTokensIncrementallyByContractAddress ¶
func (p *Provider) GetTokensIncrementallyByContractAddress(ctx context.Context, address persist.Address, maxLimit int) (<-chan common.ChainAgnosticTokensAndContracts, <-chan error)
GetTokensIncrementallyByContractAddress returns tokens for a contract address
func (*Provider) GetTokensIncrementallyByWalletAddress ¶
type Token ¶
type Token struct { Contract persist.Address `json:"contract"` TokenID string `json:"tokenId"` Kind string `json:"kind"` Name string `json:"name"` Description string `json:"description"` Metadata persist.TokenMetadata `json:"metadata"` Media string `json:"media"` Image string `json:"image"` ImageSmall string `json:"imageSmall"` ImageLarge string `json:"imageLarge"` Collection Collection `json:"collection"` Owner persist.Address `json:"owner"` IsSpam bool `json:"isSpam"` }
type TokenWithOwnership ¶
Click to show internal directories.
Click to hide internal directories.