mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-19 15:10:36 +00:00
merge and docs
This commit is contained in:
@@ -27,10 +27,15 @@ import {
|
||||
batchOrder,
|
||||
cancelAllOrders,
|
||||
withdrawAll,
|
||||
closePerpTradeShort,
|
||||
closePerpTradeLong,
|
||||
openPerpTradeShort,
|
||||
openPerpTradeLong,
|
||||
transfer,
|
||||
getTokenDataByAddress,
|
||||
getTokenDataByTicker,
|
||||
stakeWithJup,
|
||||
stakeWithSolayer,
|
||||
sendCompressedAirdrop,
|
||||
orcaCreateSingleSidedLiquidityPool,
|
||||
orcaCreateCLMM,
|
||||
@@ -209,6 +214,42 @@ export class SolanaAgentKit {
|
||||
return withdrawAll(this, marketId);
|
||||
}
|
||||
|
||||
async openPerpTradeLong(
|
||||
args: Omit<Parameters<typeof openPerpTradeLong>[0], "agent">,
|
||||
): Promise<string> {
|
||||
return openPerpTradeLong({
|
||||
agent: this,
|
||||
...args,
|
||||
});
|
||||
}
|
||||
|
||||
async openPerpTradeShort(
|
||||
args: Omit<Parameters<typeof openPerpTradeShort>[0], "agent">,
|
||||
): Promise<string> {
|
||||
return openPerpTradeShort({
|
||||
agent: this,
|
||||
...args,
|
||||
});
|
||||
}
|
||||
|
||||
async closePerpTradeShort(
|
||||
args: Omit<Parameters<typeof closePerpTradeShort>[0], "agent">,
|
||||
): Promise<string> {
|
||||
return closePerpTradeShort({
|
||||
agent: this,
|
||||
...args,
|
||||
});
|
||||
}
|
||||
|
||||
async closePerpTradeLong(
|
||||
args: Omit<Parameters<typeof closePerpTradeLong>[0], "agent">,
|
||||
): Promise<string> {
|
||||
return closePerpTradeLong({
|
||||
agent: this,
|
||||
...args,
|
||||
});
|
||||
}
|
||||
|
||||
async lendAssets(amount: number): Promise<string> {
|
||||
return lendAsset(this, amount);
|
||||
}
|
||||
@@ -254,6 +295,10 @@ export class SolanaAgentKit {
|
||||
return stakeWithJup(this, amount);
|
||||
}
|
||||
|
||||
async restake(amount: number): Promise<string> {
|
||||
return stakeWithSolayer(this, amount);
|
||||
}
|
||||
|
||||
async sendCompressedAirdrop(
|
||||
mintAddress: string,
|
||||
amount: number,
|
||||
|
||||
Reference in New Issue
Block a user