mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-06-03 23:26:50 +00:00
adapting langchain to use actions
This commit is contained in:
@@ -4,7 +4,7 @@ import { z } from "zod";
|
||||
import { getAllDomainsTLDs } from "../tools";
|
||||
|
||||
const getAllDomainsTLDsAction: Action = {
|
||||
name: "solana_get_all_domains_tlds",
|
||||
name: "solana_get_all_tlds",
|
||||
similes: [
|
||||
"list domain tlds",
|
||||
"get domain extensions",
|
||||
|
||||
@@ -5,7 +5,7 @@ import { PublicKey } from "@solana/web3.js";
|
||||
import { getMainAllDomainsDomain } from "../tools";
|
||||
|
||||
const getMainAllDomainsDomainAction: Action = {
|
||||
name: "solana_get_main_all_domains_domain",
|
||||
name: "solana_get_main_domain",
|
||||
similes: [
|
||||
"get main domain",
|
||||
"fetch primary domain",
|
||||
|
||||
@@ -5,7 +5,7 @@ import { PublicKey } from "@solana/web3.js";
|
||||
import { getPrimaryDomain } from "../tools";
|
||||
|
||||
const getPrimaryDomainAction: Action = {
|
||||
name: "solana_get_primary_domain",
|
||||
name: "solana_get_domain",
|
||||
similes: [
|
||||
"get primary domain",
|
||||
"lookup primary domain",
|
||||
|
||||
@@ -6,7 +6,7 @@ import { JupiterTokenData } from "../types";
|
||||
import { getTokenAddressFromTicker, getTokenDataByAddress } from "../tools";
|
||||
|
||||
const getTokenDataAction: Action = {
|
||||
name: "solana_get_token_data",
|
||||
name: "solana_token_data",
|
||||
similes: [
|
||||
"get token info",
|
||||
"token details",
|
||||
|
||||
@@ -37,10 +37,8 @@ const pythFetchPriceAction: Action = {
|
||||
}),
|
||||
handler: async (_agent: SolanaAgentKit, input: Record<string, any>) => {
|
||||
try {
|
||||
const priceFeedId = input.priceFeedId as string;
|
||||
|
||||
const priceFeedId = input.tokenId as string;
|
||||
const priceStr = await pythFetchPrice(priceFeedId);
|
||||
|
||||
return {
|
||||
status: "success",
|
||||
price: priceStr,
|
||||
|
||||
@@ -6,7 +6,7 @@ import BN from "bn.js";
|
||||
import { raydiumCreateAmmV4 } from "../tools";
|
||||
|
||||
const raydiumCreateAmmV4Action: Action = {
|
||||
name: "solana_raydium_create_amm_v4",
|
||||
name: "raydium_create_ammV4",
|
||||
similes: [
|
||||
"create raydium v4 pool",
|
||||
"setup raydium v4 liquidity pool",
|
||||
|
||||
Reference in New Issue
Block a user