@picon-finance/dlmm-sdk 1.17.2 → 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.
@@ -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.postActiveBinId);
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.postActiveBinId);
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
@@ -2,7 +2,7 @@
2
2
  "address": "pDLMMk3KW3CUSxE1Wgjhx3jSmm2spe6Ry7Mq2HT26rC",
3
3
  "metadata": {
4
4
  "name": "picon_dlmm",
5
- "version": "1.1.1",
5
+ "version": "1.1.2",
6
6
  "spec": "0.1.0",
7
7
  "description": "Created with Anchor"
8
8
  },
@@ -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
- preActiveBinId: number;
57
- postActiveBinId: number;
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
- preActiveBinId: number;
82
- postActiveBinId: number;
86
+ preActiveBin: BinEntry;
87
+ postActiveBin: BinEntry;
83
88
  /**
84
89
  * Echoes `input.amount_out`, net.
85
90
  */
@@ -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
- preActiveBinId: number;
57
- postActiveBinId: number;
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
- preActiveBinId: number;
82
- postActiveBinId: number;
86
+ preActiveBin: BinEntry;
87
+ postActiveBin: BinEntry;
83
88
  /**
84
89
  * Echoes `input.amount_out`, net.
85
90
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picon-finance/dlmm-sdk",
3
- "version": "1.17.2",
3
+ "version": "1.18.0",
4
4
  "description": "Typescript SDK for interacting with the Picon DLMM protocol",
5
5
  "author": "Picon Finance",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@solana-program/system": "^0.13.0",
47
47
  "@solana-program/token": "^0.15.0",
48
- "@solana-program/token-2022": "^0.14.0",
48
+ "@solana-program/token-2022": "^0.14.1",
49
49
  "@solana/kit": "^7.0.0",
50
50
  "@solana/program-client-core": "^7.0.0",
51
51
  "@solana/transaction-messages": "^7.0.0"
@@ -392,7 +392,7 @@ export class Pool {
392
392
  });
393
393
 
394
394
  const binArrayAddresses = this.#binArrayAddressesForQuote(
395
- xToY, indices, maxBinArrayAddresses, quoteOutput.postActiveBinId,
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.postActiveBinId,
426
+ xToY, indices, maxBinArrayAddresses, quoteOutput.postActiveBin.binId,
427
427
  );
428
428
  return { quoteOutput, binArrayAddresses };
429
429
  }
@@ -2,7 +2,7 @@
2
2
  "address": "pDLMMk3KW3CUSxE1Wgjhx3jSmm2spe6Ry7Mq2HT26rC",
3
3
  "metadata": {
4
4
  "name": "picon_dlmm",
5
- "version": "1.1.1",
5
+ "version": "1.1.2",
6
6
  "spec": "0.1.0",
7
7
  "description": "Created with Anchor"
8
8
  },
@@ -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
- preActiveBinId: number;
57
- postActiveBinId: number;
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
- preActiveBinId: number;
82
- postActiveBinId: number;
86
+ preActiveBin: BinEntry;
87
+ postActiveBin: BinEntry;
83
88
  /**
84
89
  * Echoes `input.amount_out`, net.
85
90
  */
@@ -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
- preActiveBinId: number;
57
- postActiveBinId: number;
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
- preActiveBinId: number;
82
- postActiveBinId: number;
86
+ preActiveBin: BinEntry;
87
+ postActiveBin: BinEntry;
83
88
  /**
84
89
  * Echoes `input.amount_out`, net.
85
90
  */