Skip to content

Commit

Permalink
chore(docs): add docs for auction functions
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Oct 30, 2024
1 parent 3b74005 commit 40f95e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/arns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,15 @@ function arns.createAuction(name, timestamp, initiator)
return auction
end

--- Gets an auction by name
--- @param name string The name of the auction
--- @return Auction|nil The auction instance
function arns.getAuction(name)
return NameRegistry.auctions[name]
end

--- Gets all auctions
--- @return table The auctions
function arns.getAuctions()
return NameRegistry.auctions or {}
end
Expand Down
4 changes: 4 additions & 0 deletions src/auctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ AuctionSettings = {
--- @field startTimestamp number The starting timestamp for the auction
--- @field endTimestamp number The ending timestamp for the auction
--- @field registrationFeeCalculator function Function to calculate registration fee
--- @field computePricesForAuction function Function to compute prices for the auction
--- @field getPriceForAuctionAtTimestamp function Function to get the price for the auction at a given timestamp
--- @field startPrice function Function to get the start price for the auction
--- @field floorPrice function Function to get the floor price for the auction

--- Creates a new Auction instance
--- @param name string The name of the auction
Expand Down

0 comments on commit 40f95e9

Please sign in to comment.