Skip to content

Commit edc1001

Browse files
committed
Bump JS client to Kit v4
1 parent 7e5f04e commit edc1001

29 files changed

+483
-488
lines changed

clients/js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
},
4343
"homepage": "https://github.com/solana-program/system#readme",
4444
"peerDependencies": {
45-
"@solana/kit": "^3.0"
45+
"@solana/kit": "^4.0"
4646
},
4747
"devDependencies": {
4848
"@ava/typescript": "^4.1.0",
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/accounts/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/accounts/nonce.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/errors/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/errors/system.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/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/advanceNonceAccount.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
*/
@@ -143,22 +143,20 @@ export function getAdvanceNonceAccountInstruction<
143143
}
144144

145145
const getAccountMeta = getAccountMetaFactory(programAddress, 'omitted');
146-
const instruction = {
146+
return Object.freeze({
147147
accounts: [
148148
getAccountMeta(accounts.nonceAccount),
149149
getAccountMeta(accounts.recentBlockhashesSysvar),
150150
getAccountMeta(accounts.nonceAuthority),
151151
],
152-
programAddress,
153152
data: getAdvanceNonceAccountInstructionDataEncoder().encode({}),
153+
programAddress,
154154
} as AdvanceNonceAccountInstruction<
155155
TProgramAddress,
156156
TAccountNonceAccount,
157157
TAccountRecentBlockhashesSysvar,
158158
TAccountNonceAuthority
159-
>;
160-
161-
return instruction;
159+
>);
162160
}
163161

164162
export type ParsedAdvanceNonceAccountInstruction<

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

Lines changed: 6 additions & 10 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
*/
@@ -112,15 +112,13 @@ export function getAllocateInstruction<
112112
const args = { ...input };
113113

114114
const getAccountMeta = getAccountMetaFactory(programAddress, 'omitted');
115-
const instruction = {
115+
return Object.freeze({
116116
accounts: [getAccountMeta(accounts.newAccount)],
117-
programAddress,
118117
data: getAllocateInstructionDataEncoder().encode(
119118
args as AllocateInstructionDataArgs
120119
),
121-
} as AllocateInstruction<TProgramAddress, TAccountNewAccount>;
122-
123-
return instruction;
120+
programAddress,
121+
} as AllocateInstruction<TProgramAddress, TAccountNewAccount>);
124122
}
125123

126124
export type ParsedAllocateInstruction<
@@ -154,9 +152,7 @@ export function parseAllocateInstruction<
154152
};
155153
return {
156154
programAddress: instruction.programAddress,
157-
accounts: {
158-
newAccount: getNextAccount(),
159-
},
155+
accounts: { newAccount: getNextAccount() },
160156
data: getAllocateInstructionDataDecoder().decode(instruction.data),
161157
};
162158
}

clients/js/src/generated/instructions/allocateWithSeed.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
*/
@@ -153,22 +153,20 @@ export function getAllocateWithSeedInstruction<
153153
const args = { ...input };
154154

155155
const getAccountMeta = getAccountMetaFactory(programAddress, 'omitted');
156-
const instruction = {
156+
return Object.freeze({
157157
accounts: [
158158
getAccountMeta(accounts.newAccount),
159159
getAccountMeta(accounts.baseAccount),
160160
],
161-
programAddress,
162161
data: getAllocateWithSeedInstructionDataEncoder().encode(
163162
args as AllocateWithSeedInstructionDataArgs
164163
),
164+
programAddress,
165165
} as AllocateWithSeedInstruction<
166166
TProgramAddress,
167167
TAccountNewAccount,
168168
TAccountBaseAccount
169-
>;
170-
171-
return instruction;
169+
>);
172170
}
173171

174172
export type ParsedAllocateWithSeedInstruction<
@@ -203,10 +201,7 @@ export function parseAllocateWithSeedInstruction<
203201
};
204202
return {
205203
programAddress: instruction.programAddress,
206-
accounts: {
207-
newAccount: getNextAccount(),
208-
baseAccount: getNextAccount(),
209-
},
204+
accounts: { newAccount: getNextAccount(), baseAccount: getNextAccount() },
210205
data: getAllocateWithSeedInstructionDataDecoder().decode(instruction.data),
211206
};
212207
}

0 commit comments

Comments
 (0)