Skip to content

Commit a807db6

Browse files
committed
update solana ts dependencies
1 parent 0e045bf commit a807db6

File tree

12 files changed

+452
-843
lines changed

12 files changed

+452
-843
lines changed

examples/ts-sdk/next/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"dependencies": {
1111
"@orca-so/tx-sender": "*",
1212
"@orca-so/whirlpools": "*",
13-
"@solana/kit": "^3.0.3",
14-
"@solana/react": "^3.0.3",
13+
"@solana/kit": "^5.0.0",
14+
"@solana/react": "^5.0.0",
1515
"@wallet-standard/react": "^1.0.1",
1616
"next": "^15.5.6",
1717
"react": "^19.2.0",

ts-sdk/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
"clean": "rimraf dist src/generated"
3131
},
3232
"peerDependencies": {
33-
"@solana/kit": "^2.1.0"
33+
"@solana/kit": "^5.0.0"
3434
},
3535
"devDependencies": {
3636
"@codama/nodes-from-anchor": "^1.2.9",
3737
"@codama/renderers-js": "^1.4.2",
3838
"@orca-so/whirlpools-program": "*",
39-
"@solana/kit": "^2.3.0",
39+
"@solana/kit": "^5.0.0",
4040
"codama": "^1.3.7",
4141
"tsup": "^8.4.0",
4242
"typescript": "^5.9.3",

ts-sdk/tx-sender/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
"clean": "rimraf dist"
3030
},
3131
"dependencies": {
32-
"@solana-program/address-lookup-table": "^0.8.0",
33-
"@solana-program/compute-budget": "^0.9.0",
34-
"@solana-program/system": "^0.8.0"
32+
"@solana-program/address-lookup-table": "^0.10.0",
33+
"@solana-program/compute-budget": "^0.11.0",
34+
"@solana-program/system": "^0.10.0"
3535
},
3636
"peerDependencies": {
37-
"@solana/kit": "^3.0.3"
37+
"@solana/kit": "^5.0.0"
3838
},
3939
"devDependencies": {
40-
"@solana/kit": "^3.0.3",
40+
"@solana/kit": "^5.0.0",
4141
"tsup": "^8.4.0",
4242
"typescript": "^5.9.3",
4343
"vitest": "^3.2.4"

ts-sdk/whirlpool/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
"@orca-so/tx-sender": "*",
3333
"@orca-so/whirlpools-client": "*",
3434
"@orca-so/whirlpools-core": "*",
35-
"@solana-program/memo": "^0.8.0",
36-
"@solana-program/system": "^0.8.0",
37-
"@solana-program/token": "^0.6.0",
35+
"@solana-program/memo": "^0.10.0",
36+
"@solana-program/system": "^0.10.0",
37+
"@solana-program/token": "^0.8.0",
3838
"@solana-program/token-2022": "^0.5.0",
39-
"@solana/sysvars": "^3.0.3"
39+
"@solana/sysvars": "^5.0.0"
4040
},
4141
"peerDependencies": {
42-
"@solana/kit": "^3.0.3"
42+
"@solana/kit": "^5.0.0"
4343
},
4444
"devDependencies": {
45-
"@solana/kit": "^3.0.3",
45+
"@solana/kit": "^5.0.0",
4646
"solana-bankrun": "^0.4.0",
4747
"tsup": "^8.4.0",
4848
"typescript": "^5.9.3",

ts-sdk/whirlpool/src/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ export const SPLASH_POOL_TICK_SPACING = 32896;
8484
/**
8585
* The default funder for transactions. No explicit funder specified.
8686
*/
87-
export const DEFAULT_FUNDER: TransactionSigner =
87+
export const DEFAULT_FUNDER: TransactionSigner<string> =
8888
createNoopSigner(DEFAULT_ADDRESS);
8989

9090
/**
9191
* The currently selected funder for transactions.
9292
*/
93-
export let FUNDER: TransactionSigner = DEFAULT_FUNDER;
93+
export let FUNDER: TransactionSigner<string> = DEFAULT_FUNDER;
9494

9595
/**
9696
* Sets the default funder for transactions.
9797
*
9898
* @param {TransactionSigner | Address | null} funder - The funder to be set as default, either as an address or a transaction signer.
9999
*/
100100
export function setDefaultFunder(
101-
funder: TransactionSigner | Address | null,
101+
funder: TransactionSigner<string> | Address | null,
102102
): void {
103103
if (typeof funder === "string") {
104104
FUNDER = createNoopSigner(funder);

ts-sdk/whirlpool/src/createPool.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export function createSplashPoolInstructions(
9090
tokenMintA: Address,
9191
tokenMintB: Address,
9292
initialPrice: number = 1,
93-
funder: TransactionSigner = FUNDER,
93+
funder: TransactionSigner<string> = FUNDER,
9494
): Promise<CreatePoolInstructions> {
9595
return createConcentratedLiquidityPoolInstructions(
9696
rpc,
@@ -145,7 +145,7 @@ export async function createConcentratedLiquidityPoolInstructions(
145145
tokenMintB: Address,
146146
tickSpacing: number,
147147
initialPrice: number = 1,
148-
funder: TransactionSigner = FUNDER,
148+
funder: TransactionSigner<string> = FUNDER,
149149
): Promise<CreatePoolInstructions> {
150150
assert(
151151
funder.address !== DEFAULT_ADDRESS,
@@ -157,6 +157,7 @@ export async function createConcentratedLiquidityPoolInstructions(
157157
);
158158
const instructions: Instruction[] = [];
159159

160+
// as Parameters<typeof fetchSysvarRent>[0],
160161
const rent = await fetchSysvarRent(rpc);
161162
let nonRefundableRent: bigint = 0n;
162163

ts-sdk/whirlpool/src/decreaseLiquidity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export async function decreaseLiquidityInstructions(
171171
positionMintAddress: Address,
172172
param: DecreaseLiquidityQuoteParam,
173173
slippageToleranceBps: number = SLIPPAGE_TOLERANCE_BPS,
174-
authority: TransactionSigner = FUNDER,
174+
authority: TransactionSigner<string> = FUNDER,
175175
): Promise<DecreaseLiquidityInstructions> {
176176
assert(
177177
authority.address !== DEFAULT_ADDRESS,
@@ -316,7 +316,7 @@ export async function closePositionInstructions(
316316
>,
317317
positionMintAddress: Address,
318318
slippageToleranceBps: number = SLIPPAGE_TOLERANCE_BPS,
319-
authority: TransactionSigner = FUNDER,
319+
authority: TransactionSigner<string> = FUNDER,
320320
): Promise<ClosePositionInstructions> {
321321
assert(
322322
authority.address !== DEFAULT_ADDRESS,

ts-sdk/whirlpool/src/harvest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export async function harvestPositionInstructions(
101101
GetEpochInfoApi
102102
>,
103103
positionMintAddress: Address,
104-
authority: TransactionSigner = FUNDER,
104+
authority: TransactionSigner<string> = FUNDER,
105105
): Promise<HarvestPositionInstructions> {
106106
assert(
107107
authority.address !== DEFAULT_ADDRESS,

ts-sdk/whirlpool/src/increaseLiquidity.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export async function increaseLiquidityInstructions(
179179
positionMintAddress: Address,
180180
param: IncreaseLiquidityQuoteParam,
181181
slippageToleranceBps: number = SLIPPAGE_TOLERANCE_BPS,
182-
authority: TransactionSigner = FUNDER,
182+
authority: TransactionSigner<string> = FUNDER,
183183
): Promise<IncreaseLiquidityInstructions> {
184184
assert(
185185
authority.address !== DEFAULT_ADDRESS,
@@ -302,14 +302,15 @@ async function internalOpenPositionInstructions(
302302
mintA: Account<Mint>,
303303
mintB: Account<Mint>,
304304
slippageToleranceBps: number = SLIPPAGE_TOLERANCE_BPS,
305-
funder: TransactionSigner = FUNDER,
305+
funder: TransactionSigner<string> = FUNDER,
306306
): Promise<OpenPositionInstructions> {
307307
assert(
308308
funder.address !== DEFAULT_ADDRESS,
309309
"Either supply a funder or set the default funder",
310310
);
311311
const instructions: Instruction[] = [];
312312

313+
// rpc as Parameters<typeof fetchSysvarRent>[0],
313314
const rent = await fetchSysvarRent(rpc);
314315
let nonRefundableRent: bigint = 0n;
315316

@@ -509,7 +510,7 @@ export async function openFullRangePositionInstructions(
509510
poolAddress: Address,
510511
param: IncreaseLiquidityQuoteParam,
511512
slippageToleranceBps: number = SLIPPAGE_TOLERANCE_BPS,
512-
funder: TransactionSigner = FUNDER,
513+
funder: TransactionSigner<string> = FUNDER,
513514
): Promise<OpenPositionInstructions> {
514515
const whirlpool = await fetchWhirlpool(rpc, poolAddress);
515516
const tickRange = getFullRangeTickIndexes(whirlpool.data.tickSpacing);
@@ -582,7 +583,7 @@ export async function openPositionInstructions(
582583
lowerPrice: number,
583584
upperPrice: number,
584585
slippageToleranceBps: number = SLIPPAGE_TOLERANCE_BPS,
585-
funder: TransactionSigner = FUNDER,
586+
funder: TransactionSigner<string> = FUNDER,
586587
): Promise<OpenPositionInstructions> {
587588
const whirlpool = await fetchWhirlpool(rpc, poolAddress);
588589
assert(

ts-sdk/whirlpool/src/resetPositionRange.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function resetPositionRangeInstructions(
6666
positionMintAddress: Address,
6767
newLowerPrice: number,
6868
newUpperPrice: number,
69-
authority: TransactionSigner = FUNDER,
69+
authority: TransactionSigner<string> = FUNDER,
7070
): Promise<ResetPositionRageInstructions> {
7171
assert(
7272
authority.address !== DEFAULT_ADDRESS,

0 commit comments

Comments
 (0)