@zoralabs/nft-hooks
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -133,20 +133,21 @@ "use strict"; | ||
: {}; | ||
eventsList.push({ | ||
...common, | ||
...filledAskFields, | ||
...fixedPriceFields, | ||
sender: tokenEvent.properties.address, | ||
marketAddress: tokenEvent.properties.collectionAddress, | ||
blockInfo: { | ||
timestamp: tokenEvent.transactionInfo.blockTimestamp, | ||
blockNumber: tokenEvent.transactionInfo.blockNumber, | ||
}, | ||
event, | ||
eventType: types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT, | ||
side: types_1.FIXED_SIDE_TYPES.ASK, | ||
raw: { | ||
source: types_1.FIXED_PRICE_MARKET_SOURCES.ZORA_ASK_V3, | ||
data: tokenEvent, | ||
}, | ||
}); | ||
event && | ||
eventsList.push({ | ||
...common, | ||
...filledAskFields, | ||
...fixedPriceFields, | ||
sender: tokenEvent.properties.address, | ||
marketAddress: tokenEvent.properties.collectionAddress, | ||
blockInfo: { | ||
timestamp: tokenEvent.transactionInfo.blockTimestamp, | ||
blockNumber: tokenEvent.transactionInfo.blockNumber, | ||
}, | ||
event, | ||
eventType: types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT, | ||
side: types_1.FIXED_SIDE_TYPES.ASK, | ||
raw: { | ||
source: types_1.FIXED_PRICE_MARKET_SOURCES.ZORA_ASK_V3, | ||
data: tokenEvent, | ||
}, | ||
}); | ||
} | ||
@@ -153,0 +154,0 @@ }); |
import { EventInfoFragment } from '@zoralabs/zdk/dist/queries/queries-sdk'; | ||
import { extractPrice } from '../utils/extractPrice'; | ||
import { NormalizedEvent } from '../../../types'; | ||
export declare type TransformFunctionParam<E, T> = { | ||
event: E; | ||
at: { | ||
timestamp: string; | ||
blockNumber: number; | ||
transactionHash: string | undefined; | ||
}; | ||
blockInfo: { | ||
timestamp: any; | ||
blockNumber: number; | ||
}; | ||
price: ReturnType<typeof extractPrice>; | ||
raw?: any; | ||
eventType: T; | ||
}; | ||
export declare function transformMarketEvent(e: EventInfoFragment): NormalizedEvent | undefined; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformMarketEvent = void 0; | ||
const queries_sdk_1 = require("@zoralabs/zdk/dist/queries/queries-sdk"); | ||
const extractPrice_1 = require("../utils/extractPrice"); | ||
const types_1 = require("../../../types"); | ||
const dateToISO_1 = require("../utils/dateToISO"); | ||
const transformV2AuctionEvent_1 = require("./transformV2AuctionEvent"); | ||
const transformV1MarketEvent_1 = require("./transformV1MarketEvent"); | ||
const transformTransferEvent_1 = require("./transformTransferEvent"); | ||
const transformMintEvent_1 = require("./transformMintEvent"); | ||
const transformV3AskEvent_1 = require("./transformV3AskEvent"); | ||
function transformMarketEvent(e) { | ||
if (!(e.eventType === queries_sdk_1.EventType.V1MarketEvent && | ||
e.properties.__typename === 'V1MarketEvent')) { | ||
return undefined; | ||
const at = { | ||
timestamp: (0, dateToISO_1.dateToISO)(e.transactionInfo.blockTimestamp), | ||
blockNumber: e.transactionInfo.blockNumber, | ||
transactionHash: e.transactionInfo.transactionHash || undefined, | ||
}; | ||
const blockInfo = { | ||
timestamp: e.transactionInfo.blockTimestamp, | ||
blockNumber: e.transactionInfo.blockNumber, | ||
}; | ||
const price = (0, extractPrice_1.extractPrice)(e); | ||
let eventType = types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT; | ||
switch (e.properties.__typename) { | ||
case 'MintEvent': | ||
eventType = types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_TRANSFER_EVENT; | ||
return (0, transformMintEvent_1.transformMintEvent)({ | ||
event: e.properties, | ||
at, | ||
blockInfo, | ||
price, | ||
eventType, | ||
}); | ||
case 'TransferEvent': | ||
eventType = types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_TRANSFER_EVENT; | ||
return (0, transformTransferEvent_1.transformTransferEvent)({ | ||
event: e.properties, | ||
at, | ||
blockInfo, | ||
price, | ||
raw: e, | ||
eventType, | ||
}); | ||
case 'V1MarketEvent': | ||
eventType = types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT; | ||
return (0, transformV1MarketEvent_1.transformV1MarketEvent)({ | ||
event: e.properties, | ||
at, | ||
blockInfo, | ||
price, | ||
eventType, | ||
}); | ||
case 'V2AuctionEvent': | ||
eventType = types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT; | ||
return (0, transformV2AuctionEvent_1.transformV2AuctionEvent)({ | ||
event: e.properties, | ||
at, | ||
blockInfo, | ||
price, | ||
raw: e, | ||
eventType, | ||
}); | ||
case 'V3AskEvent': | ||
eventType = types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT; | ||
return (0, transformV3AskEvent_1.transformV3AskEvent)({ | ||
event: e.properties, | ||
at, | ||
blockInfo, | ||
price, | ||
raw: e, | ||
eventType, | ||
}); | ||
case 'ApprovalEvent': | ||
case 'Sale': | ||
default: | ||
return undefined; | ||
} | ||
// FIXME: what to do when unable to map to FIXED_PRICE_EVENT_TYPES? | ||
let event = undefined; | ||
switch (e.properties.v1MarketEventType) { | ||
case queries_sdk_1.V1MarketEventType.V1MarketAskCreated: | ||
event = types_1.FIXED_PRICE_EVENT_TYPES.FIXED_PRICE_CREATED; | ||
break; | ||
case queries_sdk_1.V1MarketEventType.V1MarketAskRemoved: | ||
event = types_1.FIXED_PRICE_EVENT_TYPES.FIXED_PRICE_CANCELLED; | ||
break; | ||
case queries_sdk_1.V1MarketEventType.V1MarketAskRemoved: | ||
event = types_1.FIXED_PRICE_EVENT_TYPES.FIXED_PRICE_CANCELLED; | ||
break; | ||
} | ||
if (!event) { | ||
return; | ||
} | ||
return { | ||
// FIXME: address === sender??? | ||
sender: e.properties.address, | ||
...(0, extractPrice_1.extractPrice)(e), | ||
marketAddress: e.properties.collectionAddress, | ||
event, | ||
eventType: types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT, | ||
side: types_1.FIXED_SIDE_TYPES.ASK, | ||
blockInfo: { | ||
timestamp: e.transactionInfo.blockTimestamp, | ||
blockNumber: e.transactionInfo.blockNumber, | ||
}, | ||
at: { | ||
timestamp: (0, dateToISO_1.dateToISO)(e.transactionInfo.blockTimestamp), | ||
blockNumber: e.transactionInfo.blockNumber, | ||
transactionHash: e.transactionInfo.transactionHash || undefined, | ||
}, | ||
raw: { | ||
source: types_1.FIXED_PRICE_MARKET_SOURCES.ZORA_ASK_V1, | ||
data: e, | ||
}, | ||
}; | ||
} | ||
exports.transformMarketEvent = transformMarketEvent; |
@@ -10,9 +10,9 @@ "use strict"; | ||
const getReserveAuctionStatus = (status) => { | ||
if (status === queries_sdk_1.V2AuctionStatus.Active) { | ||
if (status === 'ACTIVE') { | ||
return types_1.MARKET_INFO_STATUSES.ACTIVE; | ||
} | ||
if (status === queries_sdk_1.V2AuctionStatus.Canceled) { | ||
if (status === 'CANCELED') { | ||
return types_1.MARKET_INFO_STATUSES.CANCELED; | ||
} | ||
if (status === queries_sdk_1.V2AuctionStatus.Completed) { | ||
if (status === 'COMPLETED') { | ||
return types_1.MARKET_INFO_STATUSES.COMPLETE; | ||
@@ -23,9 +23,9 @@ } | ||
const getV1MarketFixedPriceStatus = (status) => { | ||
if (status === queries_sdk_1.V1MarketEntityStatus.Active) { | ||
if (status === 'ACTIVE') { | ||
return types_1.MARKET_INFO_STATUSES.ACTIVE; | ||
} | ||
if (status === queries_sdk_1.V1MarketEntityStatus.Canceled) { | ||
if (status === 'CANCELED') { | ||
return types_1.MARKET_INFO_STATUSES.CANCELED; | ||
} | ||
if (status === queries_sdk_1.V1MarketEntityStatus.Completed) { | ||
if (status === 'COMPLETED') { | ||
return types_1.MARKET_INFO_STATUSES.COMPLETE; | ||
@@ -36,9 +36,9 @@ } | ||
const getV3AskStatus = (status) => { | ||
if (status === queries_sdk_1.V3AskStatus.Active) { | ||
if (status === 'ACTIVE') { | ||
return types_1.MARKET_INFO_STATUSES.ACTIVE; | ||
} | ||
if (status === queries_sdk_1.V3AskStatus.Canceled) { | ||
if (status === 'CANCELED') { | ||
return types_1.MARKET_INFO_STATUSES.CANCELED; | ||
} | ||
if (status === queries_sdk_1.V3AskStatus.Completed) { | ||
if (status === 'COMPLETED') { | ||
return types_1.MARKET_INFO_STATUSES.COMPLETE; | ||
@@ -50,5 +50,5 @@ } | ||
markets.forEach((market) => { | ||
var _a, _b; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11; | ||
if (market.marketType === queries_sdk_1.MarketType.V1Ask && | ||
market.properties.__typename === 'V1Ask') { | ||
((_a = market === null || market === void 0 ? void 0 : market.properties) === null || _a === void 0 ? void 0 : _a.__typename) === 'V1Ask') { | ||
marketResponse.push({ | ||
@@ -58,9 +58,8 @@ type: types_1.MARKET_TYPES.FIXED_PRICE, | ||
side: types_1.FIXED_SIDE_TYPES.ASK, | ||
// TODO(iain): fix naming | ||
status: getV1MarketFixedPriceStatus(market.properties.v1AskStatus), | ||
...(0, getStandardMarketData_1.getStandardMarketData)({ market, amount: market.properties.amount }), | ||
status: getV1MarketFixedPriceStatus((_b = market === null || market === void 0 ? void 0 : market.properties) === null || _b === void 0 ? void 0 : _b.v1AskStatus), | ||
...(0, getStandardMarketData_1.getStandardMarketData)({ market, amount: (_c = market === null || market === void 0 ? void 0 : market.properties) === null || _c === void 0 ? void 0 : _c.amount }), | ||
}); | ||
} | ||
if (market.marketType === queries_sdk_1.MarketType.V1Offer && | ||
market.properties.__typename === 'V1Offer') { | ||
((_d = market === null || market === void 0 ? void 0 : market.properties) === null || _d === void 0 ? void 0 : _d.__typename) === 'V1Offer') { | ||
marketResponse.push({ | ||
@@ -70,23 +69,23 @@ type: types_1.MARKET_TYPES.FIXED_PRICE, | ||
side: types_1.FIXED_SIDE_TYPES.OFFER, | ||
status: getV1MarketFixedPriceStatus(market.properties.v1OfferStatus), | ||
...(0, getStandardMarketData_1.getStandardMarketData)({ market, amount: market.properties.amount }), | ||
status: getV1MarketFixedPriceStatus((_e = market === null || market === void 0 ? void 0 : market.properties) === null || _e === void 0 ? void 0 : _e.v1OfferStatus), | ||
...(0, getStandardMarketData_1.getStandardMarketData)({ market, amount: (_f = market === null || market === void 0 ? void 0 : market.properties) === null || _f === void 0 ? void 0 : _f.amount }), | ||
}); | ||
} | ||
if (market.marketType === queries_sdk_1.MarketType.V2Auction && | ||
market.properties.__typename === 'V2Auction') { | ||
const expiresAt = market.properties.estimatedExpirationTime; | ||
((_g = market === null || market === void 0 ? void 0 : market.properties) === null || _g === void 0 ? void 0 : _g.__typename) === 'V2Auction') { | ||
const expiresAt = (_h = market === null || market === void 0 ? void 0 : market.properties) === null || _h === void 0 ? void 0 : _h.estimatedExpirationTime; | ||
marketResponse.push({ | ||
type: types_1.MARKET_TYPES.AUCTION, | ||
source: types_1.AUCTION_SOURCE_TYPES.ZORA_RESERVE_V2, | ||
status: getReserveAuctionStatus(market.properties.v2AuctionStatus), | ||
auctionId: market.properties.auctionId, | ||
status: getReserveAuctionStatus((_j = market === null || market === void 0 ? void 0 : market.properties) === null || _j === void 0 ? void 0 : _j.v2AuctionStatus), | ||
auctionId: (_k = market === null || market === void 0 ? void 0 : market.properties) === null || _k === void 0 ? void 0 : _k.auctionId, | ||
// Duration shouldn't be able to overflow | ||
duration: parseInt(market.properties.duration, 10), | ||
startedAt: market.properties.firstBidTime | ||
duration: parseInt((_l = market === null || market === void 0 ? void 0 : market.properties) === null || _l === void 0 ? void 0 : _l.duration, 10), | ||
startedAt: ((_m = market === null || market === void 0 ? void 0 : market.properties) === null || _m === void 0 ? void 0 : _m.firstBidTime) | ||
? { | ||
timestamp: market.properties.firstBidTime, | ||
timestamp: (_o = market === null || market === void 0 ? void 0 : market.properties) === null || _o === void 0 ? void 0 : _o.firstBidTime, | ||
} | ||
: undefined, | ||
bids: [], | ||
endsAt: market.properties.firstBidTime | ||
endsAt: ((_p = market === null || market === void 0 ? void 0 : market.properties) === null || _p === void 0 ? void 0 : _p.firstBidTime) | ||
? { | ||
@@ -96,5 +95,5 @@ timestamp: (0, dateToISO_1.dateToISO)(expiresAt), | ||
: undefined, | ||
currentBid: market.properties.highestBidder && market.properties.highestBidPrice | ||
currentBid: ((_q = market === null || market === void 0 ? void 0 : market.properties) === null || _q === void 0 ? void 0 : _q.highestBidder) && ((_r = market === null || market === void 0 ? void 0 : market.properties) === null || _r === void 0 ? void 0 : _r.highestBidPrice) | ||
? { | ||
creator: market.properties.highestBidder, | ||
creator: (_s = market === null || market === void 0 ? void 0 : market.properties) === null || _s === void 0 ? void 0 : _s.highestBidder, | ||
created: { | ||
@@ -104,13 +103,13 @@ timestamp: (0, dateToISO_1.dateToISO)(market.transactionInfo.blockTimestamp), | ||
amount: { | ||
usd: market.properties.highestBidPrice.usdcPrice | ||
usd: ((_t = market === null || market === void 0 ? void 0 : market.properties) === null || _t === void 0 ? void 0 : _t.highestBidPrice.usdcPrice) | ||
? { | ||
value: (_a = market.properties.highestBidPrice.usdcPrice) === null || _a === void 0 ? void 0 : _a.decimal, | ||
raw: (_b = market.properties.highestBidPrice.usdcPrice) === null || _b === void 0 ? void 0 : _b.raw, | ||
value: (_v = (_u = market === null || market === void 0 ? void 0 : market.properties) === null || _u === void 0 ? void 0 : _u.highestBidPrice.usdcPrice) === null || _v === void 0 ? void 0 : _v.decimal, | ||
raw: (_x = (_w = market === null || market === void 0 ? void 0 : market.properties) === null || _w === void 0 ? void 0 : _w.highestBidPrice.usdcPrice) === null || _x === void 0 ? void 0 : _x.raw, | ||
decimals: 18, | ||
} | ||
: undefined, | ||
eth: market.properties.highestBidPrice.nativePrice | ||
eth: ((_y = market === null || market === void 0 ? void 0 : market.properties) === null || _y === void 0 ? void 0 : _y.highestBidPrice.nativePrice) | ||
? { | ||
value: market.properties.highestBidPrice.nativePrice.decimal, | ||
raw: market.properties.highestBidPrice.nativePrice.raw, | ||
value: (_z = market === null || market === void 0 ? void 0 : market.properties) === null || _z === void 0 ? void 0 : _z.highestBidPrice.nativePrice.decimal, | ||
raw: (_0 = market === null || market === void 0 ? void 0 : market.properties) === null || _0 === void 0 ? void 0 : _0.highestBidPrice.nativePrice.raw, | ||
decimals: 18, | ||
@@ -120,10 +119,10 @@ } | ||
amount: { | ||
raw: market.properties.highestBidPrice.nativePrice.raw, | ||
value: market.properties.highestBidPrice.nativePrice.decimal, | ||
decimals: market.properties.highestBidPrice.nativePrice.currency.decimals || | ||
raw: (_1 = market === null || market === void 0 ? void 0 : market.properties) === null || _1 === void 0 ? void 0 : _1.highestBidPrice.nativePrice.raw, | ||
value: (_2 = market === null || market === void 0 ? void 0 : market.properties) === null || _2 === void 0 ? void 0 : _2.highestBidPrice.nativePrice.decimal, | ||
decimals: ((_3 = market === null || market === void 0 ? void 0 : market.properties) === null || _3 === void 0 ? void 0 : _3.highestBidPrice.nativePrice.currency.decimals) || | ||
undefined, | ||
}, | ||
symbol: market.properties.highestBidPrice.nativePrice.currency.name, | ||
name: market.properties.highestBidPrice.nativePrice.currency.name, | ||
address: market.properties.highestBidPrice.nativePrice.currency.address, | ||
symbol: (_4 = market === null || market === void 0 ? void 0 : market.properties) === null || _4 === void 0 ? void 0 : _4.highestBidPrice.nativePrice.currency.name, | ||
name: (_5 = market === null || market === void 0 ? void 0 : market.properties) === null || _5 === void 0 ? void 0 : _5.highestBidPrice.nativePrice.currency.name, | ||
address: (_6 = market === null || market === void 0 ? void 0 : market.properties) === null || _6 === void 0 ? void 0 : _6.highestBidPrice.nativePrice.currency.address, | ||
}, | ||
@@ -134,3 +133,3 @@ } | ||
market, | ||
amount: market.properties.highestBidPrice || market.properties.reservePrice, | ||
amount: ((_7 = market === null || market === void 0 ? void 0 : market.properties) === null || _7 === void 0 ? void 0 : _7.highestBidPrice) || ((_8 = market === null || market === void 0 ? void 0 : market.properties) === null || _8 === void 0 ? void 0 : _8.reservePrice), | ||
}), | ||
@@ -140,3 +139,3 @@ }); | ||
if (market.marketType === queries_sdk_1.MarketType.V3Ask && | ||
market.properties.__typename === 'V3Ask') { | ||
((_9 = market === null || market === void 0 ? void 0 : market.properties) === null || _9 === void 0 ? void 0 : _9.__typename) === 'V3Ask') { | ||
marketResponse.push({ | ||
@@ -146,4 +145,4 @@ type: types_1.MARKET_TYPES.FIXED_PRICE, | ||
side: types_1.FIXED_SIDE_TYPES.ASK, | ||
status: getV3AskStatus(market.properties.v3AskStatus), | ||
...(0, getStandardMarketData_1.getStandardMarketData)({ market, amount: market.properties.askPrice }), | ||
status: getV3AskStatus((_10 = market === null || market === void 0 ? void 0 : market.properties) === null || _10 === void 0 ? void 0 : _10.v3AskStatus), | ||
...(0, getStandardMarketData_1.getStandardMarketData)({ market, amount: (_11 = market === null || market === void 0 ? void 0 : market.properties) === null || _11 === void 0 ? void 0 : _11.askPrice }), | ||
}); | ||
@@ -150,0 +149,0 @@ } |
@@ -29,3 +29,3 @@ import { NetworkIDs, NFTObject } from '../..'; | ||
__typename?: "Market" | undefined; | ||
collectionAddress: string; | ||
collectionAddress?: string | null | undefined; | ||
marketAddress: string; | ||
@@ -71,5 +71,9 @@ marketType: ZDKMarketType; | ||
}; | ||
properties: { | ||
properties?: { | ||
__typename: "LilNounsAuction"; | ||
} | { | ||
__typename: "NounsAuction"; | ||
} | { | ||
__typename: "V1Ask"; | ||
v1AskStatus: import("@zoralabs/zdk/dist/queries/queries-sdk").V1MarketEntityStatus; | ||
v1AskStatus: string; | ||
currency: string; | ||
@@ -105,3 +109,3 @@ amount: { | ||
__typename: "V1Offer"; | ||
v1OfferStatus: import("@zoralabs/zdk/dist/queries/queries-sdk").V1MarketEntityStatus; | ||
v1OfferStatus: string; | ||
sellOnShare: string; | ||
@@ -146,3 +150,3 @@ bidder: string; | ||
estimatedExpirationTime?: any; | ||
v2AuctionStatus: import("@zoralabs/zdk/dist/queries/queries-sdk").V2AuctionStatus; | ||
v2AuctionStatus: string; | ||
tokenOwner: string; | ||
@@ -206,5 +210,5 @@ address: string; | ||
finder?: string | null | undefined; | ||
findersFeeBps: number; | ||
sellerFundsRecipient: string; | ||
v3AskStatus: import("@zoralabs/zdk/dist/queries/queries-sdk").V3AskStatus; | ||
findersFeeBps?: number | null | undefined; | ||
sellerFundsRecipient?: string | null | undefined; | ||
v3AskStatus: string; | ||
seller: string; | ||
@@ -239,3 +243,5 @@ address: string; | ||
}; | ||
}; | ||
} | { | ||
__typename: "V3ReserveAuction"; | ||
} | null | undefined; | ||
}[]; | ||
@@ -403,3 +409,3 @@ token: { | ||
eventType: import("@zoralabs/zdk/dist/queries/queries-sdk").EventType; | ||
collectionAddress: string; | ||
collectionAddress?: string | null | undefined; | ||
tokenId?: string | null | undefined; | ||
@@ -416,2 +422,4 @@ transactionInfo: { | ||
} | { | ||
__typename: "LilNounsAuctionEvent"; | ||
} | { | ||
__typename: "MintEvent"; | ||
@@ -448,4 +456,8 @@ tokenId: string; | ||
} | { | ||
__typename: "NounsAuctionEvent"; | ||
} | { | ||
__typename: "Sale"; | ||
} | { | ||
__typename: "SeaportEvent"; | ||
} | { | ||
__typename: "TransferEvent"; | ||
@@ -866,3 +878,7 @@ fromAddress: string; | ||
}; | ||
} | { | ||
__typename: "V3PrivateAskEventProperties"; | ||
}; | ||
} | { | ||
__typename: "V3ReserveAuctionEvent"; | ||
}; | ||
@@ -869,0 +885,0 @@ }[]; |
@@ -5,3 +5,3 @@ import React from 'react'; | ||
import { NetworkIDs } from '../constants/networks'; | ||
import { ZoraV2IndexerStrategy } from '../strategies'; | ||
import { ZDKFetchStrategy } from '../strategies'; | ||
export declare type FetchContext = { | ||
@@ -15,3 +15,3 @@ strategy: typeof NFTStrategy; | ||
export declare const NFTFetchContext: React.Context<{ | ||
strategy: NFTStrategy | ZoraV2IndexerStrategy; | ||
strategy: NFTStrategy | ZDKFetchStrategy; | ||
fetcher: MediaFetchAgent; | ||
@@ -18,0 +18,0 @@ }>; |
@@ -12,3 +12,3 @@ "use strict"; | ||
exports.defaultFetchAgent = { | ||
strategy: new strategies_1.ZoraV2IndexerStrategy(defaultNetwork), | ||
strategy: new strategies_1.ZDKFetchStrategy(defaultNetwork), | ||
fetcher: new MediaFetchAgent_1.MediaFetchAgent(defaultNetwork), | ||
@@ -22,3 +22,3 @@ }; | ||
} | ||
return new strategies_1.ZoraV2IndexerStrategy(networkId); | ||
return new strategies_1.ZDKFetchStrategy(networkId); | ||
}, [userStrategy]); | ||
@@ -25,0 +25,0 @@ const fetcher = (0, react_1.useMemo)(() => { |
@@ -147,3 +147,3 @@ import { EventInfoFragment } from '@zoralabs/zdk/dist/queries/queries-sdk'; | ||
}; | ||
declare type TransferEvent = TokenTransferEvent & { | ||
export declare type TransferEvent = TokenTransferEvent & { | ||
raw: { | ||
@@ -154,6 +154,7 @@ source: MEDIA_SOURCES; | ||
}; | ||
declare type MarketAuctionEvent = SharedMarketEventData & { | ||
export declare type MarketAuctionEvent = SharedMarketEventData & { | ||
event: AUCTION_EVENT_TYPES; | ||
at: TimedAction; | ||
amount?: number; | ||
winner?: string; | ||
eventType: TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT; | ||
@@ -168,3 +169,3 @@ raw: { | ||
}; | ||
declare type MarketFixedPriceEvent = SharedMarketEventData & { | ||
export declare type MarketFixedPriceEvent = SharedMarketEventData & { | ||
at: TimedAction; | ||
@@ -171,0 +172,0 @@ event: FIXED_PRICE_EVENT_TYPES; |
{ | ||
"name": "@zoralabs/nft-hooks", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "Generic react hooks for fetching zora auctions, nfts, and data on arbitary 721s. Powers nft-components.", | ||
@@ -71,3 +71,3 @@ "repository": "https://github.com/ourzora/nft-hooks", | ||
"@types/deepmerge": "^2.2.0", | ||
"@zoralabs/zdk": "2.1.3", | ||
"@zoralabs/zdk": "2.1.6", | ||
"big.js": "^6.1.0", | ||
@@ -74,0 +74,0 @@ "cross-fetch": "^3.1.4", |
@@ -56,3 +56,3 @@ ## @zoralabs/nft-hooks | ||
return ( | ||
<NFTFetchConfiguration strategy={zdkStrategy} network={Networks.MAINNET}> | ||
<NFTFetchConfiguration strategy={zdkStrategy} networkId={Networks.MAINNET}> | ||
<NFTList> | ||
@@ -59,0 +59,0 @@ </NFTFetchConfiguration> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
960023
146
21642
+ Added@zoralabs/zdk@2.1.6(transitive)
- Removed@zoralabs/zdk@2.1.3(transitive)
Updated@zoralabs/zdk@2.1.6