@picon-finance/dlmm-sdk 1.17.3 → 1.18.0
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/entities/pool.js +2 -2
- package/dist/picon_dlmm.json +1 -1
- package/dist/quote/wasm-node/picon_dlmm_quote.d.ts +9 -4
- package/dist/quote/wasm-node/picon_dlmm_quote_bg.wasm +0 -0
- package/dist/quote/wasm-web/picon_dlmm_quote.d.ts +9 -4
- package/dist/quote/wasm-web/picon_dlmm_quote_bg.wasm +0 -0
- package/package.json +1 -1
- package/src/entities/pool.ts +2 -2
- package/src/picon_dlmm.json +1 -1
- package/src/quote/wasm-node/picon_dlmm_quote.d.ts +9 -4
- package/src/quote/wasm-node/picon_dlmm_quote_bg.wasm +0 -0
- package/src/quote/wasm-web/picon_dlmm_quote.d.ts +9 -4
- package/src/quote/wasm-web/picon_dlmm_quote_bg.wasm +0 -0
package/dist/entities/pool.js
CHANGED
|
@@ -199,7 +199,7 @@ export class Pool {
|
|
|
199
199
|
outputTransferFee: xToY ? transferFeeY : transferFeeX,
|
|
200
200
|
binArrays,
|
|
201
201
|
});
|
|
202
|
-
const binArrayAddresses = this.#binArrayAddressesForQuote(xToY, indices, maxBinArrayAddresses, quoteOutput.
|
|
202
|
+
const binArrayAddresses = this.#binArrayAddressesForQuote(xToY, indices, maxBinArrayAddresses, quoteOutput.postActiveBin.binId);
|
|
203
203
|
return { quoteOutput, binArrayAddresses };
|
|
204
204
|
}
|
|
205
205
|
async #quoteExactOut({ xToY, amountOut, slippageToleranceBps, }) {
|
|
@@ -214,7 +214,7 @@ export class Pool {
|
|
|
214
214
|
outputTransferFee: xToY ? transferFeeY : transferFeeX,
|
|
215
215
|
binArrays,
|
|
216
216
|
});
|
|
217
|
-
const binArrayAddresses = this.#binArrayAddressesForQuote(xToY, indices, maxBinArrayAddresses, quoteOutput.
|
|
217
|
+
const binArrayAddresses = this.#binArrayAddressesForQuote(xToY, indices, maxBinArrayAddresses, quoteOutput.postActiveBin.binId);
|
|
218
218
|
return { quoteOutput, binArrayAddresses };
|
|
219
219
|
}
|
|
220
220
|
// The bin array window a quote might touch, before the quote itself narrows down how much of
|
package/dist/picon_dlmm.json
CHANGED
|
@@ -11,6 +11,11 @@ export interface BinArray {
|
|
|
11
11
|
bins: Bin[];
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export interface BinEntry {
|
|
15
|
+
binId: number;
|
|
16
|
+
price: bigint;
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
export interface DynamicFeeConfig {
|
|
15
20
|
filterPeriod: number;
|
|
16
21
|
decayPeriod: number;
|
|
@@ -53,8 +58,8 @@ export interface QuoteExactInInput {
|
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
export interface QuoteExactInOutput {
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
preActiveBin: BinEntry;
|
|
62
|
+
postActiveBin: BinEntry;
|
|
58
63
|
amountIn: bigint;
|
|
59
64
|
amountOut: bigint;
|
|
60
65
|
minAmountOut: bigint;
|
|
@@ -78,8 +83,8 @@ export interface QuoteExactOutInput {
|
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
export interface QuoteExactOutOutput {
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
preActiveBin: BinEntry;
|
|
87
|
+
postActiveBin: BinEntry;
|
|
83
88
|
/**
|
|
84
89
|
* Echoes `input.amount_out`, net.
|
|
85
90
|
*/
|
|
Binary file
|
|
@@ -11,6 +11,11 @@ export interface BinArray {
|
|
|
11
11
|
bins: Bin[];
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export interface BinEntry {
|
|
15
|
+
binId: number;
|
|
16
|
+
price: bigint;
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
export interface DynamicFeeConfig {
|
|
15
20
|
filterPeriod: number;
|
|
16
21
|
decayPeriod: number;
|
|
@@ -53,8 +58,8 @@ export interface QuoteExactInInput {
|
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
export interface QuoteExactInOutput {
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
preActiveBin: BinEntry;
|
|
62
|
+
postActiveBin: BinEntry;
|
|
58
63
|
amountIn: bigint;
|
|
59
64
|
amountOut: bigint;
|
|
60
65
|
minAmountOut: bigint;
|
|
@@ -78,8 +83,8 @@ export interface QuoteExactOutInput {
|
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
export interface QuoteExactOutOutput {
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
preActiveBin: BinEntry;
|
|
87
|
+
postActiveBin: BinEntry;
|
|
83
88
|
/**
|
|
84
89
|
* Echoes `input.amount_out`, net.
|
|
85
90
|
*/
|
|
Binary file
|
package/package.json
CHANGED
package/src/entities/pool.ts
CHANGED
|
@@ -392,7 +392,7 @@ export class Pool {
|
|
|
392
392
|
});
|
|
393
393
|
|
|
394
394
|
const binArrayAddresses = this.#binArrayAddressesForQuote(
|
|
395
|
-
xToY, indices, maxBinArrayAddresses, quoteOutput.
|
|
395
|
+
xToY, indices, maxBinArrayAddresses, quoteOutput.postActiveBin.binId,
|
|
396
396
|
);
|
|
397
397
|
return { quoteOutput, binArrayAddresses };
|
|
398
398
|
}
|
|
@@ -423,7 +423,7 @@ export class Pool {
|
|
|
423
423
|
});
|
|
424
424
|
|
|
425
425
|
const binArrayAddresses = this.#binArrayAddressesForQuote(
|
|
426
|
-
xToY, indices, maxBinArrayAddresses, quoteOutput.
|
|
426
|
+
xToY, indices, maxBinArrayAddresses, quoteOutput.postActiveBin.binId,
|
|
427
427
|
);
|
|
428
428
|
return { quoteOutput, binArrayAddresses };
|
|
429
429
|
}
|
package/src/picon_dlmm.json
CHANGED
|
@@ -11,6 +11,11 @@ export interface BinArray {
|
|
|
11
11
|
bins: Bin[];
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export interface BinEntry {
|
|
15
|
+
binId: number;
|
|
16
|
+
price: bigint;
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
export interface DynamicFeeConfig {
|
|
15
20
|
filterPeriod: number;
|
|
16
21
|
decayPeriod: number;
|
|
@@ -53,8 +58,8 @@ export interface QuoteExactInInput {
|
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
export interface QuoteExactInOutput {
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
preActiveBin: BinEntry;
|
|
62
|
+
postActiveBin: BinEntry;
|
|
58
63
|
amountIn: bigint;
|
|
59
64
|
amountOut: bigint;
|
|
60
65
|
minAmountOut: bigint;
|
|
@@ -78,8 +83,8 @@ export interface QuoteExactOutInput {
|
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
export interface QuoteExactOutOutput {
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
preActiveBin: BinEntry;
|
|
87
|
+
postActiveBin: BinEntry;
|
|
83
88
|
/**
|
|
84
89
|
* Echoes `input.amount_out`, net.
|
|
85
90
|
*/
|
|
Binary file
|
|
@@ -11,6 +11,11 @@ export interface BinArray {
|
|
|
11
11
|
bins: Bin[];
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export interface BinEntry {
|
|
15
|
+
binId: number;
|
|
16
|
+
price: bigint;
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
export interface DynamicFeeConfig {
|
|
15
20
|
filterPeriod: number;
|
|
16
21
|
decayPeriod: number;
|
|
@@ -53,8 +58,8 @@ export interface QuoteExactInInput {
|
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
export interface QuoteExactInOutput {
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
preActiveBin: BinEntry;
|
|
62
|
+
postActiveBin: BinEntry;
|
|
58
63
|
amountIn: bigint;
|
|
59
64
|
amountOut: bigint;
|
|
60
65
|
minAmountOut: bigint;
|
|
@@ -78,8 +83,8 @@ export interface QuoteExactOutInput {
|
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
export interface QuoteExactOutOutput {
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
preActiveBin: BinEntry;
|
|
87
|
+
postActiveBin: BinEntry;
|
|
83
88
|
/**
|
|
84
89
|
* Echoes `input.amount_out`, net.
|
|
85
90
|
*/
|
|
Binary file
|