Documentation
¶
Index ¶
- func GetEventDecoderConfig() mapstructure.DecoderConfig
- func StringToNftIDHookFunc() mapstructure.DecodeHookFunc
- type Account
- type Chain
- type CollectionCriteria
- type CollectionOffer
- type Consideration
- type ContractCriteria
- type EventPayload
- type GeneralEvent
- type Item
- type ItemGenericPayload
- type ItemListed
- type ItemListedPayload
- type ItemMetadataUpdated
- type ItemReceivedBid
- type ItemReceivedBidPayload
- type Metadata
- type MgmtAction
- type MgmtEvent
- type NftID
- type Parameters
- type PaymentToken
- type ProtocolData
- type TraitCriteria
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEventDecoderConfig ¶ added in v0.12.0
func GetEventDecoderConfig() mapstructure.DecoderConfig
func StringToNftIDHookFunc ¶ added in v0.7.3
func StringToNftIDHookFunc() mapstructure.DecodeHookFunc
StringToNftIDHookFunc is a mapstructure hook function that converts a string to a NftID.
Types ¶
type CollectionCriteria ¶ added in v0.11.0
type CollectionCriteria struct {
Slug string `json:"slug" mapstructure:"slug"`
}
func (*CollectionCriteria) String ¶ added in v0.11.0
func (c *CollectionCriteria) String() string
type CollectionOffer ¶ added in v0.7.3
type Consideration ¶ added in v0.7.3
type Consideration struct {
EndAmount *big.Int `json:"endAmount" mapstructure:"endAmount"`
IdentifierOrCriteria string `json:"identifierOrCriteria" mapstructure:"identifierOrCriteria"`
ItemType int `json:"itemType" mapstructure:"itemType"`
Recipient common.Address `json:"recipient,omitempty" mapstructure:"recipient,omitempty"`
StartAmount *big.Int `json:"startAmount" mapstructure:"startAmount"`
Token common.Address `json:"token" mapstructure:"token"`
}
type ContractCriteria ¶ added in v0.11.0
type EventPayload ¶ added in v0.7.3
type EventPayload struct {
OrderHash common.Hash `json:"order_hash" mapstructure:"order_hash"`
EventTimestamp time.Time `json:"event_timestamp" mapstructure:"event_timestamp"`
ExpirationDate time.Time `json:"expiration_date" mapstructure:"expiration_date"`
CollectionCriteria `json:"collection" mapstructure:"collection"`
Maker Account `json:"maker,omitempty" mapstructure:"maker,omitempty"`
Taker Account `json:"taker,omitempty" mapstructure:"taker,omitempty"`
BasePrice *big.Int `json:"base_price" mapstructure:"base_price"`
Quantity int `json:"quantity" mapstructure:"quantity"`
PaymentToken `json:"payment_token" mapstructure:"payment_token"`
ProtocolAddress common.Address `json:"protocol_address,omitempty" mapstructure:"protocol_address,omitempty"`
ProtocolData ProtocolData `json:"protocol_data,omitempty" mapstructure:"protocol_data,omitempty"`
// "item" is weird Oo it afaik just exists in the *collection*Offer event and is always empty!?
Item interface{} `json:"item,omitempty" mapstructure:"item,omitempty"`
Other map[string]interface{} `mapstructure:",remain"`
}
func (EventPayload) GetPrice ¶ added in v0.7.3
func (ep EventPayload) GetPrice() *price.Price
type GeneralEvent ¶ added in v0.12.0
type GeneralEvent struct {
EventType string `json:"event_type" mapstructure:"event_type"`
SentAt time.Time `json:"sent_at" mapstructure:"sent_at"`
Payload ItemGenericPayload `json:"payload" mapstructure:"payload"`
Other map[string]interface{} `mapstructure:",remain"`
// contains filtered or unexported fields
}
func (*GeneralEvent) BasePrice ¶ added in v0.12.0
func (e *GeneralEvent) BasePrice() *price.Price
func (*GeneralEvent) ContractAddress ¶ added in v0.12.0
func (e *GeneralEvent) ContractAddress() *common.Address
func (*GeneralEvent) ItemName ¶ added in v0.12.0
func (e *GeneralEvent) ItemName() string
type ItemGenericPayload ¶ added in v0.11.0
type ItemGenericPayload struct {
Item `json:"item" mapstructure:"item,omitempty"`
CreatedDate time.Time `json:"created_date" mapstructure:"created_date,omitempty"`
CollectionCriteria `json:"collection_criteria" mapstructure:"collection_criteria,omitempty"`
ContractCriteria `json:"asset_contract_criteria" mapstructure:"asset_contract_criteria,omitempty"`
TraitCriteria `json:"trait_criteria" mapstructure:"trait_criteria,omitempty"`
EventPayload `json:"payload" mapstructure:",squash,omitempty"`
IsPrivate bool `json:"is_private" mapstructure:"is_private"`
ListingDate time.Time `json:"listing_date" mapstructure:"listing_date"`
ListingType interface{} `json:"listing_type" mapstructure:"listing_type"`
Other map[string]interface{} `mapstructure:",remain"`
}
type ItemListed ¶ added in v0.7.3
type ItemListed struct {
EventType string `json:"event_type" mapstructure:"event_type"`
SentAt time.Time `json:"sent_at" mapstructure:"sent_at"`
Payload ItemListedPayload `json:"payload" mapstructure:"payload"`
Other map[string]interface{} `mapstructure:",remain"`
}
type ItemListedPayload ¶ added in v0.11.1
type ItemListedPayload struct {
EventPayload `mapstructure:",squash"`
Item Item `json:"item" mapstructure:"item"`
IsPrivate bool `json:"is_private" mapstructure:"is_private"`
ListingDate time.Time `json:"listing_date" mapstructure:"listing_date"`
ListingType interface{} `json:"listing_type" mapstructure:"listing_type"`
Other map[string]interface{} `mapstructure:",remain"`
}
type ItemMetadataUpdated ¶ added in v0.11.0
type ItemReceivedBid ¶ added in v0.7.3
type ItemReceivedBid struct {
EventType string `json:"event_type" mapstructure:"event_type"`
SentAt time.Time `json:"sent_at" mapstructure:"sent_at"`
Payload ItemReceivedBidPayload `json:"payload" mapstructure:"payload"`
Other map[string]interface{} `mapstructure:",remain"`
}
type ItemReceivedBidPayload ¶ added in v0.7.3
type ItemReceivedBidPayload struct {
Item `json:"item" mapstructure:"item"`
EventPayload `json:"payload" mapstructure:",squash"`
CreatedDate time.Time `json:"created_date" mapstructure:"created_date"`
Other map[string]interface{} `mapstructure:",remain"`
}
type Metadata ¶ added in v0.11.0
type Metadata struct {
Name string `json:"name" mapstructure:"name"`
Description string `json:"description" mapstructure:"description"`
BackgroundColor string `json:"background_color" mapstructure:"background_color"`
AnimationURL string `json:"animation_url" mapstructure:"animation_url"`
ImageURL string `json:"image_url" mapstructure:"image_url"`
MetadataURL string `json:"metadata_url" mapstructure:"metadata_url"`
Traits []degendb.Trait `json:"traits" mapstructure:"traits"`
}
type MgmtAction ¶
type MgmtAction int64
const ( // client actions. Subscribe MgmtAction = iota Unsubscribe // SendSlugs is used to request the slugs/events to subscribe to from the clients. SendSlugs )
func (MgmtAction) String ¶
func (a MgmtAction) String() string
type MgmtEvent ¶
type MgmtEvent struct {
Action MgmtAction `json:"action"`
Events []osmodels.EventType `json:"events"`
Slugs []string `json:"slugs"`
}
type NftID ¶ added in v0.7.3
type NftID []string
func ParseNftID ¶ added in v0.7.3
ParseNftID parses a NftID from a string in the format "chain/contractAddress/tokenID".
func (*NftID) ContractAddress ¶ added in v0.7.3
ContractAddress returns the contract address of the token.
type Parameters ¶ added in v0.11.0
type Parameters struct {
ConduitKey string `json:"conduitKey" mapstructure:"conduitKey"`
Consideration []Consideration `json:"consideration,omitempty" mapstructure:"consideration,omitempty"`
Counter interface{} `json:"counter" mapstructure:"counter"`
EndTime time.Time `json:"endTime" mapstructure:"endTime"`
Offer []Consideration `json:"offer,omitempty" mapstructure:"offer,omitempty"`
Offerer string `json:"offerer" mapstructure:"offerer"`
OrderType int `json:"orderType" mapstructure:"orderType"`
Salt string `json:"salt,omitempty" mapstructure:"salt,omitempty"`
StartTime time.Time `json:"startTime" mapstructure:"startTime"`
TotalOriginalConsiderationItems int `json:"totalOriginalConsiderationItems" mapstructure:"totalOriginalConsiderationItems"`
Zone common.Address `json:"zone" mapstructure:"zone"`
ZoneHash common.Hash `json:"zoneHash" mapstructure:"zoneHash"`
}
type PaymentToken ¶ added in v0.7.3
type ProtocolData ¶ added in v0.7.3
type ProtocolData struct {
Parameters `json:"parameters,omitempty" mapstructure:"parameters,omitempty"`
Signature string `json:"signature" mapstructure:"signature"`
}
type TraitCriteria ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.