openzoo 0.51.22 → 0.51.23

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.
@@ -1,3 +1,3 @@
1
1
  <!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; script-src 'self'"><title>OpenZoo savings</title><style>
2
2
  *{box-sizing:border-box}body{max-height:100vh;overflow-y:auto;margin:0;padding:8px;background:transparent;font:13px system-ui;color:#fff}.pill{border-radius:20px;background:#18181bf5;border:1px solid #ffffff25;overflow:hidden;box-shadow:0 4px 14px #0004}header{background:#e85d1c;padding:12px 16px;font-weight:650;-webkit-app-region:drag;display:flex;justify-content:space-between;align-items:center}button{-webkit-app-region:no-drag;border:0;background:none;color:inherit;font:18px system-ui;cursor:pointer;padding:0 5px}main{padding:12px 16px}dl{display:grid;grid-template-columns:1fr auto;margin:0;gap:7px}dd{margin:0;font-variant-numeric:tabular-nums}small{color:#bbb;display:block;margin-top:12px;font-size:11px}#state{color:#d8ff76}.actions{display:flex;align-items:center;gap:8px}#deposit,.fund-button{font-size:12px;border:1px solid #ffffff60;border-radius:7px;padding:5px 10px}.fund-button{display:block;width:100%;text-align:left;margin:9px 0;overflow-wrap:anywhere;line-height:1.5}.fund-button span{display:block;font-size:11px;color:#ccc;user-select:text}[hidden]{display:none!important}#welcome p{font-size:12px;line-height:1.5;color:#ccc}#funding{border-top:1px solid #ffffff25;margin-top:12px}#funding p{font-size:12px;color:#ccc}
3
- </style></head><body><div class="pill"><header><span>OpenZoo · costs & savings</span><div class="actions"><button id="deposit">Deposit</button><button id="collapse" aria-label="Collapse savings" aria-expanded="true" title="Collapse">−</button><button id="close" aria-label="Close savings pill">×</button></div></header><main><section id="welcome" hidden><h3>Welcome to OpenZoo</h3><p>Pay per request from your OpenZoo wallet. Add funds before your first chat.</p><p>1. Choose card or crypto below.<br>2. Add funds to this wallet.<br>3. Once your balance appears, start chatting.</p></section><div id="totals"><dl><dt>Wallet balance</dt><dd id="wallet">—</dd><dt>Prepaid credit</dt><dd id="credit">—</dd><dt>Charged · verified calls</dt><dd id="spent">—</dd><dt>Direct cost · verified calls</dt><dd id="direct">—</dd><dt id="saving-label">Saved</dt><dd id="saved">—</dd></dl><small id="state" role="status">Checking your balance…</small><small>Savings cover matching verified calls only. Drag the orange bar to move.</small></div><section id="funding" hidden><h3>Add funds</h3><p id="fund-status" role="status">Loading your wallet…</p><button class="fund-button" id="copy-solana" disabled>Solana · USDC / KISS / LEOS / TOKEN<span id="solana-address"></span><span>Click to copy address</span></button><button class="fund-button" id="copy-evm" disabled>Base · USDC<span id="evm-address"></span><span>Click to copy address</span></button><button class="fund-button" id="card">Pay by card · Whop ↗</button><p>At checkout, paste your Solana address to link the purchase to this wallet. Your balance updates automatically after confirmation.</p><button class="fund-button" id="back">Back to savings</button><button class="fund-button" id="later" hidden>Set up later</button></section></main></div><script src="savings-renderer.js"></script></body></html>
3
+ </style></head><body><div class="pill"><header><span>OpenZoo · costs & savings</span><div class="actions"><button id="deposit">Deposit</button><button id="collapse" aria-label="Collapse savings" aria-expanded="true" title="Collapse">−</button><button id="close" aria-label="Close savings pill">×</button></div></header><main><section id="welcome" hidden><h3>Welcome to OpenZoo</h3><p>Pay per request from your OpenZoo wallet. Add funds before your first chat.</p><p>1. Choose card or crypto below.<br>2. Add funds to this wallet.<br>3. Once your balance appears, start chatting.</p></section><div id="totals"><dl><dt>Wallet balance</dt><dd id="wallet">—</dd><dt>Prepaid credit</dt><dd id="credit">—</dd><dt>Charged · verified calls</dt><dd id="spent">—</dd><dt>Direct cost · verified calls</dt><dd id="direct">—</dd><dt id="saving-label">Saved</dt><dd id="saved">—</dd></dl><small id="state" role="status">Checking your balance…</small><small>Savings cover matching verified calls only. Drag the orange bar to move.</small></div><section id="funding" hidden><h3>Add funds</h3><p>Use native USDC or eat.ag cooked tokens. Unwrapped TOKEN, KISS and LEOS are not accepted. Cook first at eat.ag.</p><p id="fund-status" role="status">Loading your wallet…</p><button class="fund-button" id="copy-solana" disabled>Solana · native USDC / cooked KISS / LEOS / TOKEN<span id="solana-address"></span><span>Click to copy address</span></button><button class="fund-button" id="copy-evm" disabled>Base · USDC<span id="evm-address"></span><span>Click to copy address</span></button><button class="fund-button" id="card">Pay by card · Whop ↗</button><p>At checkout, paste your Solana address to link the purchase to this wallet. Your balance updates automatically after confirmation.</p><button class="fund-button" id="back">Back to savings</button><button class="fund-button" id="later" hidden>Set up later</button></section></main></div><script src="savings-renderer.js"></script></body></html>
package/lib/config.js CHANGED
@@ -38,12 +38,12 @@ export const config = {
38
38
  */
39
39
  export const FUNDING_ASSETS = [
40
40
  { symbol: 'USDC', mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' },
41
- { symbol: 'KISS', mint: '7K2iAPzHddrghwBF7S7oA9qHr7dDR4QvFmdD1sZgRJxF' },
42
- // LEOS is NINE decimals, and a LEGACY SPL mint rather than Token-2022 —
41
+ { symbol: 'KISS', mint: '9TVSmJj6UbZHMoqdYwjTwTdr6AfT9tjTzT27hvyZxsbX' },
42
+ // Cooked LEOS is NINE decimals and uses Token-2022 —
43
43
  // balance reads must not assume either, so nothing here hardcodes them;
44
44
  // decimals come off the mint on chain.
45
- { symbol: 'LEOS', mint: '5xgsnby6P9zqGK71J7H4yJLxzqPvNbC7rDZxNzjHmj7e' },
46
- { symbol: 'TOKEN', mint: 'EVULoNF4DeMBN4dGiZiDfpiiTfNZgoCvXWWgaV3epump' },
45
+ { symbol: 'LEOS', mint: '2tXdVsqrMYZhXGQSErTL5FmF2qCiL9tsQQ9pVafYmzf3' },
46
+ { symbol: 'TOKEN', mint: '4JSgUyRRgrNSK5pA3wQMp61vP5RRuLeynmPbRwMkvrex' },
47
47
  ];
48
48
 
49
49
  export const USDC_MINT = FUNDING_ASSETS[0].mint;
@@ -134,7 +134,7 @@ export function evmRpcFor(rail) {
134
134
  * also has an EVM address for the Base / Robinhood rails.
135
135
  */
136
136
  export function fundingLine(address) {
137
- return `send a few cents of USDC (${USDC_MINT}) or KISS (${TOKEN_MINT}) on Solana to ${address}`;
137
+ return `Send native USDC or eat.ag cooked TOKEN, KISS, or LEOS on Solana to ${address}. Unwrapped project tokens are not accepted. Cook first: ${FUNDING_ASSETS.filter(a => a.symbol !== "USDC").map(a => `${a.symbol}: https://eat.ag/cook/${a.mint}`).join(" · ")}`;
138
138
  }
139
139
 
140
140
  /**
package/lib/pay.js CHANGED
@@ -258,6 +258,7 @@ export class PayClient {
258
258
  async buildPaymentFor(accept, onStage, challenge) {
259
259
  const rail = railOf(accept);
260
260
  if (rail === 'solana') {
261
+ if (['7K2iAPzHddrghwBF7S7oA9qHr7dDR4QvFmdD1sZgRJxF','EVULoNF4DeMBN4dGiZiDfpiiTfNZgoCvXWWgaV3epump','5xgsnby6P9zqGK71J7H4yJLxzqPvNbC7rDZxNzjHmj7e'].includes(accept.asset)) throw new Error('Unwrapped project tokens are no longer accepted. Cook your tokens at eat.ag first.');
261
262
  const need = BigInt(accept.maxAmountRequired);
262
263
  const bal = await cachedTokenBalance(this.connection, this.keypair.publicKey, accept.asset, { force: true }).catch(() => { throw new BalanceUnavailableError(); });
263
264
  // SHORT IS SHORT. The 402 quotes the raw native mint, so there is nothing
@@ -267,7 +268,7 @@ export class PayClient {
267
268
  if (bal.raw < need) {
268
269
  const usd = Number(accept?.extra?.billedUsd);
269
270
  const line = await withOnrampLink(
270
- `Send USDC (or KISS/LEOS) on Solana to ${this.address}.`,
271
+ fundingLine(this.address),
271
272
  { solana: this.address, usd },
272
273
  );
273
274
  throw new UnderfundedError(accept, bal.ui, this.address, { line });
@@ -101,8 +101,9 @@ export function whopFundBlurb(solana, evm) {
101
101
  'Funding options:',
102
102
  `Card: ${url}`,
103
103
  `At checkout, use this Solana wallet address to link your purchase: ${addr}`,
104
- `Solana deposit wallet (USDC / LEOS / KISS / TOKEN): ${addr}`,
105
- ...FUNDING_ASSETS.filter(a => ['LEOS', 'KISS', 'TOKEN'].includes(a.symbol)).map(a => `${a.symbol} mint (CA): ${a.mint}`),
104
+ `Solana deposit wallet (native USDC / cooked LEOS / cooked KISS / cooked TOKEN): ${addr}`,
105
+ ...FUNDING_ASSETS.filter(a => ['LEOS', 'KISS', 'TOKEN'].includes(a.symbol)).map(a => `Cooked ${a.symbol} mint (CA): ${a.mint} — https://eat.ag/cook/${a.mint}`),
106
+ 'Cook TOKEN, KISS, or LEOS at eat.ag first. Unwrapped versions are not accepted. USDC stays native.',
106
107
  'Send funds to your deposit wallet, not the mint address.',
107
108
  ...(base ? [`Base (USDC): ${base}`] : []),
108
109
  'Your balance refreshes automatically once the payment is confirmed.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openzoo",
3
- "version": "0.51.22",
3
+ "version": "0.51.23",
4
4
  "description": "Local x402-paying proxy + MCP server for openzoo.fun — point any OpenAI-compatible harness (Cursor, Claude Code, aider, SDKs) at localhost and it pays per call from a local burner wallet. Solana and Base rails live; Robinhood experimental.",
5
5
  "license": "MIT",
6
6
  "type": "module",