Skip to content

Commit b93511c

Browse files
authored
Bump JS client to Kit v4 (#20)
1 parent 89ab183 commit b93511c

File tree

14 files changed

+422
-392
lines changed

14 files changed

+422
-392
lines changed

clients/js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
},
4444
"homepage": "https://github.com/solana-program/compute-budget#readme",
4545
"peerDependencies": {
46-
"@solana/kit": "^3.0"
46+
"@solana/kit": "^4.0"
4747
},
4848
"devDependencies": {
4949
"@solana/eslint-config-solana": "^3.0.3",
50-
"@solana/kit": "^3.0",
50+
"@solana/kit": "^4.0",
5151
"@types/node": "^24",
5252
"@typescript-eslint/eslint-plugin": "^7.16.1",
5353
"@typescript-eslint/parser": "^7.16.1",

clients/js/pnpm-lock.yaml

Lines changed: 302 additions & 302 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/js/src/generated/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* Please DO NOT EDIT THIS FILE, instead use visitors
4-
* to add features, then rerun codama to update it.
4+
* to add features, then rerun Codama to update it.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/

clients/js/src/generated/instructions/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* Please DO NOT EDIT THIS FILE, instead use visitors
4-
* to add features, then rerun codama to update it.
4+
* to add features, then rerun Codama to update it.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/

clients/js/src/generated/instructions/requestHeapFrame.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* Please DO NOT EDIT THIS FILE, instead use visitors
4-
* to add features, then rerun codama to update it.
4+
* to add features, then rerun Codama to update it.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -101,14 +101,12 @@ export function getRequestHeapFrameInstruction<
101101
// Original args.
102102
const args = { ...input };
103103

104-
const instruction = {
105-
programAddress,
104+
return Object.freeze({
106105
data: getRequestHeapFrameInstructionDataEncoder().encode(
107106
args as RequestHeapFrameInstructionDataArgs
108107
),
109-
} as RequestHeapFrameInstruction<TProgramAddress>;
110-
111-
return instruction;
108+
programAddress,
109+
} as RequestHeapFrameInstruction<TProgramAddress>);
112110
}
113111

114112
export type ParsedRequestHeapFrameInstruction<

clients/js/src/generated/instructions/requestUnits.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* Please DO NOT EDIT THIS FILE, instead use visitors
4-
* to add features, then rerun codama to update it.
4+
* to add features, then rerun Codama to update it.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -102,22 +102,17 @@ export function getRequestUnitsInstruction<
102102
// Original args.
103103
const args = { ...input };
104104

105-
const instruction = {
106-
programAddress,
105+
return Object.freeze({
107106
data: getRequestUnitsInstructionDataEncoder().encode(
108107
args as RequestUnitsInstructionDataArgs
109108
),
110-
} as RequestUnitsInstruction<TProgramAddress>;
111-
112-
return instruction;
109+
programAddress,
110+
} as RequestUnitsInstruction<TProgramAddress>);
113111
}
114112

115113
export type ParsedRequestUnitsInstruction<
116114
TProgram extends string = typeof COMPUTE_BUDGET_PROGRAM_ADDRESS,
117-
> = {
118-
programAddress: Address<TProgram>;
119-
data: RequestUnitsInstructionData;
120-
};
115+
> = { programAddress: Address<TProgram>; data: RequestUnitsInstructionData };
121116

122117
export function parseRequestUnitsInstruction<TProgram extends string>(
123118
instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>

clients/js/src/generated/instructions/setComputeUnitLimit.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* Please DO NOT EDIT THIS FILE, instead use visitors
4-
* to add features, then rerun codama to update it.
4+
* to add features, then rerun Codama to update it.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -98,14 +98,12 @@ export function getSetComputeUnitLimitInstruction<
9898
// Original args.
9999
const args = { ...input };
100100

101-
const instruction = {
102-
programAddress,
101+
return Object.freeze({
103102
data: getSetComputeUnitLimitInstructionDataEncoder().encode(
104103
args as SetComputeUnitLimitInstructionDataArgs
105104
),
106-
} as SetComputeUnitLimitInstruction<TProgramAddress>;
107-
108-
return instruction;
105+
programAddress,
106+
} as SetComputeUnitLimitInstruction<TProgramAddress>);
109107
}
110108

111109
export type ParsedSetComputeUnitLimitInstruction<

clients/js/src/generated/instructions/setComputeUnitPrice.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* Please DO NOT EDIT THIS FILE, instead use visitors
4-
* to add features, then rerun codama to update it.
4+
* to add features, then rerun Codama to update it.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -98,14 +98,12 @@ export function getSetComputeUnitPriceInstruction<
9898
// Original args.
9999
const args = { ...input };
100100

101-
const instruction = {
102-
programAddress,
101+
return Object.freeze({
103102
data: getSetComputeUnitPriceInstructionDataEncoder().encode(
104103
args as SetComputeUnitPriceInstructionDataArgs
105104
),
106-
} as SetComputeUnitPriceInstruction<TProgramAddress>;
107-
108-
return instruction;
105+
programAddress,
106+
} as SetComputeUnitPriceInstruction<TProgramAddress>);
109107
}
110108

111109
export type ParsedSetComputeUnitPriceInstruction<

clients/js/src/generated/instructions/setLoadedAccountsDataSizeLimit.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* Please DO NOT EDIT THIS FILE, instead use visitors
4-
* to add features, then rerun codama to update it.
4+
* to add features, then rerun Codama to update it.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/
@@ -98,14 +98,12 @@ export function getSetLoadedAccountsDataSizeLimitInstruction<
9898
// Original args.
9999
const args = { ...input };
100100

101-
const instruction = {
102-
programAddress,
101+
return Object.freeze({
103102
data: getSetLoadedAccountsDataSizeLimitInstructionDataEncoder().encode(
104103
args as SetLoadedAccountsDataSizeLimitInstructionDataArgs
105104
),
106-
} as SetLoadedAccountsDataSizeLimitInstruction<TProgramAddress>;
107-
108-
return instruction;
105+
programAddress,
106+
} as SetLoadedAccountsDataSizeLimitInstruction<TProgramAddress>);
109107
}
110108

111109
export type ParsedSetLoadedAccountsDataSizeLimitInstruction<

clients/js/src/generated/programs/computeBudget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* This code was AUTOGENERATED using the codama library.
2+
* This code was AUTOGENERATED using the Codama library.
33
* Please DO NOT EDIT THIS FILE, instead use visitors
4-
* to add features, then rerun codama to update it.
4+
* to add features, then rerun Codama to update it.
55
*
66
* @see https://github.com/codama-idl/codama
77
*/

0 commit comments

Comments
 (0)