Documentation ¶
Index ¶
- Constants
- func GetAssetContract(contractAddress common.Address) *models.AssetContract
- func GetCollectionSlug(collectionAddress common.Address) string
- func GetCollectionsFor(walletAddress common.Address, userCollections *collections.Collections, ...) []*collections.GbCollection
- func GetWalletCollections(wallets map[common.Address]*wallet.Wallet, ...) []*collections.GbCollection
- func SubscribeToCollectionSlug(client *StreamClient, slug string, eventHandler func(itemListedEvent any))
- type StreamClient
- type StreamEventType
Constants ¶
View Source
const StreamAPIEndpoint = "wss://stream.openseabeta.com/socket"
Variables ¶
This section is empty.
Functions ¶
func GetAssetContract ¶
func GetAssetContract(contractAddress common.Address) *models.AssetContract
func GetCollectionSlug ¶
func GetCollectionsFor ¶
func GetCollectionsFor(walletAddress common.Address, userCollections *collections.Collections, nodes *node.Nodes, try int) []*collections.GbCollection
GetCollectionsFor returns the collections a wallet owns at least one item of.
func GetWalletCollections ¶
func GetWalletCollections(wallets map[common.Address]*wallet.Wallet, userCollections *collections.Collections, nodes *node.Nodes) []*collections.GbCollection
GetWalletCollections returns the collections a wallet owns at least one item of.
func SubscribeToCollectionSlug ¶
func SubscribeToCollectionSlug(client *StreamClient, slug string, eventHandler func(itemListedEvent any))
Types ¶
type StreamClient ¶
type StreamClient struct {
// contains filtered or unexported fields
}
func NewStreamClient ¶
func NewStreamClient(token string, onError func(error)) *StreamClient
func (*StreamClient) Connect ¶
func (s *StreamClient) Connect() error
func (*StreamClient) Disconnect ¶
func (s *StreamClient) Disconnect() error
func (*StreamClient) OnItemListed ¶
func (s *StreamClient) OnItemListed(collectionSlug string, eventHandler func(itemListedEvent any))
func (*StreamClient) OnItemReceivedOffer ¶ added in v0.0.9
func (s *StreamClient) OnItemReceivedOffer(collectionSlug string, eventHandler func(itemReceivedOfferEvent any))
type StreamEventType ¶
type StreamEventType string
const ( Listed StreamEventType = "item_listed" ReceivedOffer StreamEventType = "item_received_offer" )
Click to show internal directories.
Click to hide internal directories.