Webhook
Events
AUCTION_BID_CREATED

AUCTION_BID_CREATED

This event occurs whenever a bid on an auction is created.

Definition

type Uint256 = string
type IsoDate = string
 
type AUCTION_BID_CREATED = {
  createdAt: IsoDate
  id: string
  asset: {
    id: string
    name: string
  }
  unitPrice: Uint256
  currency: {
    symbol: string
    decimals: number
  }
  maker: {
    address: string
    username: string | null
    email: string | null
  }
  taker: {
    address: string
    username: string | null
    email: string | null
  } | null
  quantity: Uint256
  expiredAt: IsoDate
}

Usage

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