Para Plugin Example
This repository demonstrates how to integrate and use Solana Agent Kit v2 with Para plugins in your application.
https://github.com/user-attachments/assets/e4f6b64a-4829-4528-bd83-bee1c8db6cce
๐ Features
- Integration of solana-plugin-para a third party plugin for solana-agent-kit for backend and frontend respectively
- Complete example of Para wallet management
- Real-world usage patterns and best practices
๐ฆ Prerequisites
- Node.js 16.x or higher
- pnpm or bun package manager
- Solana development environment
๐ ๏ธ Installation
pnpm install --ignore-workspace
- Copy the environment variables:
cp .env.example .env
- Update the
.envfile with your credentials:
LANGCHAIN_CALLBACKS_BACKGROUND=false
OPENAI_API_KEY=#<use groq api https://console.groq.com/docs/openai>
RPC_URL=
SOLANA_PRIVATE_KEY=
PARA_API_KEY=
PARA_ENV=BETA | PROD
NEXT_PUBLIC_PARA_ENV=BETA | PROD
NEXT_PUBLIC_PARA_API_KEY=
๐โโ๏ธ Running the Example
- Start the development server:
pnpm dev
- Open http://localhost:3000 in your browser
๐ Implementation Details
Server-Side Integration
import { SolanaAgentKit } from "solana-agent-kit";
import ParaServerPlugin from "solana-plugin-para-server";
const solanaAgent = new SolanaAgentKit(/* config */);
export const solanaAgentWithPara = solanaAgent.use(ParaServerPlugin);
Web Integration
import ParaWebPlugin from "solana-plugin-para-web";
import { solanaAgent } from "./solana";
export const solanaAgentWithPara = solanaAgent.use(ParaWebPlugin);
export const para = solanaAgentWithPara.methods.getParaInstance();
๐ Key Components
app/api/*- API routes for Para operationsutils/*- Utility functions and configurationscomponents/*- React components for the UIpublic/*- Static assets
๐ Documentation
For more detailed information about the plugins, visit:
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.