@picon-finance/dlmm-sdk 2.0.3 → 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 (77) hide show
  1. package/dist/generated/instructions/acceptAdminAuthority.d.ts +12 -11
  2. package/dist/generated/instructions/acceptAdminAuthority.d.ts.map +1 -1
  3. package/dist/generated/instructions/acceptAdminAuthority.js +16 -4
  4. package/dist/generated/instructions/claimFee.d.ts +19 -18
  5. package/dist/generated/instructions/claimFee.d.ts.map +1 -1
  6. package/dist/generated/instructions/claimFee.js +52 -12
  7. package/dist/generated/instructions/claimProtocolFee.d.ts +30 -29
  8. package/dist/generated/instructions/claimProtocolFee.d.ts.map +1 -1
  9. package/dist/generated/instructions/claimProtocolFee.js +90 -20
  10. package/dist/generated/instructions/closePosition.d.ts +18 -17
  11. package/dist/generated/instructions/closePosition.d.ts.map +1 -1
  12. package/dist/generated/instructions/closePosition.js +38 -10
  13. package/dist/generated/instructions/createAdminConfig.d.ts +18 -17
  14. package/dist/generated/instructions/createAdminConfig.d.ts.map +1 -1
  15. package/dist/generated/instructions/createAdminConfig.js +54 -12
  16. package/dist/generated/instructions/createBinArray.d.ts +16 -15
  17. package/dist/generated/instructions/createBinArray.d.ts.map +1 -1
  18. package/dist/generated/instructions/createBinArray.js +28 -10
  19. package/dist/generated/instructions/createPool.d.ts +30 -29
  20. package/dist/generated/instructions/createPool.d.ts.map +1 -1
  21. package/dist/generated/instructions/createPool.js +98 -22
  22. package/dist/generated/instructions/deleteBinArray.d.ts +18 -17
  23. package/dist/generated/instructions/deleteBinArray.d.ts.map +1 -1
  24. package/dist/generated/instructions/deleteBinArray.js +54 -12
  25. package/dist/generated/instructions/depositByWeight.d.ts +19 -18
  26. package/dist/generated/instructions/depositByWeight.d.ts.map +1 -1
  27. package/dist/generated/instructions/depositByWeight.js +52 -12
  28. package/dist/generated/instructions/openPosition.d.ts +28 -27
  29. package/dist/generated/instructions/openPosition.d.ts.map +1 -1
  30. package/dist/generated/instructions/openPosition.js +64 -16
  31. package/dist/generated/instructions/resetAdminAuthority.d.ts +16 -15
  32. package/dist/generated/instructions/resetAdminAuthority.d.ts.map +1 -1
  33. package/dist/generated/instructions/resetAdminAuthority.js +44 -10
  34. package/dist/generated/instructions/setMetadataUpdateAuthority.d.ts +12 -11
  35. package/dist/generated/instructions/setMetadataUpdateAuthority.d.ts.map +1 -1
  36. package/dist/generated/instructions/setMetadataUpdateAuthority.js +24 -6
  37. package/dist/generated/instructions/setPoolDynamicFeeConfig.d.ts +14 -13
  38. package/dist/generated/instructions/setPoolDynamicFeeConfig.d.ts.map +1 -1
  39. package/dist/generated/instructions/setPoolDynamicFeeConfig.js +26 -8
  40. package/dist/generated/instructions/setPoolProtocolShare.d.ts +14 -13
  41. package/dist/generated/instructions/setPoolProtocolShare.d.ts.map +1 -1
  42. package/dist/generated/instructions/setPoolProtocolShare.js +26 -8
  43. package/dist/generated/instructions/swapExactIn.d.ts +15 -14
  44. package/dist/generated/instructions/swapExactIn.d.ts.map +1 -1
  45. package/dist/generated/instructions/swapExactIn.js +36 -9
  46. package/dist/generated/instructions/swapExactOut.d.ts +15 -14
  47. package/dist/generated/instructions/swapExactOut.d.ts.map +1 -1
  48. package/dist/generated/instructions/swapExactOut.js +36 -9
  49. package/dist/generated/instructions/syncPool.d.ts +7 -6
  50. package/dist/generated/instructions/syncPool.d.ts.map +1 -1
  51. package/dist/generated/instructions/syncPool.js +4 -3
  52. package/dist/generated/instructions/transferAdminAuthority.d.ts +12 -11
  53. package/dist/generated/instructions/transferAdminAuthority.d.ts.map +1 -1
  54. package/dist/generated/instructions/transferAdminAuthority.js +24 -6
  55. package/dist/generated/instructions/withdraw.d.ts +19 -18
  56. package/dist/generated/instructions/withdraw.d.ts.map +1 -1
  57. package/dist/generated/instructions/withdraw.js +52 -12
  58. package/package.json +5 -5
  59. package/src/generated/instructions/acceptAdminAuthority.ts +68 -25
  60. package/src/generated/instructions/claimFee.ts +218 -83
  61. package/src/generated/instructions/claimProtocolFee.ts +346 -131
  62. package/src/generated/instructions/closePosition.ts +160 -61
  63. package/src/generated/instructions/createAdminConfig.ts +172 -63
  64. package/src/generated/instructions/createBinArray.ts +124 -51
  65. package/src/generated/instructions/createPool.ts +354 -133
  66. package/src/generated/instructions/deleteBinArray.ts +172 -63
  67. package/src/generated/instructions/depositByWeight.ts +218 -83
  68. package/src/generated/instructions/openPosition.ts +300 -117
  69. package/src/generated/instructions/resetAdminAuthority.ts +138 -51
  70. package/src/generated/instructions/setMetadataUpdateAuthority.ts +74 -27
  71. package/src/generated/instructions/setPoolDynamicFeeConfig.ts +98 -39
  72. package/src/generated/instructions/setPoolProtocolShare.ts +98 -39
  73. package/src/generated/instructions/swapExactIn.ts +155 -60
  74. package/src/generated/instructions/swapExactOut.ts +155 -60
  75. package/src/generated/instructions/syncPool.ts +37 -12
  76. package/src/generated/instructions/transferAdminAuthority.ts +74 -27
  77. package/src/generated/instructions/withdraw.ts +218 -83
@@ -28,12 +28,15 @@ import {
28
28
  type InstructionWithData,
29
29
  type ReadonlySignerAccount,
30
30
  type ReadonlyUint8Array,
31
- type TransactionSigner,
32
31
  type WritableAccount,
33
32
  } from "@solana/kit";
34
33
  import {
35
34
  getAccountMetaFactory,
35
+ type InstructionAccountInput,
36
+ type InstructionAccountInputAddress,
37
+ type InstructionSignerInput,
36
38
  type ResolvedInstructionAccount,
39
+ type ResolvedInstructionAccountMeta,
37
40
  } from "@solana/program-client-core";
38
41
  import { findAdminConfigPda } from "../pdas/index.js";
39
42
  import { PICON_DLMM_PROGRAM_ADDRESS } from "../programs/index.js";
@@ -100,16 +103,17 @@ export function getAcceptAdminAuthorityInstructionDataCodec(): FixedSizeCodec<
100
103
  }
101
104
 
102
105
  export type AcceptAdminAuthorityAsyncInput<
103
- TAccountPendingAuthority extends string = string,
104
- TAccountAdminConfig extends string = string,
106
+ TAccountPendingAuthority extends InstructionSignerInput =
107
+ InstructionSignerInput,
108
+ TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput,
105
109
  > = {
106
- pendingAuthority: TransactionSigner<TAccountPendingAuthority>;
107
- adminConfig?: Address<TAccountAdminConfig>;
110
+ pendingAuthority: TAccountPendingAuthority;
111
+ adminConfig?: TAccountAdminConfig;
108
112
  };
109
113
 
110
114
  export async function getAcceptAdminAuthorityInstructionAsync<
111
- TAccountPendingAuthority extends string,
112
- TAccountAdminConfig extends string,
115
+ TAccountPendingAuthority extends InstructionSignerInput,
116
+ TAccountAdminConfig extends InstructionAccountInput,
113
117
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
114
118
  >(
115
119
  input: AcceptAdminAuthorityAsyncInput<
@@ -120,20 +124,34 @@ export async function getAcceptAdminAuthorityInstructionAsync<
120
124
  ): Promise<
121
125
  AcceptAdminAuthorityInstruction<
122
126
  TProgramAddress,
123
- TAccountPendingAuthority,
124
- TAccountAdminConfig
127
+ ResolvedInstructionAccountMeta<
128
+ TAccountPendingAuthority,
129
+ InstructionAccountInputAddress<TAccountPendingAuthority>
130
+ >,
131
+ ResolvedInstructionAccountMeta<
132
+ TAccountAdminConfig,
133
+ InstructionAccountInputAddress<TAccountAdminConfig>
134
+ >
125
135
  >
126
136
  > {
127
137
  // Program address.
128
138
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
129
139
 
140
+ // Account meta helper.
141
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
142
+
130
143
  // Original accounts.
131
144
  const originalAccounts = {
132
145
  pendingAuthority: {
133
146
  value: input.pendingAuthority ?? null,
147
+ isSigner: true,
134
148
  isWritable: false,
135
149
  },
136
- adminConfig: { value: input.adminConfig ?? null, isWritable: true },
150
+ adminConfig: {
151
+ value: input.adminConfig ?? null,
152
+ isSigner: false,
153
+ isWritable: true,
154
+ },
137
155
  };
138
156
  const accounts = originalAccounts as Record<
139
157
  keyof typeof originalAccounts,
@@ -145,7 +163,6 @@ export async function getAcceptAdminAuthorityInstructionAsync<
145
163
  accounts.adminConfig.value = await findAdminConfigPda({ programAddress });
146
164
  }
147
165
 
148
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
149
166
  return Object.freeze({
150
167
  accounts: [
151
168
  getAccountMeta("pendingAuthority", accounts.pendingAuthority),
@@ -155,22 +172,29 @@ export async function getAcceptAdminAuthorityInstructionAsync<
155
172
  programAddress,
156
173
  } as AcceptAdminAuthorityInstruction<
157
174
  TProgramAddress,
158
- TAccountPendingAuthority,
159
- TAccountAdminConfig
175
+ ResolvedInstructionAccountMeta<
176
+ TAccountPendingAuthority,
177
+ InstructionAccountInputAddress<TAccountPendingAuthority>
178
+ >,
179
+ ResolvedInstructionAccountMeta<
180
+ TAccountAdminConfig,
181
+ InstructionAccountInputAddress<TAccountAdminConfig>
182
+ >
160
183
  >);
161
184
  }
162
185
 
163
186
  export type AcceptAdminAuthorityInput<
164
- TAccountPendingAuthority extends string = string,
165
- TAccountAdminConfig extends string = string,
187
+ TAccountPendingAuthority extends InstructionSignerInput =
188
+ InstructionSignerInput,
189
+ TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput,
166
190
  > = {
167
- pendingAuthority: TransactionSigner<TAccountPendingAuthority>;
168
- adminConfig: Address<TAccountAdminConfig>;
191
+ pendingAuthority: TAccountPendingAuthority;
192
+ adminConfig: TAccountAdminConfig;
169
193
  };
170
194
 
171
195
  export function getAcceptAdminAuthorityInstruction<
172
- TAccountPendingAuthority extends string,
173
- TAccountAdminConfig extends string,
196
+ TAccountPendingAuthority extends InstructionSignerInput,
197
+ TAccountAdminConfig extends InstructionAccountInput,
174
198
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
175
199
  >(
176
200
  input: AcceptAdminAuthorityInput<
@@ -180,26 +204,39 @@ export function getAcceptAdminAuthorityInstruction<
180
204
  config?: { programAddress?: TProgramAddress },
181
205
  ): AcceptAdminAuthorityInstruction<
182
206
  TProgramAddress,
183
- TAccountPendingAuthority,
184
- TAccountAdminConfig
207
+ ResolvedInstructionAccountMeta<
208
+ TAccountPendingAuthority,
209
+ InstructionAccountInputAddress<TAccountPendingAuthority>
210
+ >,
211
+ ResolvedInstructionAccountMeta<
212
+ TAccountAdminConfig,
213
+ InstructionAccountInputAddress<TAccountAdminConfig>
214
+ >
185
215
  > {
186
216
  // Program address.
187
217
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
188
218
 
219
+ // Account meta helper.
220
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
221
+
189
222
  // Original accounts.
190
223
  const originalAccounts = {
191
224
  pendingAuthority: {
192
225
  value: input.pendingAuthority ?? null,
226
+ isSigner: true,
193
227
  isWritable: false,
194
228
  },
195
- adminConfig: { value: input.adminConfig ?? null, isWritable: true },
229
+ adminConfig: {
230
+ value: input.adminConfig ?? null,
231
+ isSigner: false,
232
+ isWritable: true,
233
+ },
196
234
  };
197
235
  const accounts = originalAccounts as Record<
198
236
  keyof typeof originalAccounts,
199
237
  ResolvedInstructionAccount
200
238
  >;
201
239
 
202
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
203
240
  return Object.freeze({
204
241
  accounts: [
205
242
  getAccountMeta("pendingAuthority", accounts.pendingAuthority),
@@ -209,8 +246,14 @@ export function getAcceptAdminAuthorityInstruction<
209
246
  programAddress,
210
247
  } as AcceptAdminAuthorityInstruction<
211
248
  TProgramAddress,
212
- TAccountPendingAuthority,
213
- TAccountAdminConfig
249
+ ResolvedInstructionAccountMeta<
250
+ TAccountPendingAuthority,
251
+ InstructionAccountInputAddress<TAccountPendingAuthority>
252
+ >,
253
+ ResolvedInstructionAccountMeta<
254
+ TAccountAdminConfig,
255
+ InstructionAccountInputAddress<TAccountAdminConfig>
256
+ >
214
257
  >);
215
258
  }
216
259
 
@@ -35,12 +35,15 @@ import {
35
35
  type ReadonlyAccount,
36
36
  type ReadonlySignerAccount,
37
37
  type ReadonlyUint8Array,
38
- type TransactionSigner,
39
38
  type WritableAccount,
40
39
  } from "@solana/kit";
41
40
  import {
42
41
  getAccountMetaFactory,
42
+ type InstructionAccountInput,
43
+ type InstructionAccountInputAddress,
44
+ type InstructionSignerInput,
43
45
  type ResolvedInstructionAccount,
46
+ type ResolvedInstructionAccountMeta,
44
47
  } from "@solana/program-client-core";
45
48
  import { PICON_DLMM_PROGRAM_ADDRESS } from "../programs/index.js";
46
49
  import {
@@ -177,55 +180,62 @@ export function getClaimFeeInstructionDataCodec(): Codec<
177
180
  }
178
181
 
179
182
  export type ClaimFeeInput<
180
- TAccountOwner extends string = string,
181
- TAccountPool extends string = string,
182
- TAccountPosition extends string = string,
183
- TAccountPositionTokenAccount extends string = string,
184
- TAccountTokenMintX extends string = string,
185
- TAccountTokenMintY extends string = string,
186
- TAccountTokenOwnerAccountX extends string = string,
187
- TAccountTokenOwnerAccountY extends string = string,
188
- TAccountTokenVaultX extends string = string,
189
- TAccountTokenVaultY extends string = string,
190
- TAccountTokenProgramX extends string = string,
191
- TAccountTokenProgramY extends string = string,
192
- TAccountLowerBinArray extends string = string,
193
- TAccountUpperBinArray extends string = string,
183
+ TAccountOwner extends InstructionSignerInput = InstructionSignerInput,
184
+ TAccountPool extends InstructionAccountInput = InstructionAccountInput,
185
+ TAccountPosition extends InstructionAccountInput = InstructionAccountInput,
186
+ TAccountPositionTokenAccount extends InstructionAccountInput =
187
+ InstructionAccountInput,
188
+ TAccountTokenMintX extends InstructionAccountInput = InstructionAccountInput,
189
+ TAccountTokenMintY extends InstructionAccountInput = InstructionAccountInput,
190
+ TAccountTokenOwnerAccountX extends InstructionAccountInput =
191
+ InstructionAccountInput,
192
+ TAccountTokenOwnerAccountY extends InstructionAccountInput =
193
+ InstructionAccountInput,
194
+ TAccountTokenVaultX extends InstructionAccountInput = InstructionAccountInput,
195
+ TAccountTokenVaultY extends InstructionAccountInput = InstructionAccountInput,
196
+ TAccountTokenProgramX extends InstructionAccountInput =
197
+ InstructionAccountInput,
198
+ TAccountTokenProgramY extends InstructionAccountInput =
199
+ InstructionAccountInput,
200
+ TAccountLowerBinArray extends InstructionAccountInput =
201
+ InstructionAccountInput,
202
+ TAccountUpperBinArray extends InstructionAccountInput =
203
+ InstructionAccountInput,
194
204
  > = {
195
- owner: TransactionSigner<TAccountOwner>;
196
- pool: Address<TAccountPool>;
197
- position: Address<TAccountPosition>;
198
- positionTokenAccount: Address<TAccountPositionTokenAccount>;
199
- tokenMintX: Address<TAccountTokenMintX>;
200
- tokenMintY: Address<TAccountTokenMintY>;
201
- tokenOwnerAccountX: Address<TAccountTokenOwnerAccountX>;
202
- tokenOwnerAccountY: Address<TAccountTokenOwnerAccountY>;
203
- tokenVaultX: Address<TAccountTokenVaultX>;
204
- tokenVaultY: Address<TAccountTokenVaultY>;
205
- tokenProgramX: Address<TAccountTokenProgramX>;
206
- tokenProgramY: Address<TAccountTokenProgramY>;
207
- lowerBinArray: Address<TAccountLowerBinArray>;
208
- upperBinArray?: Address<TAccountUpperBinArray>;
205
+ owner: TAccountOwner;
206
+ pool: TAccountPool;
207
+ position: TAccountPosition;
208
+ positionTokenAccount: TAccountPositionTokenAccount;
209
+ tokenMintX: TAccountTokenMintX;
210
+ tokenMintY: TAccountTokenMintY;
211
+ tokenOwnerAccountX: TAccountTokenOwnerAccountX;
212
+ tokenOwnerAccountY: TAccountTokenOwnerAccountY;
213
+ tokenVaultX: TAccountTokenVaultX;
214
+ tokenVaultY: TAccountTokenVaultY;
215
+ tokenProgramX: TAccountTokenProgramX;
216
+ tokenProgramY: TAccountTokenProgramY;
217
+ lowerBinArray: TAccountLowerBinArray;
218
+ upperBinArray?: TAccountUpperBinArray;
209
219
  lowerBinId: ClaimFeeInstructionDataArgs["lowerBinId"];
210
220
  upperBinId: ClaimFeeInstructionDataArgs["upperBinId"];
211
221
  remainingAccountsScheme: ClaimFeeInstructionDataArgs["remainingAccountsScheme"];
212
222
  };
213
223
 
214
224
  export function getClaimFeeInstruction<
215
- TAccountOwner extends string,
216
- TAccountPool extends string,
217
- TAccountPosition extends string,
218
- TAccountPositionTokenAccount extends string,
219
- TAccountTokenMintX extends string,
220
- TAccountTokenMintY extends string,
221
- TAccountTokenOwnerAccountX extends string,
222
- TAccountTokenOwnerAccountY extends string,
223
- TAccountTokenVaultX extends string,
224
- TAccountTokenVaultY extends string,
225
- TAccountTokenProgramX extends string,
226
- TAccountTokenProgramY extends string,
227
- TAccountLowerBinArray extends string,
228
- TAccountUpperBinArray extends string,
225
+ TAccountOwner extends InstructionSignerInput,
226
+ TAccountPool extends InstructionAccountInput,
227
+ TAccountPosition extends InstructionAccountInput,
228
+ TAccountPositionTokenAccount extends InstructionAccountInput,
229
+ TAccountTokenMintX extends InstructionAccountInput,
230
+ TAccountTokenMintY extends InstructionAccountInput,
231
+ TAccountTokenOwnerAccountX extends InstructionAccountInput,
232
+ TAccountTokenOwnerAccountY extends InstructionAccountInput,
233
+ TAccountTokenVaultX extends InstructionAccountInput,
234
+ TAccountTokenVaultY extends InstructionAccountInput,
235
+ TAccountTokenProgramX extends InstructionAccountInput,
236
+ TAccountTokenProgramY extends InstructionAccountInput,
237
+ TAccountLowerBinArray extends InstructionAccountInput,
238
+ TAccountUpperBinArray extends InstructionAccountInput,
229
239
  TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS,
230
240
  >(
231
241
  input: ClaimFeeInput<
@@ -247,49 +257,133 @@ export function getClaimFeeInstruction<
247
257
  config?: { programAddress?: TProgramAddress },
248
258
  ): ClaimFeeInstruction<
249
259
  TProgramAddress,
250
- TAccountOwner,
251
- TAccountPool,
252
- TAccountPosition,
253
- TAccountPositionTokenAccount,
254
- TAccountTokenMintX,
255
- TAccountTokenMintY,
256
- TAccountTokenOwnerAccountX,
257
- TAccountTokenOwnerAccountY,
258
- TAccountTokenVaultX,
259
- TAccountTokenVaultY,
260
- TAccountTokenProgramX,
261
- TAccountTokenProgramY,
262
- TAccountLowerBinArray,
263
- TAccountUpperBinArray
260
+ ResolvedInstructionAccountMeta<
261
+ TAccountOwner,
262
+ InstructionAccountInputAddress<TAccountOwner>
263
+ >,
264
+ ResolvedInstructionAccountMeta<
265
+ TAccountPool,
266
+ InstructionAccountInputAddress<TAccountPool>
267
+ >,
268
+ ResolvedInstructionAccountMeta<
269
+ TAccountPosition,
270
+ InstructionAccountInputAddress<TAccountPosition>
271
+ >,
272
+ ResolvedInstructionAccountMeta<
273
+ TAccountPositionTokenAccount,
274
+ InstructionAccountInputAddress<TAccountPositionTokenAccount>
275
+ >,
276
+ ResolvedInstructionAccountMeta<
277
+ TAccountTokenMintX,
278
+ InstructionAccountInputAddress<TAccountTokenMintX>
279
+ >,
280
+ ResolvedInstructionAccountMeta<
281
+ TAccountTokenMintY,
282
+ InstructionAccountInputAddress<TAccountTokenMintY>
283
+ >,
284
+ ResolvedInstructionAccountMeta<
285
+ TAccountTokenOwnerAccountX,
286
+ InstructionAccountInputAddress<TAccountTokenOwnerAccountX>
287
+ >,
288
+ ResolvedInstructionAccountMeta<
289
+ TAccountTokenOwnerAccountY,
290
+ InstructionAccountInputAddress<TAccountTokenOwnerAccountY>
291
+ >,
292
+ ResolvedInstructionAccountMeta<
293
+ TAccountTokenVaultX,
294
+ InstructionAccountInputAddress<TAccountTokenVaultX>
295
+ >,
296
+ ResolvedInstructionAccountMeta<
297
+ TAccountTokenVaultY,
298
+ InstructionAccountInputAddress<TAccountTokenVaultY>
299
+ >,
300
+ ResolvedInstructionAccountMeta<
301
+ TAccountTokenProgramX,
302
+ InstructionAccountInputAddress<TAccountTokenProgramX>
303
+ >,
304
+ ResolvedInstructionAccountMeta<
305
+ TAccountTokenProgramY,
306
+ InstructionAccountInputAddress<TAccountTokenProgramY>
307
+ >,
308
+ ResolvedInstructionAccountMeta<
309
+ TAccountLowerBinArray,
310
+ InstructionAccountInputAddress<TAccountLowerBinArray>
311
+ >,
312
+ ResolvedInstructionAccountMeta<
313
+ TAccountUpperBinArray,
314
+ InstructionAccountInputAddress<TAccountUpperBinArray>
315
+ >
264
316
  > {
265
317
  // Program address.
266
318
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
267
319
 
320
+ // Account meta helper.
321
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
322
+
268
323
  // Original accounts.
269
324
  const originalAccounts = {
270
- owner: { value: input.owner ?? null, isWritable: false },
271
- pool: { value: input.pool ?? null, isWritable: false },
272
- position: { value: input.position ?? null, isWritable: true },
325
+ owner: { value: input.owner ?? null, isSigner: true, isWritable: false },
326
+ pool: { value: input.pool ?? null, isSigner: false, isWritable: false },
327
+ position: {
328
+ value: input.position ?? null,
329
+ isSigner: false,
330
+ isWritable: true,
331
+ },
273
332
  positionTokenAccount: {
274
333
  value: input.positionTokenAccount ?? null,
334
+ isSigner: false,
335
+ isWritable: false,
336
+ },
337
+ tokenMintX: {
338
+ value: input.tokenMintX ?? null,
339
+ isSigner: false,
340
+ isWritable: false,
341
+ },
342
+ tokenMintY: {
343
+ value: input.tokenMintY ?? null,
344
+ isSigner: false,
275
345
  isWritable: false,
276
346
  },
277
- tokenMintX: { value: input.tokenMintX ?? null, isWritable: false },
278
- tokenMintY: { value: input.tokenMintY ?? null, isWritable: false },
279
347
  tokenOwnerAccountX: {
280
348
  value: input.tokenOwnerAccountX ?? null,
349
+ isSigner: false,
281
350
  isWritable: true,
282
351
  },
283
352
  tokenOwnerAccountY: {
284
353
  value: input.tokenOwnerAccountY ?? null,
354
+ isSigner: false,
355
+ isWritable: true,
356
+ },
357
+ tokenVaultX: {
358
+ value: input.tokenVaultX ?? null,
359
+ isSigner: false,
360
+ isWritable: true,
361
+ },
362
+ tokenVaultY: {
363
+ value: input.tokenVaultY ?? null,
364
+ isSigner: false,
285
365
  isWritable: true,
286
366
  },
287
- tokenVaultX: { value: input.tokenVaultX ?? null, isWritable: true },
288
- tokenVaultY: { value: input.tokenVaultY ?? null, isWritable: true },
289
- tokenProgramX: { value: input.tokenProgramX ?? null, isWritable: false },
290
- tokenProgramY: { value: input.tokenProgramY ?? null, isWritable: false },
291
- lowerBinArray: { value: input.lowerBinArray ?? null, isWritable: false },
292
- upperBinArray: { value: input.upperBinArray ?? null, isWritable: false },
367
+ tokenProgramX: {
368
+ value: input.tokenProgramX ?? null,
369
+ isSigner: false,
370
+ isWritable: false,
371
+ },
372
+ tokenProgramY: {
373
+ value: input.tokenProgramY ?? null,
374
+ isSigner: false,
375
+ isWritable: false,
376
+ },
377
+ lowerBinArray: {
378
+ value: input.lowerBinArray ?? null,
379
+ isSigner: false,
380
+ isWritable: false,
381
+ },
382
+ upperBinArray: {
383
+ value: input.upperBinArray ?? null,
384
+ isSigner: false,
385
+ isWritable: false,
386
+ },
293
387
  };
294
388
  const accounts = originalAccounts as Record<
295
389
  keyof typeof originalAccounts,
@@ -299,7 +393,6 @@ export function getClaimFeeInstruction<
299
393
  // Original args.
300
394
  const args = { ...input };
301
395
 
302
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
303
396
  return Object.freeze({
304
397
  accounts: [
305
398
  getAccountMeta("owner", accounts.owner),
@@ -323,20 +416,62 @@ export function getClaimFeeInstruction<
323
416
  programAddress,
324
417
  } as ClaimFeeInstruction<
325
418
  TProgramAddress,
326
- TAccountOwner,
327
- TAccountPool,
328
- TAccountPosition,
329
- TAccountPositionTokenAccount,
330
- TAccountTokenMintX,
331
- TAccountTokenMintY,
332
- TAccountTokenOwnerAccountX,
333
- TAccountTokenOwnerAccountY,
334
- TAccountTokenVaultX,
335
- TAccountTokenVaultY,
336
- TAccountTokenProgramX,
337
- TAccountTokenProgramY,
338
- TAccountLowerBinArray,
339
- TAccountUpperBinArray
419
+ ResolvedInstructionAccountMeta<
420
+ TAccountOwner,
421
+ InstructionAccountInputAddress<TAccountOwner>
422
+ >,
423
+ ResolvedInstructionAccountMeta<
424
+ TAccountPool,
425
+ InstructionAccountInputAddress<TAccountPool>
426
+ >,
427
+ ResolvedInstructionAccountMeta<
428
+ TAccountPosition,
429
+ InstructionAccountInputAddress<TAccountPosition>
430
+ >,
431
+ ResolvedInstructionAccountMeta<
432
+ TAccountPositionTokenAccount,
433
+ InstructionAccountInputAddress<TAccountPositionTokenAccount>
434
+ >,
435
+ ResolvedInstructionAccountMeta<
436
+ TAccountTokenMintX,
437
+ InstructionAccountInputAddress<TAccountTokenMintX>
438
+ >,
439
+ ResolvedInstructionAccountMeta<
440
+ TAccountTokenMintY,
441
+ InstructionAccountInputAddress<TAccountTokenMintY>
442
+ >,
443
+ ResolvedInstructionAccountMeta<
444
+ TAccountTokenOwnerAccountX,
445
+ InstructionAccountInputAddress<TAccountTokenOwnerAccountX>
446
+ >,
447
+ ResolvedInstructionAccountMeta<
448
+ TAccountTokenOwnerAccountY,
449
+ InstructionAccountInputAddress<TAccountTokenOwnerAccountY>
450
+ >,
451
+ ResolvedInstructionAccountMeta<
452
+ TAccountTokenVaultX,
453
+ InstructionAccountInputAddress<TAccountTokenVaultX>
454
+ >,
455
+ ResolvedInstructionAccountMeta<
456
+ TAccountTokenVaultY,
457
+ InstructionAccountInputAddress<TAccountTokenVaultY>
458
+ >,
459
+ ResolvedInstructionAccountMeta<
460
+ TAccountTokenProgramX,
461
+ InstructionAccountInputAddress<TAccountTokenProgramX>
462
+ >,
463
+ ResolvedInstructionAccountMeta<
464
+ TAccountTokenProgramY,
465
+ InstructionAccountInputAddress<TAccountTokenProgramY>
466
+ >,
467
+ ResolvedInstructionAccountMeta<
468
+ TAccountLowerBinArray,
469
+ InstructionAccountInputAddress<TAccountLowerBinArray>
470
+ >,
471
+ ResolvedInstructionAccountMeta<
472
+ TAccountUpperBinArray,
473
+ InstructionAccountInputAddress<TAccountUpperBinArray>
474
+ >
340
475
  >);
341
476
  }
342
477