Webhook
Events
AUCTION_ENDED

AUCTION_ENDED

This event occurs whenever an auction ends

Definition

type Uint256 = string
type IsoDate = string
type ChainId = number
type Address = string
 
type AUCTION_ENDED = {
  id: string
  createdAt: IsoDate
  creator: {
    address: Address
    username: string | null
    email: string | null
  }
  endAt: IsoDate
  asset: {
    id: string
    name: string
    collection: {
      chainId: ChainId
      address: Address
      name: string
    }
  }
  reserveAmount: Uint256
  currency: {
    symbol: string
    decimals: number
  }
}

Usage

import { Events, parseAndVerifyRequest } from '@nft/webhook'
 
const { data, type } = await parseAndVerifyRequest<'AUCTION_ENDED'>(
  req,
  process.env.LITEFLOW_WEBHOOK_SECRET,
)
// data is type Events['AUCTION_ENDED']