@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
@@ -5,7 +5,8 @@
5
5
  *
6
6
  * @see https://github.com/codama-idl/codama
7
7
  */
8
- import { type AccountMeta, type AccountSignerMeta, type Address, type Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type Option, type OptionOrNullable, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from "@solana/kit";
8
+ import { type AccountMeta, type AccountSignerMeta, type Address, type Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type Option, type OptionOrNullable, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type WritableAccount } from "@solana/kit";
9
+ import { type InstructionAccountInput, type InstructionAccountInputAddress, type InstructionSignerInput, type ResolvedInstructionAccountMeta } from "@solana/program-client-core";
9
10
  import { PICON_DLMM_PROGRAM_ADDRESS } from "../programs/index.js";
10
11
  import { type RemainingAccountsScheme, type RemainingAccountsSchemeArgs } from "../types/index.js";
11
12
  export declare const WITHDRAW_DISCRIMINATOR: ReadonlyUint8Array;
@@ -43,29 +44,29 @@ export type WithdrawInstructionDataArgs = {
43
44
  export declare function getWithdrawInstructionDataEncoder(): Encoder<WithdrawInstructionDataArgs>;
44
45
  export declare function getWithdrawInstructionDataDecoder(): Decoder<WithdrawInstructionData>;
45
46
  export declare function getWithdrawInstructionDataCodec(): Codec<WithdrawInstructionDataArgs, WithdrawInstructionData>;
46
- export type WithdrawInput<TAccountOwner extends string = string, TAccountPool extends string = string, TAccountPosition extends string = string, TAccountPositionTokenAccount extends string = string, TAccountTokenMintX extends string = string, TAccountTokenMintY extends string = string, TAccountTokenOwnerAccountX extends string = string, TAccountTokenOwnerAccountY extends string = string, TAccountTokenVaultX extends string = string, TAccountTokenVaultY extends string = string, TAccountTokenProgramX extends string = string, TAccountTokenProgramY extends string = string, TAccountLowerBinArray extends string = string, TAccountUpperBinArray extends string = string> = {
47
- owner: TransactionSigner<TAccountOwner>;
48
- pool: Address<TAccountPool>;
49
- position: Address<TAccountPosition>;
50
- positionTokenAccount: Address<TAccountPositionTokenAccount>;
51
- tokenMintX: Address<TAccountTokenMintX>;
52
- tokenMintY: Address<TAccountTokenMintY>;
53
- tokenOwnerAccountX: Address<TAccountTokenOwnerAccountX>;
54
- tokenOwnerAccountY: Address<TAccountTokenOwnerAccountY>;
55
- tokenVaultX: Address<TAccountTokenVaultX>;
56
- tokenVaultY: Address<TAccountTokenVaultY>;
57
- tokenProgramX: Address<TAccountTokenProgramX>;
58
- tokenProgramY: Address<TAccountTokenProgramY>;
59
- lowerBinArray: Address<TAccountLowerBinArray>;
60
- upperBinArray?: Address<TAccountUpperBinArray>;
47
+ export type WithdrawInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountPosition extends InstructionAccountInput = InstructionAccountInput, TAccountPositionTokenAccount extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenOwnerAccountX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenOwnerAccountY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput = InstructionAccountInput, TAccountLowerBinArray extends InstructionAccountInput = InstructionAccountInput, TAccountUpperBinArray extends InstructionAccountInput = InstructionAccountInput> = {
48
+ owner: TAccountOwner;
49
+ pool: TAccountPool;
50
+ position: TAccountPosition;
51
+ positionTokenAccount: TAccountPositionTokenAccount;
52
+ tokenMintX: TAccountTokenMintX;
53
+ tokenMintY: TAccountTokenMintY;
54
+ tokenOwnerAccountX: TAccountTokenOwnerAccountX;
55
+ tokenOwnerAccountY: TAccountTokenOwnerAccountY;
56
+ tokenVaultX: TAccountTokenVaultX;
57
+ tokenVaultY: TAccountTokenVaultY;
58
+ tokenProgramX: TAccountTokenProgramX;
59
+ tokenProgramY: TAccountTokenProgramY;
60
+ lowerBinArray: TAccountLowerBinArray;
61
+ upperBinArray?: TAccountUpperBinArray;
61
62
  lowerBinId: WithdrawInstructionDataArgs["lowerBinId"];
62
63
  upperBinId: WithdrawInstructionDataArgs["upperBinId"];
63
64
  bpsToRemove: WithdrawInstructionDataArgs["bpsToRemove"];
64
65
  remainingAccountsScheme: WithdrawInstructionDataArgs["remainingAccountsScheme"];
65
66
  };
66
- export declare function getWithdrawInstruction<TAccountOwner extends string, TAccountPool extends string, TAccountPosition extends string, TAccountPositionTokenAccount extends string, TAccountTokenMintX extends string, TAccountTokenMintY extends string, TAccountTokenOwnerAccountX extends string, TAccountTokenOwnerAccountY extends string, TAccountTokenVaultX extends string, TAccountTokenVaultY extends string, TAccountTokenProgramX extends string, TAccountTokenProgramY extends string, TAccountLowerBinArray extends string, TAccountUpperBinArray extends string, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: WithdrawInput<TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionTokenAccount, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenOwnerAccountX, TAccountTokenOwnerAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY, TAccountLowerBinArray, TAccountUpperBinArray>, config?: {
67
+ export declare function getWithdrawInstruction<TAccountOwner extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountPosition extends InstructionAccountInput, TAccountPositionTokenAccount extends InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput, TAccountTokenOwnerAccountX extends InstructionAccountInput, TAccountTokenOwnerAccountY extends InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput, TAccountLowerBinArray extends InstructionAccountInput, TAccountUpperBinArray extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: WithdrawInput<TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionTokenAccount, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenOwnerAccountX, TAccountTokenOwnerAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY, TAccountLowerBinArray, TAccountUpperBinArray>, config?: {
67
68
  programAddress?: TProgramAddress;
68
- }): WithdrawInstruction<TProgramAddress, TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionTokenAccount, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenOwnerAccountX, TAccountTokenOwnerAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY, TAccountLowerBinArray, TAccountUpperBinArray>;
69
+ }): WithdrawInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountPosition, InstructionAccountInputAddress<TAccountPosition>>, ResolvedInstructionAccountMeta<TAccountPositionTokenAccount, InstructionAccountInputAddress<TAccountPositionTokenAccount>>, ResolvedInstructionAccountMeta<TAccountTokenMintX, InstructionAccountInputAddress<TAccountTokenMintX>>, ResolvedInstructionAccountMeta<TAccountTokenMintY, InstructionAccountInputAddress<TAccountTokenMintY>>, ResolvedInstructionAccountMeta<TAccountTokenOwnerAccountX, InstructionAccountInputAddress<TAccountTokenOwnerAccountX>>, ResolvedInstructionAccountMeta<TAccountTokenOwnerAccountY, InstructionAccountInputAddress<TAccountTokenOwnerAccountY>>, ResolvedInstructionAccountMeta<TAccountTokenVaultX, InstructionAccountInputAddress<TAccountTokenVaultX>>, ResolvedInstructionAccountMeta<TAccountTokenVaultY, InstructionAccountInputAddress<TAccountTokenVaultY>>, ResolvedInstructionAccountMeta<TAccountTokenProgramX, InstructionAccountInputAddress<TAccountTokenProgramX>>, ResolvedInstructionAccountMeta<TAccountTokenProgramY, InstructionAccountInputAddress<TAccountTokenProgramY>>, ResolvedInstructionAccountMeta<TAccountLowerBinArray, InstructionAccountInputAddress<TAccountLowerBinArray>>, ResolvedInstructionAccountMeta<TAccountUpperBinArray, InstructionAccountInputAddress<TAccountUpperBinArray>>>;
69
70
  export type ParsedWithdrawInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
70
71
  programAddress: Address<TProgram>;
71
72
  accounts: {
@@ -1 +1 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,aAAa,CAAC,EAAE,CAAC,CAAC;QACjC,aAAa,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;QACjC,aAAa,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;QACjC,aAAa,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;KAC/C,CAAC;IACF,IAAI,EAAE,uBAAuB,CAAC;CAC/B,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,QAAQ,SAAS,MAAM,EACvB,aAAa,SAAS,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,yBAAyB,CAAC,QAAQ,EAAE,aAAa,CAAC,CA0CpD"}
@@ -45,36 +45,76 @@ export function getWithdrawInstructionDataCodec() {
45
45
  export function getWithdrawInstruction(input, config) {
46
46
  // Program address.
47
47
  const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
48
+ // Account meta helper.
49
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
48
50
  // Original accounts.
49
51
  const originalAccounts = {
50
- owner: { value: input.owner ?? null, isWritable: false },
51
- pool: { value: input.pool ?? null, isWritable: false },
52
- position: { value: input.position ?? null, isWritable: true },
52
+ owner: { value: input.owner ?? null, isSigner: true, isWritable: false },
53
+ pool: { value: input.pool ?? null, isSigner: false, isWritable: false },
54
+ position: {
55
+ value: input.position ?? null,
56
+ isSigner: false,
57
+ isWritable: true,
58
+ },
53
59
  positionTokenAccount: {
54
60
  value: input.positionTokenAccount ?? null,
61
+ isSigner: false,
62
+ isWritable: false,
63
+ },
64
+ tokenMintX: {
65
+ value: input.tokenMintX ?? null,
66
+ isSigner: false,
67
+ isWritable: false,
68
+ },
69
+ tokenMintY: {
70
+ value: input.tokenMintY ?? null,
71
+ isSigner: false,
55
72
  isWritable: false,
56
73
  },
57
- tokenMintX: { value: input.tokenMintX ?? null, isWritable: false },
58
- tokenMintY: { value: input.tokenMintY ?? null, isWritable: false },
59
74
  tokenOwnerAccountX: {
60
75
  value: input.tokenOwnerAccountX ?? null,
76
+ isSigner: false,
61
77
  isWritable: true,
62
78
  },
63
79
  tokenOwnerAccountY: {
64
80
  value: input.tokenOwnerAccountY ?? null,
81
+ isSigner: false,
82
+ isWritable: true,
83
+ },
84
+ tokenVaultX: {
85
+ value: input.tokenVaultX ?? null,
86
+ isSigner: false,
87
+ isWritable: true,
88
+ },
89
+ tokenVaultY: {
90
+ value: input.tokenVaultY ?? null,
91
+ isSigner: false,
92
+ isWritable: true,
93
+ },
94
+ tokenProgramX: {
95
+ value: input.tokenProgramX ?? null,
96
+ isSigner: false,
97
+ isWritable: false,
98
+ },
99
+ tokenProgramY: {
100
+ value: input.tokenProgramY ?? null,
101
+ isSigner: false,
102
+ isWritable: false,
103
+ },
104
+ lowerBinArray: {
105
+ value: input.lowerBinArray ?? null,
106
+ isSigner: false,
107
+ isWritable: true,
108
+ },
109
+ upperBinArray: {
110
+ value: input.upperBinArray ?? null,
111
+ isSigner: false,
65
112
  isWritable: true,
66
113
  },
67
- tokenVaultX: { value: input.tokenVaultX ?? null, isWritable: true },
68
- tokenVaultY: { value: input.tokenVaultY ?? null, isWritable: true },
69
- tokenProgramX: { value: input.tokenProgramX ?? null, isWritable: false },
70
- tokenProgramY: { value: input.tokenProgramY ?? null, isWritable: false },
71
- lowerBinArray: { value: input.lowerBinArray ?? null, isWritable: true },
72
- upperBinArray: { value: input.upperBinArray ?? null, isWritable: true },
73
114
  };
74
115
  const accounts = originalAccounts;
75
116
  // Original args.
76
117
  const args = { ...input };
77
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
78
118
  return Object.freeze({
79
119
  accounts: [
80
120
  getAccountMeta("owner", accounts.owner),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picon-finance/dlmm-sdk",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Typescript SDK for interacting with the Picon DLMM protocol",
5
5
  "author": "Picon Finance",
6
6
  "license": "MIT",
@@ -45,15 +45,15 @@
45
45
  "dependencies": {
46
46
  "@solana-program/system": "^0.14.1",
47
47
  "@solana-program/token": "^0.16.1",
48
- "@solana-program/token-2022": "^0.16.1",
49
- "@solana/kit": "^8.2.0",
50
- "@solana/program-client-core": "^8.2.0",
51
- "@solana/transaction-messages": "^8.2.0"
48
+ "@solana-program/token-2022": "^0.18.0",
49
+ "@solana/kit": "^8.3.0",
50
+ "@solana/program-client-core": "^8.3.0",
51
+ "@solana/transaction-messages": "^8.3.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/bun": "latest",
55
- "@codama/nodes-from-anchor": "^1.5.5",
56
- "@codama/renderers-js": "^2.4.0",
57
- "codama": "^1.10.2"
55
+ "@codama/nodes-from-anchor": "^1.5.6",
56
+ "@codama/renderers-js": "^2.5.0",
57
+ "codama": "^1.11.0"
58
58
  }
59
59
  }
@@ -135,7 +135,7 @@ export class DlmmProgram {
135
135
  { positionMints: candidateMints },
136
136
  { programAddress: this.#programAddress },
137
137
  );
138
- const maybePools = await fetchAllMaybePositionPoolsChunked(
138
+ const maybeEntries = await fetchAllMaybePositionPoolsChunked(
139
139
  this.#rpc,
140
140
  positionAddresses,
141
141
  config,
@@ -143,8 +143,8 @@ export class DlmmProgram {
143
143
 
144
144
  return new Map(
145
145
  Map.groupBy(
146
- maybePools.flatMap((maybePool, i) =>
147
- maybePool ? [{ pool: maybePool.pool, mint: candidateMints[i] }] : []),
146
+ maybeEntries.flatMap((maybeEntry, i) =>
147
+ maybeEntry ? [{ pool: maybeEntry.pool, mint: candidateMints[i] }] : []),
148
148
  ({ pool }) => pool,
149
149
  ).entries().map(([pool, pairs]) => [pool, pairs.map(({ mint }) => mint)]),
150
150
  );
@@ -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