mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-20 07:36:44 +00:00
feat: fix merge
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { create_image } from "../tools/create_image";
|
||||
import { create_image } from "../../tools/agent";
|
||||
|
||||
const createImageAction: Action = {
|
||||
name: "CREATE_IMAGE",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { SolanaAgentKit } from "..";
|
||||
import { get_wallet_address } from "../tools";
|
||||
import { Action } from "../types/action";
|
||||
import { get_wallet_address } from "../../tools/agent";
|
||||
|
||||
const getWalletAddressAction: Action = {
|
||||
name: "GET_WALLET_ADDRESS",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { getAllDomainsTLDs } from "../tools";
|
||||
import { getAllDomainsTLDs } from "../../tools";
|
||||
|
||||
const getAllDomainsTLDsAction: Action = {
|
||||
name: "GET_ALL_TLDS",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { getOwnedAllDomains } from "../tools";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { getOwnedAllDomains } from "../../tools";
|
||||
|
||||
const getOwnedAllDomainsAction: Action = {
|
||||
name: "GET_OWNED_ALL_DOMAINS",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { getOwnedDomainsForTLD } from "../tools";
|
||||
import { getOwnedDomainsForTLD } from "../../tools";
|
||||
|
||||
const getOwnedDomainsForTLDAction: Action = {
|
||||
name: "GET_OWNED_DOMAINS_FOR_TLD",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { resolveAllDomains } from "../tools";
|
||||
import { resolveAllDomains } from "../../tools";
|
||||
|
||||
const resolveDomainAction: Action = {
|
||||
name: "RESOLVE_ALL_DOMAINS",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { getTokenDataByTicker } from "../tools";
|
||||
import { getTokenDataByTicker } from "../../tools/dexscreener";
|
||||
|
||||
const tokenDataByTickerAction: Action = {
|
||||
name: "GET_TOKEN_DATA_BY_TICKER",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { flashCloseTrade } from "../tools";
|
||||
import { flashCloseTrade } from "../../tools/flash";
|
||||
|
||||
const flashCloseTradeAction: Action = {
|
||||
name: "FLASH_CLOSE_TRADE",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { flashOpenTrade } from "../tools";
|
||||
import { flashOpenTrade } from "../../tools/flash";
|
||||
|
||||
const flashOpenTradeAction: Action = {
|
||||
name: "FLASH_OPEN_TRADE",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { create_gibwork_task } from "../tools";
|
||||
import { create_gibwork_task } from "../../tools/gibwork";
|
||||
|
||||
const createGibworkTaskAction: Action = {
|
||||
name: "CREATE_GIBWORK_TASK",
|
||||
@@ -1,42 +1,42 @@
|
||||
import deployTokenAction from "./deployToken";
|
||||
import balanceAction from "./balance";
|
||||
import transferAction from "./transfer";
|
||||
import deployCollectionAction from "./deployCollection";
|
||||
import mintNFTAction from "./mintNFT";
|
||||
import tradeAction from "./trade";
|
||||
import requestFundsAction from "./requestFunds";
|
||||
import resolveDomainAction from "./resolveDomain";
|
||||
import getTokenDataAction from "./getTokenData";
|
||||
import getTPSAction from "./getTPS";
|
||||
import fetchPriceAction from "./fetchPrice";
|
||||
import stakeWithJupAction from "./stakeWithJup";
|
||||
import stakeWithSolayerAction from "./stakeWithSolayer";
|
||||
import registerDomainAction from "./registerDomain";
|
||||
import lendAssetAction from "./lendAsset";
|
||||
import createGibworkTaskAction from "./createGibworkTask";
|
||||
import resolveSolDomainAction from "./resolveSolDomain";
|
||||
import pythFetchPriceAction from "./pythFetchPrice";
|
||||
import getOwnedDomainsForTLDAction from "./getOwnedDomainsForTLD";
|
||||
import getPrimaryDomainAction from "./getPrimaryDomain";
|
||||
import getAllDomainsTLDsAction from "./getAllDomainsTLDs";
|
||||
import getOwnedAllDomainsAction from "./getOwnedAllDomains";
|
||||
import createImageAction from "./createImage";
|
||||
import getMainAllDomainsDomainAction from "./getMainAllDomainsDomain";
|
||||
import getAllRegisteredAllDomainsAction from "./getAllRegisteredAllDomains";
|
||||
import raydiumCreateCpmmAction from "./raydiumCreateCpmm";
|
||||
import raydiumCreateAmmV4Action from "./raydiumCreateAmmV4";
|
||||
import createOrcaSingleSidedWhirlpoolAction from "./createOrcaSingleSidedWhirlpool";
|
||||
import launchPumpfunTokenAction from "./launchPumpfunToken";
|
||||
import getWalletAddressAction from "./getWalletAddress";
|
||||
import flashOpenTradeAction from "./flashOpenTrade";
|
||||
import flashCloseTradeAction from "./flashCloseTrade";
|
||||
import createMultisigAction from "./createMultisig";
|
||||
import depositToMultisigAction from "./depositToMultisigTreasury";
|
||||
import transferFromMultisigAction from "./transferFromMultisigTreasury";
|
||||
import createMultisigProposalAction from "./createMultisigProposal";
|
||||
import approveMultisigProposalAction from "./approveMultisigProposal";
|
||||
import rejectMultisigProposalAction from "./rejectMultisigProposal";
|
||||
import executeMultisigProposalAction from "./executeMultisigProposal";
|
||||
import deployTokenAction from "./metaplex/deployToken";
|
||||
import balanceAction from "./solana/balance";
|
||||
import transferAction from "./solana/transfer";
|
||||
import deployCollectionAction from "./metaplex/deployCollection";
|
||||
import mintNFTAction from "./metaplex/mintNFT";
|
||||
import tradeAction from "./jupiter/trade";
|
||||
import requestFundsAction from "./solana/requestFunds";
|
||||
import resolveDomainAction from "./sns/registerDomain";
|
||||
import getTokenDataAction from "./jupiter/getTokenData";
|
||||
import getTPSAction from "./solana/getTPS";
|
||||
import fetchPriceAction from "./jupiter/fetchPrice";
|
||||
import stakeWithJupAction from "./jupiter/stakeWithJup";
|
||||
import stakeWithSolayerAction from "./solayer/stakeWithSolayer";
|
||||
import registerDomainAction from "./sns/registerDomain";
|
||||
import lendAssetAction from "./lulo/lendAsset";
|
||||
import createGibworkTaskAction from "./gibwork/createGibworkTask";
|
||||
import resolveSolDomainAction from "./sns/resolveSolDomain";
|
||||
import pythFetchPriceAction from "./pyth/pythFetchPrice";
|
||||
import getOwnedDomainsForTLDAction from "./alldomains/getOwnedDomainsForTLD";
|
||||
import getPrimaryDomainAction from "./sns/getPrimaryDomain";
|
||||
import getAllDomainsTLDsAction from "./alldomains/getAllDomainsTLDs";
|
||||
import getOwnedAllDomainsAction from "./alldomains/getOwnedAllDomains";
|
||||
import createImageAction from "./agent/createImage";
|
||||
import getMainAllDomainsDomainAction from "./sns/getMainAllDomainsDomain";
|
||||
import getAllRegisteredAllDomainsAction from "./sns/getAllRegisteredAllDomains";
|
||||
import raydiumCreateCpmmAction from "./raydium/raydiumCreateCpmm";
|
||||
import raydiumCreateAmmV4Action from "./raydium/raydiumCreateAmmV4";
|
||||
import createOrcaSingleSidedWhirlpoolAction from "./orca/createOrcaSingleSidedWhirlpool";
|
||||
import launchPumpfunTokenAction from "./pumpfun/launchPumpfunToken";
|
||||
import getWalletAddressAction from "./agent/getWalletAddress";
|
||||
import flashOpenTradeAction from "./flash/flashOpenTrade";
|
||||
import flashCloseTradeAction from "./flash/flashCloseTrade";
|
||||
import createMultisigAction from "./squads/createMultisig";
|
||||
import approveMultisigProposalAction from "./squads/approveMultisigProposal";
|
||||
import createMultisigProposalAction from "./squads/createMultisigProposal";
|
||||
import depositToMultisigAction from "./squads/depositToMultisigTreasury";
|
||||
import executeMultisigProposalAction from "./squads/executeMultisigProposal";
|
||||
import rejectMultisigProposalAction from "./squads/rejectMultisigProposal";
|
||||
import transferFromMultisigAction from "./squads/transferFromMultisigTreasury";
|
||||
|
||||
export const ACTIONS = {
|
||||
WALLET_ADDRESS_ACTION: getWalletAddressAction,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { fetchPrice } from "../tools";
|
||||
import { fetchPrice } from "../../tools/jupiter";
|
||||
|
||||
const fetchPriceAction: Action = {
|
||||
name: "FETCH_PRICE",
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { JupiterTokenData } from "../types";
|
||||
import { getTokenAddressFromTicker, getTokenDataByAddress } from "../tools";
|
||||
import { JupiterTokenData } from "../../types";
|
||||
import { getTokenAddressFromTicker, getTokenDataByAddress } from "../../tools";
|
||||
|
||||
const getTokenDataAction: Action = {
|
||||
name: "GET_TOKEN_DATA",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { stakeWithJup } from "../tools";
|
||||
import { stakeWithJup } from "../../tools";
|
||||
|
||||
const stakeWithJupAction: Action = {
|
||||
name: "STAKE_WITH_JUPITER",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { trade } from "../tools";
|
||||
import { trade } from "../../tools";
|
||||
|
||||
const tradeAction: Action = {
|
||||
name: "TRADE",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { sendCompressedAirdrop } from "../tools";
|
||||
import { sendCompressedAirdrop } from "../../tools";
|
||||
|
||||
const compressedAirdropAction: Action = {
|
||||
name: "COMPRESSED_AIRDROP",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { lendAsset } from "../tools";
|
||||
import { lendAsset } from "../../tools/lulo";
|
||||
|
||||
const lendAssetAction: Action = {
|
||||
name: "LEND_ASSET",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { deploy_collection } from "../tools";
|
||||
import { deploy_collection } from "../../tools/metaplex";
|
||||
|
||||
interface CollectionOptions {
|
||||
name: string;
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { deploy_token } from "../tools";
|
||||
import { deploy_token } from "../../tools";
|
||||
|
||||
const deployTokenAction: Action = {
|
||||
name: "DEPLOY_TOKEN",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { mintCollectionNFT } from "../tools";
|
||||
import { mintCollectionNFT } from "../../tools/metaplex";
|
||||
|
||||
const mintNFTAction: Action = {
|
||||
name: "MINT_NFT",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { openbookCreateMarket } from "../tools";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { openbookCreateMarket } from "../../tools/openbook";
|
||||
|
||||
const createOpenbookMarketAction: Action = {
|
||||
name: "CREATE_OPENBOOK_MARKET",
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { Decimal } from "decimal.js";
|
||||
import { orcaCreateSingleSidedLiquidityPool } from "../tools";
|
||||
import { orcaCreateSingleSidedLiquidityPool } from "../../tools";
|
||||
|
||||
// Fee tiers mapping from the original tool
|
||||
const FEE_TIERS = {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { launchPumpFunToken } from "../tools";
|
||||
import { launchPumpFunToken } from "../../tools";
|
||||
|
||||
const launchPumpfunTokenAction: Action = {
|
||||
name: "LAUNCH_PUMPFUN_TOKEN",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { fetchPythPrice, fetchPythPriceFeedID } from "../tools";
|
||||
import { fetchPythPrice, fetchPythPriceFeedID } from "../../tools";
|
||||
|
||||
const pythFetchPriceAction: Action = {
|
||||
name: "PYTH_FETCH_PRICE",
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import BN from "bn.js";
|
||||
import { raydiumCreateAmmV4 } from "../tools";
|
||||
import { raydiumCreateAmmV4 } from "../../tools";
|
||||
|
||||
const raydiumCreateAmmV4Action: Action = {
|
||||
name: "RAYDIUM_CREATE_AMM_V4",
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { BN } from "@coral-xyz/anchor";
|
||||
import Decimal from "decimal.js";
|
||||
import { raydiumCreateClmm } from "../tools";
|
||||
import { raydiumCreateClmm } from "../../tools";
|
||||
|
||||
const raydiumCreateClmmAction: Action = {
|
||||
name: "RAYDIUM_CREATE_CLMM",
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import BN from "bn.js";
|
||||
import { raydiumCreateCpmm } from "../tools";
|
||||
import { raydiumCreateCpmm } from "../../tools";
|
||||
|
||||
const raydiumCreateCpmmAction: Action = {
|
||||
name: "RAYDIUM_CREATE_CPMM",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { getAllRegisteredAllDomains } from "../tools";
|
||||
import { getAllRegisteredAllDomains } from "../../tools";
|
||||
|
||||
const getAllRegisteredAllDomainsAction: Action = {
|
||||
name: "GET_ALL_REGISTERED_ALL_DOMAINS",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { getMainAllDomainsDomain } from "../tools";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { getMainAllDomainsDomain } from "../../tools";
|
||||
|
||||
const getMainAllDomainsDomainAction: Action = {
|
||||
name: "GET_MAIN_ALL_DOMAINS_DOMAIN",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { z } from "zod";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { getPrimaryDomain } from "../tools";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { getPrimaryDomain } from "../../tools";
|
||||
|
||||
const getPrimaryDomainAction: Action = {
|
||||
name: "GET_PRIMARY_DOMAIN",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { registerDomain } from "../tools";
|
||||
import { registerDomain } from "../../tools";
|
||||
|
||||
const registerDomainAction: Action = {
|
||||
name: "REGISTER_DOMAIN",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { resolveSolDomain } from "../tools";
|
||||
import { resolveSolDomain } from "../../tools/";
|
||||
|
||||
const resolveSolDomainAction: Action = {
|
||||
name: "RESOLVE_SOL_DOMAIN",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { get_balance } from "../tools";
|
||||
import { get_balance } from "../../tools";
|
||||
|
||||
const balanceAction: Action = {
|
||||
name: "BALANCE_ACTION",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { closeEmptyTokenAccounts } from "../tools";
|
||||
import { closeEmptyTokenAccounts } from "../../tools";
|
||||
|
||||
const closeEmptyTokenAccountsAction: Action = {
|
||||
name: "CLOSE_EMPTY_TOKEN_ACCOUNTS",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { getTPS } from "../tools";
|
||||
import { getTPS } from "../../tools/solana";
|
||||
|
||||
const getTPSAction: Action = {
|
||||
name: "GET_TPS",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { request_faucet_funds } from "../tools";
|
||||
import { request_faucet_funds } from "../../tools/solana";
|
||||
|
||||
const requestFundsAction: Action = {
|
||||
name: "REQUEST_FUNDS",
|
||||
@@ -1,8 +1,8 @@
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { transfer } from "../tools";
|
||||
import { transfer } from "../../tools";
|
||||
|
||||
const transferAction: Action = {
|
||||
name: "TRANSFER",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { stakeWithSolayer } from "../tools";
|
||||
import { stakeWithSolayer } from "../../tools";
|
||||
|
||||
const stakeWithSolayerAction: Action = {
|
||||
name: "STAKE_WITH_SOLAYER",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { multisig_approve_proposal } from "../tools";
|
||||
import { multisig_approve_proposal } from "../../tools";
|
||||
|
||||
const approveMultisigProposalAction: Action = {
|
||||
name: "APPROVE_MULTISIG_PROPOSAL_ACTION",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { create_squads_multisig } from "../tools";
|
||||
import { create_squads_multisig } from "../../tools";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
|
||||
const createMultisigAction: Action = {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { multisig_create_proposal } from "../tools";
|
||||
import { multisig_create_proposal } from "../../tools";
|
||||
|
||||
const createMultisigProposalAction: Action = {
|
||||
name: "CREATE_MULTISIG_PROPOSAL_ACTION",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { multisig_deposit_to_treasury } from "../tools";
|
||||
import { multisig_deposit_to_treasury } from "../../tools";
|
||||
|
||||
const depositToMultisigAction: Action = {
|
||||
name: "DEPOSIT_TO_MULTISIG_ACTION",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { multisig_execute_proposal } from "../tools";
|
||||
import { multisig_execute_proposal } from "../../tools";
|
||||
|
||||
const executeMultisigProposalAction: Action = {
|
||||
name: "EXECUTE_MULTISIG_PROPOSAL_ACTION",
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { multisig_reject_proposal } from "../tools";
|
||||
import { multisig_reject_proposal } from "../../tools";
|
||||
|
||||
const rejectMultisigProposalAction: Action = {
|
||||
name: "REJECT_MULTISIG_PROPOSAL_ACTION",
|
||||
@@ -17,13 +17,13 @@ const rejectMultisigProposalAction: Action = {
|
||||
[
|
||||
{
|
||||
input: {
|
||||
transactionIndex: 0,
|
||||
proposalIndex: 0,
|
||||
},
|
||||
output: {
|
||||
status: "success",
|
||||
message: "Proposal rejected successfully",
|
||||
transaction: "4xKpN2...",
|
||||
transactionIndex: "0",
|
||||
proposalIndex: "0",
|
||||
},
|
||||
explanation:
|
||||
"Reject a proposal to transfer 1 SOL from 2-of-2 multisig account on Solana",
|
||||
@@ -31,21 +31,21 @@ const rejectMultisigProposalAction: Action = {
|
||||
],
|
||||
],
|
||||
schema: z.object({
|
||||
transactionIndex: z.number().optional(),
|
||||
proposalIndex: z.number().optional(),
|
||||
}),
|
||||
handler: async (agent: SolanaAgentKit, input: Record<string, any>) => {
|
||||
const transactionIndex =
|
||||
input.transactionIndex !== undefined
|
||||
? Number(input.transactionIndex)
|
||||
const proposalIndex =
|
||||
input.proposalIndex !== undefined
|
||||
? Number(input.proposalIndex)
|
||||
: undefined;
|
||||
|
||||
const tx = await multisig_reject_proposal(agent, transactionIndex);
|
||||
const tx = await multisig_reject_proposal(agent, proposalIndex);
|
||||
|
||||
return {
|
||||
status: "success",
|
||||
message: "Proposal rejected successfully",
|
||||
transaction: tx,
|
||||
transactionIndex: transactionIndex,
|
||||
proposalIndex,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Action } from "../types/action";
|
||||
import { SolanaAgentKit } from "../agent";
|
||||
import { Action } from "../../types/action";
|
||||
import { SolanaAgentKit } from "../../agent";
|
||||
import { z } from "zod";
|
||||
import { multisig_transfer_from_treasury } from "../tools";
|
||||
import { multisig_transfer_from_treasury } from "../../tools";
|
||||
import { PublicKey } from "@solana/web3.js";
|
||||
|
||||
const transferFromMultisigAction: Action = {
|
||||
Reference in New Issue
Block a user