Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zoralabs/nft-hooks

Package Overview
Dependencies
Maintainers
10
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zoralabs/nft-hooks - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

dist/fetcher/AuctionState.d.ts

8

dist/fetcher/AuctionInfoTypes.d.ts
import { AskPriceFragment, BidDataPartialFragment, CurrencyShortFragment, CurrentReserveBidFragment, PreviousReserveBidFragment } from '../graph-queries/zora-types';
import { ChainCurrencyType } from '../fetcher/FetchResultTypes';
import { AuctionStateInfo } from './AuctionState';
export declare type PricingInfo = {

@@ -20,3 +21,8 @@ currency: CurrencyShortFragment;

};
export declare enum AuctionType {
PERPETUAL = "PERPETUAL",
RESERVE = "RESERVE"
}
export declare type AuctionInfoData = {
status: AuctionStateInfo;
highestBid?: {

@@ -28,3 +34,3 @@ pricing: PricingInfo;

current: {
auctionType: 'reserve' | 'perpetual';
auctionType: AuctionType;
endingAt?: string;

@@ -31,0 +37,0 @@ likelyHasEnded: boolean;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuctionType = void 0;
var AuctionType;
(function (AuctionType) {
AuctionType["PERPETUAL"] = "PERPETUAL";
AuctionType["RESERVE"] = "RESERVE";
})(AuctionType = exports.AuctionType || (exports.AuctionType = {}));
;

14

dist/fetcher/TransformFetchResults.js

@@ -7,2 +7,4 @@ "use strict";

const RequestError_1 = require("./RequestError");
const AuctionInfoTypes_1 = require("./AuctionInfoTypes");
const AuctionState_1 = require("./AuctionState");
const NULL_ETH_CURRENCY_ID = '0x0000000000000000000000000000000000000000';

@@ -92,3 +94,3 @@ function transformCurrencyEth(currency) {

const inETH = new big_js_1.default(currencyInfo.token.derivedETH)
.mul(new big_js_1.default(bidAmount).div(new big_js_1.default(10).pow(parseInt(currencyInfo.token.decimals, 10))))
.mul(new big_js_1.default(bidAmount).div(new big_js_1.default(10).pow(currencyInfo.token.decimals)))
.toString();

@@ -155,3 +157,2 @@ return {

}
return;
}

@@ -227,3 +228,3 @@ const reserve = chainNFT.pricing.reserve;

const { pricing, nft } = chainNFT;
return {
const nftAuctionInformation = {
pricing: {

@@ -261,6 +262,9 @@ reserve: pricing.reserve

auction: {
status: AuctionState_1.AuctionStateInfo.LOADING,
highestBid,
// Only really useful for a reserve auction, reserveMet could be used to show first
current: {
auctionType: hasActiveReserveAuction ? 'reserve' : 'perpetual',
auctionType: hasActiveReserveAuction
? AuctionInfoTypes_1.AuctionType.RESERVE
: AuctionInfoTypes_1.AuctionType.PERPETUAL,
reservePrice: getReservePrice(),

@@ -278,3 +282,5 @@ likelyHasEnded,

};
nftAuctionInformation.auction.status = AuctionState_1.getAuctionState(nftAuctionInformation);
return nftAuctionInformation;
}
exports.addAuctionInformation = addAuctionInformation;

@@ -11,3 +11,4 @@ import { Networks, NetworkIDs } from './constants/networks';

import { useZoraUsername } from './hooks/useZoraUsername';
import { PricingInfo } from './fetcher/AuctionInfoTypes';
export { useNFT, useNFTContent, useNFTMetadata, useAuctions, useZoraUsername, useNFTType, useNFTContentType, useNFTMetadataType, PricingInfo, NFTFetchConfiguration, MediaFetchAgent, AuctionResultType, NFTDataType, ChainCurrencyType, Networks, NetworkIDs, ExtractResultData, };
import { AuctionType, PricingInfo } from './fetcher/AuctionInfoTypes';
import { AuctionStateInfo } from './fetcher/AuctionState';
export { useNFT, useNFTContent, useNFTMetadata, useAuctions, useZoraUsername, useNFTType, useNFTContentType, useNFTMetadataType, PricingInfo, NFTFetchConfiguration, MediaFetchAgent, AuctionResultType, AuctionType, AuctionStateInfo, NFTDataType, ChainCurrencyType, Networks, NetworkIDs, ExtractResultData, };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtractResultData = exports.Networks = exports.MediaFetchAgent = exports.NFTFetchConfiguration = exports.useZoraUsername = exports.useAuctions = exports.useNFTMetadata = exports.useNFTContent = exports.useNFT = void 0;
exports.ExtractResultData = exports.Networks = exports.AuctionStateInfo = exports.AuctionType = exports.MediaFetchAgent = exports.NFTFetchConfiguration = exports.useZoraUsername = exports.useAuctions = exports.useNFTMetadata = exports.useNFTContent = exports.useNFT = void 0;
const tslib_1 = require("tslib");

@@ -23,1 +23,5 @@ const networks_1 = require("./constants/networks");

Object.defineProperty(exports, "useZoraUsername", { enumerable: true, get: function () { return useZoraUsername_1.useZoraUsername; } });
const AuctionInfoTypes_1 = require("./fetcher/AuctionInfoTypes");
Object.defineProperty(exports, "AuctionType", { enumerable: true, get: function () { return AuctionInfoTypes_1.AuctionType; } });
const AuctionState_1 = require("./fetcher/AuctionState");
Object.defineProperty(exports, "AuctionStateInfo", { enumerable: true, get: function () { return AuctionState_1.AuctionStateInfo; } });
{
"name": "@zoralabs/nft-hooks",
"version": "0.1.8",
"version": "0.1.9",
"description": "Generic Rendering Component for zNFTs",

@@ -5,0 +5,0 @@ "repository": "https://github.com/our-zora/nft-hooks",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc