Documentation ¶
Index ¶
- func IsHexAddress(s string) bool
- type Account
- type Address
- type Asset
- type AssetBundle
- type AssetContract
- type AuctionType
- type Bytes
- type Contract
- type DevFeePaymentEvent
- type Event
- type EventType
- type FeeMethod
- type HowToCall
- type Number
- type Opensea
- func (o Opensea) GetOrders(assetContractAddress string, listedAfter int64) ([]*Order, error)
- func (o Opensea) GetOrdersWithContext(ctx context.Context, assetContractAddress string, listedAfter int64) (orders []*Order, err error)
- func (o Opensea) GetSingleAsset(assetContractAddress string, tokenID *big.Int) (*Asset, error)
- func (o Opensea) GetSingleAssetWithContext(ctx context.Context, assetContractAddress string, tokenID *big.Int) (*Asset, error)
- func (o Opensea) GetSingleContract(assetContractAddress string) (*Contract, error)
- func (o Opensea) GetSingleContractWithContext(ctx context.Context, assetContractAddress string) (contract *Contract, err error)
- func (o Opensea) RetrievingEvents(params *RetrievingEventsParams) ([]*Event, error)
- func (o Opensea) RetrievingEventsWithContext(ctx context.Context, params *RetrievingEventsParams) (events []*Event, err error)
- type Order
- type PaymentToken
- type RetrievingEventsParams
- type SaleKind
- type Side
- type TimeNano
- type Trait
- type Transaction
- type User
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsHexAddress ¶
Types ¶
type Address ¶
type Address string
const NullAddress Address = "0x0000000000000000000000000000000000000000"
func ParseAddress ¶
func (Address) IsNullAddress ¶
func (Address) MarshalJSON ¶
func (*Address) UnmarshalJSON ¶
type Asset ¶
type Asset struct { TokenID string `json:"token_id"` NumSales int64 `json:"num_sales"` BackgroundColor string `json:"background_color"` ImageURL string `json:"image_url"` ImagePreviewURL string `json:"image_preview_url"` ImageThumbnailURL string `json:"image_thumbnail_url"` ImageOriginalURL string `json:"image_original_url"` AnimationURL string `json:"animation_url"` AnimationOriginalURL string `json:"animation_original_url"` Name string `json:"name"` Description string `json:"description"` ExternalLink string `json:"external_link"` AssetContract *AssetContract `json:"asset_contract"` Owner *Account `json:"owner"` Permalink string `json:"permalink"` // Collection *Collection `json:"collection"` Decimals int64 `json:"decimals"` }
type AssetBundle ¶
type AssetBundle struct { Maker *Account `json:"maker"` Slug string `json:"slug"` Assets []*Asset `json:"assets"` Name string `json:"name"` Description string `json:"description"` ExternalLink string `json:"external_link"` AssetContract *AssetContract `json:"asset_contract"` Permalink string `json:"permalink"` SellOrders interface{} `json:"sell_orders"` }
type AssetContract ¶
type AssetContract struct { Address Address `json:"address"` AssetContractType string `json:"asset_contract_type"` CreatedDate string `json:"created_date"` Name string `json:"name"` NftVersion string `json:"nft_version"` OpenseaVersion interface{} `json:"opensea_version"` Owner *Account `json:"owner"` SchemaName string `json:"schema_name"` Symbol string `json:"symbol"` TotalSupply interface{} `json:"total_supply"` Description string `json:"description"` ExternalLink string `json:"external_link"` ImageURL string `json:"image_url"` DefaultToFiat bool `json:"default_to_fiat"` DevBuyerFeeBasisPoints int64 `json:"dev_buyer_fee_basis_points"` DevSellerFeeBasisPoints int64 `json:"dev_seller_fee_basis_points"` OnlyProxiedTransfers bool `json:"only_proxied_transfers"` OpenseaBuyerFeeBasisPoints int64 `json:"opensea_buyer_fee_basis_points"` OpenseaSellerFeeBasisPoints int64 `json:"opensea_seller_fee_basis_points"` BuyerFeeBasisPoints int64 `json:"buyer_fee_basis_points"` SellerFeeBasisPoints int64 `json:"seller_fee_basis_points"` PayoutAddress Address `json:"payout_address"` }
type AuctionType ¶
type AuctionType string
const ( AuctionTypeNone AuctionType = "" AuctionTypeEnglish AuctionType = "english" AuctionTypeDutch AuctionType = "dutch" AuctionTypeMinPrice AuctionType = "min-price" )
type Contract ¶
type Contract struct { // Collection Collection `json:"collection"` Address Address `json:"address"` AssetContractType string `json:"asset_contract_type"` CreatedDate string `json:"created_date"` Name string `json:"name"` NFTVersion string `json:"nft_version"` OpenseaVersion interface{} `json:"opensea_version"` Owner int64 `json:"owner"` SchemaName string `json:"schema_name"` Symbol string `json:"symbol"` TotalSupply interface{} `json:"total_supply"` Description string `json:"description"` ExternalLink string `json:"external_link"` ImageURL string `json:"image_url"` DefaultToFiat bool `json:"default_to_fiat"` DevBuyerFeeBasisPoints int64 `json:"dev_buyer_fee_basis_points"` DevSellerFeeBasisPoints int64 `json:"dev_seller_fee_basis_points"` OnlyProxiedTransfers bool `json:"only_proxied_transfers"` OpenseaBuyerFeeBasisPoints int64 `json:"opensea_buyer_fee_basis_points"` OpenseaSellerFeeBasisPoints int64 `json:"opensea_seller_fee_basis_points"` BuyerFeeBasisPoints int64 `json:"buyer_fee_basis_points"` SellerFeeBasisPoints int64 `json:"seller_fee_basis_points"` PayoutAddress interface{} `json:"payout_address"` }
type DevFeePaymentEvent ¶
type DevFeePaymentEvent struct { EventType string `json:"event_type"` EventTimestamp string `json:"event_timestamp"` AuctionType interface{} `json:"auction_type"` TotalPrice interface{} `json:"total_price"` Transaction Transaction `json:"transaction"` PaymentToken PaymentToken `json:"payment_token"` }
DevFeePaymentEvent is fee transfer event from OpenSea to Dev, It appears to be running in bulk on a regular basis.
type Event ¶
type Event struct { ID int64 `json:"id"` Transaction *Transaction `json:"transaction"` PaymentToken *PaymentToken `json:"payment_token"` Asset *Asset `json:"asset"` AssetBundle *AssetBundle `json:"asset_bundle"` WinnerAccount *Account `json:"winner_account"` FromAccount *Account `json:"from_account"` ToAccount *Account `json:"to_account"` OwnerAccount *Account `json:"owner_account"` ApprovedAccount *Account `json:"approved_account"` Seller *Account `json:"seller"` DevFeePaymentEvent *DevFeePaymentEvent `json:"dev_fee_payment_event"` CollectionSlug string `json:"collection_slug"` CreatedDate TimeNano `json:"created_date"` ModifiedDate TimeNano `json:"modified_date"` ContractAddress Address `json:"contract_address"` LogIndex interface{} `json:"log_index"` EventType EventType `json:"event_type"` AuctionType string `json:"auction_type"` StartingPrice string `json:"starting_price"` EndingPrice string `json:"ending_price"` Duration interface{} `json:"duration"` MinPrice Number `json:"min_price"` OfferedTo Number `json:"offered_to"` BidAmount Number `json:"bid_amount"` TotalPrice Number `json:"total_price"` CustomEventName interface{} `json:"custom_event_name"` Quantity string `json:"quantity"` PayoutAmount interface{} `json:"payout_amount"` EventTimestamp TimeNano `json:"event_timestamp"` Relayer string `json:"relayer"` Collection int64 `json:"collection"` PayoutAccount interface{} `json:"payout_account"` PayoutAssetContract interface{} `json:"payout_asset_contract"` PayoutCollection interface{} `json:"payout_collection"` BuyOrder uint64 `json:"buy_order"` SellOrder uint64 `json:"sell_order"` }
type EventType ¶
type EventType string
const ( EventTypeNone EventType = "" EventTypeCreated EventType = "created" EventTypeSuccessful EventType = "successful" EventTypeCancelled EventType = "cancelled" EventTypeBidEntered EventType = "bid_entered" EventTypeBidWithdrawn EventType = "bid_withdrawn" EventTypeTransfer EventType = "transfer" EventTypeApprove EventType = "approve" EventTypeCompositionCreated EventType = "composition_created" )
type Opensea ¶
func NewOpensea ¶
func NewOpenseaRinkeby ¶
func (Opensea) GetOrdersWithContext ¶
func (Opensea) GetSingleAsset ¶
func (Opensea) GetSingleAssetWithContext ¶
func (Opensea) GetSingleContract ¶
func (Opensea) GetSingleContractWithContext ¶
func (Opensea) RetrievingEvents ¶
func (o Opensea) RetrievingEvents(params *RetrievingEventsParams) ([]*Event, error)
func (Opensea) RetrievingEventsWithContext ¶
type Order ¶
type Order struct { ID int64 `json:"id"` Asset Asset `json:"asset"` // AssetBundle interface{} `json:"asset_bundle"` CreatedDate *TimeNano `json:"created_date"` ClosingDate *TimeNano `json:"closing_date"` // ClosingExtendable bool `json:"closing_extendable"` ExpirationTime int64 `json:"expiration_time"` ListingTime int64 `json:"listing_time"` // OrderHash string `json:"order_hash"` // Metadata Metadata `json:"metadata"` Exchange Address `json:"exchange"` Maker Account `json:"maker"` Taker Account `json:"taker"` CurrentPrice Number `json:"current_price"` // CurrentBounty string `json:"current_bounty"` // BountyMultiple string `json:"bounty_multiple"` MakerRelayerFee Number `json:"maker_relayer_fee"` TakerRelayerFee Number `json:"taker_relayer_fee"` MakerProtocolFee Number `json:"maker_protocol_fee"` TakerProtocolFee Number `json:"taker_protocol_fee"` MakerReferrerFee Number `json:"maker_referrer_fee"` FeeRecipient Account `json:"fee_recipient"` FeeMethod FeeMethod `json:"fee_method"` Side Side `json:"side"` // 0 for buy orders and 1 for sell orders. SaleKind SaleKind `json:"sale_kind"` Target Address `json:"target"` HowToCall HowToCall `json:"how_to_call"` Calldata Bytes `json:"calldata"` ReplacementPattern Bytes `json:"replacement_pattern"` StaticTarget Address `json:"static_target"` StaticExtradata Bytes `json:"static_extradata"` PaymentToken Address `json:"payment_token"` // PaymentTokenContract PaymentTokenContract `json:"payment_token_contract"` BasePrice Number `json:"base_price"` Extra Number `json:"extra"` Quantity string `json:"quantity"` Salt Number `json:"salt"` V *uint8 `json:"v"` R *Bytes `json:"r"` S *Bytes `json:"s"` ApprovedOnChain bool `json:"approved_on_chain"` Cancelled bool `json:"cancelled"` Finalized bool `json:"finalized"` MarkedInvalid bool `json:"marked_invalid"` }
type PaymentToken ¶
type RetrievingEventsParams ¶
type RetrievingEventsParams struct { AssetContractAddress Address TokenID int32 AccountAddress Address EventType EventType OnlyOpensea bool AuctionType AuctionType Offset int Limit int OccurredBefore int64 OccurredAfter int64 }
func NewRetrievingEventsParams ¶
func NewRetrievingEventsParams() *RetrievingEventsParams
func (RetrievingEventsParams) Encode ¶
func (p RetrievingEventsParams) Encode() string
func (*RetrievingEventsParams) SetAccountAddress ¶
func (p *RetrievingEventsParams) SetAccountAddress(addr string) (err error)
func (*RetrievingEventsParams) SetAssetContractAddress ¶
func (p *RetrievingEventsParams) SetAssetContractAddress(addr string) (err error)
type Trait ¶
type Trait struct { TraitType string `json:"trait_type"` Value json.RawMessage `json:"value"` DisplayType interface{} `json:"display_type"` MaxValue interface{} `json:"max_value"` TraitCount int64 `json:"trait_count"` Order interface{} `json:"order"` }
type Transaction ¶
type Transaction struct { ID int64 `json:"id"` FromAccount Account `json:"from_account"` ToAccount Account `json:"to_account"` CreatedDate TimeNano `json:"created_date"` ModifiedDate TimeNano `json:"modified_date"` TransactionHash string `json:"transaction_hash"` TransactionIndex string `json:"transaction_index"` BlockNumber string `json:"block_number"` BlockHash string `json:"block_hash"` Timestamp string `json:"timestamp"` }
Click to show internal directories.
Click to hide internal directories.