SetNet.Auction
1.2.0
dotnet add package SetNet.Auction --version 1.2.0
NuGet\Install-Package SetNet.Auction -Version 1.2.0
<PackageReference Include="SetNet.Auction" Version="1.2.0" />
<PackageVersion Include="SetNet.Auction" Version="1.2.0" />
<PackageReference Include="SetNet.Auction" />
paket add SetNet.Auction --version 1.2.0
#r "nuget: SetNet.Auction, 1.2.0"
#:package SetNet.Auction@1.2.0
#addin nuget:?package=SetNet.Auction&version=1.2.0
#tool nuget:?package=SetNet.Auction&version=1.2.0
<p align="center"> <img src="https://raw.githubusercontent.com/Povstalez/SetNet/master/assets/icon.png" alt="SetNet" width="96"> </p>
SetNet.Auction
Player-driven auction house for SetNet.
List an item (it's escrowed from your inventory), let players bid or buy out (each bid escrows the bidder's currency and refunds the previous high bidder), and a background timer settles expired listings — the winner gets the item, the seller gets the winning bid, or the item comes back if nobody bid. Every move goes through SetNet.Inventory and SetNet.Wallet, so escrow can't dupe or lose anything. Added by composition — no base class.
Install
dotnet add package SetNet
dotnet add package SetNet.Inventory
dotnet add package SetNet.Wallet
dotnet add package SetNet.Auction
Usage
Call InventoryRuntime.Enable(), WalletRuntime.Enable(), and AuctionRuntime.Enable() at startup.
// server
InventoryRuntime.Enable(); WalletRuntime.Enable(); AuctionRuntime.Enable();
var inventory = server.UseInventory();
var wallet = server.UseWallet();
server.UseAuction(inventory, wallet);
// client
InventoryRuntime.Enable(); WalletRuntime.Enable(); AuctionRuntime.Enable();
var ah = client.UseAuction();
ah.Outbid += e => Toast($"Outbid — {e.Amount} {e.Currency} refunded");
ah.Won += e => Toast($"Won {e.Count}× {e.ItemId}!");
ah.Sold += e => Toast($"Sold for {e.Amount} {e.Currency}");
ah.Returned += e => Toast("Listing expired — item returned");
string id = await ah.SellAsync("epic_sword", 1, minBid: 500, durationSeconds: 3600, buyout: 5000);
foreach (var l in await ah.BrowseAsync()) ShowRow(l);
await ah.BidAsync(someListingId, 600);
await ah.BuyoutAsync(someListingId);
API
Server: server.UseAuction(InventoryServer, WalletServer) → AuctionServer (holds listings, runs the settlement timer; Dispose() stops it).
Client: client.UseAuction() → AuctionClient
| Member | Purpose |
|---|---|
BrowseAsync() |
active listings |
SellAsync(itemId, count, minBid, durationSeconds, buyout = 0, currency = "gold") |
list (escrows the item) |
BidAsync(listingId, amount) / BuyoutAsync(listingId) |
bid / instant-buy (escrows currency) |
CancelAsync(listingId) |
cancel your bid-free listing |
event Outbid / Won / Sold / Returned |
outcomes |
InventoryRuntime.Enable() + WalletRuntime.Enable() + AuctionRuntime.Enable() — one-time bootstrap.
Notes
- Rides the unified SetNet.Protocol messaging layer on the
Channels.Auctionchannel (all modules share one envelope wire type,65447) — no per-module wire ids to reserve. Serializer-agnostic: the control protocol is hand-framedbyte[], your payloads use yourSetNetSerializer. - Escrow everywhere. The item leaves the seller's inventory at listing; each bid withdraws currency and refunds the prior bidder; settlement grants item↔currency. Nothing is created or destroyed — a cancel/expiry returns the item, an outbid returns the money.
- Settlement runs on a ~1 s timer; a buyout settles instantly. Cancel is only allowed before the first bid.
- Persistence. Listings and escrow live in memory here; back
SetNet.Inventory/SetNet.Walletwith durable stores and persist listings yourself if auctions must survive a restart. - Node-local. Listings live on the auction node. For a cluster, run one auction endpoint (or shard sellers/buyers to it) so escrow stays consistent.
Documentation & source
- 🐙 https://github.com/Povstalez/SetNet — full catalog in docs/MODULES.md
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- SetNet (>= 1.2.0)
- SetNet.Inventory (>= 1.2.0)
- SetNet.Wallet (>= 1.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.0 | 86 | 8/5/2026 |