diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8917bd9f..4b967a1f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -23,7 +23,14 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache-dependency-path: pnpm-lock.json
- - run: pnpm install
- - run: pnpm run lint
- - run: pnpm run build
- # - run: pnpm run test # TODO: add mock env for testing
\ No newline at end of file
+ - name: Install pnpm
+ uses: pnpm/action-setup@v2
+ with:
+ version: 8
+ - name: Install dependencies
+ run: pnpm install
+ - name: Run lint
+ run: pnpm run lint
+ - name: Run build
+ run: pnpm run build
+ # - run: pnpm run test # TODO: add mock env for testing
diff --git a/docs/classes/SolanaAgentKit.html b/docs/classes/SolanaAgentKit.html
index 149719f8..f0aebb11 100644
--- a/docs/classes/SolanaAgentKit.html
+++ b/docs/classes/SolanaAgentKit.html
@@ -1,7 +1,7 @@
SolanaAgentKit | solana-agent-kit Index
Index
Properties
Example
const agent = new SolanaAgentKit(privateKey, rpcUrl, {
OPENAI_API_KEY: 'your-key'
});
-
new SolanaAgentKit(
private_key: string,
rpc_url: string,
config: Config,
): SolanaAgentKitParameters
- private_key: string
- rpc_url: string
- config: Config
Properties
connection
connection: Connection
wallet_address
wallet_address: PublicKey
Methods
batchOrder
- batchOrder(marketId: PublicKey, orders: OrderParams[]): Promise<string>
Returns Promise<string>
cancelAllOrders
- cancelAllOrders(marketId: PublicKey): Promise<string>
Returns Promise<string>
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>
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>
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
createTiplink
- createTiplink(
amount: number,
splmintAddress?: PublicKey,
): Promise<{ signature: string; url: string }> Parameters
- amount: number
Optional
splmintAddress: PublicKey
Returns Promise<{ signature: string; url: string }>
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 }>
fetchTokenDetailedReport
- fetchTokenDetailedReport(mint: string): Promise<TokenCheck>
fetchTokenPrice
- fetchTokenPrice(mint: string): Promise<string>
Returns Promise<string>
fetchTokenReportSummary
- fetchTokenReportSummary(mint: string): Promise<TokenCheck>
getAllDomainsTLDs
- getAllDomainsTLDs(): Promise<string[]>
Returns Promise<string[]>
getAllRegisteredAllDomains
- getAllRegisteredAllDomains(): Promise<string[]>
Returns Promise<string[]>
getBalance
- getBalance(token_address?: PublicKey): Promise<number>
Parameters
Optional
token_address: PublicKey
Returns Promise<number>
getBalanceOther
- getBalanceOther(
walletAddress: PublicKey,
tokenAddress?: PublicKey,
): Promise<number> Parameters
- walletAddress: PublicKey
Optional
tokenAddress: PublicKey
Returns Promise<number>
getMainAllDomainsDomain
- getMainAllDomainsDomain(owner: PublicKey): Promise<null | string>
Returns Promise<null | string>
getOwnedAllDomains
- getOwnedAllDomains(owner: PublicKey): Promise<string[]>
Returns Promise<string[]>
getOwnedDomainsForTLD
- getOwnedDomainsForTLD(tld: string): Promise<string[]>
Returns Promise<string[]>
getPrimaryDomain
- getPrimaryDomain(account: PublicKey): Promise<string>
Returns Promise<string>
getPythPrice
- getPythPrice(priceFeedID: string): Promise<string>
Returns Promise<string>
getPythPriceFeedID
- getPythPriceFeedID(tokenSymbol: string): Promise<string>
Returns Promise<string>
getTPS
- getTPS(): Promise<number>
Returns Promise<number>
lendAssets
- lendAssets(amount: number): Promise<string>
Returns Promise<string>
limitOrder
- limitOrder(
marketId: PublicKey,
quantity: number,
side: string,
price: number,
): Promise<string> Parameters
- marketId: PublicKey
- quantity: number
- side: string
- price: number
Returns Promise<string>
manifestCreateMarket
- manifestCreateMarket(
baseMint: PublicKey,
quoteMint: PublicKey,
): Promise<string[]> Parameters
- baseMint: PublicKey
- quoteMint: PublicKey
Returns Promise<string[]>
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
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[]>
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>
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>
orcaClosePosition
- orcaClosePosition(positionMintAddress: PublicKey): Promise<string>
Parameters
- positionMintAddress: PublicKey
Returns Promise<string>
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>
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>
orcaFetchPositions
- orcaFetchPositions(): Promise<string>
Returns Promise<string>
orcaOpenCenteredPositionWithLiquidity
- orcaOpenCenteredPositionWithLiquidity(
whirlpoolAddress: PublicKey,
priceOffsetBps: number,
inputTokenMint: PublicKey,
inputAmount: Decimal,
): Promise<string> Parameters
- whirlpoolAddress: PublicKey
- priceOffsetBps: number
- inputTokenMint: PublicKey
- inputAmount: Decimal
Returns Promise<string>
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>
raydiumCreateAmmV4
- raydiumCreateAmmV4(
marketId: PublicKey,
baseAmount: BN,
quoteAmount: BN,
startTime: BN,
): Promise<string> Parameters
- marketId: PublicKey
- baseAmount: BN
- quoteAmount: BN
- startTime: BN
Returns Promise<string>
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>
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>
registerDomain
- registerDomain(name: string, spaceKB?: number): Promise<string>
Parameters
- name: string
Optional
spaceKB: number
Returns Promise<string>
requestFaucetFunds
- requestFaucetFunds(): Promise<string>
Returns Promise<string>
resolveAllDomains
- resolveAllDomains(domain: string): Promise<undefined | PublicKey>
Returns Promise<undefined | PublicKey>
resolveSolDomain
- resolveSolDomain(domain: string): Promise<PublicKey>
Returns Promise<PublicKey>
restake
- restake(amount: number): Promise<string>
Returns Promise<string>
rockPaperScissors
- rockPaperScissors(
amount: number,
choice: "rock" | "paper" | "scissors",
): Promise<string> Parameters
- amount: number
- choice: "rock" | "paper" | "scissors"
Returns Promise<string>
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[]>
stake
- stake(amount: number): Promise<string>
Returns Promise<string>
tensorCancelListing
- tensorCancelListing(nftMint: PublicKey): Promise<string>
Returns Promise<string>
tensorListNFT
- tensorListNFT(nftMint: PublicKey, price: number): Promise<string>
Parameters
- nftMint: PublicKey
- price: number
Returns Promise<string>
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>
transfer
- transfer(to: PublicKey, amount: number, mint?: PublicKey): Promise<string>
Parameters
- to: PublicKey
- amount: number
Optional
mint: PublicKey
Returns Promise<string>
withdrawAll
- withdrawAll(marketId: PublicKey): Promise<string>
Returns Promise<string>
+
new SolanaAgentKit(
private_key: string,
rpc_url: string,
config: Config,
): SolanaAgentKitParameters
- private_key: string
- rpc_url: string
- config: Config
Properties
connection
connection: Connection
wallet_address
wallet_address: PublicKey
Methods
batchOrder
- batchOrder(marketId: PublicKey, orders: OrderParams[]): Promise<string>
Returns Promise<string>
cancelAllOrders
- cancelAllOrders(marketId: PublicKey): Promise<string>
Returns Promise<string>
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>
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>
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
createTiplink
- createTiplink(
amount: number,
splmintAddress?: PublicKey,
): Promise<{ signature: string; url: string }> Parameters
- amount: number
Optional
splmintAddress: PublicKey
Returns Promise<{ signature: string; url: string }>
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 }>
fetchTokenDetailedReport
- fetchTokenDetailedReport(mint: string): Promise<TokenCheck>
fetchTokenPrice
- fetchTokenPrice(mint: string): Promise<string>
Returns Promise<string>
fetchTokenReportSummary
- fetchTokenReportSummary(mint: string): Promise<TokenCheck>
getAllDomainsTLDs
- getAllDomainsTLDs(): Promise<string[]>
Returns Promise<string[]>
getAllRegisteredAllDomains
- getAllRegisteredAllDomains(): Promise<string[]>
Returns Promise<string[]>
getBalance
- getBalance(token_address?: PublicKey): Promise<number>
Parameters
Optional
token_address: PublicKey
Returns Promise<number>
getBalanceOther
- getBalanceOther(
walletAddress: PublicKey,
tokenAddress?: PublicKey,
): Promise<number> Parameters
- walletAddress: PublicKey
Optional
tokenAddress: PublicKey
Returns Promise<number>
getMainAllDomainsDomain
- getMainAllDomainsDomain(owner: PublicKey): Promise<null | string>
Returns Promise<null | string>
getOwnedAllDomains
- getOwnedAllDomains(owner: PublicKey): Promise<string[]>
Returns Promise<string[]>
getOwnedDomainsForTLD
- getOwnedDomainsForTLD(tld: string): Promise<string[]>
Returns Promise<string[]>
getPrimaryDomain
- getPrimaryDomain(account: PublicKey): Promise<string>
Returns Promise<string>
getPythPrice
- getPythPrice(priceFeedID: string): Promise<string>
Returns Promise<string>
getPythPriceFeedID
- getPythPriceFeedID(tokenSymbol: string): Promise<string>
Returns Promise<string>
getTPS
- getTPS(): Promise<number>
Returns Promise<number>
lendAssets
- lendAssets(amount: number): Promise<string>
Returns Promise<string>
limitOrder
- limitOrder(
marketId: PublicKey,
quantity: number,
side: string,
price: number,
): Promise<string> Parameters
- marketId: PublicKey
- quantity: number
- side: string
- price: number
Returns Promise<string>
manifestCreateMarket
- manifestCreateMarket(
baseMint: PublicKey,
quoteMint: PublicKey,
): Promise<string[]> Parameters
- baseMint: PublicKey
- quoteMint: PublicKey
Returns Promise<string[]>
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
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[]>
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>
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>
orcaClosePosition
- orcaClosePosition(positionMintAddress: PublicKey): Promise<string>
Parameters
- positionMintAddress: PublicKey
Returns Promise<string>
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>
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>
orcaFetchPositions
- orcaFetchPositions(): Promise<string>
Returns Promise<string>
orcaOpenCenteredPositionWithLiquidity
- orcaOpenCenteredPositionWithLiquidity(
whirlpoolAddress: PublicKey,
priceOffsetBps: number,
inputTokenMint: PublicKey,
inputAmount: Decimal,
): Promise<string> Parameters
- whirlpoolAddress: PublicKey
- priceOffsetBps: number
- inputTokenMint: PublicKey
- inputAmount: Decimal
Returns Promise<string>
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>
raydiumCreateAmmV4
- raydiumCreateAmmV4(
marketId: PublicKey,
baseAmount: BN,
quoteAmount: BN,
startTime: BN,
): Promise<string> Parameters
- marketId: PublicKey
- baseAmount: BN
- quoteAmount: BN
- startTime: BN
Returns Promise<string>
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>
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>
registerDomain
- registerDomain(name: string, spaceKB?: number): Promise<string>
Parameters
- name: string
Optional
spaceKB: number
Returns Promise<string>
requestFaucetFunds
- requestFaucetFunds(): Promise<string>
Returns Promise<string>
resolveAllDomains
- resolveAllDomains(domain: string): Promise<undefined | PublicKey>
Returns Promise<undefined | PublicKey>
resolveSolDomain
- resolveSolDomain(domain: string): Promise<PublicKey>
Returns Promise<PublicKey>
restake
- restake(amount: number): Promise<string>
Returns Promise<string>
rockPaperScissors
- rockPaperScissors(
amount: number,
choice: "rock" | "paper" | "scissors",
): Promise<string> Parameters
- amount: number
- choice: "rock" | "paper" | "scissors"
Returns Promise<string>
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[]>
stake
- stake(amount: number): Promise<string>
Returns Promise<string>
tensorCancelListing
- tensorCancelListing(nftMint: PublicKey): Promise<string>
Returns Promise<string>
tensorListNFT
- tensorListNFT(nftMint: PublicKey, price: number): Promise<string>
Parameters
- nftMint: PublicKey
- price: number
Returns Promise<string>
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>
transfer
- transfer(to: PublicKey, amount: number, mint?: PublicKey): Promise<string>
Parameters
- to: PublicKey
- amount: number
Optional
mint: PublicKey
Returns Promise<string>
withdrawAll
- withdrawAll(marketId: PublicKey): Promise<string>
Returns Promise<string>
Main class for interacting with Solana blockchain Provides a unified interface for token operations, NFT management, trading and more
SolanaAgentKit
-