Update agent and langchain

This commit is contained in:
calintje
2024-12-19 00:50:54 +01:00
parent 2c3fb17e41
commit f82f83f8ad
4 changed files with 84 additions and 2 deletions

View File

@@ -13,9 +13,13 @@ import {
lendAsset,
getTPS,
stakeWithJup,
createOrcaSingleSidedWhirlpool,
FEE_TIERS
} from "../tools";
import { CollectionOptions, PumpFunTokenOptions } from "../types";
import { DEFAULT_OPTIONS } from "../constants";
import { BN } from "@coral-xyz/anchor";
import Decimal from "decimal.js";
/**
* Main class for interacting with Solana blockchain
@@ -118,4 +122,23 @@ export class SolanaAgentKit {
) {
return stakeWithJup(this, amount);
}
async createOrcaSingleSidedWhirlpool(
depositTokenAmount: BN,
depositTokenMint: PublicKey,
otherTokenMint: PublicKey,
initialPrice: Decimal,
maxPrice: Decimal,
feeTier: keyof typeof FEE_TIERS,
) {
return createOrcaSingleSidedWhirlpool(
this,
depositTokenAmount,
depositTokenMint,
otherTokenMint,
initialPrice,
maxPrice,
feeTier
)
}
}