clawmoney 0.14.7 → 0.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/relay/pricing.d.ts +1 -1
- package/dist/relay/pricing.js +7 -4
- package/package.json +1 -1
package/dist/relay/pricing.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface ModelPricing {
|
|
|
21
21
|
}
|
|
22
22
|
export declare const API_PRICES: Record<string, ModelPricing>;
|
|
23
23
|
export declare const RELAY_DISCOUNT = 0.2;
|
|
24
|
-
export declare const PLATFORM_FEE = 0.
|
|
24
|
+
export declare const PLATFORM_FEE = 0.1;
|
|
25
25
|
export declare function getModelPricing(model: string): ModelPricing;
|
|
26
26
|
export interface CostBreakdown {
|
|
27
27
|
inputCost: number;
|
package/dist/relay/pricing.js
CHANGED
|
@@ -92,8 +92,8 @@ const DEFAULT_PRICING = { input: 5, output: 25 };
|
|
|
92
92
|
// Concretely, for a 1M-token Claude Sonnet input+output at default rates:
|
|
93
93
|
// API price = 1M × ($3 input + $15 output) = $18
|
|
94
94
|
// Buyer pays (20%) = $3.60
|
|
95
|
-
// Platform fee (
|
|
96
|
-
// Provider earns = $3.
|
|
95
|
+
// Platform fee (10%) = $0.36
|
|
96
|
+
// Provider earns = $3.24
|
|
97
97
|
//
|
|
98
98
|
// Why 20% flat across all platforms:
|
|
99
99
|
// - The Provider's subscription fee is a sunk cost; their marginal cost
|
|
@@ -107,8 +107,11 @@ const DEFAULT_PRICING = { input: 5, output: 25 };
|
|
|
107
107
|
// we can revisit and split into per-cli_type rates.
|
|
108
108
|
// Relay discount: consumers pay this fraction of API price
|
|
109
109
|
export const RELAY_DISCOUNT = 0.20; // 20% of API price (buyer saves 80%)
|
|
110
|
-
// Platform fee: this fraction of what the buyer pays goes to the platform
|
|
111
|
-
|
|
110
|
+
// Platform fee: this fraction of what the buyer pays goes to the platform.
|
|
111
|
+
// On-chain this is enforced by the PaySplitter contract (feeBps = 1000 = 10%
|
|
112
|
+
// on Base mainnet 0x998f7F6D22ac38cf1196c62f628c6a3956Ff97Db). This constant
|
|
113
|
+
// is display-only for the CLI; the real split happens in the contract.
|
|
114
|
+
export const PLATFORM_FEE = 0.10; // 10%
|
|
112
115
|
export function getModelPricing(model) {
|
|
113
116
|
return API_PRICES[model] ?? DEFAULT_PRICING;
|
|
114
117
|
}
|