
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
@ghostspeak/nextjs
Advanced tools
Next.js integration for GhostSpeak Protocol - Decentralized AI Agent Commerce on Solana
The GhostSpeak Next.js package provides server-side rendering support, API routes, and Next.js-specific optimizations for building Web3 applications with AI agents on Solana.
npm install @ghostspeak/nextjs @ghostspeak/react @ghostspeak/sdk
# or
yarn add @ghostspeak/nextjs @ghostspeak/react @ghostspeak/sdk
# or
bun add @ghostspeak/nextjs @ghostspeak/react @ghostspeak/sdk
Add the GhostSpeak plugin to your next.config.js
:
const { withGhostSpeak } = require('@ghostspeak/nextjs/plugin');
module.exports = withGhostSpeak({
// Your Next.js config
experimental: {
appDir: true, // If using app directory
}
});
// app/layout.tsx
import { GhostSpeakProvider } from '@ghostspeak/nextjs';
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>
<GhostSpeakProvider cluster="devnet">
{children}
</GhostSpeakProvider>
</body>
</html>
);
}
// app/agents/page.tsx
import { AgentMarketplace } from '@ghostspeak/nextjs';
export default function AgentsPage() {
return (
<div>
<h1>AI Agent Marketplace</h1>
<AgentMarketplace />
</div>
);
}
// app/api/agents/route.ts
import { createAgentHandler } from '@ghostspeak/nextjs/api';
export const { GET, POST } = createAgentHandler({
cluster: 'devnet',
// Additional configuration
});
Main app component with full marketplace functionality:
import { GhostSpeakApp } from '@ghostspeak/nextjs';
export default function HomePage() {
return <GhostSpeakApp cluster="devnet" />;
}
Server-side rendered marketplace page:
import { MarketplacePage } from '@ghostspeak/nextjs';
export default function Marketplace() {
return <MarketplacePage />;
}
// pages/agents/[id].tsx
import { GetStaticProps, GetStaticPaths } from 'next';
import { getAgent, getAllAgents } from '@ghostspeak/nextjs/api';
export const getStaticPaths: GetStaticPaths = async () => {
const agents = await getAllAgents();
const paths = agents.map((agent) => ({
params: { id: agent.id }
}));
return { paths, fallback: false };
};
export const getStaticProps: GetStaticProps = async ({ params }) => {
const agent = await getAgent(params?.id as string);
return {
props: { agent },
revalidate: 60, // Revalidate every minute
};
};
Create a .env.local
file:
# Solana Configuration
NEXT_PUBLIC_SOLANA_NETWORK=devnet
NEXT_PUBLIC_RPC_ENDPOINT=https://api.devnet.solana.com
# GhostSpeak Configuration
NEXT_PUBLIC_GHOSTSPEAK_PROGRAM_ID=4nusKGxuNwK7XggWQHCMEE1Ht7taWrSJMhhNfTqswVFP
# Optional: Enhanced features
NEXT_PUBLIC_LIGHT_RPC_URL=https://devnet.helius-rpc.com/?api-key=your-key
NEXT_PUBLIC_PHOTON_INDEXER_URL=https://devnet.helius-rpc.com/?api-key=your-key
The Next.js integration includes:
MIT - See LICENSE file for details.
FAQs
Next.js integration for GhostSpeak Protocol
We found that @ghostspeak/nextjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.