@picon-finance/dlmm-sdk 2.0.2 → 2.0.4

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.
Files changed (83) hide show
  1. package/dist/entities/dlmm_program.d.ts +1 -1
  2. package/dist/entities/dlmm_program.d.ts.map +1 -1
  3. package/dist/entities/dlmm_program.js +2 -2
  4. package/dist/entities/pool.d.ts +1 -1
  5. package/dist/entities/pool.d.ts.map +1 -1
  6. package/dist/generated/instructions/acceptAdminAuthority.d.ts +12 -11
  7. package/dist/generated/instructions/acceptAdminAuthority.d.ts.map +1 -1
  8. package/dist/generated/instructions/acceptAdminAuthority.js +16 -4
  9. package/dist/generated/instructions/claimFee.d.ts +19 -18
  10. package/dist/generated/instructions/claimFee.d.ts.map +1 -1
  11. package/dist/generated/instructions/claimFee.js +52 -12
  12. package/dist/generated/instructions/claimProtocolFee.d.ts +30 -29
  13. package/dist/generated/instructions/claimProtocolFee.d.ts.map +1 -1
  14. package/dist/generated/instructions/claimProtocolFee.js +90 -20
  15. package/dist/generated/instructions/closePosition.d.ts +18 -17
  16. package/dist/generated/instructions/closePosition.d.ts.map +1 -1
  17. package/dist/generated/instructions/closePosition.js +38 -10
  18. package/dist/generated/instructions/createAdminConfig.d.ts +18 -17
  19. package/dist/generated/instructions/createAdminConfig.d.ts.map +1 -1
  20. package/dist/generated/instructions/createAdminConfig.js +54 -12
  21. package/dist/generated/instructions/createBinArray.d.ts +16 -15
  22. package/dist/generated/instructions/createBinArray.d.ts.map +1 -1
  23. package/dist/generated/instructions/createBinArray.js +28 -10
  24. package/dist/generated/instructions/createPool.d.ts +30 -29
  25. package/dist/generated/instructions/createPool.d.ts.map +1 -1
  26. package/dist/generated/instructions/createPool.js +98 -22
  27. package/dist/generated/instructions/deleteBinArray.d.ts +18 -17
  28. package/dist/generated/instructions/deleteBinArray.d.ts.map +1 -1
  29. package/dist/generated/instructions/deleteBinArray.js +54 -12
  30. package/dist/generated/instructions/depositByWeight.d.ts +19 -18
  31. package/dist/generated/instructions/depositByWeight.d.ts.map +1 -1
  32. package/dist/generated/instructions/depositByWeight.js +52 -12
  33. package/dist/generated/instructions/openPosition.d.ts +28 -27
  34. package/dist/generated/instructions/openPosition.d.ts.map +1 -1
  35. package/dist/generated/instructions/openPosition.js +64 -16
  36. package/dist/generated/instructions/resetAdminAuthority.d.ts +16 -15
  37. package/dist/generated/instructions/resetAdminAuthority.d.ts.map +1 -1
  38. package/dist/generated/instructions/resetAdminAuthority.js +44 -10
  39. package/dist/generated/instructions/setMetadataUpdateAuthority.d.ts +12 -11
  40. package/dist/generated/instructions/setMetadataUpdateAuthority.d.ts.map +1 -1
  41. package/dist/generated/instructions/setMetadataUpdateAuthority.js +24 -6
  42. package/dist/generated/instructions/setPoolDynamicFeeConfig.d.ts +14 -13
  43. package/dist/generated/instructions/setPoolDynamicFeeConfig.d.ts.map +1 -1
  44. package/dist/generated/instructions/setPoolDynamicFeeConfig.js +26 -8
  45. package/dist/generated/instructions/setPoolProtocolShare.d.ts +14 -13
  46. package/dist/generated/instructions/setPoolProtocolShare.d.ts.map +1 -1
  47. package/dist/generated/instructions/setPoolProtocolShare.js +26 -8
  48. package/dist/generated/instructions/swapExactIn.d.ts +15 -14
  49. package/dist/generated/instructions/swapExactIn.d.ts.map +1 -1
  50. package/dist/generated/instructions/swapExactIn.js +36 -9
  51. package/dist/generated/instructions/swapExactOut.d.ts +15 -14
  52. package/dist/generated/instructions/swapExactOut.d.ts.map +1 -1
  53. package/dist/generated/instructions/swapExactOut.js +36 -9
  54. package/dist/generated/instructions/syncPool.d.ts +7 -6
  55. package/dist/generated/instructions/syncPool.d.ts.map +1 -1
  56. package/dist/generated/instructions/syncPool.js +4 -3
  57. package/dist/generated/instructions/transferAdminAuthority.d.ts +12 -11
  58. package/dist/generated/instructions/transferAdminAuthority.d.ts.map +1 -1
  59. package/dist/generated/instructions/transferAdminAuthority.js +24 -6
  60. package/dist/generated/instructions/withdraw.d.ts +19 -18
  61. package/dist/generated/instructions/withdraw.d.ts.map +1 -1
  62. package/dist/generated/instructions/withdraw.js +52 -12
  63. package/package.json +8 -8
  64. package/src/entities/dlmm_program.ts +3 -3
  65. package/src/generated/instructions/acceptAdminAuthority.ts +68 -25
  66. package/src/generated/instructions/claimFee.ts +218 -83
  67. package/src/generated/instructions/claimProtocolFee.ts +346 -131
  68. package/src/generated/instructions/closePosition.ts +160 -61
  69. package/src/generated/instructions/createAdminConfig.ts +172 -63
  70. package/src/generated/instructions/createBinArray.ts +124 -51
  71. package/src/generated/instructions/createPool.ts +354 -133
  72. package/src/generated/instructions/deleteBinArray.ts +172 -63
  73. package/src/generated/instructions/depositByWeight.ts +218 -83
  74. package/src/generated/instructions/openPosition.ts +300 -117
  75. package/src/generated/instructions/resetAdminAuthority.ts +138 -51
  76. package/src/generated/instructions/setMetadataUpdateAuthority.ts +74 -27
  77. package/src/generated/instructions/setPoolDynamicFeeConfig.ts +98 -39
  78. package/src/generated/instructions/setPoolProtocolShare.ts +98 -39
  79. package/src/generated/instructions/swapExactIn.ts +155 -60
  80. package/src/generated/instructions/swapExactOut.ts +155 -60
  81. package/src/generated/instructions/syncPool.ts +37 -12
  82. package/src/generated/instructions/transferAdminAuthority.ts +74 -27
  83. package/src/generated/instructions/withdraw.ts +218 -83
@@ -28,13 +28,16 @@ import {
28
28
  type InstructionWithData,
29
29
  type ReadonlyAccount,
30
30
  type ReadonlyUint8Array,
31
- type TransactionSigner,
32
31
  type WritableAccount,
33
32
  type WritableSignerAccount,
34
33
  } from "@solana/kit";
35
34
  import {
36
35
  getAccountMetaFactory,
36
+ type InstructionAccountInput,
37
+ type InstructionAccountInputAddress,
38
+ type InstructionSignerInput,
37
39
  type ResolvedInstructionAccount,
40
+ type ResolvedInstructionAccountMeta,
38
41
  } from "@solana/program-client-core";
39
42
  import { findAdminConfigPda } from "../pdas/index.js";
40
43
  import { PICON_DLMM_PROGRAM_ADDRESS } from "../programs/index.js";
@@ -110,22 +113,22 @@ export function getResetAdminAuthorityInstructionDataCodec(): FixedSizeCodec<
110
113
  }
111
114
 
112
115
  export type ResetAdminAuthorityAsyncInput<
113
- TAccountDeployer extends string = string,
114
- TAccountAdminConfig extends string = string,
115
- TAccountProgram extends string = string,
116
- TAccountProgramData extends string = string,
116
+ TAccountDeployer extends InstructionSignerInput = InstructionSignerInput,
117
+ TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput,
118
+ TAccountProgram extends InstructionAccountInput = InstructionAccountInput,
119
+ TAccountProgramData extends InstructionAccountInput = InstructionAccountInput,
117
120
  > = {
118
- deployer: TransactionSigner<TAccountDeployer>;
119
- adminConfig?: Address<TAccountAdminConfig>;
120
- program?: Address<TAccountProgram>;
121
- programData: Address<TAccountProgramData>;
121
+ deployer: TAccountDeployer;
122
+ adminConfig?: TAccountAdminConfig;
123
+ program?: TAccountProgram;
124
+ programData: TAccountProgramData;
122
125
  };
123
126
 
124
127
  export async function getResetAdminAuthorityInstructionAsync<
125
- TAccountDeployer extends string,
126
- TAccountAdminConfig extends string,
127
- TAccountProgram extends string,
128
- TAccountProgramData extends string,
128
+ TAccountDeployer extends InstructionSignerInput,
129
+ TAccountAdminConfig extends InstructionAccountInput,
130
+ TAccountProgram extends InstructionAccountInput,
131
+ TAccountProgramData extends InstructionAccountInput,
129
132
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
130
133
  >(
131
134
  input: ResetAdminAuthorityAsyncInput<
@@ -138,21 +141,52 @@ export async function getResetAdminAuthorityInstructionAsync<
138
141
  ): Promise<
139
142
  ResetAdminAuthorityInstruction<
140
143
  TProgramAddress,
141
- TAccountDeployer,
142
- TAccountAdminConfig,
143
- TAccountProgram,
144
- TAccountProgramData
144
+ ResolvedInstructionAccountMeta<
145
+ TAccountDeployer,
146
+ InstructionAccountInputAddress<TAccountDeployer>
147
+ >,
148
+ ResolvedInstructionAccountMeta<
149
+ TAccountAdminConfig,
150
+ InstructionAccountInputAddress<TAccountAdminConfig>
151
+ >,
152
+ ResolvedInstructionAccountMeta<
153
+ TAccountProgram,
154
+ InstructionAccountInputAddress<TAccountProgram>
155
+ >,
156
+ ResolvedInstructionAccountMeta<
157
+ TAccountProgramData,
158
+ InstructionAccountInputAddress<TAccountProgramData>
159
+ >
145
160
  >
146
161
  > {
147
162
  // Program address.
148
163
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
149
164
 
165
+ // Account meta helper.
166
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
167
+
150
168
  // Original accounts.
151
169
  const originalAccounts = {
152
- deployer: { value: input.deployer ?? null, isWritable: true },
153
- adminConfig: { value: input.adminConfig ?? null, isWritable: true },
154
- program: { value: input.program ?? null, isWritable: false },
155
- programData: { value: input.programData ?? null, isWritable: false },
170
+ deployer: {
171
+ value: input.deployer ?? null,
172
+ isSigner: true,
173
+ isWritable: true,
174
+ },
175
+ adminConfig: {
176
+ value: input.adminConfig ?? null,
177
+ isSigner: false,
178
+ isWritable: true,
179
+ },
180
+ program: {
181
+ value: input.program ?? null,
182
+ isSigner: false,
183
+ isWritable: false,
184
+ },
185
+ programData: {
186
+ value: input.programData ?? null,
187
+ isSigner: false,
188
+ isWritable: false,
189
+ },
156
190
  };
157
191
  const accounts = originalAccounts as Record<
158
192
  keyof typeof originalAccounts,
@@ -168,7 +202,6 @@ export async function getResetAdminAuthorityInstructionAsync<
168
202
  "pDLMMk3KW3CUSxE1Wgjhx3jSmm2spe6Ry7Mq2HT26rC" as Address<"pDLMMk3KW3CUSxE1Wgjhx3jSmm2spe6Ry7Mq2HT26rC">;
169
203
  }
170
204
 
171
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
172
205
  return Object.freeze({
173
206
  accounts: [
174
207
  getAccountMeta("deployer", accounts.deployer),
@@ -180,30 +213,42 @@ export async function getResetAdminAuthorityInstructionAsync<
180
213
  programAddress,
181
214
  } as ResetAdminAuthorityInstruction<
182
215
  TProgramAddress,
183
- TAccountDeployer,
184
- TAccountAdminConfig,
185
- TAccountProgram,
186
- TAccountProgramData
216
+ ResolvedInstructionAccountMeta<
217
+ TAccountDeployer,
218
+ InstructionAccountInputAddress<TAccountDeployer>
219
+ >,
220
+ ResolvedInstructionAccountMeta<
221
+ TAccountAdminConfig,
222
+ InstructionAccountInputAddress<TAccountAdminConfig>
223
+ >,
224
+ ResolvedInstructionAccountMeta<
225
+ TAccountProgram,
226
+ InstructionAccountInputAddress<TAccountProgram>
227
+ >,
228
+ ResolvedInstructionAccountMeta<
229
+ TAccountProgramData,
230
+ InstructionAccountInputAddress<TAccountProgramData>
231
+ >
187
232
  >);
188
233
  }
189
234
 
190
235
  export type ResetAdminAuthorityInput<
191
- TAccountDeployer extends string = string,
192
- TAccountAdminConfig extends string = string,
193
- TAccountProgram extends string = string,
194
- TAccountProgramData extends string = string,
236
+ TAccountDeployer extends InstructionSignerInput = InstructionSignerInput,
237
+ TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput,
238
+ TAccountProgram extends InstructionAccountInput = InstructionAccountInput,
239
+ TAccountProgramData extends InstructionAccountInput = InstructionAccountInput,
195
240
  > = {
196
- deployer: TransactionSigner<TAccountDeployer>;
197
- adminConfig: Address<TAccountAdminConfig>;
198
- program?: Address<TAccountProgram>;
199
- programData: Address<TAccountProgramData>;
241
+ deployer: TAccountDeployer;
242
+ adminConfig: TAccountAdminConfig;
243
+ program?: TAccountProgram;
244
+ programData: TAccountProgramData;
200
245
  };
201
246
 
202
247
  export function getResetAdminAuthorityInstruction<
203
- TAccountDeployer extends string,
204
- TAccountAdminConfig extends string,
205
- TAccountProgram extends string,
206
- TAccountProgramData extends string,
248
+ TAccountDeployer extends InstructionSignerInput,
249
+ TAccountAdminConfig extends InstructionAccountInput,
250
+ TAccountProgram extends InstructionAccountInput,
251
+ TAccountProgramData extends InstructionAccountInput,
207
252
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
208
253
  >(
209
254
  input: ResetAdminAuthorityInput<
@@ -215,20 +260,51 @@ export function getResetAdminAuthorityInstruction<
215
260
  config?: { programAddress?: TProgramAddress },
216
261
  ): ResetAdminAuthorityInstruction<
217
262
  TProgramAddress,
218
- TAccountDeployer,
219
- TAccountAdminConfig,
220
- TAccountProgram,
221
- TAccountProgramData
263
+ ResolvedInstructionAccountMeta<
264
+ TAccountDeployer,
265
+ InstructionAccountInputAddress<TAccountDeployer>
266
+ >,
267
+ ResolvedInstructionAccountMeta<
268
+ TAccountAdminConfig,
269
+ InstructionAccountInputAddress<TAccountAdminConfig>
270
+ >,
271
+ ResolvedInstructionAccountMeta<
272
+ TAccountProgram,
273
+ InstructionAccountInputAddress<TAccountProgram>
274
+ >,
275
+ ResolvedInstructionAccountMeta<
276
+ TAccountProgramData,
277
+ InstructionAccountInputAddress<TAccountProgramData>
278
+ >
222
279
  > {
223
280
  // Program address.
224
281
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
225
282
 
283
+ // Account meta helper.
284
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
285
+
226
286
  // Original accounts.
227
287
  const originalAccounts = {
228
- deployer: { value: input.deployer ?? null, isWritable: true },
229
- adminConfig: { value: input.adminConfig ?? null, isWritable: true },
230
- program: { value: input.program ?? null, isWritable: false },
231
- programData: { value: input.programData ?? null, isWritable: false },
288
+ deployer: {
289
+ value: input.deployer ?? null,
290
+ isSigner: true,
291
+ isWritable: true,
292
+ },
293
+ adminConfig: {
294
+ value: input.adminConfig ?? null,
295
+ isSigner: false,
296
+ isWritable: true,
297
+ },
298
+ program: {
299
+ value: input.program ?? null,
300
+ isSigner: false,
301
+ isWritable: false,
302
+ },
303
+ programData: {
304
+ value: input.programData ?? null,
305
+ isSigner: false,
306
+ isWritable: false,
307
+ },
232
308
  };
233
309
  const accounts = originalAccounts as Record<
234
310
  keyof typeof originalAccounts,
@@ -241,7 +317,6 @@ export function getResetAdminAuthorityInstruction<
241
317
  "pDLMMk3KW3CUSxE1Wgjhx3jSmm2spe6Ry7Mq2HT26rC" as Address<"pDLMMk3KW3CUSxE1Wgjhx3jSmm2spe6Ry7Mq2HT26rC">;
242
318
  }
243
319
 
244
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
245
320
  return Object.freeze({
246
321
  accounts: [
247
322
  getAccountMeta("deployer", accounts.deployer),
@@ -253,10 +328,22 @@ export function getResetAdminAuthorityInstruction<
253
328
  programAddress,
254
329
  } as ResetAdminAuthorityInstruction<
255
330
  TProgramAddress,
256
- TAccountDeployer,
257
- TAccountAdminConfig,
258
- TAccountProgram,
259
- TAccountProgramData
331
+ ResolvedInstructionAccountMeta<
332
+ TAccountDeployer,
333
+ InstructionAccountInputAddress<TAccountDeployer>
334
+ >,
335
+ ResolvedInstructionAccountMeta<
336
+ TAccountAdminConfig,
337
+ InstructionAccountInputAddress<TAccountAdminConfig>
338
+ >,
339
+ ResolvedInstructionAccountMeta<
340
+ TAccountProgram,
341
+ InstructionAccountInputAddress<TAccountProgram>
342
+ >,
343
+ ResolvedInstructionAccountMeta<
344
+ TAccountProgramData,
345
+ InstructionAccountInputAddress<TAccountProgramData>
346
+ >
260
347
  >);
261
348
  }
262
349
 
@@ -30,12 +30,15 @@ import {
30
30
  type InstructionWithData,
31
31
  type ReadonlySignerAccount,
32
32
  type ReadonlyUint8Array,
33
- type TransactionSigner,
34
33
  type WritableAccount,
35
34
  } from "@solana/kit";
36
35
  import {
37
36
  getAccountMetaFactory,
37
+ type InstructionAccountInput,
38
+ type InstructionAccountInputAddress,
39
+ type InstructionSignerInput,
38
40
  type ResolvedInstructionAccount,
41
+ type ResolvedInstructionAccountMeta,
39
42
  } from "@solana/program-client-core";
40
43
  import { findAdminConfigPda } from "../pdas/index.js";
41
44
  import { PICON_DLMM_PROGRAM_ADDRESS } from "../programs/index.js";
@@ -109,17 +112,17 @@ export function getSetMetadataUpdateAuthorityInstructionDataCodec(): FixedSizeCo
109
112
  }
110
113
 
111
114
  export type SetMetadataUpdateAuthorityAsyncInput<
112
- TAccountAuthority extends string = string,
113
- TAccountAdminConfig extends string = string,
115
+ TAccountAuthority extends InstructionSignerInput = InstructionSignerInput,
116
+ TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput,
114
117
  > = {
115
- authority: TransactionSigner<TAccountAuthority>;
116
- adminConfig?: Address<TAccountAdminConfig>;
118
+ authority: TAccountAuthority;
119
+ adminConfig?: TAccountAdminConfig;
117
120
  metadataUpdateAuthority: SetMetadataUpdateAuthorityInstructionDataArgs["metadataUpdateAuthority"];
118
121
  };
119
122
 
120
123
  export async function getSetMetadataUpdateAuthorityInstructionAsync<
121
- TAccountAuthority extends string,
122
- TAccountAdminConfig extends string,
124
+ TAccountAuthority extends InstructionSignerInput,
125
+ TAccountAdminConfig extends InstructionAccountInput,
123
126
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
124
127
  >(
125
128
  input: SetMetadataUpdateAuthorityAsyncInput<
@@ -130,17 +133,34 @@ export async function getSetMetadataUpdateAuthorityInstructionAsync<
130
133
  ): Promise<
131
134
  SetMetadataUpdateAuthorityInstruction<
132
135
  TProgramAddress,
133
- TAccountAuthority,
134
- TAccountAdminConfig
136
+ ResolvedInstructionAccountMeta<
137
+ TAccountAuthority,
138
+ InstructionAccountInputAddress<TAccountAuthority>
139
+ >,
140
+ ResolvedInstructionAccountMeta<
141
+ TAccountAdminConfig,
142
+ InstructionAccountInputAddress<TAccountAdminConfig>
143
+ >
135
144
  >
136
145
  > {
137
146
  // Program address.
138
147
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
139
148
 
149
+ // Account meta helper.
150
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
151
+
140
152
  // Original accounts.
141
153
  const originalAccounts = {
142
- authority: { value: input.authority ?? null, isWritable: false },
143
- adminConfig: { value: input.adminConfig ?? null, isWritable: true },
154
+ authority: {
155
+ value: input.authority ?? null,
156
+ isSigner: true,
157
+ isWritable: false,
158
+ },
159
+ adminConfig: {
160
+ value: input.adminConfig ?? null,
161
+ isSigner: false,
162
+ isWritable: true,
163
+ },
144
164
  };
145
165
  const accounts = originalAccounts as Record<
146
166
  keyof typeof originalAccounts,
@@ -155,7 +175,6 @@ export async function getSetMetadataUpdateAuthorityInstructionAsync<
155
175
  accounts.adminConfig.value = await findAdminConfigPda({ programAddress });
156
176
  }
157
177
 
158
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
159
178
  return Object.freeze({
160
179
  accounts: [
161
180
  getAccountMeta("authority", accounts.authority),
@@ -167,23 +186,29 @@ export async function getSetMetadataUpdateAuthorityInstructionAsync<
167
186
  programAddress,
168
187
  } as SetMetadataUpdateAuthorityInstruction<
169
188
  TProgramAddress,
170
- TAccountAuthority,
171
- TAccountAdminConfig
189
+ ResolvedInstructionAccountMeta<
190
+ TAccountAuthority,
191
+ InstructionAccountInputAddress<TAccountAuthority>
192
+ >,
193
+ ResolvedInstructionAccountMeta<
194
+ TAccountAdminConfig,
195
+ InstructionAccountInputAddress<TAccountAdminConfig>
196
+ >
172
197
  >);
173
198
  }
174
199
 
175
200
  export type SetMetadataUpdateAuthorityInput<
176
- TAccountAuthority extends string = string,
177
- TAccountAdminConfig extends string = string,
201
+ TAccountAuthority extends InstructionSignerInput = InstructionSignerInput,
202
+ TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput,
178
203
  > = {
179
- authority: TransactionSigner<TAccountAuthority>;
180
- adminConfig: Address<TAccountAdminConfig>;
204
+ authority: TAccountAuthority;
205
+ adminConfig: TAccountAdminConfig;
181
206
  metadataUpdateAuthority: SetMetadataUpdateAuthorityInstructionDataArgs["metadataUpdateAuthority"];
182
207
  };
183
208
 
184
209
  export function getSetMetadataUpdateAuthorityInstruction<
185
- TAccountAuthority extends string,
186
- TAccountAdminConfig extends string,
210
+ TAccountAuthority extends InstructionSignerInput,
211
+ TAccountAdminConfig extends InstructionAccountInput,
187
212
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
188
213
  >(
189
214
  input: SetMetadataUpdateAuthorityInput<
@@ -193,16 +218,33 @@ export function getSetMetadataUpdateAuthorityInstruction<
193
218
  config?: { programAddress?: TProgramAddress },
194
219
  ): SetMetadataUpdateAuthorityInstruction<
195
220
  TProgramAddress,
196
- TAccountAuthority,
197
- TAccountAdminConfig
221
+ ResolvedInstructionAccountMeta<
222
+ TAccountAuthority,
223
+ InstructionAccountInputAddress<TAccountAuthority>
224
+ >,
225
+ ResolvedInstructionAccountMeta<
226
+ TAccountAdminConfig,
227
+ InstructionAccountInputAddress<TAccountAdminConfig>
228
+ >
198
229
  > {
199
230
  // Program address.
200
231
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
201
232
 
233
+ // Account meta helper.
234
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
235
+
202
236
  // Original accounts.
203
237
  const originalAccounts = {
204
- authority: { value: input.authority ?? null, isWritable: false },
205
- adminConfig: { value: input.adminConfig ?? null, isWritable: true },
238
+ authority: {
239
+ value: input.authority ?? null,
240
+ isSigner: true,
241
+ isWritable: false,
242
+ },
243
+ adminConfig: {
244
+ value: input.adminConfig ?? null,
245
+ isSigner: false,
246
+ isWritable: true,
247
+ },
206
248
  };
207
249
  const accounts = originalAccounts as Record<
208
250
  keyof typeof originalAccounts,
@@ -212,7 +254,6 @@ export function getSetMetadataUpdateAuthorityInstruction<
212
254
  // Original args.
213
255
  const args = { ...input };
214
256
 
215
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
216
257
  return Object.freeze({
217
258
  accounts: [
218
259
  getAccountMeta("authority", accounts.authority),
@@ -224,8 +265,14 @@ export function getSetMetadataUpdateAuthorityInstruction<
224
265
  programAddress,
225
266
  } as SetMetadataUpdateAuthorityInstruction<
226
267
  TProgramAddress,
227
- TAccountAuthority,
228
- TAccountAdminConfig
268
+ ResolvedInstructionAccountMeta<
269
+ TAccountAuthority,
270
+ InstructionAccountInputAddress<TAccountAuthority>
271
+ >,
272
+ ResolvedInstructionAccountMeta<
273
+ TAccountAdminConfig,
274
+ InstructionAccountInputAddress<TAccountAdminConfig>
275
+ >
229
276
  >);
230
277
  }
231
278
 
@@ -29,12 +29,15 @@ import {
29
29
  type ReadonlyAccount,
30
30
  type ReadonlySignerAccount,
31
31
  type ReadonlyUint8Array,
32
- type TransactionSigner,
33
32
  type WritableAccount,
34
33
  } from "@solana/kit";
35
34
  import {
36
35
  getAccountMetaFactory,
36
+ type InstructionAccountInput,
37
+ type InstructionAccountInputAddress,
38
+ type InstructionSignerInput,
37
39
  type ResolvedInstructionAccount,
40
+ type ResolvedInstructionAccountMeta,
38
41
  } from "@solana/program-client-core";
39
42
  import { findAdminConfigPda } from "../pdas/index.js";
40
43
  import { PICON_DLMM_PROGRAM_ADDRESS } from "../programs/index.js";
@@ -118,20 +121,20 @@ export function getSetPoolDynamicFeeConfigInstructionDataCodec(): FixedSizeCodec
118
121
  }
119
122
 
120
123
  export type SetPoolDynamicFeeConfigAsyncInput<
121
- TAccountAuthority extends string = string,
122
- TAccountAdminConfig extends string = string,
123
- TAccountPool extends string = string,
124
+ TAccountAuthority extends InstructionSignerInput = InstructionSignerInput,
125
+ TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput,
126
+ TAccountPool extends InstructionAccountInput = InstructionAccountInput,
124
127
  > = {
125
- authority: TransactionSigner<TAccountAuthority>;
126
- adminConfig?: Address<TAccountAdminConfig>;
127
- pool: Address<TAccountPool>;
128
+ authority: TAccountAuthority;
129
+ adminConfig?: TAccountAdminConfig;
130
+ pool: TAccountPool;
128
131
  config: SetPoolDynamicFeeConfigInstructionDataArgs["config"];
129
132
  };
130
133
 
131
134
  export async function getSetPoolDynamicFeeConfigInstructionAsync<
132
- TAccountAuthority extends string,
133
- TAccountAdminConfig extends string,
134
- TAccountPool extends string,
135
+ TAccountAuthority extends InstructionSignerInput,
136
+ TAccountAdminConfig extends InstructionAccountInput,
137
+ TAccountPool extends InstructionAccountInput,
135
138
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
136
139
  >(
137
140
  input: SetPoolDynamicFeeConfigAsyncInput<
@@ -143,19 +146,39 @@ export async function getSetPoolDynamicFeeConfigInstructionAsync<
143
146
  ): Promise<
144
147
  SetPoolDynamicFeeConfigInstruction<
145
148
  TProgramAddress,
146
- TAccountAuthority,
147
- TAccountAdminConfig,
148
- TAccountPool
149
+ ResolvedInstructionAccountMeta<
150
+ TAccountAuthority,
151
+ InstructionAccountInputAddress<TAccountAuthority>
152
+ >,
153
+ ResolvedInstructionAccountMeta<
154
+ TAccountAdminConfig,
155
+ InstructionAccountInputAddress<TAccountAdminConfig>
156
+ >,
157
+ ResolvedInstructionAccountMeta<
158
+ TAccountPool,
159
+ InstructionAccountInputAddress<TAccountPool>
160
+ >
149
161
  >
150
162
  > {
151
163
  // Program address.
152
164
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
153
165
 
166
+ // Account meta helper.
167
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
168
+
154
169
  // Original accounts.
155
170
  const originalAccounts = {
156
- authority: { value: input.authority ?? null, isWritable: false },
157
- adminConfig: { value: input.adminConfig ?? null, isWritable: false },
158
- pool: { value: input.pool ?? null, isWritable: true },
171
+ authority: {
172
+ value: input.authority ?? null,
173
+ isSigner: true,
174
+ isWritable: false,
175
+ },
176
+ adminConfig: {
177
+ value: input.adminConfig ?? null,
178
+ isSigner: false,
179
+ isWritable: false,
180
+ },
181
+ pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
159
182
  };
160
183
  const accounts = originalAccounts as Record<
161
184
  keyof typeof originalAccounts,
@@ -170,7 +193,6 @@ export async function getSetPoolDynamicFeeConfigInstructionAsync<
170
193
  accounts.adminConfig.value = await findAdminConfigPda({ programAddress });
171
194
  }
172
195
 
173
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
174
196
  return Object.freeze({
175
197
  accounts: [
176
198
  getAccountMeta("authority", accounts.authority),
@@ -183,27 +205,36 @@ export async function getSetPoolDynamicFeeConfigInstructionAsync<
183
205
  programAddress,
184
206
  } as SetPoolDynamicFeeConfigInstruction<
185
207
  TProgramAddress,
186
- TAccountAuthority,
187
- TAccountAdminConfig,
188
- TAccountPool
208
+ ResolvedInstructionAccountMeta<
209
+ TAccountAuthority,
210
+ InstructionAccountInputAddress<TAccountAuthority>
211
+ >,
212
+ ResolvedInstructionAccountMeta<
213
+ TAccountAdminConfig,
214
+ InstructionAccountInputAddress<TAccountAdminConfig>
215
+ >,
216
+ ResolvedInstructionAccountMeta<
217
+ TAccountPool,
218
+ InstructionAccountInputAddress<TAccountPool>
219
+ >
189
220
  >);
190
221
  }
191
222
 
192
223
  export type SetPoolDynamicFeeConfigInput<
193
- TAccountAuthority extends string = string,
194
- TAccountAdminConfig extends string = string,
195
- TAccountPool extends string = string,
224
+ TAccountAuthority extends InstructionSignerInput = InstructionSignerInput,
225
+ TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput,
226
+ TAccountPool extends InstructionAccountInput = InstructionAccountInput,
196
227
  > = {
197
- authority: TransactionSigner<TAccountAuthority>;
198
- adminConfig: Address<TAccountAdminConfig>;
199
- pool: Address<TAccountPool>;
228
+ authority: TAccountAuthority;
229
+ adminConfig: TAccountAdminConfig;
230
+ pool: TAccountPool;
200
231
  config: SetPoolDynamicFeeConfigInstructionDataArgs["config"];
201
232
  };
202
233
 
203
234
  export function getSetPoolDynamicFeeConfigInstruction<
204
- TAccountAuthority extends string,
205
- TAccountAdminConfig extends string,
206
- TAccountPool extends string,
235
+ TAccountAuthority extends InstructionSignerInput,
236
+ TAccountAdminConfig extends InstructionAccountInput,
237
+ TAccountPool extends InstructionAccountInput,
207
238
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
208
239
  >(
209
240
  input: SetPoolDynamicFeeConfigInput<
@@ -214,18 +245,38 @@ export function getSetPoolDynamicFeeConfigInstruction<
214
245
  config?: { programAddress?: TProgramAddress },
215
246
  ): SetPoolDynamicFeeConfigInstruction<
216
247
  TProgramAddress,
217
- TAccountAuthority,
218
- TAccountAdminConfig,
219
- TAccountPool
248
+ ResolvedInstructionAccountMeta<
249
+ TAccountAuthority,
250
+ InstructionAccountInputAddress<TAccountAuthority>
251
+ >,
252
+ ResolvedInstructionAccountMeta<
253
+ TAccountAdminConfig,
254
+ InstructionAccountInputAddress<TAccountAdminConfig>
255
+ >,
256
+ ResolvedInstructionAccountMeta<
257
+ TAccountPool,
258
+ InstructionAccountInputAddress<TAccountPool>
259
+ >
220
260
  > {
221
261
  // Program address.
222
262
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
223
263
 
264
+ // Account meta helper.
265
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
266
+
224
267
  // Original accounts.
225
268
  const originalAccounts = {
226
- authority: { value: input.authority ?? null, isWritable: false },
227
- adminConfig: { value: input.adminConfig ?? null, isWritable: false },
228
- pool: { value: input.pool ?? null, isWritable: true },
269
+ authority: {
270
+ value: input.authority ?? null,
271
+ isSigner: true,
272
+ isWritable: false,
273
+ },
274
+ adminConfig: {
275
+ value: input.adminConfig ?? null,
276
+ isSigner: false,
277
+ isWritable: false,
278
+ },
279
+ pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
229
280
  };
230
281
  const accounts = originalAccounts as Record<
231
282
  keyof typeof originalAccounts,
@@ -235,7 +286,6 @@ export function getSetPoolDynamicFeeConfigInstruction<
235
286
  // Original args.
236
287
  const args = { ...input };
237
288
 
238
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
239
289
  return Object.freeze({
240
290
  accounts: [
241
291
  getAccountMeta("authority", accounts.authority),
@@ -248,9 +298,18 @@ export function getSetPoolDynamicFeeConfigInstruction<
248
298
  programAddress,
249
299
  } as SetPoolDynamicFeeConfigInstruction<
250
300
  TProgramAddress,
251
- TAccountAuthority,
252
- TAccountAdminConfig,
253
- TAccountPool
301
+ ResolvedInstructionAccountMeta<
302
+ TAccountAuthority,
303
+ InstructionAccountInputAddress<TAccountAuthority>
304
+ >,
305
+ ResolvedInstructionAccountMeta<
306
+ TAccountAdminConfig,
307
+ InstructionAccountInputAddress<TAccountAdminConfig>
308
+ >,
309
+ ResolvedInstructionAccountMeta<
310
+ TAccountPool,
311
+ InstructionAccountInputAddress<TAccountPool>
312
+ >
254
313
  >);
255
314
  }
256
315