mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-06-06 15:11:43 +00:00
Merge branch 'main' into rename-and-fixes
This commit is contained in:
@@ -28,6 +28,12 @@ import {
|
||||
fetchPrice,
|
||||
pythFetchPrice,
|
||||
FEE_TIERS,
|
||||
getAllDomainsTLDs,
|
||||
getAllRegisteredAllDomains,
|
||||
getOwnedDomainsForTLD,
|
||||
getMainAllDomainsDomain,
|
||||
getOwnedAllDomains,
|
||||
resolveAllDomains,
|
||||
} from "../tools";
|
||||
import {
|
||||
CollectionDeployment,
|
||||
@@ -38,6 +44,7 @@ import {
|
||||
PumpFunTokenOptions,
|
||||
} from "../types";
|
||||
import { BN } from "@coral-xyz/anchor";
|
||||
import { NameAccountAndDomain } from "@onsol/tldparser";
|
||||
|
||||
/**
|
||||
* Main class for interacting with Solana blockchain
|
||||
@@ -197,8 +204,8 @@ export class SolanaAgentKit {
|
||||
otherTokenMint: PublicKey,
|
||||
initialPrice: Decimal,
|
||||
maxPrice: Decimal,
|
||||
feeTier: keyof typeof FEE_TIERS,
|
||||
): Promise<string> {
|
||||
feeTier: keyof typeof FEE_TIERS
|
||||
) {
|
||||
return createOrcaSingleSidedWhirlpool(
|
||||
this,
|
||||
depositTokenAmount,
|
||||
@@ -206,15 +213,43 @@ export class SolanaAgentKit {
|
||||
otherTokenMint,
|
||||
initialPrice,
|
||||
maxPrice,
|
||||
feeTier,
|
||||
feeTier
|
||||
);
|
||||
}
|
||||
|
||||
async resolveAllDomains(domain: string): Promise<PublicKey | undefined> {
|
||||
return resolveAllDomains(this, domain);
|
||||
}
|
||||
|
||||
async getOwnedAllDomains(
|
||||
owner: PublicKey
|
||||
): Promise<string[]> {
|
||||
return getOwnedAllDomains(this, owner);
|
||||
}
|
||||
|
||||
async getOwnedDomainsForTLD(
|
||||
tld: string
|
||||
):Promise<string[]> {
|
||||
return getOwnedDomainsForTLD(this, tld);
|
||||
}
|
||||
|
||||
async getAllDomainsTLDs(): Promise<String[]> {
|
||||
return getAllDomainsTLDs(this);
|
||||
}
|
||||
|
||||
async getAllRegisteredAllDomains(): Promise<string[]> {
|
||||
return getAllRegisteredAllDomains(this);
|
||||
}
|
||||
|
||||
async getMainAllDomainsDomain(owner: PublicKey): Promise<string | null> {
|
||||
return getMainAllDomainsDomain(this, owner);
|
||||
}
|
||||
|
||||
async raydiumCreateAmmV4(
|
||||
marketId: PublicKey,
|
||||
baseAmount: BN,
|
||||
quoteAmount: BN,
|
||||
startTime: BN,
|
||||
startTime: BN
|
||||
): Promise<string> {
|
||||
return raydiumCreateAmmV4(
|
||||
this,
|
||||
@@ -223,8 +258,8 @@ export class SolanaAgentKit {
|
||||
baseAmount,
|
||||
quoteAmount,
|
||||
|
||||
startTime,
|
||||
);
|
||||
startTime
|
||||
);;
|
||||
}
|
||||
|
||||
async raydiumCreateClmm(
|
||||
@@ -232,7 +267,7 @@ export class SolanaAgentKit {
|
||||
mint2: PublicKey,
|
||||
configId: PublicKey,
|
||||
initialPrice: Decimal,
|
||||
startTime: BN,
|
||||
startTime: BN
|
||||
): Promise<string> {
|
||||
return raydiumCreateClmm(
|
||||
this,
|
||||
@@ -250,7 +285,7 @@ export class SolanaAgentKit {
|
||||
configId: PublicKey,
|
||||
mintAAmount: BN,
|
||||
mintBAmount: BN,
|
||||
startTime: BN,
|
||||
startTime: BN
|
||||
): Promise<string> {
|
||||
return raydiumCreateCpmm(
|
||||
this,
|
||||
@@ -259,7 +294,8 @@ export class SolanaAgentKit {
|
||||
configId,
|
||||
mintAAmount,
|
||||
mintBAmount,
|
||||
startTime,
|
||||
|
||||
startTime
|
||||
);
|
||||
}
|
||||
|
||||
@@ -267,7 +303,7 @@ export class SolanaAgentKit {
|
||||
baseMint: PublicKey,
|
||||
quoteMint: PublicKey,
|
||||
lotSize: number = 1,
|
||||
tickSize: number = 0.01,
|
||||
tickSize: number = 0.01
|
||||
): Promise<string[]> {
|
||||
return openbookCreateMarket(
|
||||
this,
|
||||
|
||||
Reference in New Issue
Block a user