Skip to content

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.

chore: walk-scene Playwright smokes + pump.fun devnet spike

nirholasab4777282224
diff --git a/spike-pump-creator.mjs b/spike-pump-creator.mjs
new file mode 100644
index 000000000..687b4a9bd
--- /dev/null
+++ b/spike-pump-creator.mjs
@@ -0,0 +1,109 @@
+// Spike: prove pump.fun `create_v2` accepts `creator != user` (signer).
+// Devnet only. Generates fresh keypairs, airdrops, builds + sends a create_v2
+// transaction, then reads the resulting BondingCurve account and asserts
+// bondingCurve.creator == payoutOwner.publicKey while the signer was visitor.
+
+import {
+ Connection,
+ Keypair,
+ PublicKey,
+ TransactionMessage,
+ VersionedTransaction,
+ LAMPORTS_PER_SOL,
+} from '@solana/web3.js';
+import { PumpSdk, bondingCurvePda } from '@pump-fun/pump-sdk';
+
+const RPC = process.env.SOLANA_RPC_URL_DEVNET || 'https://api.devnet.solana.com';
+const conn = new Connection(RPC, 'confirmed');
+
+const payoutOwner = Keypair.generate(); // becomes BondingCurve.creator — never signs
+const visitor = Keypair.generate(); // signs + pays
+const mint = Keypair.generate(); // new mint keypair
+
+console.log('payoutOwner:', payoutOwner.publicKey.toBase58());
+console.log('visitor :', visitor.publicKey.toBase58());
+console.log('mint :', mint.publicKey.toBase58());
+
+async function airdrop(pubkey, sol) {
+ for (let attempt = 1; attempt <= 8; attempt++) {
+ try {
+ const sig = await conn.requestAirdrop(pubkey, sol * LAMPORTS_PER_SOL);
+ const { blockhash, lastValidBlockHeight } = await conn.getLatestBlockhash('confirmed');
+ await conn.confirmTransaction({ signature: sig, blockhash, lastValidBlockHeight }, 'confirmed');
+ const bal = await conn.getBalance(pubkey);
+ console.log(`airdropped ${sol} SOL → ${pubkey.toBase58()} (balance: ${bal / LAMPORTS_PER_SOL} SOL) [attempt ${attempt}]`);
+ return;
+ } catch (e) {
+ console.log(` airdrop attempt ${attempt} failed: ${e.message}; retrying in ${attempt * 2}s`);
+ await new Promise((r) => setTimeout(r, attempt * 2000));
+ }
+ }
+ throw new Error('airdrop failed after 8 attempts');
+}
+
+// Devnet faucet caps single requests at ~1 SOL. Two requests give us headroom.
+await airdrop(visitor.publicKey, 1);
+await airdrop(visitor.publicKey, 1);
+
+const sdk = new PumpSdk();
+const ix = await sdk.createV2Instruction({
+ mint: mint.publicKey,
+ name: 'CreatorSplitTest',
+ symbol: 'CST',
+ uri: 'https://example.invalid/meta.json',
+ creator: payoutOwner.publicKey, // <-- DIFFERENT from signer
+ user: visitor.publicKey, // <-- the only signer
+ mayhemMode: false,
+});
+
+const { blockhash, lastValidBlockHeight } = await conn.getLatestBlockhash('confirmed');
+const msg = new TransactionMessage({
+ payerKey: visitor.publicKey,
+ recentBlockhash: blockhash,
+ instructions: [ix],
+}).compileToV0Message();
+const vtx = new VersionedTransaction(msg);
+vtx.sign([visitor, mint]); // payoutOwner does NOT sign
+
+console.log('\nsubmitting tx...');
+const sig = await conn.sendTransaction(vtx, { skipPreflight: false });
+console.log('signature:', sig);
+
+await conn.confirmTransaction({ signature: sig, blockhash, lastValidBlockHeight }, 'confirmed');
+console.log('confirmed.');
+
+const bcPda = bondingCurvePda(mint.publicKey);
+console.log('\nBondingCurve PDA:', bcPda.toBase58());
+
+const acct = await conn.getAccountInfo(bcPda);
+if (!acct) throw new Error('bonding curve account not found post-tx');
+
+// BondingCurve layout (from IDL):
+// 8 bytes discriminator
+// 6 × u64 (virt_token, virt_quote, real_token, real_quote, total_supply, ...)
+// Actually per IDL: virtual_token_reserves u64, virtual_quote_reserves u64,
+// real_token_reserves u64, real_quote_reserves u64, token_total_supply u64,
+// complete bool (1 byte), creator pubkey (32 bytes), is_mayhem_mode bool,
+// is_cashback_coin bool, quote_mint pubkey.
+const d = acct.data;
+const off = 8 + 5 * 8 + 1; // after disc + 5 u64s + complete bool
+const creatorBytes = d.slice(off, off + 32);
+const creatorOnChain = new PublicKey(creatorBytes);
+
+console.log('\nBondingCurve.creator on-chain:', creatorOnChain.toBase58());
+console.log('Expected (payoutOwner) :', payoutOwner.publicKey.toBase58());
+console.log('Actual signer (visitor) :', visitor.publicKey.toBase58());
+
+if (creatorOnChain.equals(payoutOwner.publicKey)) {
+ console.log('\n✅ PROVEN: BondingCurve.creator was set to a pubkey that NEVER signed.');
+ console.log(' The launchpad architecture is empirically confirmed on devnet.');
+} else {
+ console.log('\n❌ Unexpected: BondingCurve.creator does not match payoutOwner.');
+ console.log(' Investigate offset / layout. Raw account data (hex):');
+ console.log(d.toString('hex'));
+ process.exit(1);
+}
+
+console.log('\nDevnet explorer:');
+console.log(` https://solscan.io/tx/${sig}?cluster=devnet`);
+console.log(` https://solscan.io/account/${bcPda.toBase58()}?cluster=devnet`);
diff --git a/walk-after.png b/walk-after.png
new file mode 100644
index 000000000..bb7b708e8
Binary files /dev/null and b/walk-after.png differ
diff --git a/walk-before.png b/walk-before.png
new file mode 100644
index 000000000..882e8191e
Binary files /dev/null and b/walk-before.png differ
diff --git a/walk-debug.tmp.mjs b/walk-debug.tmp.mjs
new file mode 100644
index 000000000..fa26a6745
--- /dev/null
+++ b/walk-debug.tmp.mjs
@@ -0,0 +1,28 @@
+import { chromium } from 'playwright';
+
+const browser = await chromium.launch();
+const ctx = await browser.newContext({ viewport: { width: 1024, height: 768 } });
+await ctx.grantPermissions(['camera']);
+const page = await ctx.newPage();
+const logs = [];
+page.on('pageerror', (err) => logs.push('[pageerror] ' + (err?.stack || err)));
+page.on('console', (m) => logs.push(`[${m.type()}] ${m.text()}`));
+page.on('requestfailed', (req) => logs.push(`[reqfail] ${req.url()} ${req.failure()?.errorText}`));
+page.on('websocket', (ws) => {
+ logs.push(`[ws-open] ${ws.url()}`);
+ ws.on('framereceived', (f) => logs.push(`[ws-recv] ${typeof f.payload === 'string' ? f.payload.slice(0,80) : `<${f.payload.length}B>`}`));
+ ws.on('framesent', (f) => logs.push(`[ws-send] ${typeof f.payload === 'string' ? f.payload.slice(0,80) : `<${f.payload.length}B>`}`));
+ ws.on('socketerror', (e) => logs.push(`[ws-err] ${e}`));
+ ws.on('close', () => logs.push(`[ws-close] ${ws.url()}`));
+});
+
+await page.goto('http://localhost:3000/walk?name=alice', { waitUntil: 'domcontentloaded' });
+await page.waitForTimeout(7000);
+
+const state = await page.evaluate(() => ({
+ statusText: document.getElementById('walk-status')?.textContent,
+ onlineStatus: document.getElementById('walk-online')?.dataset?.status,
+ onlineLabel: document.getElementById('walk-online')?.querySelector('[data-label]')?.textContent,
+}));
+await browser.close();
+console.log(JSON.stringify({ state, logs }, null, 2));
diff --git a/walk-multi-A.png b/walk-multi-A.png
new file mode 100644
index 000000000..c48303ed4
Binary files /dev/null and b/walk-multi-A.png differ
diff --git a/walk-multi-B.png b/walk-multi-B.png
new file mode 100644
index 000000000..c8fd2f673
Binary files /dev/null and b/walk-multi-B.png differ
diff --git a/walk-multi-smoke.tmp.mjs b/walk-multi-smoke.tmp.mjs
new file mode 100644
index 000000000..0dcd80113
--- /dev/null
+++ b/walk-multi-smoke.tmp.mjs
@@ -0,0 +1,94 @@
+import { chromium } from 'playwright';
+
+const VITE = 'http://localhost:3000';
+const TIMEOUT = 25_000;
+
+const browser = await chromium.launch();
+
+async function newClient(name) {
+ const ctx = await browser.newContext({ viewport: { width: 1024, height: 768 } });
+ await ctx.grantPermissions(['camera']);
+ const page = await ctx.newPage();
+ const errs = [];
+ page.on('pageerror', (err) => errs.push(`[pageerror:${name}] ${err?.stack || err}`));
+ page.on('console', (m) => {
+ if (m.type() === 'error') errs.push(`[console.error:${name}] ${m.text()}`);
+ });
+ return { ctx, page, errs };
+}
+
+const a = await newClient('A');
+const b = await newClient('B');
+
+// Each client connects with a different display name.
+await a.page.goto(`${VITE}/walk?name=alice`, { waitUntil: 'domcontentloaded', timeout: TIMEOUT });
+await b.page.goto(`${VITE}/walk?name=bob`, { waitUntil: 'domcontentloaded', timeout: TIMEOUT });
+
+// Wait for both avatars to load (status text flips to "walk it").
+const waitForReady = (p) =>
+ p.waitForFunction(
+ () => {
+ const el = document.getElementById('walk-status');
+ return el && /walk it/i.test(el.textContent || '');
+ },
+ { timeout: TIMEOUT },
+ );
+await Promise.all([waitForReady(a.page), waitForReady(b.page)]);
+
+// Wait for the online pill on each client to flip to "online".
+const waitForOnline = (p) =>
+ p.waitForFunction(
+ () => {
+ const el = document.getElementById('walk-online');
+ return el && el.getAttribute('data-status') === 'online';
+ },
+ { timeout: TIMEOUT },
+ );
+await Promise.all([waitForOnline(a.page), waitForOnline(b.page)]);
+
+// Push A forward (W) for ~1.2s — B should observe A's position changing.
+// We detect that by waiting for B's DOM to gain a .walk-remote-label
+// (alice's floating name tag).
+await a.page.evaluate(async () => {
+ const wait = (ms) => new Promise((r) => setTimeout(r, ms));
+ const fire = (type, code) => window.dispatchEvent(new KeyboardEvent(type, { code, bubbles: true }));
+ fire('keydown', 'KeyW');
+ await wait(1200);
+ fire('keyup', 'KeyW');
+});
+
+// Give B a moment to receive the patches.
+await b.page.waitForTimeout(800);
+
+const bSawA = await b.page.evaluate(() => {
+ const labels = Array.from(document.querySelectorAll('.walk-remote-label'));
+ return {
+ count: labels.length,
+ names: labels.map((l) => l.textContent),
+ countPill: document.getElementById('walk-online-count')?.textContent,
+ };
+});
+const aSawB = await a.page.evaluate(() => {
+ const labels = Array.from(document.querySelectorAll('.walk-remote-label'));
+ return {
+ count: labels.length,
+ names: labels.map((l) => l.textContent),
+ countPill: document.getElementById('walk-online-count')?.textContent,
+ };
+});
+
+// Screenshots for visual confirmation.
+await a.page.screenshot({ path: 'walk-multi-A.png' });
+await b.page.screenshot({ path: 'walk-multi-B.png' });
+
+await browser.close();
+
+const errs = [...a.errs, ...b.errs];
+const ok =
+ bSawA.count >= 1 &&
+ bSawA.names.includes('alice') &&
+ aSawB.count >= 1 &&
+ aSawB.names.includes('bob') &&
+ errs.length === 0;
+console.log(JSON.stringify({ ok, bSawA, aSawB, errs }, null, 2));
+process.exit(ok ? 0 : 1);
diff --git a/walk-smoke.png b/walk-smoke.png
new file mode 100644
index 000000000..8bc0288eb
Binary files /dev/null and b/walk-smoke.png differ
diff --git a/walk-smoke.tmp.mjs b/walk-smoke.tmp.mjs
new file mode 100644
index 000000000..8cd6409de
--- /dev/null
+++ b/walk-smoke.tmp.mjs
@@ -0,0 +1,60 @@
+import { chromium } from 'playwright';
+import { readFileSync } from 'fs';
+
+const URL = 'http://localhost:3003/walk';
+const TIMEOUT = 25_000;
+
+const browser = await chromium.launch();
+const context = await browser.newContext({ viewport: { width: 1024, height: 768 } });
+await context.grantPermissions(['camera']);
+
+const page = await context.newPage();
+const pageErrors = [];
+page.on('pageerror', (err) => pageErrors.push(err?.stack || String(err)));
+page.on('console', (msg) => {
+ if (msg.type() === 'error') pageErrors.push('[console.error] ' + msg.text());
+});
+
+await page.goto(URL, { waitUntil: 'domcontentloaded', timeout: TIMEOUT });
+await page.waitForFunction(
+ () => {
+ const el = document.getElementById('walk-status');
+ return el && /walk it/i.test(el.textContent || '');
+ },
+ { timeout: TIMEOUT },
+);
+// Allow one extra second so idle clip settles into a deterministic pose.
+await page.waitForTimeout(800);
+
+const beforeBuf = await page.screenshot({ path: 'walk-before.png', fullPage: false });
+
+await page.evaluate(async () => {
+ const wait = (ms) => new Promise((r) => setTimeout(r, ms));
+ const fireKey = (type, code) => {
+ window.dispatchEvent(new KeyboardEvent(type, { code, bubbles: true }));
+ };
+ fireKey('keydown', 'KeyW');
+ await wait(1200);
+ fireKey('keyup', 'KeyW');
+ await wait(400);
+});
+
+const afterBuf = await page.screenshot({ path: 'walk-after.png', fullPage: false });
+
+// Quick byte-level diff — if the avatar moved at all, the PNGs will differ.
+// PNGs are deterministic for identical pixel input, so equal length+content
+// across two distinct frames means literally nothing changed on screen.
+const sameBytes = beforeBuf.length === afterBuf.length &&
+ beforeBuf.equals(afterBuf);
+
+await browser.close();
+
+const ok = !sameBytes && pageErrors.length === 0;
+console.log(JSON.stringify({
+ ok,
+ sameBytes,
+ beforeBytes: beforeBuf.length,
+ afterBytes: afterBuf.length,
+ pageErrors,
+}, null, 2));
+process.exit(ok ? 0 : 1);