# Class SolanaAgentKit

Main class for interacting with Solana blockchain Provides a unified interface for token operations, NFT management, trading and more

SolanaAgentKit

- Defined in src/agent/index.ts:145

#####
Index

### Constructors

constructor

### Properties

config
connection
wallet
wallet_address

### Methods

approveMultisigProposal
batchOrder
cancelAllOrders
closeEmptyTokenAccounts
closePerpTradeLong
closePerpTradeShort
create3LandCollection
create3LandNft
createDriftUserAccount
createDriftVault
createGibworkTask
createMultisigProposal
createSquadsMultisig
createTiplink
CreateWebhook
deleteWebhook
deployCollection
deployToken
depositIntoDriftVault
depositToDriftUserAccount
depositToMultisig
deriveDriftVaultAddress
doesUserHaveDriftAccount
driftSpotTokenSwap
driftUserAccountInfo
executeMultisigTransaction
fetchTokenDetailedReport
fetchTokenPrice
fetchTokenReportSummary
flashCloseTrade
flashOpenTrade
getAllAssetsbyOwner
getAllDomainsTLDs
getAllRegisteredAllDomains
getAvailableDriftMarkets
getBalance
getBalanceOther
getDriftVaultInfo
getEntryQuoteOfPerpTrade
getLendAndBorrowAPY
getMainAllDomainsDomain
getOwnedAllDomains
getOwnedDomainsForTLD
getPerpMarketFundingRate
getPrimaryDomain
getPythPrice
getPythPriceFeedID
getTokenBalances
getTokenDataByAddress
getTokenDataByTicker
getTPS
getWebhook
heliusParseTransactions
launchPumpFunToken
lendAssets
limitOrder
luloLend
luloWithdraw
manifestCreateMarket
meteoraCreateDlmmPool
meteoraCreateDynamicPool
mintNFT
openbookCreateMarket
openPerpTradeLong
openPerpTradeShort
orcaClosePosition
orcaCreateCLMM
orcaCreateSingleSidedLiquidityPool
orcaFetchPositions
orcaOpenCenteredPositionWithLiquidity
orcaOpenSingleSidedPosition
raydiumCreateAmmV4
raydiumCreateClmm
raydiumCreateCpmm
registerDomain
rejectMultisigProposal
requestFaucetFunds
requestUnstakeFromDriftInsuranceFund
requestWithdrawalFromDriftVault
resolveAllDomains
resolveSolDomain
restake
rockPaperScissors
sendCompressedAirdrop
sendTranctionWithPriority
stake
stakeToDriftInsuranceFund
tensorCancelListing
tensorListNFT
trade
tradeUsingDelegatedDriftVault
tradeUsingDriftPerpAccount
transfer
transferFromMultisig
unstakeFromDriftInsuranceFund
updateDriftVault
updateDriftVaultDelegate
voltrDepositStrategy
voltrGetPositionValues
voltrWithdrawStrategy
withdrawAll
withdrawFromDriftAccount
withdrawFromDriftVault

##
Constructors

### constructor

- new SolanaAgentKit(
  private_key: string,
  rpc_url: string,
  openai_api_key: null | string,
  ): SolanaAgentKit

- #### Parameters

  - private_key: string
  - rpc_url: string
  - openai_api_key: null | string

  #### Returns SolanaAgentKit

  #### Deprecated

  Using openai_api_key directly in constructor is deprecated. Please use the new constructor with Config object instead:

  #### Example

      const agent = new SolanaAgentKit(privateKey, rpcUrl, {
        OPENAI_API_KEY: 'your-key'
      });

  - Defined in src/agent/index.ts:159
- new SolanaAgentKit(
  private_key: string,
  rpc_url: string,
  config: Config ,
  ): SolanaAgentKit

- #### Parameters

  - private_key: string
  - rpc_url: string
  - config: Config

  #### Returns SolanaAgentKit

  - Defined in src/agent/index.ts:164

##
Properties

### config

config: Config

Configuration object

- Defined in src/agent/index.ts:149

### connection

connection: Connection

Solana RPC connection

- Defined in src/agent/index.ts:146

### wallet

wallet: Keypair

Wallet keypair for signing transactions

- Defined in src/agent/index.ts:147

### wallet_address

wallet_address: PublicKey

Public key of the wallet

- Defined in src/agent/index.ts:148

##
Methods

### approveMultisigProposal

- approveMultisigProposal(transactionIndex?: number | bigint): Promise<string>

- #### Parameters

  - `Optional` transactionIndex: number | bigint

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:791

### batchOrder

- batchOrder(marketId: PublicKey, orders: OrderParams []): Promise<string>

- #### Parameters

  - marketId: PublicKey
  - orders: OrderParams []

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:275

### cancelAllOrders

- cancelAllOrders(marketId: PublicKey): Promise<string>

- #### Parameters

  - marketId: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:282

### closeEmptyTokenAccounts

- closeEmptyTokenAccounts(): Promise<{ signature: string; size: number }>

- #### Returns Promise<{ signature: string; size: number }>

  - Defined in src/agent/index.ts:669

### closePerpTradeLong

- closePerpTradeLong(
  args: Omit<
  { agent: SolanaAgentKit ; price: number; tradeMint: PublicKey },
  "agent",
  >,
  ): Promise<string>

- #### Parameters

  - args: Omit<{ agent: SolanaAgentKit ; price: number; tradeMint: PublicKey }, "agent">

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:317

### closePerpTradeShort

- closePerpTradeShort(
  args: Omit<
  { agent: SolanaAgentKit ; price: number; tradeMint: PublicKey },
  "agent",
  >,
  ): Promise<string>

- #### Parameters

  - args: Omit<{ agent: SolanaAgentKit ; price: number; tradeMint: PublicKey }, "agent">

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:308

### create3LandCollection

- create3LandCollection(
  collectionOpts: CreateCollectionOptions,
  isDevnet?: boolean,
  ): Promise<string>

- #### Parameters

  - collectionOpts: CreateCollectionOptions
  - isDevnet: boolean = false

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:708

### create3LandNft

- create3LandNft(
  collectionAccount: string,
  createItemOptions: CreateSingleOptions,
  isDevnet?: boolean,
  withPool?: boolean,
  ): Promise<string>

- #### Parameters

  - collectionAccount: string
  - createItemOptions: CreateSingleOptions
  - isDevnet: boolean = false
  - withPool: boolean = false

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:725

### createDriftUserAccount

- createDriftUserAccount(
  depositAmount: number,
  depositSymbol: string,
  ): Promise<
  | { account: PublicKey; message?: undefined; txSignature: string }
  | { account: PublicKey; message: string; txSignature?: undefined },
  >

- #### Parameters

  - depositAmount: number
  - depositSymbol: string

  #### Returns Promise<
  | { account: PublicKey; message?: undefined; txSignature: string }
  | { account: PublicKey; message: string; txSignature?: undefined },
  >

  - Defined in src/agent/index.ts:821

### createDriftVault

- createDriftVault(
  params: {
  hurdleRate?: number;
  managementFee: number;
  marketName: `${string}-${string}`;
  maxTokens: number;
  minDepositAmount: number;
  name: string;
  permissioned?: boolean;
  profitShare: number;
  redeemPeriod: number;
  },
  ): Promise<string>

- #### Parameters

  - params: {
    hurdleRate?: number;
    managementFee: number;
    marketName: `${string}-${string}`;
    maxTokens: number;
    minDepositAmount: number;
    name: string;
    permissioned?: boolean;
    profitShare: number;
    redeemPeriod: number;
    }

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:825

### createGibworkTask

- createGibworkTask(
  title: string,
  content: string,
  requirements: string,
  tags: string[],
  tokenMintAddress: string,
  tokenAmount: number,
  payer?: string,
  ): Promise< GibworkCreateTaskReponse >

- #### Parameters

  - title: string
  - content: string
  - requirements: string
  - tags: string[]
  - tokenMintAddress: string
  - tokenAmount: number
  - `Optional` payer: string

  #### Returns Promise< GibworkCreateTaskReponse >

  - Defined in src/agent/index.ts:630

### createMultisigProposal

- createMultisigProposal(transactionIndex?: number | bigint): Promise<string>

- #### Parameters

  - `Optional` transactionIndex: number | bigint

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:785

### createSquadsMultisig

- createSquadsMultisig(creator: PublicKey): Promise<string>

- #### Parameters

  - creator: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:764

### createTiplink

- createTiplink(
  amount: number,
  splmintAddress?: PublicKey,
  ): Promise<{ signature: string; url: string }>

- #### Parameters

  - amount: number
  - `Optional` splmintAddress: PublicKey

  #### Returns Promise<{ signature: string; url: string }>

  - Defined in src/agent/index.ts:657

### CreateWebhook

- CreateWebhook(
  accountAddresses: string[],
  webhookURL: string,
  ): Promise< HeliusWebhookResponse >

- #### Parameters

  - accountAddresses: string[]
  - webhookURL: string

  #### Returns Promise< HeliusWebhookResponse >

  - Defined in src/agent/index.ts:808

### deleteWebhook

- deleteWebhook(webhookID: string): Promise<any>

- #### Parameters

  - webhookID: string

  #### Returns Promise<any>

  - Defined in src/agent/index.ts:817

### deployCollection

- deployCollection(options: CollectionOptions ): Promise< CollectionDeployment >

- #### Parameters

  - options: CollectionOptions

  #### Returns Promise< CollectionDeployment >

  - Defined in src/agent/index.ts:199

### deployToken

- deployToken(
  name: string,
  uri: string,
  symbol: string,
  decimals?: number,
  initialSupply?: number,
  ): Promise<{ mint: PublicKey }>

- #### Parameters

  - name: string
  - uri: string
  - symbol: string
  - decimals: number = DEFAULT_OPTIONS.TOKEN_DECIMALS
  - `Optional` initialSupply: number

  #### Returns Promise<{ mint: PublicKey }>

  - Defined in src/agent/index.ts:189

### depositIntoDriftVault

- depositIntoDriftVault(amount: number, vault: string): Promise<string>

- #### Parameters

  - amount: number
  - vault: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:839

### depositToDriftUserAccount

- depositToDriftUserAccount(
  amount: number,
  symbol: string,
  isRepayment?: boolean,
  ): Promise<TxSigAndSlot>

- #### Parameters

  - amount: number
  - symbol: string
  - `Optional` isRepayment: boolean

  #### Returns Promise<TxSigAndSlot>

  - Defined in src/agent/index.ts:842

### depositToMultisig

- depositToMultisig(
  amount: number,
  vaultIndex?: number,
  mint?: PublicKey,
  ): Promise<string>

- #### Parameters

  - amount: number
  - vaultIndex: number = 0
  - `Optional` mint: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:768

### deriveDriftVaultAddress

- deriveDriftVaultAddress(name: string): Promise<PublicKey>

- #### Parameters

  - name: string

  #### Returns Promise<PublicKey>

  - Defined in src/agent/index.ts:849

### doesUserHaveDriftAccount

- doesUserHaveDriftAccount(): Promise<{ account: PublicKey; hasAccount: boolean }>

- #### Returns Promise<{ account: PublicKey; hasAccount: boolean }>

  - Defined in src/agent/index.ts:852

### driftSpotTokenSwap

- driftSpotTokenSwap(
  params: { fromSymbol: string; slippage?: number; toSymbol: string } & (
  { toAmount: number }
  | { fromAmount: number }
  ),
  ): Promise<string>

- #### Parameters

  - params: { fromSymbol: string; slippage?: number; toSymbol: string } & (
    { toAmount: number }
    | { fromAmount: number }
    )

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:943

### driftUserAccountInfo

- driftUserAccountInfo(): Promise<
  {
  authority: PublicKey;
  cumulativePerpFunding: BN;
  cumulativeSpotFees: BN;
  delegate: PublicKey;
  hasOpenAuction: boolean;
  hasOpenOrder: boolean;
  idle: boolean;
  isMarginTradingEnabled: boolean;
  lastActiveSlot: number;
  lastAddPerpLpSharesTs: BN;
  lastFuelBonusUpdateTs: number;
  liquidationMarginFreed: BN;
  marginMode: MarginMode;
  maxMarginRatio: number;
  name: number[];
  nextLiquidationId: number;
  nextOrderId: number;
  openAuctions: number;
  openOrders: number;
  orders: Order[];
  perpPositions: {
  baseAssetAmount: number;
  lastBaseAssetAmountPerLp: BN;
  lastCumulativeFundingRate: BN;
  lastQuoteAssetAmountPerLp: BN;
  lpShares: BN;
  marketIndex: number;
  openAsks: BN;
  openBids: BN;
  openOrders: number;
  perLpBase: number;
  quoteAssetAmount: BN;
  quoteBreakEvenAmount: BN;
  quoteEntryAmount: BN;
  remainderBaseAssetAmount: number;
  settledPnl: number;
  }[];
  poolId: number;
  settledPerpPnl: string;
  spotPositions: {
  availableBalance: number;
  balanceType: SpotBalanceType;
  cumulativeDeposits: BN;
  marketIndex: number;
  openAsks: BN;
  openBids: BN;
  openOrders: number;
  scaledBalance: BN;
  symbol: undefined
  | string;
  }[];
  status: number;
  subAccountId: number;
  totalDeposits: BN;
  totalSocialLoss: BN;
  totalWithdraws: BN;
  },
  >

- #### Returns Promise<
  {
  authority: PublicKey;
  cumulativePerpFunding: BN;
  cumulativeSpotFees: BN;
  delegate: PublicKey;
  hasOpenAuction: boolean;
  hasOpenOrder: boolean;
  idle: boolean;
  isMarginTradingEnabled: boolean;
  lastActiveSlot: number;
  lastAddPerpLpSharesTs: BN;
  lastFuelBonusUpdateTs: number;
  liquidationMarginFreed: BN;
  marginMode: MarginMode;
  maxMarginRatio: number;
  name: number[];
  nextLiquidationId: number;
  nextOrderId: number;
  openAuctions: number;
  openOrders: number;
  orders: Order[];
  perpPositions: {
  baseAssetAmount: number;
  lastBaseAssetAmountPerLp: BN;
  lastCumulativeFundingRate: BN;
  lastQuoteAssetAmountPerLp: BN;
  lpShares: BN;
  marketIndex: number;
  openAsks: BN;
  openBids: BN;
  openOrders: number;
  perLpBase: number;
  quoteAssetAmount: BN;
  quoteBreakEvenAmount: BN;
  quoteEntryAmount: BN;
  remainderBaseAssetAmount: number;
  settledPnl: number;
  }[];
  poolId: number;
  settledPerpPnl: string;
  spotPositions: {
  availableBalance: number;
  balanceType: SpotBalanceType;
  cumulativeDeposits: BN;
  marketIndex: number;
  openAsks: BN;
  openBids: BN;
  openOrders: number;
  scaledBalance: BN;
  symbol: undefined
  | string;
  }[];
  status: number;
  subAccountId: number;
  totalDeposits: BN;
  totalSocialLoss: BN;
  totalWithdraws: BN;
  },
  >

  - Defined in src/agent/index.ts:855

### executeMultisigTransaction

- executeMultisigTransaction(transactionIndex?: number | bigint): Promise<string>

- #### Parameters

  - `Optional` transactionIndex: number | bigint

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:803

### fetchTokenDetailedReport

- fetchTokenDetailedReport(mint: string): Promise< TokenCheck >

- #### Parameters

  - mint: string

  #### Returns Promise< TokenCheck >

  - Defined in src/agent/index.ts:680

### fetchTokenPrice

- fetchTokenPrice(mint: string): Promise<string>

- #### Parameters

  - mint: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:354

### fetchTokenReportSummary

- fetchTokenReportSummary(mint: string): Promise< TokenCheck >

- #### Parameters

  - mint: string

  #### Returns Promise< TokenCheck >

  - Defined in src/agent/index.ts:676

### flashCloseTrade

- flashCloseTrade(params: FlashCloseTradeParams ): Promise<string>

- Closes an existing trading position on Flash.Trade

  #### Parameters

  - params: FlashCloseTradeParams

    Flash trade close parameters

  #### Returns Promise<string>

  Transaction signature

  - Defined in src/agent/index.ts:698

### flashOpenTrade

- flashOpenTrade(params: FlashTradeParams ): Promise<string>

- Opens a new trading position on Flash.Trade

  #### Parameters

  - params: FlashTradeParams

    Flash trade parameters including market, side, collateral, leverage, and pool name

  #### Returns Promise<string>

  Transaction signature

  - Defined in src/agent/index.ts:689

### getAllAssetsbyOwner

- getAllAssetsbyOwner(owner: PublicKey, limit: number): Promise<any>

- #### Parameters

  - owner: PublicKey
  - limit: number

  #### Returns Promise<any>

  - Defined in src/agent/index.ts:704

### getAllDomainsTLDs

- getAllDomainsTLDs(): Promise<string[]>

- #### Returns Promise<string[]>

  - Defined in src/agent/index.ts:533

### getAllRegisteredAllDomains

- getAllRegisteredAllDomains(): Promise<string[]>

- #### Returns Promise<string[]>

  - Defined in src/agent/index.ts:537

### getAvailableDriftMarkets

- getAvailableDriftMarkets(
  type?: "spot" | "perp",
  ):
  | SpotMarketConfig[]
  | PerpMarketConfig[]
  | { perp: PerpMarketConfig[]; spot: SpotMarketConfig[] }

- #### Parameters

  - `Optional` type: "spot" | "perp"

  #### Returns
  | SpotMarketConfig[]
  | PerpMarketConfig[]
  | { perp: PerpMarketConfig[]; spot: SpotMarketConfig[] }

  - Defined in src/agent/index.ts:921

### getBalance

- getBalance(token_address?: PublicKey): Promise<number>

- #### Parameters

  - `Optional` token_address: PublicKey

  #### Returns Promise<number>

  - Defined in src/agent/index.ts:205

### getBalanceOther

- getBalanceOther(
  walletAddress: PublicKey,
  tokenAddress?: PublicKey,
  ): Promise<number>

- #### Parameters

  - walletAddress: PublicKey
  - `Optional` tokenAddress: PublicKey

  #### Returns Promise<number>

  - Defined in src/agent/index.ts:222

### getDriftVaultInfo

- getDriftVaultInfo(
  vaultName: string,
  ): Promise<
  {
  address: string;
  balance: string;
  delegate: string;
  hurdleRate: number;
  managementFee: number;
  marketName: string;
  maxTokens: number;
  minDepositAmount: number;
  name: string;
  permissioned: boolean;
  profitShare: number;
  redeemPeriod: number;
  },
  >

- #### Parameters

  - vaultName: string

  #### Returns Promise<
  {
  address: string;
  balance: string;
  delegate: string;
  hurdleRate: number;
  managementFee: number;
  marketName: string;
  maxTokens: number;
  minDepositAmount: number;
  name: string;
  permissioned: boolean;
  profitShare: number;
  redeemPeriod: number;
  },
  >

  - Defined in src/agent/index.ts:904

### getEntryQuoteOfPerpTrade

- getEntryQuoteOfPerpTrade(
  amount: number,
  symbol: `${string}-PERP`,
  action: "long" | "short",
  ): Promise<
  {
  bestPrice: number;
  entryPrice: number;
  priceImpact: number;
  worstPrice: number;
  },
  >

- #### Parameters

  - amount: number
  - symbol: `${string}-PERP`
  - action: "long" | "short"

  #### Returns Promise<
  {
  bestPrice: number;
  entryPrice: number;
  priceImpact: number;
  worstPrice: number;
  },
  >

  - Defined in src/agent/index.ts:971

### getLendAndBorrowAPY

- getLendAndBorrowAPY(
  symbol: string,
  ): Promise<{ borrowAPY: number; lendingAPY: number }>

- #### Parameters

  - symbol: string

  #### Returns Promise<{ borrowAPY: number; lendingAPY: number }>

  - Defined in src/agent/index.ts:978

### getMainAllDomainsDomain

- getMainAllDomainsDomain(owner: PublicKey): Promise<null | string>

- #### Parameters

  - owner: PublicKey

  #### Returns Promise<null | string>

  - Defined in src/agent/index.ts:541

### getOwnedAllDomains

- getOwnedAllDomains(owner: PublicKey): Promise<string[]>

- #### Parameters

  - owner: PublicKey

  #### Returns Promise<string[]>

  - Defined in src/agent/index.ts:525

### getOwnedDomainsForTLD

- getOwnedDomainsForTLD(tld: string): Promise<string[]>

- #### Parameters

  - tld: string

  #### Returns Promise<string[]>

  - Defined in src/agent/index.ts:529

### getPerpMarketFundingRate

- getPerpMarketFundingRate(
  symbol: `${string}-PERP`,
  period?: "year" | "hour",
  ): Promise<{ friendlyString: string; longRate: number; shortRate: number }>

- #### Parameters

  - symbol: `${string}-PERP`
  - period: "year" | "hour" = "year"

  #### Returns Promise<{ friendlyString: string; longRate: number; shortRate: number }>

  - Defined in src/agent/index.ts:965

### getPrimaryDomain

- getPrimaryDomain(account: PublicKey): Promise<string>

- #### Parameters

  - account: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:253

### getPythPrice

- getPythPrice(priceFeedID: string): Promise<string>

- #### Parameters

  - priceFeedID: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:626

### getPythPriceFeedID

- getPythPriceFeedID(tokenSymbol: string): Promise<string>

- #### Parameters

  - tokenSymbol: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:622

### getTokenBalances

- getTokenBalances(
  wallet_address?: PublicKey,
  ): Promise<
  {
  sol: number;
  tokens: {
  balance: number;
  decimals: number;
  name: string;
  symbol: string;
  tokenAddress: string;
  }[];
  },
  >

- #### Parameters

  - `Optional` wallet_address: PublicKey

  #### Returns Promise<
  {
  sol: number;
  tokens: {
  balance: number;
  decimals: number;
  name: string;
  symbol: string;
  tokenAddress: string;
  }[];
  },
  >

  - Defined in src/agent/index.ts:209

### getTokenDataByAddress

- getTokenDataByAddress(mint: string): Promise<undefined | JupiterTokenData >

- #### Parameters

  - mint: string

  #### Returns Promise<undefined | JupiterTokenData >

  - Defined in src/agent/index.ts:342

### getTokenDataByTicker

- getTokenDataByTicker(ticker: string): Promise<undefined | JupiterTokenData >

- #### Parameters

  - ticker: string

  #### Returns Promise<undefined | JupiterTokenData >

  - Defined in src/agent/index.ts:348

### getTPS

- getTPS(): Promise<number>

- #### Returns Promise<number>

  - Defined in src/agent/index.ts:338

### getWebhook

- getWebhook(id: string): Promise< HeliusWebhookIdResponse >

- #### Parameters

  - id: string

  #### Returns Promise< HeliusWebhookIdResponse >

  - Defined in src/agent/index.ts:814

### heliusParseTransactions

- heliusParseTransactions(transactionId: string): Promise<any>

- #### Parameters

  - transactionId: string

  #### Returns Promise<any>

  - Defined in src/agent/index.ts:701

### launchPumpFunToken

- launchPumpFunToken(
  tokenName: string,
  tokenTicker: string,
  description: string,
  imageUrl: string,
  options?: PumpFunTokenOptions ,
  ): Promise< PumpfunLaunchResponse >

- #### Parameters

  - tokenName: string
  - tokenTicker: string
  - description: string
  - imageUrl: string
  - `Optional` options: PumpFunTokenOptions

  #### Returns Promise< PumpfunLaunchResponse >

  - Defined in src/agent/index.ts:358

### lendAssets

- lendAssets(amount: number): Promise<string>

- #### Parameters

  - amount: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:326

### limitOrder

- limitOrder(
  marketId: PublicKey,
  quantity: number,
  side: string,
  price: number,
  ): Promise<string>

- #### Parameters

  - marketId: PublicKey
  - quantity: number
  - side: string
  - price: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:266

### luloLend

- luloLend(mintAddress: string, amount: number): Promise<string>

- #### Parameters

  - mintAddress: string
  - amount: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:330

### luloWithdraw

- luloWithdraw(mintAddress: string, amount: number): Promise<string>

- #### Parameters

  - mintAddress: string
  - amount: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:334

### manifestCreateMarket

- manifestCreateMarket(
  baseMint: PublicKey,
  quoteMint: PublicKey,
  ): Promise<string[]>

- #### Parameters

  - baseMint: PublicKey
  - quoteMint: PublicKey

  #### Returns Promise<string[]>

  - Defined in src/agent/index.ts:615

### meteoraCreateDlmmPool

- meteoraCreateDlmmPool(
  tokenAMint: PublicKey,
  tokenBMint: PublicKey,
  binStep: number,
  initialPrice: number,
  priceRoundingUp: boolean,
  feeBps: number,
  activationType: number,
  hasAlphaVault: boolean,
  activationPoint: undefined | BN,
  ): Promise<string>

- #### Parameters

  - tokenAMint: PublicKey
  - tokenBMint: PublicKey
  - binStep: number
  - initialPrice: number
  - priceRoundingUp: boolean
  - feeBps: number
  - activationType: number
  - hasAlphaVault: boolean
  - activationPoint: undefined | BN

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:428

### meteoraCreateDynamicPool

- meteoraCreateDynamicPool(
  tokenAMint: PublicKey,
  tokenBMint: PublicKey,
  tokenAAmount: BN,
  tokenBAmount: BN,
  tradeFeeNumerator: number,
  activationPoint: null | BN,
  hasAlphaVault: boolean,
  activationType: number,
  ): Promise<string>

- #### Parameters

  - tokenAMint: PublicKey
  - tokenBMint: PublicKey
  - tokenAAmount: BN
  - tokenBAmount: BN
  - tradeFeeNumerator: number
  - activationPoint: null | BN
  - hasAlphaVault: boolean
  - activationType: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:402

### mintNFT

- mintNFT(
  collectionMint: PublicKey,
  metadata: {
  creators?: { address: string; share: number }[];
  name: string;
  sellerFeeBasisPoints?: number;
  uri: string;
  },
  recipient?: PublicKey,
  ): Promise< MintCollectionNFTResponse >

- #### Parameters

  - collectionMint: PublicKey
  - metadata: {
    creators?: { address: string; share: number }[];
    name: string;
    sellerFeeBasisPoints?: number;
    uri: string;
    }
  - `Optional` recipient: PublicKey

  #### Returns Promise< MintCollectionNFTResponse >

  - Defined in src/agent/index.ts:229

### openbookCreateMarket

- openbookCreateMarket(
  baseMint: PublicKey,
  quoteMint: PublicKey,
  lotSize?: number,
  tickSize?: number,
  ): Promise<string[]>

- #### Parameters

  - baseMint: PublicKey
  - quoteMint: PublicKey
  - lotSize: number = 1
  - tickSize: number = 0.01

  #### Returns Promise<string[]>

  - Defined in src/agent/index.ts:599

### openPerpTradeLong

- openPerpTradeLong(
  args: Omit<
  {
  agent: SolanaAgentKit ;
  collateralAmount: number;
  collateralMint?: PublicKey;
  leverage?: number;
  price: number;
  slippage?: number;
  tradeMint?: PublicKey;
  },
  "agent",
  >,
  ): Promise<string>

- #### Parameters

  - args: Omit<
    {
    agent: SolanaAgentKit ;
    collateralAmount: number;
    collateralMint?: PublicKey;
    leverage?: number;
    price: number;
    slippage?: number;
    tradeMint?: PublicKey;
    },
    "agent",
    >

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:290

### openPerpTradeShort

- openPerpTradeShort(
  args: Omit<
  {
  agent: SolanaAgentKit ;
  collateralAmount: number;
  collateralMint?: PublicKey;
  leverage?: number;
  price: number;
  slippage?: number;
  tradeMint?: PublicKey;
  },
  "agent",
  >,
  ): Promise<string>

- #### Parameters

  - args: Omit<
    {
    agent: SolanaAgentKit ;
    collateralAmount: number;
    collateralMint?: PublicKey;
    leverage?: number;
    price: number;
    slippage?: number;
    tradeMint?: PublicKey;
    },
    "agent",
    >

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:299

### orcaClosePosition

- orcaClosePosition(positionMintAddress: PublicKey): Promise<string>

- #### Parameters

  - positionMintAddress: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:453

### orcaCreateCLMM

- orcaCreateCLMM(
  mintDeploy: PublicKey,
  mintPair: PublicKey,
  initialPrice: Decimal,
  feeTier: 1 | 2 | 4 | 5 | 16 | 30 | 65 | 100 | 200,
  ): Promise<string>

- #### Parameters

  - mintDeploy: PublicKey
  - mintPair: PublicKey
  - initialPrice: Decimal
  - feeTier: 1 | 2 | 4 | 5 | 16 | 30 | 65 | 100 | 200

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:457

### orcaCreateSingleSidedLiquidityPool

- orcaCreateSingleSidedLiquidityPool(
  depositTokenAmount: number,
  depositTokenMint: PublicKey,
  otherTokenMint: PublicKey,
  initialPrice: Decimal,
  maxPrice: Decimal,
  feeTier: 1 | 2 | 4 | 5 | 16 | 30 | 65 | 100 | 200,
  ): Promise<string>

- #### Parameters

  - depositTokenAmount: number
  - depositTokenMint: PublicKey
  - otherTokenMint: PublicKey
  - initialPrice: Decimal
  - maxPrice: Decimal
  - feeTier: 1 | 2 | 4 | 5 | 16 | 30 | 65 | 100 | 200

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:466

### orcaFetchPositions

- orcaFetchPositions(): Promise<string>

- #### Returns Promise<string>

  - Defined in src/agent/index.ts:485

### orcaOpenCenteredPositionWithLiquidity

- orcaOpenCenteredPositionWithLiquidity(
  whirlpoolAddress: PublicKey,
  priceOffsetBps: number,
  inputTokenMint: PublicKey,
  inputAmount: Decimal,
  ): Promise<string>

- #### Parameters

  - whirlpoolAddress: PublicKey
  - priceOffsetBps: number
  - inputTokenMint: PublicKey
  - inputAmount: Decimal

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:489

### orcaOpenSingleSidedPosition

- orcaOpenSingleSidedPosition(
  whirlpoolAddress: PublicKey,
  distanceFromCurrentPriceBps: number,
  widthBps: number,
  inputTokenMint: PublicKey,
  inputAmount: Decimal,
  ): Promise<string>

- #### Parameters

  - whirlpoolAddress: PublicKey
  - distanceFromCurrentPriceBps: number
  - widthBps: number
  - inputTokenMint: PublicKey
  - inputAmount: Decimal

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:504

### raydiumCreateAmmV4

- raydiumCreateAmmV4(
  marketId: PublicKey,
  baseAmount: BN,
  quoteAmount: BN,
  startTime: BN,
  ): Promise<string>

- #### Parameters

  - marketId: PublicKey
  - baseAmount: BN
  - quoteAmount: BN
  - startTime: BN

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:545

### raydiumCreateClmm

- raydiumCreateClmm(
  mint1: PublicKey,
  mint2: PublicKey,
  configId: PublicKey,
  initialPrice: Decimal,
  startTime: BN,
  ): Promise<string>

- #### Parameters

  - mint1: PublicKey
  - mint2: PublicKey
  - configId: PublicKey
  - initialPrice: Decimal
  - startTime: BN

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:562

### raydiumCreateCpmm

- raydiumCreateCpmm(
  mint1: PublicKey,
  mint2: PublicKey,
  configId: PublicKey,
  mintAAmount: BN,
  mintBAmount: BN,
  startTime: BN,
  ): Promise<string>

- #### Parameters

  - mint1: PublicKey
  - mint2: PublicKey
  - configId: PublicKey
  - mintAAmount: BN
  - mintBAmount: BN
  - startTime: BN

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:579

### registerDomain

- registerDomain(name: string, spaceKB?: number): Promise<string>

- #### Parameters

  - name: string
  - `Optional` spaceKB: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:245

### rejectMultisigProposal

- rejectMultisigProposal(transactionIndex?: number | bigint): Promise<string>

- #### Parameters

  - `Optional` transactionIndex: number | bigint

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:797

### requestFaucetFunds

- requestFaucetFunds(): Promise<string>

- #### Returns Promise<string>

  - Defined in src/agent/index.ts:185

### requestUnstakeFromDriftInsuranceFund

- requestUnstakeFromDriftInsuranceFund(
  amount: number,
  symbol: string,
  ): Promise<string>

- #### Parameters

  - amount: number
  - symbol: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:937

### requestWithdrawalFromDriftVault

- requestWithdrawalFromDriftVault(amount: number, vault: string): Promise<string>

- #### Parameters

  - amount: number
  - vault: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:858

### resolveAllDomains

- resolveAllDomains(domain: string): Promise<undefined | PublicKey>

- #### Parameters

  - domain: string

  #### Returns Promise<undefined | PublicKey>

  - Defined in src/agent/index.ts:521

### resolveSolDomain

- resolveSolDomain(domain: string): Promise<PublicKey>

- #### Parameters

  - domain: string

  #### Returns Promise<PublicKey>

  - Defined in src/agent/index.ts:249

### restake

- restake(amount: number): Promise<string>

- #### Parameters

  - amount: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:379

### rockPaperScissors

- rockPaperScissors(
  amount: number,
  choice: "rock" | "paper" | "scissors",
  ): Promise<string>

- #### Parameters

  - amount: number
  - choice: "rock" | "paper" | "scissors"

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:651

### sendCompressedAirdrop

- sendCompressedAirdrop(
  mintAddress: string,
  amount: number,
  decimals: number,
  recipients: string[],
  priorityFeeInLamports: number,
  shouldLog: boolean,
  ): Promise<string[]>

- #### Parameters

  - mintAddress: string
  - amount: number
  - decimals: number
  - recipients: string[]
  - priorityFeeInLamports: number
  - shouldLog: boolean

  #### Returns Promise<string[]>

  - Defined in src/agent/index.ts:383

### sendTranctionWithPriority

- sendTranctionWithPriority(
  priorityLevel: string,
  amount: number,
  to: PublicKey,
  splmintAddress?: PublicKey,
  ): Promise<{ fee: number; transactionId: string }>

- #### Parameters

  - priorityLevel: string
  - amount: number
  - to: PublicKey
  - `Optional` splmintAddress: PublicKey

  #### Returns Promise<{ fee: number; transactionId: string }>

  - Defined in src/agent/index.ts:749

### stake

- stake(amount: number): Promise<string>

- #### Parameters

  - amount: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:375

### stakeToDriftInsuranceFund

- stakeToDriftInsuranceFund(amount: number, symbol: string): Promise<string>

- #### Parameters

  - amount: number
  - symbol: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:934

### tensorCancelListing

- tensorCancelListing(nftMint: PublicKey): Promise<string>

- #### Parameters

  - nftMint: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:665

### tensorListNFT

- tensorListNFT(nftMint: PublicKey, price: number): Promise<string>

- #### Parameters

  - nftMint: PublicKey
  - price: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:661

### trade

- trade(
  outputMint: PublicKey,
  inputAmount: number,
  inputMint?: PublicKey,
  slippageBps?: number,
  ): Promise<string>

- #### Parameters

  - outputMint: PublicKey
  - inputAmount: number
  - `Optional` inputMint: PublicKey
  - slippageBps: number = DEFAULT_OPTIONS.SLIPPAGE_BPS

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:257

### tradeUsingDelegatedDriftVault

- tradeUsingDelegatedDriftVault(
  vault: string,
  amount: number,
  symbol: string,
  action: "long" | "short",
  type: "market" | "limit",
  price?: number,
  ): Promise<TxSigAndSlot>

- #### Parameters

  - vault: string
  - amount: number
  - symbol: string
  - action: "long" | "short"
  - type: "market" | "limit"
  - `Optional` price: number

  #### Returns Promise<TxSigAndSlot>

  - Defined in src/agent/index.ts:861

### tradeUsingDriftPerpAccount

- tradeUsingDriftPerpAccount(
  amount: number,
  symbol: string,
  action: "long" | "short",
  type: "market" | "limit",
  price?: number,
  ): Promise<string>

- #### Parameters

  - amount: number
  - symbol: string
  - action: "long" | "short"
  - type: "market" | "limit"
  - `Optional` price: number

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:879

### transfer

- transfer(to: PublicKey, amount: number, mint?: PublicKey): Promise<string>

- #### Parameters

  - to: PublicKey
  - amount: number
  - `Optional` mint: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:237

### transferFromMultisig

- transferFromMultisig(
  amount: number,
  to: PublicKey,
  vaultIndex?: number,
  mint?: PublicKey,
  ): Promise<string>

- #### Parameters

  - amount: number
  - to: PublicKey
  - vaultIndex: number = 0
  - `Optional` mint: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:776

### unstakeFromDriftInsuranceFund

- unstakeFromDriftInsuranceFund(symbol: string): Promise<string>

- #### Parameters

  - symbol: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:940

### updateDriftVault

- updateDriftVault(
  vaultAddress: string,
  params: {
  hurdleRate?: number;
  managementFee: number;
  marketName: `${string}-${string}`;
  maxTokens: number;
  minDepositAmount: number;
  name: string;
  permissioned?: boolean;
  profitShare: number;
  redeemPeriod: number;
  },
  ): Promise<string>

- #### Parameters

  - vaultAddress: string
  - params: {
    hurdleRate?: number;
    managementFee: number;
    marketName: `${string}-${string}`;
    maxTokens: number;
    minDepositAmount: number;
    name: string;
    permissioned?: boolean;
    profitShare: number;
    redeemPeriod: number;
    }

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:888

### updateDriftVaultDelegate

- updateDriftVaultDelegate(
  vaultAddress: string,
  delegate: string,
  ): Promise<string>

- #### Parameters

  - vaultAddress: string
  - delegate: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:917

### voltrDepositStrategy

- voltrDepositStrategy(
  depositAmount: BN,
  vault: PublicKey,
  strategy: PublicKey,
  ): Promise<string>

- #### Parameters

  - depositAmount: BN
  - vault: PublicKey
  - strategy: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:982

### voltrGetPositionValues

- voltrGetPositionValues(vault: PublicKey): Promise<string>

- #### Parameters

  - vault: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:998

### voltrWithdrawStrategy

- voltrWithdrawStrategy(
  withdrawAmount: BN,
  vault: PublicKey,
  strategy: PublicKey,
  ): Promise<string>

- #### Parameters

  - withdrawAmount: BN
  - vault: PublicKey
  - strategy: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:990

### withdrawAll

- withdrawAll(marketId: PublicKey): Promise<string>

- #### Parameters

  - marketId: PublicKey

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:286

### withdrawFromDriftAccount

- withdrawFromDriftAccount(
  amount: number,
  symbol: string,
  isBorrow?: boolean,
  ): Promise<TxSigAndSlot>

- #### Parameters

  - amount: number
  - symbol: string
  - `Optional` isBorrow: boolean

  #### Returns Promise<TxSigAndSlot>

  - Defined in src/agent/index.ts:907

### withdrawFromDriftVault

- withdrawFromDriftVault(vault: string): Promise<string>

- #### Parameters

  - vault: string

  #### Returns Promise<string>

  - Defined in src/agent/index.ts:914