Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: pay-what-you-want pricing, toast helper, skill-ownership chat context
miniaturization77e6b4088e32
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a12db286f..48e9803b0 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -40,6 +40,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **My Collection page now loads** — The /collection page — where your unlocked skills and active subscriptions live — was returning a 404 because its route pointed at the wrong build path, and its subscriptions list was calling an endpoint that rejected the request. Both are fixed: the page loads, your purchased skills and NFT receipts render, and the Subscriptions tab now shows your active creator subscriptions with plan, price, renewal date, and a link to each creator. The marketplace analytics page had the same routing fault and now loads too. (`/collection`) `[fix]`- **Our paid services are properly discoverable by AI agents again** — Every three.ws paid endpoint and MCP tool is published to the x402 discovery indexes (Coinbase's Bazaar, x402scan, agentic.market) so AI agents can find and pay for them automatically. A stray invisible character in the published Solana receiving address was making indexers reject the entire catalog, and our MCP tools weren't flagged as discoverable — both are fixed, service names were tidied to meet listing limits, and we added a checker that catches these issues before they ship. Result: agents can discover and call our services across the ecosystem. `[improvement]`- **Pay-per-call endpoints accept Solana USDC payments again** — Paying for any x402 endpoint with Solana USDC was failing the moment the wallet tried to build the payment — the platform's receiving address was being published with a stray invisible character, so a correctly-built payment got rejected as going to the wrong recipient. Payment addresses are now cleaned before they're ever advertised, so Solana USDC payments to paid endpoints go through and settle as expected. `[fix]`+- **Pay-what-you-want pricing for skills** — Creators can now price a skill as “pay what you want” with an optional minimum; buyers name their price at checkout and the fee, referral, and revenue math all use the actual amount paid. (`/marketplace`) `[feature]`- **Payment hardening and a steadier holder leaderboard** — Two behind-the-scenes reliability and safety fixes. Agent payment invoices now verify that the wallet paying is actually linked to your account before an invoice is created, closing a gap that let bogus payment requests be generated against any agent. And the $THREE holder leaderboard, its share card, and the token stats panel no longer each kick off a full on-chain holder scan during a traffic spike — one scan now serves everyone and refreshes the shared snapshot, so the leaderboard stays fast and responsive under load. Nothing to do on your end. (`/leaderboard`) `[security, fix, infra]`- **Platform-wide hardening: payment integrity, security, and scale** — A broad reliability pass across the parts of three.ws that move real money and serve heavy traffic. On the money side: bundle purchases and agent payments are now verified on-chain before anything unlocks, each payment is credited exactly once, withdrawals can't be processed twice, and recurring subscriptions can't be double-billed. On the security side: a set of input-handling and link-safety fixes across pages, stronger protection for custodial keys at rest, and tighter checks on outbound agent payments so funds only ever move in the expected asset. On the scale side: the busiest directory, profile, and feed pages now ride a short cache and run far fewer database queries, so they stay fast as the community grows. Most of this is invisible by design — it's the plumbing that keeps the platform correct and quick under load. `[security, improvement, infra]`- **Profiles you can edit — and follow** — Your three.ws profile at three.ws/u/<your-username> is now a real social home. Edit it in place: add a bio, a profile picture and banner image, your location, and a website link — all from an Edit button on your own profile. You can now follow other creators and agents, and they can follow you; every profile shows live follower and following counts you can tap to browse the lists, with one-tap follow buttons throughout. And there's a new Feed at three.ws/feed that gathers the latest avatars, agents, and coin launches from everyone you follow, newest first. Find your profile and Feed links from your account page. (`/feed`) `[feature]`diff --git a/api/_lib/services/MonetizationService.js b/api/_lib/services/MonetizationService.jsindex b706ab6a5..ecad94ce0 100644--- a/api/_lib/services/MonetizationService.js+++ b/api/_lib/services/MonetizationService.js@@ -247,7 +247,9 @@ export class MonetizationService {// `payAmount`, validated against the configured minimum and a sane ceiling.let purchaseAmount;if (isPwyw) {- purchaseAmount = this.resolvePwywAmount(payAmount, price);+ // resolvePwywAmount returns a BigInt; normalize to a string so every+ // downstream SQL interpolation matches the fixed/time-pass branches.+ purchaseAmount = this.resolvePwywAmount(payAmount, price).toString();} else if (isTimePass && price.time_pass_amount) {purchaseAmount = price.time_pass_amount;} else {diff --git a/data/changelog.json b/data/changelog.jsonindex 4eea15bd3..b043fa1d6 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,15 @@{"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-06-21",+ "title": "Pay-what-you-want pricing for skills",+ "summary": "Creators can now price a skill as “pay what you want” with an optional minimum; buyers name their price at checkout and the fee, referral, and revenue math all use the actual amount paid.",+ "tags": [+ "feature"+ ],+ "link": "/marketplace"+ },{"date": "2026-06-21","title": "Affiliate dashboard now shows who you referred",diff --git a/public/changelog.json b/public/changelog.jsonindex aa2cdd00b..8c379786a 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-21T08:14:13.200Z",+ "generated_at": "2026-06-21T08:30:32.877Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -368,6 +368,16 @@"fix"]},+ {+ "date": "2026-06-21",+ "type": "update",+ "title": "Pay-what-you-want pricing for skills",+ "summary": "Creators can now price a skill as “pay what you want” with an optional minimum; buyers name their price at checkout and the fee, referral, and revenue math all use the actual amount paid.",+ "link": "/marketplace",+ "tags": [+ "feature"+ ]+ },{"date": "2026-06-21","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 0a6ac58bb..4b9f012c3 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -278,6 +278,14 @@<category>fix</category><description>Paying for any x402 endpoint with Solana USDC was failing the moment the wallet tried to build the payment — the platform's receiving address was being published with a stray invisible character, so a correctly-built payment got rejected as going to the wrong recipient. Payment addresses are now cleaned before they're ever advertised, so Solana USDC payments to paid endpoints go through and settle as expected.</description></item>+ <item>+ <title>Pay-what-you-want pricing for skills</title>+ <link>https://three.ws/marketplace</link>+ <guid isPermaLink="false">2026-06-21:Pay-what-you-want pricing for skills</guid>+ <pubDate>Sun, 21 Jun 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Creators can now price a skill as “pay what you want” with an optional minimum; buyers name their price at checkout and the fee, referral, and revenue math all use the actual amount paid.</description>+ </item><item><title>Payment hardening and a steadier holder leaderboard</title><link>https://three.ws/leaderboard</link>diff --git a/public/features.json b/public/features.jsonindex d60f165e3..f9385e13c 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-21T08:14:13.146Z",+ "generated_at": "2026-06-21T08:30:32.851Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/agent-detail-market.js b/src/agent-detail-market.jsindex f13bd2752..865b19863 100644--- a/src/agent-detail-market.js+++ b/src/agent-detail-market.js@@ -508,21 +508,35 @@ function renderPricing(a) {if (purchasedSkills.has(name)) {badge = `<span class="ad-price-badge owned">✓ Owned</span>`;} else if (price && Number(price.amount) > 0) {- const priceInUSDC = (Number(price.amount) / 1e6).toFixed(2);+ const isPwyw = price.pricing_type === 'pwyw';const trialUses = price.trial_uses || 0;const trialBtn = trialUses > 0? `<button class="ad-skill-btn trial-btn" data-skill-name="${escapeHtml(name)}" data-agent-id="${escapeHtml(a.id)}">Try free (${trialUses} left)</button>`: '';- const hasTimePass = price.time_pass_hours && price.time_pass_amount;+ // Time-pass renting is a fixed-price mechanism; PWYW lets the buyer+ // name the amount instead, so it never pairs with a time-pass button.+ const hasTimePass = !isPwyw && price.time_pass_hours && price.time_pass_amount;const timePassBtn = hasTimePass? (() => {const tpHuman = (Number(price.time_pass_amount) / 1e6).toFixed(2);return `<button class="ad-skill-btn time-pass-btn" data-skill-name="${escapeHtml(name)}" data-agent-id="${escapeHtml(a.id)}" data-duration="${price.time_pass_hours}">Get ${price.time_pass_hours}h (${tpHuman} USDC)</button>`;})(): '';+ let priceBadge;+ let purchaseLabel;+ if (isPwyw) {+ const minAtomics = price.minimum_amount != null ? Number(price.minimum_amount) : 0;+ priceBadge = minAtomics > 0+ ? `<span class="ad-price-badge pwyw">Pay what you want · min ${(minAtomics / 1e6).toFixed(2)} USDC</span>`+ : `<span class="ad-price-badge pwyw">Pay what you want</span>`;+ purchaseLabel = 'Name your price';+ } else {+ priceBadge = `<span class="ad-price-badge paid">${(Number(price.amount) / 1e6).toFixed(2)} USDC</span>`;+ purchaseLabel = 'Purchase';+ }badge =- `<span class="ad-price-badge paid">${priceInUSDC} USDC</span>` +- `<button class="ad-skill-btn purchase-btn" data-skill-name="${escapeHtml(name)}" data-agent-id="${escapeHtml(a.id)}">Purchase</button>` ++ priceBadge ++ `<button class="ad-skill-btn purchase-btn" data-skill-name="${escapeHtml(name)}" data-agent-id="${escapeHtml(a.id)}">${purchaseLabel}</button>` +trialBtn + timePassBtn;} else {badge = `<span class="ad-price-badge free">Free</span>`;diff --git a/src/agent-detail.css b/src/agent-detail.cssindex ce09107e8..ba615adae 100644--- a/src/agent-detail.css+++ b/src/agent-detail.css@@ -1416,6 +1416,11 @@ model-viewer.ad-hero-avatar {border-color: rgba(74, 222, 128, 0.3);background: rgba(74, 222, 128, 0.08);}+.ad-price-badge.pwyw {+ color: #c4b5fd;+ border-color: rgba(167, 139, 250, 0.4);+ background: rgba(167, 139, 250, 0.08);+}.ad-skill-btn {padding: 5px 12px;border-radius: 8px;@@ -2074,6 +2079,61 @@ model-viewer.ad-hero-avatar {font-size: 18px;color: var(--ad-text);}+/* Pay-what-you-want amount entry (shown in place of a fixed total). */+.payment-pwyw {+ margin: 4px 0 14px;+ display: flex;+ flex-direction: column;+ gap: 6px;+}+.payment-pwyw-label {+ font-size: 13px;+ font-weight: 600;+ color: var(--ad-text);+}+.payment-pwyw-row {+ display: flex;+ align-items: center;+ gap: 8px;+}+.payment-pwyw-input {+ flex: 1 1 auto;+ min-width: 0;+ padding: 10px 12px;+ border-radius: 9px;+ border: 1px solid var(--ad-line);+ background: var(--ad-bg-2);+ color: var(--ad-text);+ font: inherit;+ font-size: 15px;+ font-variant-numeric: tabular-nums;+ box-sizing: border-box;+}+.payment-pwyw-input::placeholder {+ color: var(--ad-dim);+}+.payment-pwyw-input:focus {+ outline: none;+ border-color: var(--ad-text);+}+.payment-pwyw-unit {+ font-size: 13px;+ font-weight: 600;+ color: var(--ad-muted);+ flex-shrink: 0;+}+.payment-pwyw-hint {+ font-size: 12px;+ min-height: 14px;+ color: var(--ad-muted);+}+.payment-pwyw-hint.ok {+ color: var(--ad-green);+}+.payment-pwyw-hint.err {+ color: #ff6b6b;+}+.payment-gift {margin-bottom: 14px;}diff --git a/tasks/CLEANUP-MANIFEST.md b/tasks/CLEANUP-MANIFEST.mdindex b9e2754d1..c3c8be4e7 100644--- a/tasks/CLEANUP-MANIFEST.md+++ b/tasks/CLEANUP-MANIFEST.md@@ -201,3 +201,11 @@ Retired (feature verified shipped):| tasks/monetization-feature/17-transactional-emails.md | DELETE | Built: sendPurchaseReceiptEmail/sendSaleNotificationEmail/sendReferralCommissionEmail in api/_lib/email.js, triggered in api/_lib/purchase-confirm.js + api/_lib/referrals.js (creditReferralCommission), best-effort. || tasks/monetization-feature/21-user-ratings-and-reviews.md | DELETE | Built: skill_reviews migration + api/skills/review.js (purchase-verified via hasSkillAccess) + src/skill-reviews.js mounted on src/agent-detail-market.js; route via api/skills/[id].js delegation. || tasks/monetization-feature/19-affiliate-dashboard-improvements.md | DELETE | Built: getReferredUsers in api/_lib/referrals.js + per-user list in GET /api/users/referrals + table in src/dashboard-next/pages/referrals.js (real joins over skill_purchases/asset_purchases). |++## 2026-06-21 built-and-shipped (monetization batch B)++| spec file | decision | evidence |+|---|---|---|+| tasks/monetization-feature/24-add-toast-notifications.md | DELETE | Built: src/ui-helpers.js showToast (accessible, token-styled, action/dismiss) adopted across src/shared/skill-purchase.js feedback points. |+| tasks/monetization-feature/15-pay-what-you-want-pricing.md | DELETE | Built: migration 20260621190000_skill_pwyw_pricing.sql (pricing_type/minimum_amount) + creator UI (src/agent-edit.js) + buyer "name your price" (skill-purchase.js) + server-authoritative resolvePwywAmount in MonetizationService; purchase.js passes pay_amount. |+| tasks/monetization-feature/20-protocol-add-ownership-context.md | DELETE | Built: per-user skill_ownership (is_premium/is_owned via hasSkillAccess) injected into the agent chat system prompt in api/agents/talk.js. |diff --git a/tasks/monetization-feature/15-pay-what-you-want-pricing.md b/tasks/monetization-feature/15-pay-what-you-want-pricing.mddeleted file mode 100644index f28ef9f0b..000000000--- a/tasks/monetization-feature/15-pay-what-you-want-pricing.md+++ /dev/null@@ -1,42 +0,0 @@-----status: not-started------# Prompt 15: "Pay What You Want" Pricing--**Status:** Not Started--## Objective-Allow creators to set a skill as "Pay What You Want" (PWYW), optionally with a minimum price.--## Explanation-PWYW can be a powerful tool for community engagement and can sometimes lead to higher revenue than a fixed price.--## Instructions-- [ ] **Modify the `agent_skill_prices` table.**- - Add a `pricing_type` of `pwyw`.- - Add a `minimum_amount` column (can be 0).-- [ ] **Update the creator dashboard.**- - Add "Pay What You Want" as a pricing option.- - If selected, allow setting a minimum price.-- [ ] **Update the UI on the agent detail page.**- - For PWYW skills, instead of a "Buy" button, show an input field for the amount and a "Pay" button.- - Client-side validation should ensure the entered amount is not below the minimum.-- [ ] **Update the purchase API (`/api/skills/purchase`).**- - It should now accept an optional `amount` in the request body for PWYW skills.- - The backend must validate that this amount is above the `minimum_amount`.- - The transaction is then constructed with the user-defined amount.--<!-- AUTO:self-delete-on-complete -->-------## ✅ On completion — delete this file--This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:--```bash-git rm "tasks/monetization-feature/15-pay-what-you-want-pricing.md"-```--Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.diff --git a/tasks/monetization-feature/20-protocol-add-ownership-context.md b/tasks/monetization-feature/20-protocol-add-ownership-context.mddeleted file mode 100644index c304c1d6b..000000000--- a/tasks/monetization-feature/20-protocol-add-ownership-context.md+++ /dev/null@@ -1,68 +0,0 @@-----status: not-started------# Prompt 20: Update Agent Protocol--**Status:** Not Started--## Objective-Enhance the agent protocol to include information about skill ownership, allowing the agent itself to be aware of monetization.--## Explanation-While skill usage is gated on the backend API, it can be beneficial for the agent's internal logic to know if a skill is premium and if the current user owns it. This could allow for more nuanced interactions, like the agent saying, "You'll need to purchase my 'Advanced Analysis' skill for that, which you can do from my profile."--## Instructions-- [ ] **Locate the agent protocol definition** or the place where the agent's context is built (likely in the main chat/action API endpoint).-- [ ] **Add Ownership Data to Context:**- - [ ] When building the context to send to the agent (or the LLM), include a new key, `skill_ownership`.- - [ ] This object should map skill names to a boolean indicating if the current user owns them.- - [ ] This requires the data from the checks performed in Prompt 8.-- [ ] **Update Agent's System Prompt:**- - [ ] Modify the agent's core system prompt to inform it about this new context.- - [ ] Instruct the agent on how to behave. For example: "If the user asks to perform a premium skill they do not own, you should politely inform them that the skill is for purchase and direct them to your agent profile page."--## Code Example (Conceptual - Backend adding to context)--```javascript-// In the API endpoint that calls the LLM--// ... after performing ownership checks from Prompt 8 ...-const skillOwnership = {};-for (const skill of agent.skills) {- const price = agent.skill_prices[skill.name];- if (price) {- const isOwned = await hasUserPurchased(user.id, agent.id, skill.name);- skillOwnership[skill.name] = { is_premium: true, is_owned: isOwned };- } else {- skillOwnership[skill.name] = { is_premium: false, is_owned: true }; // Free skills are "owned"- }-}--// Add this to the context/prompt sent to the LLM-const llmContext = {- // ... other context- skill_ownership: skillOwnership,-};--const systemPrompt = `You are an agent. You have skills. Some may be premium.-The following JSON shows your skills and if the user owns them:-${JSON.stringify(llmContext.skill_ownership)}-If a user tries to use a skill where is_premium is true but is_owned is false, you must decline and tell them it's a paid skill.`--// ... call LLM with the new prompt and context ...-```--<!-- AUTO:self-delete-on-complete -->-------## ✅ On completion — delete this file--This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:--```bash-git rm "tasks/monetization-feature/20-protocol-add-ownership-context.md"-```--Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.diff --git a/tasks/monetization-feature/24-add-toast-notifications.md b/tasks/monetization-feature/24-add-toast-notifications.mddeleted file mode 100644index b2d195ffd..000000000--- a/tasks/monetization-feature/24-add-toast-notifications.md+++ /dev/null@@ -1,121 +0,0 @@-# Prompt 24: Implement Toast Notifications--## Objective-Integrate a simple, reusable toast notification system to provide users with clear, non-blocking feedback for actions like saving settings, successful payments, or errors.--## Explanation-Status messages next to buttons are good, but they can be missed. Toast notifications are small popups (usually in a corner of the screen) that provide timely feedback. They are a standard feature in modern web apps and greatly improve the user experience. We will create a simple, vanilla JS system for this.--## Instructions-1. **Add HTML and CSS:**- * In your main layout/HTML files (e.g., `marketplace.html`, `pump-dashboard.html`), add a container element for toasts. It should be fixed to a corner of the viewport.- * Add CSS to style the container and the individual toast messages. Toasts should have different styles for success, error, and info.--2. **Create a JavaScript Helper:**- * In a shared JavaScript file (or create a new one like `src/ui-helpers.js`), write a function like `showToast(message, type = 'info', duration = 3000)`.- * The function should:- * Create a new `div` element for the toast.- * Add the `message` text to it.- * Add a class based on the `type` (e.g., `toast-success`, `toast-error`).- * Append the new toast to the toast container element.- * Use a `setTimeout` to automatically remove the toast element after the `duration`.- * Consider adding an animation for the toast appearing and disappearing.--3. **Integrate with Existing Logic:**- * Go through the feature code you've already written and replace or augment `status.textContent` messages with calls to your new `showToast` function.- * **Payment Flow (`marketplace.js`):**- * Show a success toast: `showToast('Payment successful! Skill unlocked.', 'success')`.- * Show an error toast: `showToast(\`Error: ${error.message}\`, 'error')`.- * **Payout Settings (`dashboard.js`):**- * `showToast('Payout wallet saved.', 'success')`.- * `showToast('Withdrawal request submitted.', 'success')`.--## Code Example (HTML & CSS)--Add to a main HTML file (e.g., `marketplace.html`):-```html-<!-- At the end of <body> -->-<div id="toast-container"></div>-```--Add to a main CSS file (e.g., `style.css`):-```css-#toast-container {- position: fixed;- bottom: 20px;- right: 20px;- z-index: 1000;- display: flex;- flex-direction: column;- gap: 10px;-}--.toast {- padding: 12px 16px;- border-radius: 6px;- color: #fff;- font-size: 14px;- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);- animation: toast-in 0.3s ease;- opacity: 0.95;-}--.toast.toast-info {- background-color: #374151;-}-.toast.toast-success {- background-color: #059669;-}-.toast.toast-error {- background-color: #b91c1c;-}--@keyframes toast-in {- from {- transform: translateX(100%);- opacity: 0;- }- to {- transform: translateX(0);- opacity: 0.95;- }-}-```--## Code Example (JavaScript Helper)--```javascript-// In a new file src/ui-helpers.js or similar-function showToast(message, type = 'info', duration = 3000) {- const container = document.getElementById('toast-container');- if (!container) return;-- const toast = document.createElement('div');- toast.className = `toast toast-${type}`;- toast.textContent = message;-- container.appendChild(toast);-- setTimeout(() => {- toast.remove();- }, duration);-}--// In marketplace.js, after a successful payment:-// showToast('Payment successful! Skill unlocked.', 'success');-```-Make sure to import/include this helper function where you need it.--<!-- AUTO:self-delete-on-complete -->-------## ✅ On completion — delete this file--This file is a unit of work, not a permanent doc. The moment every item above is **built, wired, verified, and committed** to the "Definition of done" in the repo-root `CLAUDE.md`, remove it in the same change:--```bash-git rm "tasks/monetization-feature/24-add-toast-notifications.md"-```--Stage the deletion alongside your implementation and include it in the completion commit. This directory is the backlog: a file that still exists is unfinished work; a file that is gone has shipped. Do not delete early, and never leave a completed prompt behind.diff --git a/tests/api/skill-price-cache.test.js b/tests/api/skill-price-cache.test.jsindex cce732769..3984a3eba 100644--- a/tests/api/skill-price-cache.test.js+++ b/tests/api/skill-price-cache.test.js@@ -158,11 +158,25 @@ describe('skillPriceMap', () => {trial_uses: 2,time_pass_hours: null,time_pass_amount: null,+ pricing_type: 'fixed',+ minimum_amount: null,});expect(map.summarize.time_pass_hours).toBe(24);expect(map.summarize.time_pass_amount).toBe(250000);});+ it('surfaces pwyw pricing_type and minimum_amount (as a string) when present', () => {+ const map = skillPriceMap([+ priceRow('tip', { amount: 100000, pricing_type: 'pwyw', minimum_amount: 50000 }),+ priceRow('plain', { amount: 75000 }),+ ]);+ expect(map.tip.pricing_type).toBe('pwyw');+ expect(map.tip.minimum_amount).toBe('50000');+ // Unknown/absent pricing_type folds to the fixed default.+ expect(map.plain.pricing_type).toBe('fixed');+ expect(map.plain.minimum_amount).toBeNull();+ });+it('defaults mint_decimals to 6 and trial_uses to 0 when a row omits them', () => {const map = skillPriceMap([{ skill: 'translate', amount: 50000, currency_mint: THREE_MINT, chain: 'solana' },