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
Ignore log exports via glob; onchain deploy/skill-NFT/registry updates
nirholasa575537cea8d
diff --git a/.gitignore b/.gitignoreindex 038281dac..7b21b5246 100644--- a/.gitignore+++ b/.gitignore@@ -256,7 +256,4 @@ pages/ibm/test.html# Raw smart-money scrapes (distilled into api/_lib/copy/smart-wallets.json — never commit the 30MB sources)/solwallets.json/bscwallets.json-three.ws-log-export-2026-06-20T06-40-10.json-three.ws-log-export-2026-06-20T11-29-59.json-three.ws-log-export-2026-06-21T06-35-55.json-three.ws-log-export-2026-06-21T06-36-48.json+three.ws-log-export-*.jsondiff --git a/api/_lib/onchain-deploy.js b/api/_lib/onchain-deploy.jsindex 53fd94335..735562de2 100644--- a/api/_lib/onchain-deploy.js+++ b/api/_lib/onchain-deploy.js@@ -34,7 +34,7 @@ import {} from './three-brand.js';import { registerAgentIdentity, MPL_AGENT_IDENTITY_PROGRAM_ID } from './agent-registry.js';import { getAgentCollection } from './solana-collection.js';-import { solanaRpcEndpoints } from './solana/connection.js';+import { solanaConnection } from './solana/connection.js';import { generateSolanaAgentWallet } from './agent-wallet.js';import { publishFeedEvent } from './feed.js';import { pinToIPFS } from './ipfs-pin.js';@@ -73,7 +73,12 @@ export function buildAuthorityUmi(network, secret = authoritySecret()) {} catch {throw new Error('authority/funder secret is not a valid base58 keypair');}- const umi = createUmi(solanaRpcEndpoints(network)[0]).use(mplCore());+ // Route umi through the multi-endpoint failover Connection (not a bare URL) so+ // every RPC the build needs — chiefly getLatestBlockhash — rotates across the+ // endpoint chain. A bare URL gives umi a single node whose malformed/empty 200+ // body surfaces as the `StructError: … but received:` crash instead of failing+ // over to a healthy provider.+ const umi = createUmi(solanaConnection({ network })).use(mplCore());const authoritySigner = createSignerFromKeypair(umi,umi.eddsa.createKeypairFromSecretKey(authorityKeypair.secretKey),diff --git a/api/_lib/skill-nft.js b/api/_lib/skill-nft.jsindex c1b70d334..17c1a309d 100644--- a/api/_lib/skill-nft.js+++ b/api/_lib/skill-nft.js@@ -37,6 +37,7 @@ import bs58 from 'bs58';import { sql } from './db.js';import { env } from './env.js';import { collectionAuthoritySigner } from './solana-collection.js';+import { solanaConnection } from './solana/connection.js';import { skillCollectionSymbol } from './three-brand.js';/** Skill-NFT networks we support. Mainnet is the default (live purchases). */@@ -85,7 +86,10 @@ function explorerUrl(mint, network) {* the fee payer and signer for collection creation and every mint-into-collection.*/function authorityUmi(network) {- const umi = createUmi(rpcForNetwork(network)).use(mplCore());+ // Failover Connection rather than a bare URL: collection creation and every+ // mint-into-collection rotate across the endpoint chain, so a single node's+ // malformed/empty 200 body fails over instead of throwing the StructError crash.+ const umi = createUmi(solanaConnection({ url: rpcForNetwork(network), network })).use(mplCore());const authority = collectionAuthoritySigner(umi);umi.use(signerIdentity(authority));return { umi, authority };diff --git a/api/agents/solana/_handlers.js b/api/agents/solana/_handlers.jsindex 91ef2aedc..8fa366457 100644--- a/api/agents/solana/_handlers.js+++ b/api/agents/solana/_handlers.js@@ -630,7 +630,11 @@ export const handleRegisterPrep = wrap(async (req, res) => {}const buildTx = async (rpc) => {- const umi = createUmi(rpc).use(mplCore());+ // Failover Connection rather than the bare `rpc` URL: buildAndSign's+ // getLatestBlockhash rotates across the endpoint chain, so a single node's+ // malformed/empty 200 body fails over to a healthy provider instead of+ // throwing `StructError: … but received:` and failing the whole registration.+ const umi = createUmi(solanaConnection({ url: rpc, network })).use(mplCore());const ownerPubkey = umiPublicKey(wallet_address);umi.use(signerIdentity(createNoopSigner(ownerPubkey)));const createArgs = { asset: assetSigner, owner: ownerPubkey, name, uri: metadataUri, plugins };diff --git a/api/nft/mint-scene.js b/api/nft/mint-scene.jsindex f7e8e5481..268a23a43 100644--- a/api/nft/mint-scene.js+++ b/api/nft/mint-scene.js@@ -4,6 +4,7 @@ import { limits, clientIp } from '../_lib/rate-limit.js';import { getSessionUser, authenticateBearer, extractBearer } from '../_lib/auth.js';import { createUmi } from '@metaplex-foundation/umi-bundle-defaults';import { mplCore, createV1 } from '@metaplex-foundation/mpl-core';+import { solanaConnection } from '../_lib/solana/connection.js';import {generateSigner,publicKey as umiPublicKey,@@ -98,8 +99,11 @@ export default wrap(async (req, res) => {return respondError(res, e.status || 502, e.code || 'upstream_error', e);}+ // Failover Connection rather than a bare URL: the mint's getLatestBlockhash and+ // account reads rotate across the endpoint chain, so a single node's+ // malformed/empty 200 body fails over instead of throwing the StructError crash.const rpcUrl = env.SOLANA_RPC_URL;- const umi = createUmi(rpcUrl).use(mplCore());+ const umi = createUmi(solanaConnection({ url: rpcUrl })).use(mplCore());let ownerPk;try {diff --git a/api/registry/resolve.js b/api/registry/resolve.jsindex 8dd04d342..199f448e5 100644--- a/api/registry/resolve.js+++ b/api/registry/resolve.js@@ -20,7 +20,7 @@ import { limits, clientIp } from '../_lib/rate-limit.js';import { isUuid } from '../_lib/validate.js';import { resolveAvatarUrl } from '../_lib/avatars.js';import { publicUrl as r2PublicUrl } from '../_lib/r2.js';-import { solanaRpcEndpoints } from '../_lib/solana/connection.js';+import { solanaConnection } from '../_lib/solana/connection.js';// Solana base58 pubkey — excludes 0/O/I/l, length 32–44. A UUID contains// hyphens so it can never match; we still check isUuid() first for clarity.@@ -30,7 +30,10 @@ const PUBKEY_RE = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;// pure program-derived address math (no network), so it works for either.const _umi = {};function readUmi(network) {- if (!_umi[network]) _umi[network] = createUmi(solanaRpcEndpoints(network)[0]).use(mplCore());+ // A multi-endpoint failover Connection (not a bare URL): fetchAssetV1's RPC read+ // rotates across the endpoint chain, so a single node returning a malformed/empty+ // 200 body fails over instead of throwing the `StructError: … but received:` crash.+ if (!_umi[network]) _umi[network] = createUmi(solanaConnection({ network })).use(mplCore());return _umi[network];}