diff --git a/ts-client/package.json b/ts-client/package.json index 4a4f866e..7ff4de0f 100644 --- a/ts-client/package.json +++ b/ts-client/package.json @@ -41,8 +41,8 @@ "typescript": "^5.0.4" }, "dependencies": { - "@coral-xyz/anchor": "0.31.0", - "@coral-xyz/borsh": "0.31.0", + "@coral-xyz/anchor": "^0.32.1", + "@coral-xyz/borsh": "^0.32.1", "@solana/buffer-layout": "^4.0.1", "@solana/spl-token": "^0.4.6", "@solana/web3.js": "^1.91.6", @@ -54,4 +54,4 @@ "keywords": [], "author": "McSam", "license": "ISC" -} \ No newline at end of file +} diff --git a/ts-client/src/dlmm/constants/index.ts b/ts-client/src/dlmm/constants/index.ts index ad5a7ca3..b927f16e 100644 --- a/ts-client/src/dlmm/constants/index.ts +++ b/ts-client/src/dlmm/constants/index.ts @@ -1,5 +1,5 @@ import { LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js"; -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import IDL from "../idl/idl.json"; import Decimal from "decimal.js"; diff --git a/ts-client/src/dlmm/helpers/binArray.ts b/ts-client/src/dlmm/helpers/binArray.ts index e8d1feb6..870223c7 100644 --- a/ts-client/src/dlmm/helpers/binArray.ts +++ b/ts-client/src/dlmm/helpers/binArray.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { PublicKey } from "@solana/web3.js"; import { MAX_BIN_ARRAY_SIZE, diff --git a/ts-client/src/dlmm/helpers/derive.ts b/ts-client/src/dlmm/helpers/derive.ts index 0cfdc096..745ae44a 100644 --- a/ts-client/src/dlmm/helpers/derive.ts +++ b/ts-client/src/dlmm/helpers/derive.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { AccountMeta, Connection, PublicKey } from "@solana/web3.js"; import { DLMM } from ".."; import { ILM_BASE } from "../constants"; diff --git a/ts-client/src/dlmm/helpers/fee.ts b/ts-client/src/dlmm/helpers/fee.ts index 776179af..50627f8d 100644 --- a/ts-client/src/dlmm/helpers/fee.ts +++ b/ts-client/src/dlmm/helpers/fee.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { BASIS_POINT_MAX, FEE_PRECISION, diff --git a/ts-client/src/dlmm/helpers/index.ts b/ts-client/src/dlmm/helpers/index.ts index 0093ed4c..ad4e8293 100644 --- a/ts-client/src/dlmm/helpers/index.ts +++ b/ts-client/src/dlmm/helpers/index.ts @@ -1,4 +1,5 @@ -import { AnchorProvider, BN, EventParser, Program } from "@coral-xyz/anchor"; +import BN from "bn.js"; +import { AnchorProvider, EventParser, Program } from "@coral-xyz/anchor"; import { IdlDiscriminator } from "@coral-xyz/anchor/dist/cjs/idl"; import { ASSOCIATED_TOKEN_PROGRAM_ID, diff --git a/ts-client/src/dlmm/helpers/math.ts b/ts-client/src/dlmm/helpers/math.ts index 588aa08b..3be45831 100644 --- a/ts-client/src/dlmm/helpers/math.ts +++ b/ts-client/src/dlmm/helpers/math.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { BASIS_POINT_MAX, DEFAULT_BIN_PER_POSITION, diff --git a/ts-client/src/dlmm/helpers/strategy.ts b/ts-client/src/dlmm/helpers/strategy.ts index 2513b714..f2546b85 100644 --- a/ts-client/src/dlmm/helpers/strategy.ts +++ b/ts-client/src/dlmm/helpers/strategy.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { Mint } from "@solana/spl-token"; import { Clock, diff --git a/ts-client/src/dlmm/helpers/weight.ts b/ts-client/src/dlmm/helpers/weight.ts index 6aed27a7..f171e9e5 100644 --- a/ts-client/src/dlmm/helpers/weight.ts +++ b/ts-client/src/dlmm/helpers/weight.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import gaussian, { Gaussian } from "gaussian"; import { BASIS_POINT_MAX } from "../constants"; import Decimal from "decimal.js"; diff --git a/ts-client/src/dlmm/helpers/weightToAmounts.ts b/ts-client/src/dlmm/helpers/weightToAmounts.ts index ea34e302..a0234433 100644 --- a/ts-client/src/dlmm/helpers/weightToAmounts.ts +++ b/ts-client/src/dlmm/helpers/weightToAmounts.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { Mint } from "@solana/spl-token"; import Decimal from "decimal.js"; import { Clock } from "../types"; diff --git a/ts-client/src/dlmm/index.ts b/ts-client/src/dlmm/index.ts index 338b4afe..6b5e5124 100644 --- a/ts-client/src/dlmm/index.ts +++ b/ts-client/src/dlmm/index.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { AccountLayout, Mint, diff --git a/ts-client/src/dlmm/types/index.ts b/ts-client/src/dlmm/types/index.ts index a1c1ef9e..3153e56a 100644 --- a/ts-client/src/dlmm/types/index.ts +++ b/ts-client/src/dlmm/types/index.ts @@ -1,5 +1,5 @@ +import BN from "bn.js"; import { - BN, IdlAccounts, IdlTypes, Program, diff --git a/ts-client/src/test/calculate_distribution.test.ts b/ts-client/src/test/calculate_distribution.test.ts index b7c4e1a1..527816ad 100644 --- a/ts-client/src/test/calculate_distribution.test.ts +++ b/ts-client/src/test/calculate_distribution.test.ts @@ -1,4 +1,4 @@ -import { BN } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { createInitializeMintInstruction, createInitializeTransferFeeConfigInstruction, diff --git a/ts-client/src/test/ilm.test.ts b/ts-client/src/test/ilm.test.ts index 6f80a40e..9cd3eee9 100644 --- a/ts-client/src/test/ilm.test.ts +++ b/ts-client/src/test/ilm.test.ts @@ -1,4 +1,5 @@ -import { BN, Wallet, web3 } from "@coral-xyz/anchor"; +import { Wallet, web3 } from "@coral-xyz/anchor"; +import BN from "bn.js"; import { ASSOCIATED_TOKEN_PROGRAM_ID, ExtensionType, diff --git a/ts-client/src/test/rebalance.test.ts b/ts-client/src/test/rebalance.test.ts index 1ef17e74..fe90e899 100644 --- a/ts-client/src/test/rebalance.test.ts +++ b/ts-client/src/test/rebalance.test.ts @@ -1,4 +1,5 @@ -import { BN, web3 } from "@coral-xyz/anchor"; +import BN from "bn.js"; +import { web3 } from "@coral-xyz/anchor"; import { ASSOCIATED_TOKEN_PROGRAM_ID, createMint, diff --git a/ts-client/src/test/rebalance_with_strategy.test.ts b/ts-client/src/test/rebalance_with_strategy.test.ts index dce91610..180b3033 100644 --- a/ts-client/src/test/rebalance_with_strategy.test.ts +++ b/ts-client/src/test/rebalance_with_strategy.test.ts @@ -1,4 +1,5 @@ -import { BN, web3 } from "@coral-xyz/anchor"; +import BN from "bn.js"; +import { web3 } from "@coral-xyz/anchor"; import { ASSOCIATED_TOKEN_PROGRAM_ID, createMint, diff --git a/ts-client/src/test/sdk.test.ts b/ts-client/src/test/sdk.test.ts index 02a07160..57f44a0e 100644 --- a/ts-client/src/test/sdk.test.ts +++ b/ts-client/src/test/sdk.test.ts @@ -1,4 +1,5 @@ -import { BN, web3 } from "@coral-xyz/anchor"; +import BN from "bn.js"; +import { web3 } from "@coral-xyz/anchor"; import { ASSOCIATED_TOKEN_PROGRAM_ID, createMint, diff --git a/ts-client/src/test/single_bin.test.ts b/ts-client/src/test/single_bin.test.ts index a976d153..3a84d48d 100644 --- a/ts-client/src/test/single_bin.test.ts +++ b/ts-client/src/test/single_bin.test.ts @@ -1,4 +1,5 @@ -import { BN, web3 } from "@coral-xyz/anchor"; +import BN from "bn.js"; +import { web3 } from "@coral-xyz/anchor"; import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID,