four-flap-meme-sdk 1.5.55 → 1.5.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/sol/constants.d.ts +150 -0
- package/dist/sol/constants.js +188 -0
- package/dist/sol/dex/blockrazor/client.d.ts +51 -0
- package/dist/sol/dex/blockrazor/client.js +96 -0
- package/dist/sol/dex/blockrazor/constants.d.ts +34 -0
- package/dist/sol/dex/blockrazor/constants.js +55 -0
- package/dist/sol/dex/blockrazor/geyser.d.ts +128 -0
- package/dist/sol/dex/blockrazor/geyser.js +530 -0
- package/dist/sol/dex/blockrazor/index.d.ts +18 -0
- package/dist/sol/dex/blockrazor/index.js +23 -0
- package/dist/sol/dex/blockrazor/send.d.ts +135 -0
- package/dist/sol/dex/blockrazor/send.js +254 -0
- package/dist/sol/dex/blockrazor/types.d.ts +191 -0
- package/dist/sol/dex/blockrazor/types.js +5 -0
- package/dist/sol/dex/index.d.ts +10 -0
- package/dist/sol/dex/index.js +16 -0
- package/dist/sol/dex/jup/client.d.ts +33 -0
- package/dist/sol/dex/jup/client.js +110 -0
- package/dist/sol/dex/jup/index.d.ts +16 -0
- package/dist/sol/dex/jup/index.js +148 -0
- package/dist/sol/dex/jup/legacy.d.ts +623 -0
- package/dist/sol/dex/jup/legacy.js +416 -0
- package/dist/sol/dex/jup/lend.d.ts +640 -0
- package/dist/sol/dex/jup/lend.js +603 -0
- package/dist/sol/dex/jup/portfolio.d.ts +362 -0
- package/dist/sol/dex/jup/portfolio.js +367 -0
- package/dist/sol/dex/jup/price.d.ts +173 -0
- package/dist/sol/dex/jup/price.js +220 -0
- package/dist/sol/dex/jup/recurring.d.ts +437 -0
- package/dist/sol/dex/jup/recurring.js +320 -0
- package/dist/sol/dex/jup/send.d.ts +282 -0
- package/dist/sol/dex/jup/send.js +295 -0
- package/dist/sol/dex/jup/studio.d.ts +457 -0
- package/dist/sol/dex/jup/studio.js +488 -0
- package/dist/sol/dex/jup/tokens.d.ts +767 -0
- package/dist/sol/dex/jup/tokens.js +697 -0
- package/dist/sol/dex/jup/trigger.d.ts +511 -0
- package/dist/sol/dex/jup/trigger.js +397 -0
- package/dist/sol/dex/jup/types.d.ts +433 -0
- package/dist/sol/dex/jup/types.js +5 -0
- package/dist/sol/dex/jup/ultra.d.ts +646 -0
- package/dist/sol/dex/jup/ultra.js +853 -0
- package/dist/sol/dex/meteora/client.d.ts +76 -0
- package/dist/sol/dex/meteora/client.js +219 -0
- package/dist/sol/dex/meteora/damm-v1-bundle.d.ts +61 -0
- package/dist/sol/dex/meteora/damm-v1-bundle.js +112 -0
- package/dist/sol/dex/meteora/damm-v1.d.ts +118 -0
- package/dist/sol/dex/meteora/damm-v1.js +315 -0
- package/dist/sol/dex/meteora/damm-v2-bundle.d.ts +82 -0
- package/dist/sol/dex/meteora/damm-v2-bundle.js +242 -0
- package/dist/sol/dex/meteora/damm-v2.d.ts +172 -0
- package/dist/sol/dex/meteora/damm-v2.js +632 -0
- package/dist/sol/dex/meteora/dbc-bundle.d.ts +123 -0
- package/dist/sol/dex/meteora/dbc-bundle.js +304 -0
- package/dist/sol/dex/meteora/dbc.d.ts +192 -0
- package/dist/sol/dex/meteora/dbc.js +619 -0
- package/dist/sol/dex/meteora/dlmm-bundle.d.ts +39 -0
- package/dist/sol/dex/meteora/dlmm-bundle.js +189 -0
- package/dist/sol/dex/meteora/dlmm.d.ts +157 -0
- package/dist/sol/dex/meteora/dlmm.js +671 -0
- package/dist/sol/dex/meteora/index.d.ts +25 -0
- package/dist/sol/dex/meteora/index.js +65 -0
- package/dist/sol/dex/meteora/types.d.ts +787 -0
- package/dist/sol/dex/meteora/types.js +110 -0
- package/dist/sol/dex/orca/index.d.ts +10 -0
- package/dist/sol/dex/orca/index.js +16 -0
- package/dist/sol/dex/orca/orca-bundle.d.ts +41 -0
- package/dist/sol/dex/orca/orca-bundle.js +173 -0
- package/dist/sol/dex/orca/orca.d.ts +65 -0
- package/dist/sol/dex/orca/orca.js +474 -0
- package/dist/sol/dex/orca/types.d.ts +263 -0
- package/dist/sol/dex/orca/types.js +38 -0
- package/dist/sol/dex/orca/wavebreak-bundle.d.ts +34 -0
- package/dist/sol/dex/orca/wavebreak-bundle.js +198 -0
- package/dist/sol/dex/orca/wavebreak-types.d.ts +227 -0
- package/dist/sol/dex/orca/wavebreak-types.js +23 -0
- package/dist/sol/dex/orca/wavebreak.d.ts +78 -0
- package/dist/sol/dex/orca/wavebreak.js +497 -0
- package/dist/sol/dex/pump/index.d.ts +9 -0
- package/dist/sol/dex/pump/index.js +14 -0
- package/dist/sol/dex/pump/pump-bundle.d.ts +92 -0
- package/dist/sol/dex/pump/pump-bundle.js +383 -0
- package/dist/sol/dex/pump/pump-swap-bundle.d.ts +103 -0
- package/dist/sol/dex/pump/pump-swap-bundle.js +380 -0
- package/dist/sol/dex/pump/pump-swap.d.ts +46 -0
- package/dist/sol/dex/pump/pump-swap.js +199 -0
- package/dist/sol/dex/pump/pump.d.ts +35 -0
- package/dist/sol/dex/pump/pump.js +352 -0
- package/dist/sol/dex/pump/types.d.ts +215 -0
- package/dist/sol/dex/pump/types.js +5 -0
- package/dist/sol/dex/raydium/index.d.ts +8 -0
- package/dist/sol/dex/raydium/index.js +12 -0
- package/dist/sol/dex/raydium/launchlab.d.ts +68 -0
- package/dist/sol/dex/raydium/launchlab.js +210 -0
- package/dist/sol/dex/raydium/raydium-bundle.d.ts +64 -0
- package/dist/sol/dex/raydium/raydium-bundle.js +324 -0
- package/dist/sol/dex/raydium/raydium.d.ts +40 -0
- package/dist/sol/dex/raydium/raydium.js +366 -0
- package/dist/sol/dex/raydium/types.d.ts +240 -0
- package/dist/sol/dex/raydium/types.js +5 -0
- package/dist/sol/index.d.ts +11 -0
- package/dist/sol/index.js +18 -0
- package/dist/sol/jito/bundle.d.ts +90 -0
- package/dist/sol/jito/bundle.js +263 -0
- package/dist/sol/jito/index.d.ts +7 -0
- package/dist/sol/jito/index.js +7 -0
- package/dist/sol/jito/tip.d.ts +51 -0
- package/dist/sol/jito/tip.js +83 -0
- package/dist/sol/jito/types.d.ts +100 -0
- package/dist/sol/jito/types.js +5 -0
- package/dist/sol/nozomi/client.d.ts +63 -0
- package/dist/sol/nozomi/client.js +222 -0
- package/dist/sol/nozomi/index.d.ts +8 -0
- package/dist/sol/nozomi/index.js +8 -0
- package/dist/sol/nozomi/tip.d.ts +50 -0
- package/dist/sol/nozomi/tip.js +80 -0
- package/dist/sol/nozomi/types.d.ts +96 -0
- package/dist/sol/nozomi/types.js +5 -0
- package/dist/sol/token/create-complete.d.ts +115 -0
- package/dist/sol/token/create-complete.js +235 -0
- package/dist/sol/token/create-token.d.ts +57 -0
- package/dist/sol/token/create-token.js +230 -0
- package/dist/sol/token/index.d.ts +9 -0
- package/dist/sol/token/index.js +14 -0
- package/dist/sol/token/metadata-upload.d.ts +86 -0
- package/dist/sol/token/metadata-upload.js +173 -0
- package/dist/sol/token/metadata.d.ts +92 -0
- package/dist/sol/token/metadata.js +274 -0
- package/dist/sol/token/types.d.ts +153 -0
- package/dist/sol/token/types.js +5 -0
- package/dist/sol/types.d.ts +176 -0
- package/dist/sol/types.js +7 -0
- package/dist/sol/utils/balance.d.ts +160 -0
- package/dist/sol/utils/balance.js +638 -0
- package/dist/sol/utils/connection.d.ts +78 -0
- package/dist/sol/utils/connection.js +168 -0
- package/dist/sol/utils/index.d.ts +9 -0
- package/dist/sol/utils/index.js +9 -0
- package/dist/sol/utils/lp-inspect.d.ts +75 -0
- package/dist/sol/utils/lp-inspect.js +235 -0
- package/dist/sol/utils/transfer.d.ts +196 -0
- package/dist/sol/utils/transfer.js +307 -0
- package/dist/sol/utils/wallet.d.ts +107 -0
- package/dist/sol/utils/wallet.js +210 -0
- package/package.json +44 -5
- package/README.zh-CN.pdf +0 -0
- package/dist/flap/portal-bundle-merkle/encryption.d.ts +0 -16
- package/dist/flap/portal-bundle-merkle/encryption.js +0 -146
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jupiter API 客户端
|
|
3
|
+
* @module sol/dex/jup/client
|
|
4
|
+
*/
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// 常量
|
|
7
|
+
// ============================================================================
|
|
8
|
+
/** Jupiter API 基础 URL */
|
|
9
|
+
export const JUP_API_BASE_URL = 'https://api.jup.ag';
|
|
10
|
+
/** 默认超时时间 (ms) */
|
|
11
|
+
export const DEFAULT_TIMEOUT = 30000;
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// 客户端管理
|
|
14
|
+
// ============================================================================
|
|
15
|
+
let defaultConfig = null;
|
|
16
|
+
/**
|
|
17
|
+
* 设置默认 Jupiter 配置
|
|
18
|
+
*/
|
|
19
|
+
export function setJupiterConfig(config) {
|
|
20
|
+
defaultConfig = config;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 获取 Jupiter 配置
|
|
24
|
+
*/
|
|
25
|
+
export function getJupiterConfig(config) {
|
|
26
|
+
const cfg = config || defaultConfig;
|
|
27
|
+
if (!cfg) {
|
|
28
|
+
throw new Error('Jupiter API key not configured. Call setJupiterConfig() first or pass config.');
|
|
29
|
+
}
|
|
30
|
+
return cfg;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 获取基础 URL
|
|
34
|
+
*/
|
|
35
|
+
export function getBaseUrl(config) {
|
|
36
|
+
const cfg = getJupiterConfig(config);
|
|
37
|
+
return cfg.baseUrl || JUP_API_BASE_URL;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 构建请求头
|
|
41
|
+
*/
|
|
42
|
+
export function buildHeaders(config) {
|
|
43
|
+
const cfg = getJupiterConfig(config);
|
|
44
|
+
return {
|
|
45
|
+
'x-api-key': cfg.apiKey,
|
|
46
|
+
'Content-Type': 'application/json',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 发送 GET 请求
|
|
51
|
+
*/
|
|
52
|
+
export async function jupGet(path, params, config) {
|
|
53
|
+
const baseUrl = getBaseUrl(config);
|
|
54
|
+
const headers = buildHeaders(config);
|
|
55
|
+
const timeout = config?.timeout || defaultConfig?.timeout || DEFAULT_TIMEOUT;
|
|
56
|
+
// 构建查询字符串
|
|
57
|
+
const searchParams = new URLSearchParams();
|
|
58
|
+
if (params) {
|
|
59
|
+
for (const [key, value] of Object.entries(params)) {
|
|
60
|
+
if (value !== undefined) {
|
|
61
|
+
searchParams.append(key, String(value));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const url = `${baseUrl}${path}${searchParams.toString() ? '?' + searchParams.toString() : ''}`;
|
|
66
|
+
const controller = new AbortController();
|
|
67
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
68
|
+
try {
|
|
69
|
+
const response = await fetch(url, {
|
|
70
|
+
method: 'GET',
|
|
71
|
+
headers,
|
|
72
|
+
signal: controller.signal,
|
|
73
|
+
});
|
|
74
|
+
if (!response.ok) {
|
|
75
|
+
const errorText = await response.text();
|
|
76
|
+
throw new Error(`Jupiter API error (${response.status}): ${errorText}`);
|
|
77
|
+
}
|
|
78
|
+
return await response.json();
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
clearTimeout(timeoutId);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 发送 POST 请求
|
|
86
|
+
*/
|
|
87
|
+
export async function jupPost(path, body, config) {
|
|
88
|
+
const baseUrl = getBaseUrl(config);
|
|
89
|
+
const headers = buildHeaders(config);
|
|
90
|
+
const timeout = config?.timeout || defaultConfig?.timeout || DEFAULT_TIMEOUT;
|
|
91
|
+
const url = `${baseUrl}${path}`;
|
|
92
|
+
const controller = new AbortController();
|
|
93
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
94
|
+
try {
|
|
95
|
+
const response = await fetch(url, {
|
|
96
|
+
method: 'POST',
|
|
97
|
+
headers,
|
|
98
|
+
body: JSON.stringify(body),
|
|
99
|
+
signal: controller.signal,
|
|
100
|
+
});
|
|
101
|
+
if (!response.ok) {
|
|
102
|
+
const errorText = await response.text();
|
|
103
|
+
throw new Error(`Jupiter API error (${response.status}): ${errorText}`);
|
|
104
|
+
}
|
|
105
|
+
return await response.json();
|
|
106
|
+
}
|
|
107
|
+
finally {
|
|
108
|
+
clearTimeout(timeoutId);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jupiter API 模块
|
|
3
|
+
* @module sol/dex/jup
|
|
4
|
+
*/
|
|
5
|
+
export * from './types.js';
|
|
6
|
+
export { JUP_API_BASE_URL, DEFAULT_TIMEOUT, setJupiterConfig, getJupiterConfig, } from './client.js';
|
|
7
|
+
export { getJupiterOrder, getJupiterQuote, getJupiterSwapTransaction, executeJupiterOrder, calculateSwapOutput, getTokenUsdPrice, getJupiterHoldings, getJupiterNativeHoldings, getJupiterTokenHolding, getJupiterTokenBalances, getJupiterBalances, getJupiterSolBalance, getJupiterTokenBalance, getJupiterTokenMints, getJupiterBalanceSummary, getJupiterShield, checkTokenSafety, batchCheckTokenSafety, hasTokenCriticalRisk, searchJupiterTokens, batchSearchTokens, getJupiterTokenInfo, getJupiterTokenPriceInfo, checkTokenTrust, getJupiterRouters, getJupiterRouterIds, } from './ultra.js';
|
|
8
|
+
export { type LendDepositParams, type LendWithdrawParams, type LendMintParams, type LendBurnParams, type LendRedeemParams, type LendTransactionResponse, type LendInstructionAccount, type LendInstructionResponse, type LendUnderlyingAsset, type LendLiquiditySupplyData, type LendTokenInfo, type LendPosition, type LendEarnings, buildLendDeposit, depositUsdc, depositSol, buildLendWithdraw, withdrawUsdc, withdrawSol, buildLendMint, buildLendBurn, buildLendRedeem, getLendDepositInstruction, getLendWithdrawInstruction, getLendMintInstruction, getLendBurnInstruction, getLendRedeemInstruction, getEarnTokens, getEarnTokenByAsset, getEarnApys, sharesToAssets, assetsToShares, getEarnPositions, getEarnPositionByAsset, getActiveEarnPositions, getEarnTotalValue, getEarnEarnings, getEarnEarningsByToken, getEarnEarningsSummary, LEND_SUPPORTED_ASSETS, } from './lend.js';
|
|
9
|
+
export { type TokenImageContentType, type TokenQuoteDecimal, type VestingPeriod, type VestingDuration, type FeeBps, type FeeDuration, type FeeMode, type LockedVestingParam, type BuildCurveByMarketCapParam, type FeeConfig, type CreateDbcPoolParams, type CreateDbcPoolResponse, type SubmitDbcPoolParams, type SubmitDbcPoolResponse, type DbcPoolAddressesResponse, type DbcFeeResponse, type ClaimDbcFeeParams, type ClaimDbcFeeResponse, createDbcPoolTx, createSimpleDbcPool, createDbcPoolWithVesting, submitDbcPool, getDbcPoolAddresses, getDbcPoolAddress, getDammV2PoolAddress, isTokenMigrated, getDbcFee, createClaimDbcFeeTx, claimAllDbcFee, generateTokenMetadata, uploadDbcTokenImage, uploadDbcTokenMetadata, QUOTE_MINTS, VESTING_DURATIONS, } from './studio.js';
|
|
10
|
+
export { type CraftSendParams, type CraftSendResponse, type CraftClawbackParams, type CraftClawbackResponse, type SendInvite, type InviteListResponse, craftSend, craftSendSol, craftSendUsdc, craftClawback, getPendingInvites, getAllPendingInvites, getInviteHistory, getAllInviteHistory, getPendingInvitesTotal, getExpiringInvites, isInviteExpired, getInviteTimeRemaining, filterSentInvites, filterReceivedInvites, } from './send.js';
|
|
11
|
+
export { type FetcherReport, type PortfolioElement, type PortfolioResponse, type GetPortfolioParams, type UnstakingJup, type StakedJupInfo, type PlatformLinks, type PlatformInfo, getPortfolio, getWalletPortfolio, getPortfolioTotalValue, getPortfolioByPlatform, getPortfolioByType, getPlatformValueSummary, getPortfolioSummary, getStakedJup, getStakedJupAmount, getUnstakingJupAmount, getUpcomingUnlocks, getPlatforms, getPlatformIds, getActivePlatforms, getPlatformsByTag, searchPlatforms, getPlatformById, filterByPlatform, filterByType, filterByMinValue, sortByValue, getTopElements, } from './portfolio.js';
|
|
12
|
+
export { type TokenPriceInfo, type PriceResponse, getTokenPricesV3, getSingleTokenPriceV3, getUsdPrice, batchGetUsdPrices, get24hPriceChange, calculateTokenValue, calculatePortfolioValue, COMMON_TOKENS, getSolPrice, getUsdcPrice, getCommonTokenPrices, } from './price.js';
|
|
13
|
+
export { type TokenStats, type TokenFirstPool, type TokenAudit, type TokenApy, type OrganicScoreLabel, type TokenInfoV2, type TokenTag, type TokenCategory, type TokenInterval, type TokenContentType, type TokenContentStatus, type TokenContentUser, type TokenContent, type TokenSummary, type TokenContentData, type TokenContentResponse, type TokenContentPagination, type TokenContentFeedData, type TokenContentFeedResponse, type TokenContentFeedParams, searchTokensV2, getTokenInfoV2, batchGetTokenInfoV2, getTokensByTag, getVerifiedTokensV2, getLstTokensV2, getTopTokensV2, getTopTradedTokensV2, getTrendingTokensV2, getTopOrganicTokensV2, getRecentTokensV2, getTokenContentV2, getSingleTokenContentV2, getTokenSummaryV2, getTokenTweetsV2, getTokenArticlesV2, getCookingTokenContentV2, getTokenContentFeedV2, getAllTokenContentFeedV2, getTokenFeedV2, hasTokenContent, getAllCitations, getTokenPriceV2, batchGetTokenPricesV2, getTokenMarketDataV2, checkTokenSafetyV2, getTokenStatsSummaryV2, searchTrendingTokensV2, filterVerifiedTokens, filterHighOrganicTokens, calculateBuySellRatio, } from './tokens.js';
|
|
14
|
+
export { type RecurringTimeParams, type RecurringPriceParams, type RecurringParamsTime, type RecurringParamsPrice, type RecurringParams, type RecurringType, type RecurringCreateOrderParams, type RecurringCreateOrderResponse, type RecurringCancelOrderParams, type RecurringCancelOrderResponse, type RecurringExecuteParams, type RecurringExecuteStatus, type RecurringExecuteResponse, type RecurringOrderListStatus, type RecurringTrade, type RecurringTimeOrder, type RecurringGetOrdersParams, type RecurringGetOrdersResponse, createRecurringOrder, createSimpleRecurringOrder, createDailyRecurring, createWeeklyRecurring, cancelRecurringOrder, cancelTimeRecurringOrder, executeRecurringOrder, getRecurringOrders, getActiveTimeRecurringOrders, getHistoryTimeRecurringOrders, getAllActiveTimeRecurringOrders, calculateTotalInvestment, calculateTotalDuration, estimateEndDate, RECURRING_INTERVALS, } from './recurring.js';
|
|
15
|
+
export { type TriggerOrderParams, type TriggerCreateOrderParams, type TriggerCreateOrderResponse, type TriggerCancelSingleOrderParams, type TriggerCancelSingleOrderResponse, type TriggerCancelOrdersParams, type TriggerCancelOrdersResponse, type TriggerExecuteParams, type TriggerExecuteStatus, type TriggerExecuteResponse, type TriggerOrderStatus, type TriggerOrderListStatus, type TriggerTrade, type TriggerOrderDetail, type TriggerGetOrdersResponse, type TriggerGetOrdersParams, createTriggerOrder, createSimpleTriggerOrder, cancelTriggerOrder, cancelTriggerOrders, cancelSingleTriggerOrder, executeTriggerOrder, createAndExecuteTriggerOrder, getTriggerOrders, getActiveTriggerOrders, getHistoryTriggerOrders, getAllActiveTriggerOrders, calculateTriggerPrice, calculateTakingAmount, } from './trigger.js';
|
|
16
|
+
export { type LegacySwapMode, type LegacyInstructionVersion, type LegacySwapInfo, type LegacyRoutePlan, type LegacyPlatformFee, type LegacyQuoteParams, type LegacyQuoteResponse, type LegacySwapParams, type LegacySwapResponse, type PriorityLevel, type PriorityLevelWithMaxLamports, type JitoTipLamports, type JitoTipLamportsWithPayer, type PrioritizationFeeLamports, type InstructionAccount, type Instruction, type LegacySwapInstructionsResponse, type ProgramIdToLabelMap, getLegacyQuote, getLegacyQuoteSimple, buildLegacySwap, getLegacySwapInstructions, getProgramIdToLabel, getAllDexLabels, getProgramIdByLabel, getLabelByProgramId, searchDex, getRouteLabels, getRouteHops, getQuoteSummary, compareQuotes, getBestLegacyQuote, } from './legacy.js';
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jupiter API 模块
|
|
3
|
+
* @module sol/dex/jup
|
|
4
|
+
*/
|
|
5
|
+
// 类型导出
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
// 客户端
|
|
8
|
+
export { JUP_API_BASE_URL, DEFAULT_TIMEOUT, setJupiterConfig, getJupiterConfig, } from './client.js';
|
|
9
|
+
// Ultra API
|
|
10
|
+
export {
|
|
11
|
+
// Order
|
|
12
|
+
getJupiterOrder, getJupiterQuote, getJupiterSwapTransaction, executeJupiterOrder, calculateSwapOutput, getTokenUsdPrice,
|
|
13
|
+
// Holdings (详细版)
|
|
14
|
+
getJupiterHoldings, getJupiterNativeHoldings, getJupiterTokenHolding, getJupiterTokenBalances,
|
|
15
|
+
// Balances (轻量版)
|
|
16
|
+
getJupiterBalances, getJupiterSolBalance, getJupiterTokenBalance, getJupiterTokenMints, getJupiterBalanceSummary,
|
|
17
|
+
// Shield
|
|
18
|
+
getJupiterShield, checkTokenSafety, batchCheckTokenSafety, hasTokenCriticalRisk,
|
|
19
|
+
// Search
|
|
20
|
+
searchJupiterTokens, batchSearchTokens, getJupiterTokenInfo, getJupiterTokenPriceInfo, checkTokenTrust,
|
|
21
|
+
// Routers
|
|
22
|
+
getJupiterRouters, getJupiterRouterIds, } from './ultra.js';
|
|
23
|
+
// Lend API (Jupiter Earn)
|
|
24
|
+
export {
|
|
25
|
+
// Deposit (按数量)
|
|
26
|
+
buildLendDeposit, depositUsdc, depositSol,
|
|
27
|
+
// Withdraw (按数量)
|
|
28
|
+
buildLendWithdraw, withdrawUsdc, withdrawSol,
|
|
29
|
+
// Mint/Burn/Redeem (按份额)
|
|
30
|
+
buildLendMint, buildLendBurn, buildLendRedeem,
|
|
31
|
+
// Instructions
|
|
32
|
+
getLendDepositInstruction, getLendWithdrawInstruction, getLendMintInstruction, getLendBurnInstruction, getLendRedeemInstruction,
|
|
33
|
+
// Tokens
|
|
34
|
+
getEarnTokens, getEarnTokenByAsset, getEarnApys, sharesToAssets, assetsToShares,
|
|
35
|
+
// Positions
|
|
36
|
+
getEarnPositions, getEarnPositionByAsset, getActiveEarnPositions, getEarnTotalValue,
|
|
37
|
+
// Earnings
|
|
38
|
+
getEarnEarnings, getEarnEarningsByToken, getEarnEarningsSummary,
|
|
39
|
+
// Constants
|
|
40
|
+
LEND_SUPPORTED_ASSETS, } from './lend.js';
|
|
41
|
+
// Studio API V1 (DBC Pool Creation)
|
|
42
|
+
export {
|
|
43
|
+
// Create DBC Pool
|
|
44
|
+
createDbcPoolTx, createSimpleDbcPool, createDbcPoolWithVesting,
|
|
45
|
+
// Submit DBC Pool
|
|
46
|
+
submitDbcPool,
|
|
47
|
+
// Pool Addresses
|
|
48
|
+
getDbcPoolAddresses, getDbcPoolAddress, getDammV2PoolAddress, isTokenMigrated,
|
|
49
|
+
// DBC Fee
|
|
50
|
+
getDbcFee, createClaimDbcFeeTx, claimAllDbcFee,
|
|
51
|
+
// Helpers
|
|
52
|
+
generateTokenMetadata, uploadDbcTokenImage, uploadDbcTokenMetadata,
|
|
53
|
+
// Constants
|
|
54
|
+
QUOTE_MINTS, VESTING_DURATIONS, } from './studio.js';
|
|
55
|
+
// Send API V1
|
|
56
|
+
export {
|
|
57
|
+
// Craft Send
|
|
58
|
+
craftSend, craftSendSol, craftSendUsdc,
|
|
59
|
+
// Craft Clawback
|
|
60
|
+
craftClawback,
|
|
61
|
+
// Pending Invites
|
|
62
|
+
getPendingInvites, getAllPendingInvites,
|
|
63
|
+
// Invite History
|
|
64
|
+
getInviteHistory, getAllInviteHistory,
|
|
65
|
+
// Helpers
|
|
66
|
+
getPendingInvitesTotal, getExpiringInvites, isInviteExpired, getInviteTimeRemaining, filterSentInvites, filterReceivedInvites, } from './send.js';
|
|
67
|
+
// Portfolio API V1
|
|
68
|
+
export {
|
|
69
|
+
// Get Portfolio
|
|
70
|
+
getPortfolio, getWalletPortfolio,
|
|
71
|
+
// Summary
|
|
72
|
+
getPortfolioTotalValue, getPortfolioByPlatform, getPortfolioByType, getPlatformValueSummary, getPortfolioSummary,
|
|
73
|
+
// Staked JUP
|
|
74
|
+
getStakedJup, getStakedJupAmount, getUnstakingJupAmount, getUpcomingUnlocks,
|
|
75
|
+
// Platforms
|
|
76
|
+
getPlatforms, getPlatformIds, getActivePlatforms, getPlatformsByTag, searchPlatforms, getPlatformById,
|
|
77
|
+
// Filters
|
|
78
|
+
filterByPlatform, filterByType, filterByMinValue, sortByValue, getTopElements, } from './portfolio.js';
|
|
79
|
+
// Price API V3
|
|
80
|
+
export {
|
|
81
|
+
// Get Prices
|
|
82
|
+
getTokenPricesV3, getSingleTokenPriceV3, getUsdPrice, batchGetUsdPrices, get24hPriceChange,
|
|
83
|
+
// Calculate Value
|
|
84
|
+
calculateTokenValue, calculatePortfolioValue,
|
|
85
|
+
// Common Tokens
|
|
86
|
+
COMMON_TOKENS, getSolPrice, getUsdcPrice, getCommonTokenPrices, } from './price.js';
|
|
87
|
+
// Tokens API V2 (Beta)
|
|
88
|
+
export {
|
|
89
|
+
// Search
|
|
90
|
+
searchTokensV2, getTokenInfoV2, batchGetTokenInfoV2,
|
|
91
|
+
// Tag
|
|
92
|
+
getTokensByTag, getVerifiedTokensV2, getLstTokensV2,
|
|
93
|
+
// Category (Top Tokens)
|
|
94
|
+
getTopTokensV2, getTopTradedTokensV2, getTrendingTokensV2, getTopOrganicTokensV2,
|
|
95
|
+
// Recent
|
|
96
|
+
getRecentTokensV2,
|
|
97
|
+
// Content
|
|
98
|
+
getTokenContentV2, getSingleTokenContentV2, getTokenSummaryV2, getTokenTweetsV2, getTokenArticlesV2, getCookingTokenContentV2, getTokenContentFeedV2, getAllTokenContentFeedV2, getTokenFeedV2, hasTokenContent, getAllCitations,
|
|
99
|
+
// Price
|
|
100
|
+
getTokenPriceV2, batchGetTokenPricesV2,
|
|
101
|
+
// Market Data
|
|
102
|
+
getTokenMarketDataV2,
|
|
103
|
+
// Safety
|
|
104
|
+
checkTokenSafetyV2,
|
|
105
|
+
// Stats
|
|
106
|
+
getTokenStatsSummaryV2,
|
|
107
|
+
// Trending (by organic score)
|
|
108
|
+
searchTrendingTokensV2,
|
|
109
|
+
// Filters
|
|
110
|
+
filterVerifiedTokens, filterHighOrganicTokens,
|
|
111
|
+
// Helpers
|
|
112
|
+
calculateBuySellRatio, } from './tokens.js';
|
|
113
|
+
// Recurring API (定投/DCA)
|
|
114
|
+
export {
|
|
115
|
+
// Create Order
|
|
116
|
+
createRecurringOrder, createSimpleRecurringOrder, createDailyRecurring, createWeeklyRecurring,
|
|
117
|
+
// Cancel Order
|
|
118
|
+
cancelRecurringOrder, cancelTimeRecurringOrder,
|
|
119
|
+
// Execute
|
|
120
|
+
executeRecurringOrder,
|
|
121
|
+
// Get Orders
|
|
122
|
+
getRecurringOrders, getActiveTimeRecurringOrders, getHistoryTimeRecurringOrders, getAllActiveTimeRecurringOrders,
|
|
123
|
+
// Helpers
|
|
124
|
+
calculateTotalInvestment, calculateTotalDuration, estimateEndDate,
|
|
125
|
+
// Constants
|
|
126
|
+
RECURRING_INTERVALS, } from './recurring.js';
|
|
127
|
+
// Trigger API (限价单)
|
|
128
|
+
export {
|
|
129
|
+
// Create Order
|
|
130
|
+
createTriggerOrder, createSimpleTriggerOrder,
|
|
131
|
+
// Cancel Order
|
|
132
|
+
cancelTriggerOrder, cancelTriggerOrders, cancelSingleTriggerOrder,
|
|
133
|
+
// Execute
|
|
134
|
+
executeTriggerOrder, createAndExecuteTriggerOrder,
|
|
135
|
+
// Get Orders
|
|
136
|
+
getTriggerOrders, getActiveTriggerOrders, getHistoryTriggerOrders, getAllActiveTriggerOrders,
|
|
137
|
+
// Helpers
|
|
138
|
+
calculateTriggerPrice, calculateTakingAmount, } from './trigger.js';
|
|
139
|
+
// Legacy Swap API
|
|
140
|
+
export {
|
|
141
|
+
// Quote
|
|
142
|
+
getLegacyQuote, getLegacyQuoteSimple,
|
|
143
|
+
// Swap
|
|
144
|
+
buildLegacySwap, getLegacySwapInstructions,
|
|
145
|
+
// Program ID to Label
|
|
146
|
+
getProgramIdToLabel, getAllDexLabels, getProgramIdByLabel, getLabelByProgramId, searchDex,
|
|
147
|
+
// Helpers
|
|
148
|
+
getRouteLabels, getRouteHops, getQuoteSummary, compareQuotes, getBestLegacyQuote, } from './legacy.js';
|