Documentation for SolanaAgentKit
new SolanaAgentKit(Defined in: agent/index.ts:103private_key
,rpc_url
,openai_api_key
):SolanaAgentKit
string
string
null
| string
SolanaAgentKit
new SolanaAgentKit(Defined in: agent/index.ts:108private_key
,rpc_url
,config
):SolanaAgentKit
string
string
Config
SolanaAgentKit
requestFaucetFunds():Defined in: agent/index.ts:129Promise
<string
>
Promise
<string
>
deployToken(Defined in: agent/index.ts:133name
,uri
,symbol
,decimals
,initialSupply
?):Promise
<{mint
:PublicKey
; }>
string
string
string
number
= DEFAULT_OPTIONS.TOKEN_DECIMALS
number
Promise
<{ mint
: PublicKey
; }>
deployCollection(Defined in: agent/index.ts:143options
):Promise
<CollectionDeployment
>
CollectionOptions
Promise
<CollectionDeployment
>
getBalance(Defined in: agent/index.ts:149token_address
?):Promise
<number
>
PublicKey
Promise
<number
>
getBalanceOther(Defined in: agent/index.ts:153walletAddress
,tokenAddress
?):Promise
<number
>
PublicKey
PublicKey
Promise
<number
>
mintNFT(Defined in: agent/index.ts:160collectionMint
,metadata
,recipient
?):Promise
<MintCollectionNFTResponse
>
PublicKey
string
string
number
object
[]
PublicKey
Promise
<MintCollectionNFTResponse
>
transfer(Defined in: agent/index.ts:168to
,amount
,mint
?):Promise
<string
>
PublicKey
number
PublicKey
Promise
<string
>
registerDomain(Defined in: agent/index.ts:176name
,spaceKB
?):Promise
<string
>
string
number
Promise
<string
>
resolveSolDomain(Defined in: agent/index.ts:180domain
):Promise
<PublicKey
>
string
Promise
<PublicKey
>
getPrimaryDomain(Defined in: agent/index.ts:184account
):Promise
<string
>
PublicKey
Promise
<string
>
trade(Defined in: agent/index.ts:188outputMint
,inputAmount
,inputMint
?,slippageBps
?):Promise
<string
>
PublicKey
number
PublicKey
number
= DEFAULT_OPTIONS.SLIPPAGE_BPS
Promise
<string
>
limitOrder(Defined in: agent/index.ts:197marketId
,quantity
,side
,price
):Promise
<string
>
PublicKey
number
string
number
Promise
<string
>
batchOrder(Defined in: agent/index.ts:206marketId
,orders
):Promise
<string
>
PublicKey
OrderParams
[]
Promise
<string
>
cancelAllOrders(Defined in: agent/index.ts:213marketId
):Promise
<string
>
PublicKey
Promise
<string
>
withdrawAll(Defined in: agent/index.ts:217marketId
):Promise
<string
>
PublicKey
Promise
<string
>
openPerpTradeLong(Defined in: agent/index.ts:221args
):Promise
<string
>
Omit
<{ agent
: SolanaAgentKit
; price
: number
; collateralAmount
: number
; collateralMint
: PublicKey
; leverage
: number
; tradeMint
: PublicKey
; slippage
: number
; }, "agent"
>
Promise
<string
>
openPerpTradeShort(Defined in: agent/index.ts:230args
):Promise
<string
>
Omit
<{ agent
: SolanaAgentKit
; price
: number
; collateralAmount
: number
; collateralMint
: PublicKey
; leverage
: number
; tradeMint
: PublicKey
; slippage
: number
; }, "agent"
>
Promise
<string
>
closePerpTradeShort(Defined in: agent/index.ts:239args
):Promise
<string
>
Omit
<{ agent
: SolanaAgentKit
; price
: number
; tradeMint
: PublicKey
; }, "agent"
>
Promise
<string
>
closePerpTradeLong(Defined in: agent/index.ts:248args
):Promise
<string
>
Omit
<{ agent
: SolanaAgentKit
; price
: number
; tradeMint
: PublicKey
; }, "agent"
>
Promise
<string
>
lendAssets(Defined in: agent/index.ts:257amount
):Promise
<string
>
number
Promise
<string
>
getTPS():Defined in: agent/index.ts:261Promise
<number
>
Promise
<number
>
getTokenDataByAddress(Defined in: agent/index.ts:265mint
):Promise
<undefined
|JupiterTokenData
>
string
Promise
<undefined
| JupiterTokenData
>
getTokenDataByTicker(Defined in: agent/index.ts:271ticker
):Promise
<undefined
|JupiterTokenData
>
string
Promise
<undefined
| JupiterTokenData
>
fetchTokenPrice(Defined in: agent/index.ts:277mint
):Promise
<string
>
string
Promise
<string
>
launchPumpFunToken(Defined in: agent/index.ts:281tokenName
,tokenTicker
,description
,imageUrl
,options
?):Promise
<PumpfunLaunchResponse
>
string
string
string
string
PumpFunTokenOptions
Promise
<PumpfunLaunchResponse
>
stake(Defined in: agent/index.ts:298amount
):Promise
<string
>
number
Promise
<string
>
restake(Defined in: agent/index.ts:302amount
):Promise
<string
>
number
Promise
<string
>
sendCompressedAirdrop(Defined in: agent/index.ts:306mintAddress
,amount
,decimals
,recipients
,priorityFeeInLamports
,shouldLog
):Promise
<string
[]>
string
number
number
string
[]
number
boolean
Promise
<string
[]>
orcaClosePosition(Defined in: agent/index.ts:325positionMintAddress
):Promise
<string
>
PublicKey
Promise
<string
>
orcaCreateCLMM(Defined in: agent/index.ts:329mintDeploy
,mintPair
,initialPrice
,feeTier
):Promise
<string
>
PublicKey
PublicKey
Decimal
1
| 2
| 4
| 5
| 16
| 30
| 65
| 100
| 200
Promise
<string
>
orcaCreateSingleSidedLiquidityPool(Defined in: agent/index.ts:338depositTokenAmount
,depositTokenMint
,otherTokenMint
,initialPrice
,maxPrice
,feeTier
):Promise
<string
>
number
PublicKey
PublicKey
Decimal
Decimal
1
| 2
| 4
| 5
| 16
| 30
| 65
| 100
| 200
Promise
<string
>
orcaFetchPositions():Defined in: agent/index.ts:357Promise
<string
>
Promise
<string
>
orcaOpenCenteredPositionWithLiquidity(Defined in: agent/index.ts:361whirlpoolAddress
,priceOffsetBps
,inputTokenMint
,inputAmount
):Promise
<string
>
PublicKey
number
PublicKey
Decimal
Promise
<string
>
orcaOpenSingleSidedPosition(Defined in: agent/index.ts:376whirlpoolAddress
,distanceFromCurrentPriceBps
,widthBps
,inputTokenMint
,inputAmount
):Promise
<string
>
PublicKey
number
number
PublicKey
Decimal
Promise
<string
>
resolveAllDomains(Defined in: agent/index.ts:393domain
):Promise
<undefined
|PublicKey
>
string
Promise
<undefined
| PublicKey
>
getOwnedAllDomains(Defined in: agent/index.ts:397owner
):Promise
<string
[]>
PublicKey
Promise
<string
[]>
getOwnedDomainsForTLD(Defined in: agent/index.ts:401tld
):Promise
<string
[]>
string
Promise
<string
[]>
getAllDomainsTLDs():Defined in: agent/index.ts:405Promise
<string
[]>
Promise
<string
[]>
getAllRegisteredAllDomains():Defined in: agent/index.ts:409Promise
<string
[]>
Promise
<string
[]>
getMainAllDomainsDomain(Defined in: agent/index.ts:413owner
):Promise
<null
|string
>
PublicKey
Promise
<null
| string
>
raydiumCreateAmmV4(Defined in: agent/index.ts:417marketId
,baseAmount
,quoteAmount
,startTime
):Promise
<string
>
PublicKey
BN
BN
BN
Promise
<string
>
raydiumCreateClmm(Defined in: agent/index.ts:434mint1
,mint2
,configId
,initialPrice
,startTime
):Promise
<string
>
PublicKey
PublicKey
PublicKey
Decimal
BN
Promise
<string
>
raydiumCreateCpmm(Defined in: agent/index.ts:451mint1
,mint2
,configId
,mintAAmount
,mintBAmount
,startTime
):Promise
<string
>
PublicKey
PublicKey
PublicKey
BN
BN
BN
Promise
<string
>
openbookCreateMarket(Defined in: agent/index.ts:471baseMint
,quoteMint
,lotSize
,tickSize
):Promise
<string
[]>
PublicKey
PublicKey
number
= 1
number
= 0.01
Promise
<string
[]>
manifestCreateMarket(Defined in: agent/index.ts:487baseMint
,quoteMint
):Promise
<string
[]>
PublicKey
PublicKey
Promise
<string
[]>
getPythPriceFeedID(Defined in: agent/index.ts:494tokenSymbol
):Promise
<string
>
string
Promise
<string
>
getPythPrice(Defined in: agent/index.ts:498priceFeedID
):Promise
<string
>
string
Promise
<string
>
createGibworkTask(Defined in: agent/index.ts:502title
,content
,requirements
,tags
,tokenMintAddress
,tokenAmount
,payer
?):Promise
<GibworkCreateTaskReponse
>
string
string
string
string
[]
string
number
string
Promise
<GibworkCreateTaskReponse
>
rockPaperScissors(Defined in: agent/index.ts:523amount
,choice
):Promise
<string
>
number
"rock"
| "paper"
| "scissors"
Promise
<string
>
createTiplink(Defined in: agent/index.ts:529amount
,splmintAddress
?):Promise
<{url
:string
;signature
:string
; }>
number
PublicKey
Promise
<{ url
: string
; signature
: string
; }>
tensorListNFT(Defined in: agent/index.ts:533nftMint
,price
):Promise
<string
>
PublicKey
number
Promise
<string
>
tensorCancelListing(Defined in: agent/index.ts:537nftMint
):Promise
<string
>
PublicKey
Promise
<string
>
fetchTokenReportSummary(Defined in: agent/index.ts:541mint
):Promise
<TokenCheck
>
string
Promise
<TokenCheck
>
fetchTokenDetailedReport(Defined in: agent/index.ts:545mint
):Promise
<TokenCheck
>
string
Promise
<TokenCheck
>
flashOpenTrade(Defined in: agent/index.ts:554 Opens a new trading position on Flash.Tradeparams
):Promise
<string
>
FlashTradeParams
Flash trade parameters including market, side, collateral, leverage, and pool name
Promise
<string
>
Transaction signature
flashCloseTrade(Defined in: agent/index.ts:563 Closes an existing trading position on Flash.Tradeparams
):Promise
<string
>
FlashCloseTradeParams
Flash trade close parameters
Promise
<string
>
Transaction signature
connection: Connection
Defined in: agent/index.ts:90
Solana RPC connection
wallet: Keypair
Defined in: agent/index.ts:91
Wallet keypair for signing transactions
wallet_address: PublicKey
Defined in: agent/index.ts:92
Public key of the wallet
config: Config
Defined in: agent/index.ts:93
Configuration object