getAuctionPrice()
/**
* Get the auction price of the Collective Portrait.
*
* @remarks
* The auction price is the price of the Collective Portrait for 1 year.
* If years > 1, the function will only return the price of the Collective Portrait for 1 year + the price of the Collective Portrait for the remaining years.
* If the Collective Portrait is not up for auction, this function will throw an error.
*
* @param {CollectivePortraitName | number} identity - The name of the Collective Portrait that the user would like to get the auction price for.
* @param {number} years - The number of years that the user would like to register the Collective Portrait for.
* @returns {number} - The auction price of the Collective Portrait.
* @beta
* @async
*/
getAuctionPrice(
identity: CollectivePortraitName | number,
years: number,
): number {
// Requires the auction to be active
if (!this.isAuction(identity)) {
throw new Error('Auction is not active');
}
return this.getPrice(identity, years);
}
Last updated