@shogun-sdk/intents-sdk 1.2.4 → 1.2.6-test
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/README.md +3 -19
- package/dist/esm/chains.js +3 -0
- package/dist/esm/chains.js.map +1 -1
- package/dist/esm/constants.js +13 -4
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/core/evm/chain-provider.js +2 -1
- package/dist/esm/core/evm/chain-provider.js.map +1 -1
- package/dist/esm/core/evm/cross-chain-limit-order.js +1 -1
- package/dist/esm/core/evm/cross-chain-limit-order.js.map +1 -1
- package/dist/esm/core/evm/permit2-signature-transfer.js +15 -0
- package/dist/esm/core/evm/permit2-signature-transfer.js.map +1 -0
- package/dist/esm/core/evm/single-chain-dca-order.js +1 -1
- package/dist/esm/core/evm/single-chain-dca-order.js.map +1 -1
- package/dist/esm/core/evm/single-chain-limit-order.js +1 -1
- package/dist/esm/core/evm/single-chain-limit-order.js.map +1 -1
- package/dist/esm/core/solana/dca/single-chain-dca-order.js +3 -2
- package/dist/esm/core/solana/dca/single-chain-dca-order.js.map +1 -1
- package/dist/esm/core/solana/dca/single-chain-limit-order.js +3 -2
- package/dist/esm/core/solana/dca/single-chain-limit-order.js.map +1 -1
- package/dist/esm/core/solana/utils.js +14 -4
- package/dist/esm/core/solana/utils.js.map +1 -1
- package/dist/esm/core/sui/single-chain-dca-order.js +2 -1
- package/dist/esm/core/sui/single-chain-dca-order.js.map +1 -1
- package/dist/esm/core/sui/single-chain-limit-order.js +2 -1
- package/dist/esm/core/sui/single-chain-limit-order.js.map +1 -1
- package/dist/esm/index.js +6 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/token-list.js +2 -0
- package/dist/esm/types/token-list.js.map +1 -0
- package/dist/esm/utils/defillama.js +1 -0
- package/dist/esm/utils/defillama.js.map +1 -1
- package/dist/esm/utils/quote/aggregator.js +158 -42
- package/dist/esm/utils/quote/aggregator.js.map +1 -1
- package/dist/esm/utils/quote/paraswap.js +1 -0
- package/dist/esm/utils/quote/paraswap.js.map +1 -1
- package/dist/esm/utils/quote/pumpfun/estimations.js +169 -0
- package/dist/esm/utils/quote/pumpfun/estimations.js.map +1 -0
- package/dist/esm/utils/quote/pumpfun/estimations_amm.js +130 -0
- package/dist/esm/utils/quote/pumpfun/estimations_amm.js.map +1 -0
- package/dist/esm/utils/quote/pumpfun/index.js +198 -0
- package/dist/esm/utils/quote/pumpfun/index.js.map +1 -0
- package/dist/esm/utils/quote/pumpfun/models.js +70 -0
- package/dist/esm/utils/quote/pumpfun/models.js.map +1 -0
- package/dist/esm/utils/quote/pumpfun/utils.js +269 -0
- package/dist/esm/utils/quote/pumpfun/utils.js.map +1 -0
- package/dist/esm/utils/quote/raydium.js +336 -0
- package/dist/esm/utils/quote/raydium.js.map +1 -0
- package/dist/esm/utils/quote/stablecoins-tokens.js +1 -0
- package/dist/esm/utils/quote/stablecoins-tokens.js.map +1 -1
- package/dist/esm/utils/quote/utils.js +8 -0
- package/dist/esm/utils/quote/utils.js.map +1 -0
- package/dist/esm/utils/tokens/index.js +37 -0
- package/dist/esm/utils/tokens/index.js.map +1 -0
- package/dist/types/chains.d.ts +4 -2
- package/dist/types/chains.d.ts.map +1 -1
- package/dist/types/constants.d.ts +5 -4
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/core/evm/chain-provider.d.ts.map +1 -1
- package/dist/types/core/evm/permit2-signature-transfer.d.ts +3 -0
- package/dist/types/core/evm/permit2-signature-transfer.d.ts.map +1 -0
- package/dist/types/core/solana/dca/single-chain-dca-order.d.ts +1 -2
- package/dist/types/core/solana/dca/single-chain-dca-order.d.ts.map +1 -1
- package/dist/types/core/solana/dca/single-chain-limit-order.d.ts +1 -2
- package/dist/types/core/solana/dca/single-chain-limit-order.d.ts.map +1 -1
- package/dist/types/core/solana/utils.d.ts +2 -0
- package/dist/types/core/solana/utils.d.ts.map +1 -1
- package/dist/types/core/sui/single-chain-dca-order.d.ts.map +1 -1
- package/dist/types/core/sui/single-chain-limit-order.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/token-list.d.ts +30 -0
- package/dist/types/types/token-list.d.ts.map +1 -0
- package/dist/types/utils/defillama.d.ts +1 -0
- package/dist/types/utils/defillama.d.ts.map +1 -1
- package/dist/types/utils/quote/aggregator.d.ts +42 -5
- package/dist/types/utils/quote/aggregator.d.ts.map +1 -1
- package/dist/types/utils/quote/paraswap.d.ts.map +1 -1
- package/dist/types/utils/quote/pumpfun/estimations.d.ts +30 -0
- package/dist/types/utils/quote/pumpfun/estimations.d.ts.map +1 -0
- package/dist/types/utils/quote/pumpfun/estimations_amm.d.ts +49 -0
- package/dist/types/utils/quote/pumpfun/estimations_amm.d.ts.map +1 -0
- package/dist/types/utils/quote/pumpfun/index.d.ts +10 -0
- package/dist/types/utils/quote/pumpfun/index.d.ts.map +1 -0
- package/dist/types/utils/quote/pumpfun/models.d.ts +94 -0
- package/dist/types/utils/quote/pumpfun/models.d.ts.map +1 -0
- package/dist/types/utils/quote/pumpfun/utils.d.ts +50 -0
- package/dist/types/utils/quote/pumpfun/utils.d.ts.map +1 -0
- package/dist/types/utils/quote/raydium.d.ts +98 -0
- package/dist/types/utils/quote/raydium.d.ts.map +1 -0
- package/dist/types/utils/quote/stablecoins-tokens.d.ts.map +1 -1
- package/dist/types/utils/quote/utils.d.ts +5 -0
- package/dist/types/utils/quote/utils.d.ts.map +1 -0
- package/dist/types/utils/tokens/index.d.ts +20 -0
- package/dist/types/utils/tokens/index.d.ts.map +1 -0
- package/package.json +20 -18
- package/src/chains.ts +3 -0
- package/src/constants.ts +16 -6
- package/src/core/evm/chain-provider.ts +2 -1
- package/src/core/evm/cross-chain-limit-order.ts +1 -1
- package/src/core/evm/permit2-signature-transfer.ts +15 -0
- package/src/core/evm/single-chain-dca-order.ts +1 -1
- package/src/core/evm/single-chain-limit-order.ts +1 -1
- package/src/core/solana/dca/single-chain-dca-order.ts +3 -3
- package/src/core/solana/dca/single-chain-limit-order.ts +3 -2
- package/src/core/solana/utils.ts +24 -12
- package/src/core/sui/single-chain-dca-order.ts +2 -2
- package/src/core/sui/single-chain-limit-order.ts +2 -2
- package/src/index.ts +14 -4
- package/src/types/token-list.ts +35 -0
- package/src/utils/defillama.ts +1 -0
- package/src/utils/quote/aggregator.ts +210 -55
- package/src/utils/quote/paraswap.ts +1 -0
- package/src/utils/quote/pumpfun/estimations.ts +206 -0
- package/src/utils/quote/pumpfun/estimations_amm.ts +165 -0
- package/src/utils/quote/pumpfun/index.ts +266 -0
- package/src/utils/quote/pumpfun/models.ts +163 -0
- package/src/utils/quote/pumpfun/utils.ts +343 -0
- package/src/utils/quote/raydium.ts +506 -0
- package/src/utils/quote/stablecoins-tokens.ts +1 -0
- package/src/utils/quote/utils.ts +8 -0
- package/src/utils/tokens/index.ts +38 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defillama.d.ts","sourceRoot":"","sources":["../../../src/utils/defillama.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAQ5D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"defillama.d.ts","sourceRoot":"","sources":["../../../src/utils/defillama.ts"],"names":[],"mappings":"AAAA,OAAO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type SingleChainQuoteParams = {
|
|
|
9
9
|
tokenIn: string;
|
|
10
10
|
tokenOut: string;
|
|
11
11
|
slippageBps?: number;
|
|
12
|
+
provider?: RouteProvider;
|
|
12
13
|
};
|
|
13
|
-
export type RouteProvider = 'paraswap' | 'jupiter' | 'aftermath' | 'liquidswap';
|
|
14
|
+
export type RouteProvider = 'paraswap' | 'jupiter' | 'aftermath' | 'liquidswap' | 'raydium' | 'pumpfun';
|
|
14
15
|
export type Quote = {
|
|
15
16
|
amountIn: bigint;
|
|
16
17
|
amountOut: bigint;
|
|
18
|
+
amountOutMin?: bigint;
|
|
17
19
|
amountOutUsd: number;
|
|
18
20
|
amountInUsd: number;
|
|
19
21
|
slippage: number;
|
|
@@ -21,6 +23,12 @@ export type Quote = {
|
|
|
21
23
|
provider: RouteProvider;
|
|
22
24
|
rawQuote: any;
|
|
23
25
|
};
|
|
26
|
+
export type SimpleQuote = {
|
|
27
|
+
amountIn: bigint;
|
|
28
|
+
amountOut: bigint;
|
|
29
|
+
amountOutMin?: bigint;
|
|
30
|
+
slippage: number;
|
|
31
|
+
};
|
|
24
32
|
export type IntentsQuoteParams = {
|
|
25
33
|
sourceChainId: ChainID;
|
|
26
34
|
destChainId: ChainID;
|
|
@@ -28,7 +36,7 @@ export type IntentsQuoteParams = {
|
|
|
28
36
|
tokenIn: string;
|
|
29
37
|
tokenOut: string;
|
|
30
38
|
};
|
|
31
|
-
export type
|
|
39
|
+
export type QuoteResponseInternal = {
|
|
32
40
|
amountInUsd: number;
|
|
33
41
|
estimatedAmountInAsMinStablecoinAmount: bigint;
|
|
34
42
|
estimatedAmountOut: bigint;
|
|
@@ -36,12 +44,34 @@ export type QuoteResponse = {
|
|
|
36
44
|
estimatedAmountOutReduced: bigint;
|
|
37
45
|
estimatedAmountOutUsdReduced: number;
|
|
38
46
|
};
|
|
47
|
+
export type QuoteResponse = QuoteResponseInternal & {
|
|
48
|
+
/** Metadata for source token */
|
|
49
|
+
tokenIn: {
|
|
50
|
+
address: string;
|
|
51
|
+
chainId: ChainID;
|
|
52
|
+
};
|
|
53
|
+
/** Metadata for destination token */
|
|
54
|
+
tokenOut: {
|
|
55
|
+
address: string;
|
|
56
|
+
chainId: ChainID;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
39
59
|
export declare class QuoteProvider {
|
|
40
60
|
private static readonly DEFAULT_BRIDGE_TOKEN;
|
|
41
61
|
private static readonly DEFAULT_BRIDGE_TOKEN_DECIMALS;
|
|
42
|
-
static getQuoteFromDefillama(params: IntentsQuoteParams): Promise<QuoteResponse>;
|
|
43
|
-
static getQuoteWithDefillamaFallback(params: IntentsQuoteParams): Promise<QuoteResponse>;
|
|
44
62
|
static getQuote(params: IntentsQuoteParams): Promise<QuoteResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Get a quote for Solana with explicit provider selection
|
|
65
|
+
* @param params - Quote parameters including provider preference
|
|
66
|
+
* @returns Quote response
|
|
67
|
+
*/
|
|
68
|
+
static getSolanaQuote(params: {
|
|
69
|
+
amount: bigint;
|
|
70
|
+
tokenIn: string;
|
|
71
|
+
tokenOut: string;
|
|
72
|
+
slippageBps?: number;
|
|
73
|
+
provider?: 'jupiter' | 'raydium' | 'pumpfun';
|
|
74
|
+
}): Promise<Quote>;
|
|
45
75
|
private static getQuoteFromRouters;
|
|
46
76
|
static getSingleChainQuote(params: SingleChainQuoteParams): Promise<Quote>;
|
|
47
77
|
static transformLiquidSwapQuote(liquidSwapQuote: LiquidSwapQuoteResponse): Quote;
|
|
@@ -56,9 +86,16 @@ export declare class QuoteProvider {
|
|
|
56
86
|
}>;
|
|
57
87
|
protected static getParaswapQuote(params: SingleChainQuoteParams): Promise<SwapEstimateResult>;
|
|
58
88
|
protected static getAftermathQuote(params: SingleChainQuoteParams): Promise<RouterCompleteTradeRoute>;
|
|
89
|
+
protected static getRaydiumQuote(params: SingleChainQuoteParams): Promise<Quote>;
|
|
90
|
+
protected static getPumpFunQuote(params: SingleChainQuoteParams): Promise<Quote>;
|
|
59
91
|
private static transformAftermathQuote;
|
|
60
92
|
private static transformParaswapQuote;
|
|
61
|
-
|
|
93
|
+
static transformJupiterQuote({ quote }: {
|
|
94
|
+
quote: JupiterQuoteResponse;
|
|
95
|
+
}): Quote;
|
|
96
|
+
private static transformRaydiumQuote;
|
|
62
97
|
}
|
|
98
|
+
export declare function quoteToSimpleQuote(quote: Quote): SimpleQuote;
|
|
99
|
+
export declare function simpleQuoteToQuote(simpleQuote: SimpleQuote, provider: RouteProvider): Quote;
|
|
63
100
|
export {};
|
|
64
101
|
//# sourceMappingURL=aggregator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aggregator.d.ts","sourceRoot":"","sources":["../../../../src/utils/quote/aggregator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAsC,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAE,KAAK,aAAa,IAAI,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAyB,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAG/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"aggregator.d.ts","sourceRoot":"","sources":["../../../../src/utils/quote/aggregator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAsC,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAAE,KAAK,aAAa,IAAI,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAyB,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAG/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAA2B,KAAK,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAQxF,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,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BtC,OAAO,CAAC,MAAM,CAAC,sBAAsB;WAavB,qBAAqB,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,oBAAoB,CAAA;KAAE,GAAG,KAAK;IA6BtF,OAAO,CAAC,MAAM,CAAC,qBAAqB;CA0BrC;AAeD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAO5D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,GAAG,KAAK,CAY3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paraswap.d.ts","sourceRoot":"","sources":["../../../../src/utils/quote/paraswap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAW,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"paraswap.d.ts","sourceRoot":"","sources":["../../../../src/utils/quote/paraswap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAW,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAclE,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,qBAAa,qBAAqB;IAChC,SAAS,CAAC,OAAO,EAAE,iBAAiB,CAAC;gBAEzB,OAAO,EAAE,iBAAiB;YAIxB,gBAAgB;YAYhB,QAAQ;IAsBT,iBAAiB,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAgBhG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { BondingCurve, GlobalAccount } from './models.js';
|
|
2
|
+
export declare const BPS_DEN = 10000n;
|
|
3
|
+
export declare enum PreBondedTradeType {
|
|
4
|
+
BuyExactIn = "BuyExactIn",
|
|
5
|
+
BuyExactOut = "BuyExactOut",
|
|
6
|
+
SellExactIn = "SellExactIn",
|
|
7
|
+
SellExactOut = "SellExactOut"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Buy exact SOL in, get tokens out.
|
|
11
|
+
* Fee is deducted from SOL before the swap calculation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buyExactIn(curve: BondingCurve, solIn: bigint, feeBps: bigint): bigint;
|
|
14
|
+
/**
|
|
15
|
+
* Sell exact tokens in, get SOL out.
|
|
16
|
+
* Fee is deducted from SOL output.
|
|
17
|
+
*/
|
|
18
|
+
export declare function sellExactIn(curve: BondingCurve, tokensIn: bigint, feeBps: bigint): bigint;
|
|
19
|
+
/**
|
|
20
|
+
* Buy exact tokens out, calculate required SOL in.
|
|
21
|
+
* This calculates the EXACT amount needed, but doesn't account for slippage buffer.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buyExactOut(curve: BondingCurve, tokensOut: bigint, feeBps: bigint): bigint;
|
|
24
|
+
/**
|
|
25
|
+
* Sell exact SOL out, calculate required tokens in.
|
|
26
|
+
* This calculates the EXACT amount needed, but doesn't account for slippage buffer.
|
|
27
|
+
*/
|
|
28
|
+
export declare function sellExactOut(curve: BondingCurve, solOut: bigint, feeBps: bigint): bigint;
|
|
29
|
+
export declare function estimatePumpFunPrebonded(bondingCurve: BondingCurve, globalAccount: GlobalAccount, amount: bigint, tradeType: PreBondedTradeType): bigint;
|
|
30
|
+
//# sourceMappingURL=estimations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"estimations.d.ts","sourceRoot":"","sources":["../../../../../src/utils/quote/pumpfun/estimations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE/D,eAAO,MAAM,OAAO,SAAS,CAAC;AAE9B,oBAAY,kBAAkB;IAC5B,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;CAC9B;AAuBD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAsBrF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAqBzF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgC1F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAkDxF;AAED,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,kBAAkB,GAC5B,MAAM,CAmBR"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { GlobalConfig, TokenAccount } from './models.js';
|
|
2
|
+
import { PreBondedTradeType } from './estimations.js';
|
|
3
|
+
/**
|
|
4
|
+
* Calculate base tokens received when buying with exact quote amount
|
|
5
|
+
* @param quoteIn Amount of quote tokens (SOL) to spend
|
|
6
|
+
* @param baseRes Base token reserve
|
|
7
|
+
* @param quoteRes Quote token reserve
|
|
8
|
+
* @param feeBps Fee in basis points
|
|
9
|
+
* @returns Amount of base tokens received
|
|
10
|
+
*/
|
|
11
|
+
export declare function buyBaseExactInQuote(quoteIn: bigint, baseRes: bigint, quoteRes: bigint, feeBps: bigint): bigint;
|
|
12
|
+
/**
|
|
13
|
+
* Calculate quote tokens needed to buy exact base amount
|
|
14
|
+
* @param baseOut Desired amount of base tokens
|
|
15
|
+
* @param baseRes Base token reserve
|
|
16
|
+
* @param quoteRes Quote token reserve
|
|
17
|
+
* @param feeBps Fee in basis points
|
|
18
|
+
* @returns Amount of quote tokens needed
|
|
19
|
+
*/
|
|
20
|
+
export declare function buyBaseExactOutQuote(baseOut: bigint, baseRes: bigint, quoteRes: bigint, feeBps: bigint): bigint;
|
|
21
|
+
/**
|
|
22
|
+
* Calculate quote tokens received when selling exact base amount
|
|
23
|
+
* @param baseIn Amount of base tokens to sell
|
|
24
|
+
* @param baseRes Base token reserve
|
|
25
|
+
* @param quoteRes Quote token reserve
|
|
26
|
+
* @param feeBps Fee in basis points
|
|
27
|
+
* @returns Amount of quote tokens received
|
|
28
|
+
*/
|
|
29
|
+
export declare function sellBaseExactInQuote(baseIn: bigint, baseRes: bigint, quoteRes: bigint, feeBps: bigint): bigint;
|
|
30
|
+
/**
|
|
31
|
+
* Calculate base tokens needed to receive exact quote amount
|
|
32
|
+
* @param quoteOut Desired amount of quote tokens
|
|
33
|
+
* @param baseRes Base token reserve
|
|
34
|
+
* @param quoteRes Quote token reserve
|
|
35
|
+
* @param feeBps Fee in basis points
|
|
36
|
+
* @returns Amount of base tokens needed
|
|
37
|
+
*/
|
|
38
|
+
export declare function sellBaseExactOutQuote(quoteOut: bigint, baseRes: bigint, quoteRes: bigint, feeBps: bigint): bigint;
|
|
39
|
+
/**
|
|
40
|
+
* Main estimation function for PumpFun AMM
|
|
41
|
+
* @param baseToken Base token account info
|
|
42
|
+
* @param quoteToken Quote token account info
|
|
43
|
+
* @param globalConfig Global configuration with fee settings
|
|
44
|
+
* @param amount Amount to trade
|
|
45
|
+
* @param tradeType Type of trade (BuyExactIn, BuyExactOut, SellExactIn, SellExactOut)
|
|
46
|
+
* @returns Estimated output/input amount
|
|
47
|
+
*/
|
|
48
|
+
export declare function estimatePumpFunAmm(baseToken: TokenAccount, quoteToken: TokenAccount, globalConfig: GlobalConfig, amount: bigint, tradeType: PreBondedTradeType): bigint;
|
|
49
|
+
//# sourceMappingURL=estimations_amm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"estimations_amm.d.ts","sourceRoot":"","sources":["../../../../../src/utils/quote/pumpfun/estimations_amm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAW,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAgE/D;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAM9G;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAM/G;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAM9G;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMjH;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,YAAY,EACvB,UAAU,EAAE,YAAY,EACxB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,kBAAkB,GAC5B,MAAM,CAoBR"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Address } from '@solana/kit';
|
|
2
|
+
import { type SimpleQuote } from '../aggregator.js';
|
|
3
|
+
import type { RaydiumPumpQuoteParams } from '../raydium.js';
|
|
4
|
+
import type { BondingCurve } from './models.js';
|
|
5
|
+
export declare class PumpFunQuoteProvider {
|
|
6
|
+
getQuote(raydiumParams: RaydiumPumpQuoteParams): Promise<SimpleQuote>;
|
|
7
|
+
getTokensBondingCurve(inputMint: Address, outputMint: Address): Promise<[BondingCurve | null, BondingCurve | null]>;
|
|
8
|
+
private ensureSinglePrebondedToken;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/utils/quote/pumpfun/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAchD,qBAAa,oBAAoB;IAClB,QAAQ,CAAC,aAAa,EAAE,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC;IAmN5E,qBAAqB,CACzB,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,OAAO,GAClB,OAAO,CAAC,CAAC,YAAY,GAAG,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC,CAAC;IAmBtD,OAAO,CAAC,0BAA0B;CAcnC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type Address, type Decoder } from '@solana/kit';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a Solana Token Account
|
|
4
|
+
*/
|
|
5
|
+
export interface TokenAccount {
|
|
6
|
+
mint: Address;
|
|
7
|
+
owner: Address;
|
|
8
|
+
amount: bigint;
|
|
9
|
+
delegate: Address | null;
|
|
10
|
+
state: number;
|
|
11
|
+
isNative: bigint | null;
|
|
12
|
+
delegatedAmount: bigint;
|
|
13
|
+
closeAuthority: Address | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* BondingCurve structure matching the Rust implementation
|
|
17
|
+
* This mirrors the on-chain account layout
|
|
18
|
+
*/
|
|
19
|
+
export interface BondingCurve {
|
|
20
|
+
virtualTokenReserves: bigint;
|
|
21
|
+
virtualSolReserves: bigint;
|
|
22
|
+
realTokenReserves: bigint;
|
|
23
|
+
realSolReserves: bigint;
|
|
24
|
+
tokenTotalSupply: bigint;
|
|
25
|
+
complete: boolean;
|
|
26
|
+
creator: Address;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* GlobalAccount structure matching the Rust implementation
|
|
30
|
+
* Contains global configuration for the PumpFun protocol
|
|
31
|
+
*/
|
|
32
|
+
export interface GlobalAccount {
|
|
33
|
+
initialized: boolean;
|
|
34
|
+
authority: Address;
|
|
35
|
+
feeRecipient: Address;
|
|
36
|
+
initialVirtualTokenReserves: bigint;
|
|
37
|
+
initialVirtualSolReserves: bigint;
|
|
38
|
+
initialRealTokenReserves: bigint;
|
|
39
|
+
tokenTotalSupply: bigint;
|
|
40
|
+
feeBasisPoints: bigint;
|
|
41
|
+
withdrawAuthority: Address;
|
|
42
|
+
enableMigrate: boolean;
|
|
43
|
+
poolMigrationFee: bigint;
|
|
44
|
+
creatorFeeBasisPoints: bigint;
|
|
45
|
+
feeRecipients: Address[];
|
|
46
|
+
setCreatorAuthority: Address;
|
|
47
|
+
adminSetCreatorAuthority: Address;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* GlobalConfig structure matching the Rust implementation
|
|
51
|
+
* This is the ACTUAL structure used by PumpFun on-chain
|
|
52
|
+
*/
|
|
53
|
+
export interface GlobalConfig {
|
|
54
|
+
admin: Address;
|
|
55
|
+
lpFeeBasisPoints: bigint;
|
|
56
|
+
protocolFeeBasisPoints: bigint;
|
|
57
|
+
disableFlags: number;
|
|
58
|
+
protocolFeeRecipients: Address[];
|
|
59
|
+
coinCreatorFeeBasisPoints: bigint;
|
|
60
|
+
adminSetCoinCreatorAuthority: Address;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* PumpPoolData for migrated AMM pools
|
|
64
|
+
*/
|
|
65
|
+
export interface PumpPoolData {
|
|
66
|
+
poolBump: number;
|
|
67
|
+
index: number;
|
|
68
|
+
creator: Address;
|
|
69
|
+
baseMint: Address;
|
|
70
|
+
quoteMint: Address;
|
|
71
|
+
lpMint: Address;
|
|
72
|
+
poolBaseTokenAccount: Address;
|
|
73
|
+
poolQuoteTokenAccount: Address;
|
|
74
|
+
lpSupply: bigint;
|
|
75
|
+
coinCreator: Address;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Creates a decoder for PumpPoolData
|
|
79
|
+
*/
|
|
80
|
+
export declare function getPumpPoolDataDecoder(): Decoder<PumpPoolData>;
|
|
81
|
+
/**
|
|
82
|
+
* Creates a decoder for the BondingCurve account structure
|
|
83
|
+
* The layout must match exactly the Rust struct serialization order
|
|
84
|
+
*/
|
|
85
|
+
export declare function getBondingCurveDecoder(): Decoder<BondingCurve>;
|
|
86
|
+
/**
|
|
87
|
+
* Creates a decoder for the GlobalAccount structure
|
|
88
|
+
*/
|
|
89
|
+
export declare function getGlobalAccountDecoder(): Decoder<GlobalAccount>;
|
|
90
|
+
/**
|
|
91
|
+
* Creates a decoder for the GlobalConfig structure
|
|
92
|
+
*/
|
|
93
|
+
export declare function getGlobalConfigDecoder(): Decoder<GlobalConfig>;
|
|
94
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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BAAwB,EAAE,OAAO,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,OAAO,EAAE,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC;IAClC,4BAA4B,EAAE,OAAO,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,YAAY,CAAC,CAa9D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,YAAY,CAAC,CAU9D;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAAC,aAAa,CAAC,CAkBhE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,YAAY,CAAC,CAU9D"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type Address } from '@solana/kit';
|
|
2
|
+
import { type BondingCurve, type GlobalAccount, type GlobalConfig, type PumpPoolData, type TokenAccount } from './models.js';
|
|
3
|
+
export declare const PUMP_FUN_PROGRAM_ADDRESS: Address<"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P">;
|
|
4
|
+
export declare const PUMP_FUN_AMM_PROGRAM_ADDRESS: Address<"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA">;
|
|
5
|
+
export declare const WRAPPED_NATIVE_TOKEN_PUBKEY: Address<"So11111111111111111111111111111111111111112">;
|
|
6
|
+
export declare const GLOBAL_CONFIG_AMM: Address<"ADyA8hdefvWN2dbGGWFotbzWxrAvLW83WG6QCVXvJKqw">;
|
|
7
|
+
export declare const ANCHOR_DISCRIMINATOR_SIZE = 8;
|
|
8
|
+
/**
|
|
9
|
+
* Fetches and deserializes a PumpFun bonding curve account
|
|
10
|
+
*
|
|
11
|
+
* @param tokenMint - The token mint address
|
|
12
|
+
* @param options - Optional RPC configuration
|
|
13
|
+
* @returns Tuple of [BondingCurve data, PDA address]
|
|
14
|
+
* @throws Error if account doesn't exist or deserialization fails
|
|
15
|
+
*/
|
|
16
|
+
export declare function getPumpFunBondingCurve(tokenMint: Address): Promise<[BondingCurve, Address]>;
|
|
17
|
+
/**
|
|
18
|
+
* Fetches and deserializes the PumpFun global account
|
|
19
|
+
*
|
|
20
|
+
* @returns Tuple of [GlobalAccount data, PDA address]
|
|
21
|
+
* @throws {Error} if account doesn't exist
|
|
22
|
+
* @throws {Error} if deserialization fails
|
|
23
|
+
*/
|
|
24
|
+
export declare function getPumpFunGlobalAccount(): Promise<[GlobalAccount, Address]>;
|
|
25
|
+
/**
|
|
26
|
+
* Fetches and deserializes the PumpFun global config account
|
|
27
|
+
*
|
|
28
|
+
* @returns Tuple of [GlobalConfig data, PDA address]
|
|
29
|
+
* @throws {Error} if account doesn't exist
|
|
30
|
+
* @throws {Error} if deserialization fails
|
|
31
|
+
*/
|
|
32
|
+
export declare function getPumpFunGlobalConfig(): Promise<[GlobalConfig, Address]>;
|
|
33
|
+
/**
|
|
34
|
+
* Fetches the migrated AMM pool for a token
|
|
35
|
+
*
|
|
36
|
+
* @param baseMint - The token mint address (NOT WSOL)
|
|
37
|
+
* @returns Tuple of [PumpPoolData, pool PDA address]
|
|
38
|
+
* @throws Error if pool doesn't exist or deserialization fails
|
|
39
|
+
*/
|
|
40
|
+
export declare function getPumpFunMigratedPool(baseMint: Address): Promise<[PumpPoolData, Address]>;
|
|
41
|
+
/**
|
|
42
|
+
* Fetches and deserializes token account information for pool base and quote tokens
|
|
43
|
+
*
|
|
44
|
+
* @param poolBaseTokenAccount - Base token account public key
|
|
45
|
+
* @param poolQuoteTokenAccount - Quote token account public key
|
|
46
|
+
* @returns Tuple containing [baseTokenAccount, quoteTokenAccount]
|
|
47
|
+
* @throws Error if accounts don't exist or deserialization fails
|
|
48
|
+
*/
|
|
49
|
+
export declare function getPoolTokensInfo(poolBaseTokenAccount: Address, poolQuoteTokenAccount: Address): Promise<[TokenAccount, TokenAccount]>;
|
|
50
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/quote/pumpfun/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,OAAO,EACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AAIrB,eAAO,MAAM,wBAAwB,wDAAyD,CAAC;AAC/F,eAAO,MAAM,4BAA4B,wDAAyD,CAAC;AACnG,eAAO,MAAM,2BAA2B,wDAAyD,CAAC;AAClG,eAAO,MAAM,iBAAiB,yDAA0D,CAAC;AACzF,eAAO,MAAM,yBAAyB,IAAI,CAAC;AA6D3C;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CA8BjG;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAuCjF;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAoC/E;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAyChG;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,oBAAoB,EAAE,OAAO,EAC7B,qBAAqB,EAAE,OAAO,GAC7B,OAAO,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CA2DvC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Raydium, type LaunchpadConfigInfo, type LaunchpadPoolInfo } from '@raydium-io/raydium-sdk-v2';
|
|
2
|
+
import { type SimpleQuote } from './aggregator.js';
|
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
|
4
|
+
import BN from 'bn.js';
|
|
5
|
+
export type RaydiumPumpQuoteParams = {
|
|
6
|
+
inputMint: string;
|
|
7
|
+
outputMint: string;
|
|
8
|
+
amount: string;
|
|
9
|
+
slippageBps: number;
|
|
10
|
+
};
|
|
11
|
+
export type RaydiumQuoteResponse = {
|
|
12
|
+
success: boolean;
|
|
13
|
+
data: {
|
|
14
|
+
inputMint: string;
|
|
15
|
+
outputMint: string;
|
|
16
|
+
inAmount: string;
|
|
17
|
+
outAmount: string;
|
|
18
|
+
otherAmountThreshold: string;
|
|
19
|
+
swapMode: string;
|
|
20
|
+
slippageBps: number;
|
|
21
|
+
platformFee: null;
|
|
22
|
+
priceImpactPct: string;
|
|
23
|
+
routePlan: Array<{
|
|
24
|
+
swapInfo: {
|
|
25
|
+
ammKey: string;
|
|
26
|
+
label: string;
|
|
27
|
+
inputMint: string;
|
|
28
|
+
outputMint: string;
|
|
29
|
+
notEnoughLiquidity: boolean;
|
|
30
|
+
minInAmount: string;
|
|
31
|
+
minOutAmount: string;
|
|
32
|
+
priceImpactPct: string;
|
|
33
|
+
lpFee: {
|
|
34
|
+
amount: string;
|
|
35
|
+
mint: string;
|
|
36
|
+
pct: number;
|
|
37
|
+
};
|
|
38
|
+
platformFee: {
|
|
39
|
+
amount: string;
|
|
40
|
+
mint: string;
|
|
41
|
+
pct: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
percent: number;
|
|
45
|
+
}>;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const initSdk: () => Promise<Raydium>;
|
|
49
|
+
export declare class RaydiumQuoteProvider {
|
|
50
|
+
/**
|
|
51
|
+
* Get priority fee recommendations from Raydium API
|
|
52
|
+
* @returns Priority fee data with different tiers (vh, h, m)
|
|
53
|
+
*/
|
|
54
|
+
getPriorityFee(): Promise<{
|
|
55
|
+
vh: number;
|
|
56
|
+
h: number;
|
|
57
|
+
m: number;
|
|
58
|
+
}>;
|
|
59
|
+
getQuote(raydiumParams: RaydiumPumpQuoteParams): Promise<RaydiumQuoteResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Get transaction data for executing a swap
|
|
62
|
+
* @param params - Transaction parameters
|
|
63
|
+
* @returns Serialized transaction data
|
|
64
|
+
*/
|
|
65
|
+
getSwapTransaction(params: {
|
|
66
|
+
swapResponse: RaydiumQuoteResponse;
|
|
67
|
+
wallet: string;
|
|
68
|
+
txVersion: 'V0' | 'LEGACY';
|
|
69
|
+
wrapSol?: boolean;
|
|
70
|
+
unwrapSol?: boolean;
|
|
71
|
+
inputAccount?: string;
|
|
72
|
+
outputAccount?: string;
|
|
73
|
+
computeUnitPriceMicroLamports?: string;
|
|
74
|
+
}): Promise<{
|
|
75
|
+
id: string;
|
|
76
|
+
version: string;
|
|
77
|
+
success: boolean;
|
|
78
|
+
data: {
|
|
79
|
+
transaction: string;
|
|
80
|
+
}[];
|
|
81
|
+
}>;
|
|
82
|
+
getQuotePrebonded(raydiumParams: RaydiumPumpQuoteParams): Promise<SimpleQuote>;
|
|
83
|
+
checkPreboundedTokensSwapLaunchpad(raydiumSdk: Raydium, raydiumMint: PublicKey): Promise<[
|
|
84
|
+
LaunchpadPoolInfo & {
|
|
85
|
+
programId: PublicKey;
|
|
86
|
+
configInfo: LaunchpadConfigInfo;
|
|
87
|
+
},
|
|
88
|
+
PublicKey
|
|
89
|
+
]>;
|
|
90
|
+
estimatePrebondedToQuote(raydiumSdk: Raydium, raydiumMint: PublicKey, poolInfo: LaunchpadPoolInfo & {
|
|
91
|
+
programId: PublicKey;
|
|
92
|
+
configInfo: LaunchpadConfigInfo;
|
|
93
|
+
}, trade_type: 'buy' | 'sell', amount: BN, slippage: BN): Promise<{
|
|
94
|
+
expectedAmountOut: BN;
|
|
95
|
+
minimumAmountOut: BN;
|
|
96
|
+
}>;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=raydium.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raydium.d.ts","sourceRoot":"","sources":["../../../../src/utils/quote/raydium.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,OAAO,EAIP,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAA6B,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,MAAM,OAAO,CAAC;AAoDvB,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,oBAAoB,EAAE,MAAM,CAAC;QA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;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,6BAA6B,CAAC,EAAE,MAAM,CAAC;KACxC,GAAG,OAAO,CAAC;QACV,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,EAAE;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACjC,CAAC;IAgCW,iBAAiB,CAAC,aAAa,EAAE,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC;IAkHrF,kCAAkC,CACtC,UAAU,EAAE,OAAO,EACnB,WAAW,EAAE,SAAS,GACrB,OAAO,CACR;QACE,iBAAiB,GAAG;YAClB,SAAS,EAAE,SAAS,CAAC;YACrB,UAAU,EAAE,mBAAmB,CAAC;SACjC;QACD,SAAS;KACV,CACF;IAqCK,wBAAwB,CAC5B,UAAU,EAAE,OAAO,EACnB,WAAW,EAAE,SAAS,EACtB,QAAQ,EAAE,iBAAiB,GAAG;QAC5B,SAAS,EAAE,SAAS,CAAC;QACrB,UAAU,EAAE,mBAAmB,CAAC;KACjC,EACD,UAAU,EAAE,KAAK,GAAG,MAAM,EAC1B,MAAM,EAAE,EAAE,EACV,QAAQ,EAAE,EAAE,GACX,OAAO,CAAC;QAAE,iBAAiB,EAAE,EAAE,CAAC;QAAC,gBAAgB,EAAE,EAAE,CAAA;KAAE,CAAC;CAmG5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stablecoins-tokens.d.ts","sourceRoot":"","sources":["../../../../src/utils/quote/stablecoins-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"stablecoins-tokens.d.ts","sourceRoot":"","sources":["../../../../src/utils/quote/stablecoins-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAWtE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/quote/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAiB,CAAC;AAC7C,eAAO,MAAM,cAAc,QAAW,CAAC;AACvC,eAAO,MAAM,UAAU,QAAsB,CAAC;AAE9C,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,SAAI,GAAG,MAAM,CAGrE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TokenSearchParams, TokenSearchResponse } from '../../types/token-list.js';
|
|
2
|
+
/**
|
|
3
|
+
* getTokenList
|
|
4
|
+
*
|
|
5
|
+
* High-level SDK function for token discovery.
|
|
6
|
+
* Supports cancellation via AbortController.
|
|
7
|
+
*
|
|
8
|
+
* Example:
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { getTokenList } from "@shogun/sdk";
|
|
11
|
+
*
|
|
12
|
+
* const controller = new AbortController();
|
|
13
|
+
* const res = await getTokenList({ q: "usdc", networkId: 8453, signal: controller.signal });
|
|
14
|
+
*
|
|
15
|
+
* To cancel:
|
|
16
|
+
* controller.abort();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function getTokenList(params: TokenSearchParams): Promise<TokenSearchResponse>;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/tokens/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAExF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAiB1F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shogun-sdk/intents-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6-test",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shogun Network Intent-based cross-chain swaps SDK",
|
|
6
6
|
"author": "Shogun network",
|
|
@@ -48,26 +48,28 @@
|
|
|
48
48
|
"typescript": "5.8.2"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@coral-xyz/anchor": "
|
|
52
|
-
"@jup-ag/api": "
|
|
53
|
-
"@mysten/bcs": "
|
|
54
|
-
"@mysten/sui": "
|
|
55
|
-
"@paraswap/sdk": "
|
|
56
|
-
"@
|
|
57
|
-
"@solana/
|
|
58
|
-
"@solana/
|
|
59
|
-
"@solana/
|
|
60
|
-
"@solana/
|
|
61
|
-
"@solana/
|
|
62
|
-
"@solana/
|
|
51
|
+
"@coral-xyz/anchor": "0.31.1",
|
|
52
|
+
"@jup-ag/api": "6.0.44",
|
|
53
|
+
"@mysten/bcs": "1.8.0",
|
|
54
|
+
"@mysten/sui": "1.29.1",
|
|
55
|
+
"@paraswap/sdk": "7.3.1",
|
|
56
|
+
"@raydium-io/raydium-sdk-v2": "0.2.29-alpha",
|
|
57
|
+
"@solana/accounts": "3.0.3",
|
|
58
|
+
"@solana/addresses": "3.0.3",
|
|
59
|
+
"@solana/codecs": "3.0.3",
|
|
60
|
+
"@solana/errors": "3.0.3",
|
|
61
|
+
"@solana/instructions": "3.0.3",
|
|
62
|
+
"@solana/programs": "3.0.3",
|
|
63
|
+
"@solana/signers": "3.0.3",
|
|
63
64
|
"@solana/web3.js": "1.98.2",
|
|
64
|
-
"@uniswap/permit2-sdk": "
|
|
65
|
-
"aftermath-ts-sdk": "
|
|
66
|
-
"bn.js": "
|
|
65
|
+
"@uniswap/permit2-sdk": "1.4.0",
|
|
66
|
+
"aftermath-ts-sdk": "1.3.14",
|
|
67
|
+
"bn.js": "5.2.2",
|
|
67
68
|
"dayjs": "1.11.13",
|
|
69
|
+
"decimal.js": "^10.4.3",
|
|
68
70
|
"ethers": "6.13.5",
|
|
69
|
-
"js-sha3": "
|
|
70
|
-
"solana": "
|
|
71
|
+
"js-sha3": "0.9.3",
|
|
72
|
+
"solana": "3.0.0",
|
|
71
73
|
"viem": "2.31.0"
|
|
72
74
|
},
|
|
73
75
|
"scripts": {
|
package/src/chains.ts
CHANGED
|
@@ -22,6 +22,7 @@ export enum ChainID {
|
|
|
22
22
|
Hyperliquid = 999,
|
|
23
23
|
Solana = 7565164,
|
|
24
24
|
Sui = 101,
|
|
25
|
+
BSC = 56
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
/**
|
|
@@ -35,6 +36,7 @@ export const SupportedChains = [
|
|
|
35
36
|
ChainID.Hyperliquid,
|
|
36
37
|
ChainID.Solana,
|
|
37
38
|
ChainID.Sui,
|
|
39
|
+
ChainID.BSC
|
|
38
40
|
] as const;
|
|
39
41
|
|
|
40
42
|
/**
|
|
@@ -78,4 +80,5 @@ export const chainIdToChainTypeMap = {
|
|
|
78
80
|
[ChainID.Hyperliquid]: ChainType.EVM,
|
|
79
81
|
[ChainID.Solana]: ChainType.Solana,
|
|
80
82
|
[ChainID.Sui]: ChainType.Sui,
|
|
83
|
+
[ChainID.BSC]: ChainType.EVM,
|
|
81
84
|
} as const;
|