Solana Wallet
Guide to use superteam earn tool on your AI agent using Vity Toolkit
Quick Start
2
Initialize Vity Toolkit and Langchain.
import { ChatOpenAI } from "@langchain/openai";
import { App, LangchainToolkit } from "vity-toolkit";
import { createOpenAIFunctionsAgent, AgentExecutor } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
const llm = new ChatOpenAI({ model: "gpt-4o" });
const toolKit = new LangchainToolkit({
userPrivateKey: "<private_key>",
});4
Define the Agent.
const prompt = ChatPromptTemplate.fromMessages([
["system", "You are a helpful assistant"],
["placeholder", "{chat_history}"],
["human", "{input}"],
["placeholder", "{agent_scratchpad}"],
]);
const agent = await createOpenAIFunctionsAgent({
llm,
tools,
prompt,
});
const agentExecutor = new AgentExecutor({ agent, tools, verbose: true });
Supported Actions
Action
Description
Action.SOLANA_WALLET_GENERATE_KEYPAIRAction.SOLANA_WALLET_GET_BALANCEAction.SOLANA_WALLET_GET_MY_PUBLIC_KEYAction.SOLANA_WALLET_TRANSFERLast updated