Documentation
¶
Index ¶
- type Contract
- type ContractMetadata
- type GetContractMetadataResponse
- type Media
- type OpenseaCollection
- type OwnerWithBalances
- type Provider
- func (d *Provider) GetContractByAddress(ctx context.Context, addr persist.Address) (common.ChainAgnosticContract, error)
- func (d *Provider) GetTokenByTokenIdentifiersAndOwner(ctx context.Context, tokenIdentifiers common.ChainAgnosticIdentifiers, ...) (common.ChainAgnosticToken, common.ChainAgnosticContract, error)
- func (d *Provider) GetTokenDescriptorsByTokenIdentifiers(ctx context.Context, ti common.ChainAgnosticIdentifiers) (common.ChainAgnosticTokenDescriptors, common.ChainAgnosticContractDescriptors, ...)
- func (d *Provider) GetTokenMetadataByTokenIdentifiers(ctx context.Context, ti common.ChainAgnosticIdentifiers) (persist.TokenMetadata, error)
- func (d *Provider) GetTokenMetadataByTokenIdentifiersBatch(ctx context.Context, tIDs []common.ChainAgnosticIdentifiers) ([]persist.TokenMetadata, error)
- func (d *Provider) GetTokensByContractAddress(ctx context.Context, contractAddress persist.Address, limit, offset int) ([]common.ChainAgnosticToken, common.ChainAgnosticContract, error)
- func (d *Provider) GetTokensByTokenIdentifiers(ctx context.Context, tokenIdentifiers common.ChainAgnosticIdentifiers) ([]common.ChainAgnosticToken, common.ChainAgnosticContract, error)
- func (d *Provider) GetTokensByWalletAddress(ctx context.Context, addr persist.Address) ([]common.ChainAgnosticToken, []common.ChainAgnosticContract, error)
- func (d *Provider) GetTokensIncrementallyByContractAddress(ctx context.Context, addr persist.Address, limit int) (<-chan common.ChainAgnosticTokensAndContracts, <-chan error)
- func (d *Provider) GetTokensIncrementallyByWalletAddress(ctx context.Context, addr persist.Address) (<-chan common.ChainAgnosticTokensAndContracts, <-chan error)
- type SpamInfo
- type Token
- type TokenBalance
- type TokenID
- type TokenIdentifiers
- type TokenMetadata
- type TokenURI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct { Address string `json:"address"` Title string `json:"title"` ContractDeployer persist.EthereumAddress `json:"contractDeployer"` Opensea OpenseaCollection `json:"openSea"` }
type ContractMetadata ¶
type ContractMetadata struct { Name string `json:"name"` Symbol string `json:"symbol"` TotalSupply string `json:"totalSupply"` TokenType string `json:"tokenType"` ContractDeployer persist.EthereumAddress `json:"contractDeployer"` OpenseaCollection OpenseaCollection `json:"openSea"` }
type GetContractMetadataResponse ¶
type GetContractMetadataResponse struct { Address persist.EthereumAddress `json:"address"` ContractMetadata ContractMetadata `json:"contractMetadata"` }
type OpenseaCollection ¶
type OwnerWithBalances ¶
type OwnerWithBalances struct { OwnerAddress persist.EthereumAddress `json:"ownerAddress"` TokenBalances []TokenBalance `json:"tokenBalances"` }
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is an the struct for retrieving data from the Ethereum blockchain
func NewProvider ¶
NewProvider creates a new ethereum Provider
func (*Provider) GetContractByAddress ¶
func (d *Provider) GetContractByAddress(ctx context.Context, addr persist.Address) (common.ChainAgnosticContract, error)
GetContractByAddress retrieves an ethereum contract by address
func (*Provider) GetTokenByTokenIdentifiersAndOwner ¶
func (d *Provider) GetTokenByTokenIdentifiersAndOwner(ctx context.Context, tokenIdentifiers common.ChainAgnosticIdentifiers, ownerAddress persist.Address) (common.ChainAgnosticToken, common.ChainAgnosticContract, error)
func (*Provider) GetTokenDescriptorsByTokenIdentifiers ¶
func (d *Provider) GetTokenDescriptorsByTokenIdentifiers(ctx context.Context, ti common.ChainAgnosticIdentifiers) (common.ChainAgnosticTokenDescriptors, common.ChainAgnosticContractDescriptors, error)
func (*Provider) GetTokenMetadataByTokenIdentifiers ¶
func (d *Provider) GetTokenMetadataByTokenIdentifiers(ctx context.Context, ti common.ChainAgnosticIdentifiers) (persist.TokenMetadata, error)
func (*Provider) GetTokenMetadataByTokenIdentifiersBatch ¶
func (d *Provider) GetTokenMetadataByTokenIdentifiersBatch(ctx context.Context, tIDs []common.ChainAgnosticIdentifiers) ([]persist.TokenMetadata, error)
func (*Provider) GetTokensByContractAddress ¶
func (d *Provider) GetTokensByContractAddress(ctx context.Context, contractAddress persist.Address, limit, offset int) ([]common.ChainAgnosticToken, common.ChainAgnosticContract, error)
GetTokensByContractAddress retrieves tokens for a contract address on the Ethereum Blockchain
func (*Provider) GetTokensByTokenIdentifiers ¶
func (d *Provider) GetTokensByTokenIdentifiers(ctx context.Context, tokenIdentifiers common.ChainAgnosticIdentifiers) ([]common.ChainAgnosticToken, common.ChainAgnosticContract, error)
func (*Provider) GetTokensByWalletAddress ¶
func (d *Provider) GetTokensByWalletAddress(ctx context.Context, addr persist.Address) ([]common.ChainAgnosticToken, []common.ChainAgnosticContract, error)
GetTokensByWalletAddress retrieves tokens for a wallet address on the Ethereum Blockchain
func (*Provider) GetTokensIncrementallyByContractAddress ¶
func (d *Provider) GetTokensIncrementallyByContractAddress(ctx context.Context, addr persist.Address, limit int) (<-chan common.ChainAgnosticTokensAndContracts, <-chan error)
GetTokensIncrementallyByContractAddress retrieves tokens incrementaly for a contract address on the Ethereum Blockchain
func (*Provider) GetTokensIncrementallyByWalletAddress ¶
func (d *Provider) GetTokensIncrementallyByWalletAddress(ctx context.Context, addr persist.Address) (<-chan common.ChainAgnosticTokensAndContracts, <-chan error)
GetTokensIncrementallyByWalletAddress retrieves tokens for a wallet address on the Ethereum Blockchain
type Token ¶
type Token struct { Contract Contract `json:"contract"` ID TokenIdentifiers `json:"id"` Balance string `json:"balance"` Title string `json:"title"` Description any `json:"description"` // TODO: Update to string when on alchemy V3 TokenURI TokenURI `json:"tokenUri"` Media []Media `json:"media"` Metadata any `json:"metadata"` // TODO: Update to persist.TokenMetadata when on alchemy V3 ContractMetadata ContractMetadata `json:"contractMetadata"` TimeLastUpdated time.Time `json:"timeLastUpdated"` SpamInfo SpamInfo `json:"spamInfo"` }
type TokenBalance ¶
type TokenID ¶
type TokenID string
func (TokenID) ToTokenID ¶
func (t TokenID) ToTokenID() persist.HexTokenID
type TokenIdentifiers ¶
type TokenIdentifiers struct { TokenID TokenID `json:"tokenId"` TokenMetadata ContractMetadata `json:"tokenMetadata"` }
type TokenMetadata ¶
type TokenMetadata struct {
TokenType string `json:"tokenType"`
}
Click to show internal directories.
Click to hide internal directories.