Use when implementing sealed-bid auctions, building private bidding systems, or creating reveal mechanisms on SUI. Triggers on auction implementation, private bidding requirements, or sealed bid patterns.
From sui-dev-agentsnpx claudepluginhub first-mover-tw/sui-dev-agents --plugin sui-dev-agentsThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Sealed-bid auctions with privacy and fairness guarantees.
Seal provides:
use seal::auction;
public fun create_auction<T: key + store>(
item: T,
reserve_price: u64,
duration: u64,
ctx: &mut TxContext
): ID {
auction::create<T>(
item,
reserve_price,
duration,
ctx
)
}
public fun submit_bid(
auction_id: ID,
bid_commitment: vector<u8>, // Hash of (bid_amount + secret)
ctx: &mut TxContext
) {
auction::commit_bid(
auction_id,
bid_commitment,
ctx
);
}
public fun reveal_bid(
auction_id: ID,
bid_amount: u64,
secret: vector<u8>,
ctx: &mut TxContext
) {
auction::reveal_bid(
auction_id,
bid_amount,
secret,
ctx
);
}
import { sha256 } from '@noble/hashes/sha256';
// Generate bid commitment
function createBidCommitment(amount: number, secret: string): string {
const data = new TextEncoder().encode(`${amount}:${secret}`);
const hash = sha256(data);
return Buffer.from(hash).toString('hex');
}
// Submit sealed bid
async function submitSealedBid(auctionId: string, amount: number) {
const secret = crypto.randomUUID();
const commitment = createBidCommitment(amount, secret);
// Store secret locally for reveal
localStorage.setItem(`bid_secret_${auctionId}`, secret);
const tx = new Transaction();
tx.moveCall({
target: `${PACKAGE_ID}::auction::commit_bid`,
arguments: [
tx.pure(auctionId),
tx.pure(Array.from(Buffer.from(commitment, 'hex')))
]
});
return await signAndExecute({ transaction: tx });
}
// Reveal bid after commit phase
async function revealBid(auctionId: string, amount: number) {
const secret = localStorage.getItem(`bid_secret_${auctionId}`);
if (!secret) {
throw new Error('Secret not found');
}
const tx = new Transaction();
tx.moveCall({
target: `${PACKAGE_ID}::auction::reveal_bid`,
arguments: [
tx.pure(auctionId),
tx.pure(amount),
tx.pure(Array.from(new TextEncoder().encode(secret)))
]
});
return await signAndExecute({ transaction: tx });
}
Phase 1: Commit (bidders submit commitments)
↓
Phase 2: Reveal (bidders reveal bids)
↓
Phase 3: Settlement (highest bidder wins)
❌ Weak or predictable secrets
crypto.randomUUID() or 32+ random bytes❌ Losing secret before reveal phase
❌ Not enforcing reveal deadline
❌ Reusing secrets across auctions
❌ Commitment hash mismatch
❌ Not handling commit phase expiration
❌ Storing secret in plaintext localStorage
Query Seal docs:
const sealInfo = await sui_docs_query({
type: "github",
target: "sui-core",
query: "sealed auction implementation patterns"
});
Fair, private auctions with cryptographic guarantees!