@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.
- package/dist/entities/dlmm_program.d.ts +1 -1
- package/dist/entities/dlmm_program.d.ts.map +1 -1
- package/dist/entities/dlmm_program.js +2 -2
- package/dist/entities/pool.d.ts +1 -1
- package/dist/entities/pool.d.ts.map +1 -1
- package/dist/generated/instructions/acceptAdminAuthority.d.ts +12 -11
- package/dist/generated/instructions/acceptAdminAuthority.d.ts.map +1 -1
- package/dist/generated/instructions/acceptAdminAuthority.js +16 -4
- package/dist/generated/instructions/claimFee.d.ts +19 -18
- package/dist/generated/instructions/claimFee.d.ts.map +1 -1
- package/dist/generated/instructions/claimFee.js +52 -12
- package/dist/generated/instructions/claimProtocolFee.d.ts +30 -29
- package/dist/generated/instructions/claimProtocolFee.d.ts.map +1 -1
- package/dist/generated/instructions/claimProtocolFee.js +90 -20
- package/dist/generated/instructions/closePosition.d.ts +18 -17
- package/dist/generated/instructions/closePosition.d.ts.map +1 -1
- package/dist/generated/instructions/closePosition.js +38 -10
- package/dist/generated/instructions/createAdminConfig.d.ts +18 -17
- package/dist/generated/instructions/createAdminConfig.d.ts.map +1 -1
- package/dist/generated/instructions/createAdminConfig.js +54 -12
- package/dist/generated/instructions/createBinArray.d.ts +16 -15
- package/dist/generated/instructions/createBinArray.d.ts.map +1 -1
- package/dist/generated/instructions/createBinArray.js +28 -10
- package/dist/generated/instructions/createPool.d.ts +30 -29
- package/dist/generated/instructions/createPool.d.ts.map +1 -1
- package/dist/generated/instructions/createPool.js +98 -22
- package/dist/generated/instructions/deleteBinArray.d.ts +18 -17
- package/dist/generated/instructions/deleteBinArray.d.ts.map +1 -1
- package/dist/generated/instructions/deleteBinArray.js +54 -12
- package/dist/generated/instructions/depositByWeight.d.ts +19 -18
- package/dist/generated/instructions/depositByWeight.d.ts.map +1 -1
- package/dist/generated/instructions/depositByWeight.js +52 -12
- package/dist/generated/instructions/openPosition.d.ts +28 -27
- package/dist/generated/instructions/openPosition.d.ts.map +1 -1
- package/dist/generated/instructions/openPosition.js +64 -16
- package/dist/generated/instructions/resetAdminAuthority.d.ts +16 -15
- package/dist/generated/instructions/resetAdminAuthority.d.ts.map +1 -1
- package/dist/generated/instructions/resetAdminAuthority.js +44 -10
- package/dist/generated/instructions/setMetadataUpdateAuthority.d.ts +12 -11
- package/dist/generated/instructions/setMetadataUpdateAuthority.d.ts.map +1 -1
- package/dist/generated/instructions/setMetadataUpdateAuthority.js +24 -6
- package/dist/generated/instructions/setPoolDynamicFeeConfig.d.ts +14 -13
- package/dist/generated/instructions/setPoolDynamicFeeConfig.d.ts.map +1 -1
- package/dist/generated/instructions/setPoolDynamicFeeConfig.js +26 -8
- package/dist/generated/instructions/setPoolProtocolShare.d.ts +14 -13
- package/dist/generated/instructions/setPoolProtocolShare.d.ts.map +1 -1
- package/dist/generated/instructions/setPoolProtocolShare.js +26 -8
- package/dist/generated/instructions/swapExactIn.d.ts +15 -14
- package/dist/generated/instructions/swapExactIn.d.ts.map +1 -1
- package/dist/generated/instructions/swapExactIn.js +36 -9
- package/dist/generated/instructions/swapExactOut.d.ts +15 -14
- package/dist/generated/instructions/swapExactOut.d.ts.map +1 -1
- package/dist/generated/instructions/swapExactOut.js +36 -9
- package/dist/generated/instructions/syncPool.d.ts +7 -6
- package/dist/generated/instructions/syncPool.d.ts.map +1 -1
- package/dist/generated/instructions/syncPool.js +4 -3
- package/dist/generated/instructions/transferAdminAuthority.d.ts +12 -11
- package/dist/generated/instructions/transferAdminAuthority.d.ts.map +1 -1
- package/dist/generated/instructions/transferAdminAuthority.js +24 -6
- package/dist/generated/instructions/withdraw.d.ts +19 -18
- package/dist/generated/instructions/withdraw.d.ts.map +1 -1
- package/dist/generated/instructions/withdraw.js +52 -12
- package/package.json +8 -8
- package/src/entities/dlmm_program.ts +3 -3
- package/src/generated/instructions/acceptAdminAuthority.ts +68 -25
- package/src/generated/instructions/claimFee.ts +218 -83
- package/src/generated/instructions/claimProtocolFee.ts +346 -131
- package/src/generated/instructions/closePosition.ts +160 -61
- package/src/generated/instructions/createAdminConfig.ts +172 -63
- package/src/generated/instructions/createBinArray.ts +124 -51
- package/src/generated/instructions/createPool.ts +354 -133
- package/src/generated/instructions/deleteBinArray.ts +172 -63
- package/src/generated/instructions/depositByWeight.ts +218 -83
- package/src/generated/instructions/openPosition.ts +300 -117
- package/src/generated/instructions/resetAdminAuthority.ts +138 -51
- package/src/generated/instructions/setMetadataUpdateAuthority.ts +74 -27
- package/src/generated/instructions/setPoolDynamicFeeConfig.ts +98 -39
- package/src/generated/instructions/setPoolProtocolShare.ts +98 -39
- package/src/generated/instructions/swapExactIn.ts +155 -60
- package/src/generated/instructions/swapExactOut.ts +155 -60
- package/src/generated/instructions/syncPool.ts +37 -12
- package/src/generated/instructions/transferAdminAuthority.ts +74 -27
- package/src/generated/instructions/withdraw.ts +218 -83
|
@@ -43,36 +43,76 @@ export function getClaimFeeInstructionDataCodec() {
|
|
|
43
43
|
export function getClaimFeeInstruction(input, config) {
|
|
44
44
|
// Program address.
|
|
45
45
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
46
|
+
// Account meta helper.
|
|
47
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
46
48
|
// Original accounts.
|
|
47
49
|
const originalAccounts = {
|
|
48
|
-
owner: { value: input.owner ?? null, isWritable: false },
|
|
49
|
-
pool: { value: input.pool ?? null, isWritable: false },
|
|
50
|
-
position: {
|
|
50
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: false },
|
|
51
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: false },
|
|
52
|
+
position: {
|
|
53
|
+
value: input.position ?? null,
|
|
54
|
+
isSigner: false,
|
|
55
|
+
isWritable: true,
|
|
56
|
+
},
|
|
51
57
|
positionTokenAccount: {
|
|
52
58
|
value: input.positionTokenAccount ?? null,
|
|
59
|
+
isSigner: false,
|
|
60
|
+
isWritable: false,
|
|
61
|
+
},
|
|
62
|
+
tokenMintX: {
|
|
63
|
+
value: input.tokenMintX ?? null,
|
|
64
|
+
isSigner: false,
|
|
65
|
+
isWritable: false,
|
|
66
|
+
},
|
|
67
|
+
tokenMintY: {
|
|
68
|
+
value: input.tokenMintY ?? null,
|
|
69
|
+
isSigner: false,
|
|
53
70
|
isWritable: false,
|
|
54
71
|
},
|
|
55
|
-
tokenMintX: { value: input.tokenMintX ?? null, isWritable: false },
|
|
56
|
-
tokenMintY: { value: input.tokenMintY ?? null, isWritable: false },
|
|
57
72
|
tokenOwnerAccountX: {
|
|
58
73
|
value: input.tokenOwnerAccountX ?? null,
|
|
74
|
+
isSigner: false,
|
|
59
75
|
isWritable: true,
|
|
60
76
|
},
|
|
61
77
|
tokenOwnerAccountY: {
|
|
62
78
|
value: input.tokenOwnerAccountY ?? null,
|
|
79
|
+
isSigner: false,
|
|
80
|
+
isWritable: true,
|
|
81
|
+
},
|
|
82
|
+
tokenVaultX: {
|
|
83
|
+
value: input.tokenVaultX ?? null,
|
|
84
|
+
isSigner: false,
|
|
85
|
+
isWritable: true,
|
|
86
|
+
},
|
|
87
|
+
tokenVaultY: {
|
|
88
|
+
value: input.tokenVaultY ?? null,
|
|
89
|
+
isSigner: false,
|
|
63
90
|
isWritable: true,
|
|
64
91
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
92
|
+
tokenProgramX: {
|
|
93
|
+
value: input.tokenProgramX ?? null,
|
|
94
|
+
isSigner: false,
|
|
95
|
+
isWritable: false,
|
|
96
|
+
},
|
|
97
|
+
tokenProgramY: {
|
|
98
|
+
value: input.tokenProgramY ?? null,
|
|
99
|
+
isSigner: false,
|
|
100
|
+
isWritable: false,
|
|
101
|
+
},
|
|
102
|
+
lowerBinArray: {
|
|
103
|
+
value: input.lowerBinArray ?? null,
|
|
104
|
+
isSigner: false,
|
|
105
|
+
isWritable: false,
|
|
106
|
+
},
|
|
107
|
+
upperBinArray: {
|
|
108
|
+
value: input.upperBinArray ?? null,
|
|
109
|
+
isSigner: false,
|
|
110
|
+
isWritable: false,
|
|
111
|
+
},
|
|
71
112
|
};
|
|
72
113
|
const accounts = originalAccounts;
|
|
73
114
|
// Original args.
|
|
74
115
|
const args = { ...input };
|
|
75
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
76
116
|
return Object.freeze({
|
|
77
117
|
accounts: [
|
|
78
118
|
getAccountMeta("owner", accounts.owner),
|
|
@@ -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
|
|
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 CLAIM_PROTOCOL_FEE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
@@ -34,40 +35,40 @@ export type ClaimProtocolFeeInstructionDataArgs = {
|
|
|
34
35
|
export declare function getClaimProtocolFeeInstructionDataEncoder(): Encoder<ClaimProtocolFeeInstructionDataArgs>;
|
|
35
36
|
export declare function getClaimProtocolFeeInstructionDataDecoder(): Decoder<ClaimProtocolFeeInstructionData>;
|
|
36
37
|
export declare function getClaimProtocolFeeInstructionDataCodec(): Codec<ClaimProtocolFeeInstructionDataArgs, ClaimProtocolFeeInstructionData>;
|
|
37
|
-
export type ClaimProtocolFeeAsyncInput<TAccountAuthority extends
|
|
38
|
-
authority:
|
|
39
|
-
adminConfig?:
|
|
40
|
-
pool:
|
|
41
|
-
tokenMintX:
|
|
42
|
-
tokenMintY:
|
|
43
|
-
tokenVaultX:
|
|
44
|
-
tokenVaultY:
|
|
45
|
-
tokenAdminAccountX:
|
|
46
|
-
tokenAdminAccountY:
|
|
47
|
-
tokenProgramX:
|
|
48
|
-
tokenProgramY:
|
|
38
|
+
export type ClaimProtocolFeeAsyncInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenAdminAccountX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenAdminAccountY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput = InstructionAccountInput> = {
|
|
39
|
+
authority: TAccountAuthority;
|
|
40
|
+
adminConfig?: TAccountAdminConfig;
|
|
41
|
+
pool: TAccountPool;
|
|
42
|
+
tokenMintX: TAccountTokenMintX;
|
|
43
|
+
tokenMintY: TAccountTokenMintY;
|
|
44
|
+
tokenVaultX: TAccountTokenVaultX;
|
|
45
|
+
tokenVaultY: TAccountTokenVaultY;
|
|
46
|
+
tokenAdminAccountX: TAccountTokenAdminAccountX;
|
|
47
|
+
tokenAdminAccountY: TAccountTokenAdminAccountY;
|
|
48
|
+
tokenProgramX: TAccountTokenProgramX;
|
|
49
|
+
tokenProgramY: TAccountTokenProgramY;
|
|
49
50
|
remainingAccountsScheme: ClaimProtocolFeeInstructionDataArgs["remainingAccountsScheme"];
|
|
50
51
|
};
|
|
51
|
-
export declare function getClaimProtocolFeeInstructionAsync<TAccountAuthority extends
|
|
52
|
+
export declare function getClaimProtocolFeeInstructionAsync<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput, TAccountTokenAdminAccountX extends InstructionAccountInput, TAccountTokenAdminAccountY extends InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: ClaimProtocolFeeAsyncInput<TAccountAuthority, TAccountAdminConfig, TAccountPool, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenAdminAccountX, TAccountTokenAdminAccountY, TAccountTokenProgramX, TAccountTokenProgramY>, config?: {
|
|
52
53
|
programAddress?: TProgramAddress;
|
|
53
|
-
}): Promise<ClaimProtocolFeeInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig, TAccountPool, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenAdminAccountX, TAccountTokenAdminAccountY, TAccountTokenProgramX, TAccountTokenProgramY
|
|
54
|
-
export type ClaimProtocolFeeInput<TAccountAuthority extends
|
|
55
|
-
authority:
|
|
56
|
-
adminConfig:
|
|
57
|
-
pool:
|
|
58
|
-
tokenMintX:
|
|
59
|
-
tokenMintY:
|
|
60
|
-
tokenVaultX:
|
|
61
|
-
tokenVaultY:
|
|
62
|
-
tokenAdminAccountX:
|
|
63
|
-
tokenAdminAccountY:
|
|
64
|
-
tokenProgramX:
|
|
65
|
-
tokenProgramY:
|
|
54
|
+
}): Promise<ClaimProtocolFeeInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountTokenMintX, InstructionAccountInputAddress<TAccountTokenMintX>>, ResolvedInstructionAccountMeta<TAccountTokenMintY, InstructionAccountInputAddress<TAccountTokenMintY>>, ResolvedInstructionAccountMeta<TAccountTokenVaultX, InstructionAccountInputAddress<TAccountTokenVaultX>>, ResolvedInstructionAccountMeta<TAccountTokenVaultY, InstructionAccountInputAddress<TAccountTokenVaultY>>, ResolvedInstructionAccountMeta<TAccountTokenAdminAccountX, InstructionAccountInputAddress<TAccountTokenAdminAccountX>>, ResolvedInstructionAccountMeta<TAccountTokenAdminAccountY, InstructionAccountInputAddress<TAccountTokenAdminAccountY>>, ResolvedInstructionAccountMeta<TAccountTokenProgramX, InstructionAccountInputAddress<TAccountTokenProgramX>>, ResolvedInstructionAccountMeta<TAccountTokenProgramY, InstructionAccountInputAddress<TAccountTokenProgramY>>>>;
|
|
55
|
+
export type ClaimProtocolFeeInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenAdminAccountX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenAdminAccountY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput = InstructionAccountInput> = {
|
|
56
|
+
authority: TAccountAuthority;
|
|
57
|
+
adminConfig: TAccountAdminConfig;
|
|
58
|
+
pool: TAccountPool;
|
|
59
|
+
tokenMintX: TAccountTokenMintX;
|
|
60
|
+
tokenMintY: TAccountTokenMintY;
|
|
61
|
+
tokenVaultX: TAccountTokenVaultX;
|
|
62
|
+
tokenVaultY: TAccountTokenVaultY;
|
|
63
|
+
tokenAdminAccountX: TAccountTokenAdminAccountX;
|
|
64
|
+
tokenAdminAccountY: TAccountTokenAdminAccountY;
|
|
65
|
+
tokenProgramX: TAccountTokenProgramX;
|
|
66
|
+
tokenProgramY: TAccountTokenProgramY;
|
|
66
67
|
remainingAccountsScheme: ClaimProtocolFeeInstructionDataArgs["remainingAccountsScheme"];
|
|
67
68
|
};
|
|
68
|
-
export declare function getClaimProtocolFeeInstruction<TAccountAuthority extends
|
|
69
|
+
export declare function getClaimProtocolFeeInstruction<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput, TAccountTokenAdminAccountX extends InstructionAccountInput, TAccountTokenAdminAccountY extends InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: ClaimProtocolFeeInput<TAccountAuthority, TAccountAdminConfig, TAccountPool, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenAdminAccountX, TAccountTokenAdminAccountY, TAccountTokenProgramX, TAccountTokenProgramY>, config?: {
|
|
69
70
|
programAddress?: TProgramAddress;
|
|
70
|
-
}): ClaimProtocolFeeInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig, TAccountPool, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenAdminAccountX, TAccountTokenAdminAccountY, TAccountTokenProgramX, TAccountTokenProgramY
|
|
71
|
+
}): ClaimProtocolFeeInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountTokenMintX, InstructionAccountInputAddress<TAccountTokenMintX>>, ResolvedInstructionAccountMeta<TAccountTokenMintY, InstructionAccountInputAddress<TAccountTokenMintY>>, ResolvedInstructionAccountMeta<TAccountTokenVaultX, InstructionAccountInputAddress<TAccountTokenVaultX>>, ResolvedInstructionAccountMeta<TAccountTokenVaultY, InstructionAccountInputAddress<TAccountTokenVaultY>>, ResolvedInstructionAccountMeta<TAccountTokenAdminAccountX, InstructionAccountInputAddress<TAccountTokenAdminAccountX>>, ResolvedInstructionAccountMeta<TAccountTokenAdminAccountY, InstructionAccountInputAddress<TAccountTokenAdminAccountY>>, ResolvedInstructionAccountMeta<TAccountTokenProgramX, InstructionAccountInputAddress<TAccountTokenProgramX>>, ResolvedInstructionAccountMeta<TAccountTokenProgramY, InstructionAccountInputAddress<TAccountTokenProgramY>>>;
|
|
71
72
|
export type ParsedClaimProtocolFeeInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
72
73
|
programAddress: Address<TProgram>;
|
|
73
74
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claimProtocolFee.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/claimProtocolFee.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAaL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"claimProtocolFee.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/claimProtocolFee.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAaL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAE3B,KAAK,8BAA8B,EACpC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EACjC,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,gCAAgC,EAAE,kBACQ,CAAC;AAExD,wBAAgB,qCAAqC,IAAI,kBAAkB,CAI1E;AAED,MAAM,MAAM,2BAA2B,CACrC,QAAQ,SAAS,MAAM,GAAG,OAAO,0BAA0B,EAC3D,iBAAiB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC/D,mBAAmB,SAAS,MAAM,GAAG,WAAW,CAAC,MA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AW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,kBAAkB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,kBAAkB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAChC,aAAa,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;KAClC,CAAC;IACF,IAAI,EAAE,+BAA+B,CAAC;CACvC,CAAC;AAEF,wBAAgB,gCAAgC,CAC9C,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,iCAAiC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAiC5D"}
|
|
@@ -38,25 +38,61 @@ export function getClaimProtocolFeeInstructionDataCodec() {
|
|
|
38
38
|
export async function getClaimProtocolFeeInstructionAsync(input, config) {
|
|
39
39
|
// Program address.
|
|
40
40
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
41
|
+
// Account meta helper.
|
|
42
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
41
43
|
// Original accounts.
|
|
42
44
|
const originalAccounts = {
|
|
43
|
-
authority: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
authority: {
|
|
46
|
+
value: input.authority ?? null,
|
|
47
|
+
isSigner: true,
|
|
48
|
+
isWritable: false,
|
|
49
|
+
},
|
|
50
|
+
adminConfig: {
|
|
51
|
+
value: input.adminConfig ?? null,
|
|
52
|
+
isSigner: false,
|
|
53
|
+
isWritable: false,
|
|
54
|
+
},
|
|
55
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
56
|
+
tokenMintX: {
|
|
57
|
+
value: input.tokenMintX ?? null,
|
|
58
|
+
isSigner: false,
|
|
59
|
+
isWritable: false,
|
|
60
|
+
},
|
|
61
|
+
tokenMintY: {
|
|
62
|
+
value: input.tokenMintY ?? null,
|
|
63
|
+
isSigner: false,
|
|
64
|
+
isWritable: false,
|
|
65
|
+
},
|
|
66
|
+
tokenVaultX: {
|
|
67
|
+
value: input.tokenVaultX ?? null,
|
|
68
|
+
isSigner: false,
|
|
69
|
+
isWritable: true,
|
|
70
|
+
},
|
|
71
|
+
tokenVaultY: {
|
|
72
|
+
value: input.tokenVaultY ?? null,
|
|
73
|
+
isSigner: false,
|
|
74
|
+
isWritable: true,
|
|
75
|
+
},
|
|
50
76
|
tokenAdminAccountX: {
|
|
51
77
|
value: input.tokenAdminAccountX ?? null,
|
|
78
|
+
isSigner: false,
|
|
52
79
|
isWritable: true,
|
|
53
80
|
},
|
|
54
81
|
tokenAdminAccountY: {
|
|
55
82
|
value: input.tokenAdminAccountY ?? null,
|
|
83
|
+
isSigner: false,
|
|
56
84
|
isWritable: true,
|
|
57
85
|
},
|
|
58
|
-
tokenProgramX: {
|
|
59
|
-
|
|
86
|
+
tokenProgramX: {
|
|
87
|
+
value: input.tokenProgramX ?? null,
|
|
88
|
+
isSigner: false,
|
|
89
|
+
isWritable: false,
|
|
90
|
+
},
|
|
91
|
+
tokenProgramY: {
|
|
92
|
+
value: input.tokenProgramY ?? null,
|
|
93
|
+
isSigner: false,
|
|
94
|
+
isWritable: false,
|
|
95
|
+
},
|
|
60
96
|
};
|
|
61
97
|
const accounts = originalAccounts;
|
|
62
98
|
// Original args.
|
|
@@ -65,7 +101,6 @@ export async function getClaimProtocolFeeInstructionAsync(input, config) {
|
|
|
65
101
|
if (!accounts.adminConfig.value) {
|
|
66
102
|
accounts.adminConfig.value = await findAdminConfigPda({ programAddress });
|
|
67
103
|
}
|
|
68
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
69
104
|
return Object.freeze({
|
|
70
105
|
accounts: [
|
|
71
106
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -87,30 +122,65 @@ export async function getClaimProtocolFeeInstructionAsync(input, config) {
|
|
|
87
122
|
export function getClaimProtocolFeeInstruction(input, config) {
|
|
88
123
|
// Program address.
|
|
89
124
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
125
|
+
// Account meta helper.
|
|
126
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
90
127
|
// Original accounts.
|
|
91
128
|
const originalAccounts = {
|
|
92
|
-
authority: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
129
|
+
authority: {
|
|
130
|
+
value: input.authority ?? null,
|
|
131
|
+
isSigner: true,
|
|
132
|
+
isWritable: false,
|
|
133
|
+
},
|
|
134
|
+
adminConfig: {
|
|
135
|
+
value: input.adminConfig ?? null,
|
|
136
|
+
isSigner: false,
|
|
137
|
+
isWritable: false,
|
|
138
|
+
},
|
|
139
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
140
|
+
tokenMintX: {
|
|
141
|
+
value: input.tokenMintX ?? null,
|
|
142
|
+
isSigner: false,
|
|
143
|
+
isWritable: false,
|
|
144
|
+
},
|
|
145
|
+
tokenMintY: {
|
|
146
|
+
value: input.tokenMintY ?? null,
|
|
147
|
+
isSigner: false,
|
|
148
|
+
isWritable: false,
|
|
149
|
+
},
|
|
150
|
+
tokenVaultX: {
|
|
151
|
+
value: input.tokenVaultX ?? null,
|
|
152
|
+
isSigner: false,
|
|
153
|
+
isWritable: true,
|
|
154
|
+
},
|
|
155
|
+
tokenVaultY: {
|
|
156
|
+
value: input.tokenVaultY ?? null,
|
|
157
|
+
isSigner: false,
|
|
158
|
+
isWritable: true,
|
|
159
|
+
},
|
|
99
160
|
tokenAdminAccountX: {
|
|
100
161
|
value: input.tokenAdminAccountX ?? null,
|
|
162
|
+
isSigner: false,
|
|
101
163
|
isWritable: true,
|
|
102
164
|
},
|
|
103
165
|
tokenAdminAccountY: {
|
|
104
166
|
value: input.tokenAdminAccountY ?? null,
|
|
167
|
+
isSigner: false,
|
|
105
168
|
isWritable: true,
|
|
106
169
|
},
|
|
107
|
-
tokenProgramX: {
|
|
108
|
-
|
|
170
|
+
tokenProgramX: {
|
|
171
|
+
value: input.tokenProgramX ?? null,
|
|
172
|
+
isSigner: false,
|
|
173
|
+
isWritable: false,
|
|
174
|
+
},
|
|
175
|
+
tokenProgramY: {
|
|
176
|
+
value: input.tokenProgramY ?? null,
|
|
177
|
+
isSigner: false,
|
|
178
|
+
isWritable: false,
|
|
179
|
+
},
|
|
109
180
|
};
|
|
110
181
|
const accounts = originalAccounts;
|
|
111
182
|
// Original args.
|
|
112
183
|
const args = { ...input };
|
|
113
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
114
184
|
return Object.freeze({
|
|
115
185
|
accounts: [
|
|
116
186
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type WritableAccount, type WritableSignerAccount } 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
|
export declare const CLOSE_POSITION_DISCRIMINATOR: ReadonlyUint8Array;
|
|
11
12
|
export declare function getClosePositionDiscriminatorBytes(): ReadonlyUint8Array;
|
|
@@ -24,26 +25,26 @@ export type ClosePositionInstructionDataArgs = {};
|
|
|
24
25
|
export declare function getClosePositionInstructionDataEncoder(): FixedSizeEncoder<ClosePositionInstructionDataArgs>;
|
|
25
26
|
export declare function getClosePositionInstructionDataDecoder(): FixedSizeDecoder<ClosePositionInstructionData>;
|
|
26
27
|
export declare function getClosePositionInstructionDataCodec(): FixedSizeCodec<ClosePositionInstructionDataArgs, ClosePositionInstructionData>;
|
|
27
|
-
export type ClosePositionAsyncInput<TAccountOwner extends
|
|
28
|
-
owner:
|
|
29
|
-
position?:
|
|
30
|
-
positionMint:
|
|
31
|
-
positionTokenAccount:
|
|
32
|
-
tokenProgram?:
|
|
28
|
+
export type ClosePositionAsyncInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountPosition extends InstructionAccountInput = InstructionAccountInput, TAccountPositionMint extends InstructionAccountInput = InstructionAccountInput, TAccountPositionTokenAccount extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
29
|
+
owner: TAccountOwner;
|
|
30
|
+
position?: TAccountPosition;
|
|
31
|
+
positionMint: TAccountPositionMint;
|
|
32
|
+
positionTokenAccount: TAccountPositionTokenAccount;
|
|
33
|
+
tokenProgram?: TAccountTokenProgram;
|
|
33
34
|
};
|
|
34
|
-
export declare function getClosePositionInstructionAsync<TAccountOwner extends
|
|
35
|
+
export declare function getClosePositionInstructionAsync<TAccountOwner extends InstructionSignerInput, TAccountPosition extends InstructionAccountInput, TAccountPositionMint extends InstructionAccountInput, TAccountPositionTokenAccount extends InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: ClosePositionAsyncInput<TAccountOwner, TAccountPosition, TAccountPositionMint, TAccountPositionTokenAccount, TAccountTokenProgram>, config?: {
|
|
35
36
|
programAddress?: TProgramAddress;
|
|
36
|
-
}): Promise<ClosePositionInstruction<TProgramAddress, TAccountOwner, TAccountPosition, TAccountPositionMint, TAccountPositionTokenAccount, TAccountTokenProgram
|
|
37
|
-
export type ClosePositionInput<TAccountOwner extends
|
|
38
|
-
owner:
|
|
39
|
-
position:
|
|
40
|
-
positionMint:
|
|
41
|
-
positionTokenAccount:
|
|
42
|
-
tokenProgram?:
|
|
37
|
+
}): Promise<ClosePositionInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPosition, InstructionAccountInputAddress<TAccountPosition>>, ResolvedInstructionAccountMeta<TAccountPositionMint, InstructionAccountInputAddress<TAccountPositionMint>>, ResolvedInstructionAccountMeta<TAccountPositionTokenAccount, InstructionAccountInputAddress<TAccountPositionTokenAccount>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>>>;
|
|
38
|
+
export type ClosePositionInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountPosition extends InstructionAccountInput = InstructionAccountInput, TAccountPositionMint extends InstructionAccountInput = InstructionAccountInput, TAccountPositionTokenAccount extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
39
|
+
owner: TAccountOwner;
|
|
40
|
+
position: TAccountPosition;
|
|
41
|
+
positionMint: TAccountPositionMint;
|
|
42
|
+
positionTokenAccount: TAccountPositionTokenAccount;
|
|
43
|
+
tokenProgram?: TAccountTokenProgram;
|
|
43
44
|
};
|
|
44
|
-
export declare function getClosePositionInstruction<TAccountOwner extends
|
|
45
|
+
export declare function getClosePositionInstruction<TAccountOwner extends InstructionSignerInput, TAccountPosition extends InstructionAccountInput, TAccountPositionMint extends InstructionAccountInput, TAccountPositionTokenAccount extends InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: ClosePositionInput<TAccountOwner, TAccountPosition, TAccountPositionMint, TAccountPositionTokenAccount, TAccountTokenProgram>, config?: {
|
|
45
46
|
programAddress?: TProgramAddress;
|
|
46
|
-
}): ClosePositionInstruction<TProgramAddress, TAccountOwner, TAccountPosition, TAccountPositionMint, TAccountPositionTokenAccount, TAccountTokenProgram
|
|
47
|
+
}): ClosePositionInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPosition, InstructionAccountInputAddress<TAccountPosition>>, ResolvedInstructionAccountMeta<TAccountPositionMint, InstructionAccountInputAddress<TAccountPositionMint>>, ResolvedInstructionAccountMeta<TAccountPositionTokenAccount, InstructionAccountInputAddress<TAccountPositionTokenAccount>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>>;
|
|
47
48
|
export type ParsedClosePositionInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
48
49
|
programAddress: Address<TProgram>;
|
|
49
50
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closePosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/closePosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAWL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"closePosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions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,SAAS,WAAW,EAAE,EAE5C,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,GAChC,uBAAuB,CAAC,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,8BAA8B,CAAC,QAAQ,EAAE,aAAa,CAAC,CA2BzD"}
|
|
@@ -29,16 +29,31 @@ export function getClosePositionInstructionDataCodec() {
|
|
|
29
29
|
export async function getClosePositionInstructionAsync(input, config) {
|
|
30
30
|
// Program address.
|
|
31
31
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
32
|
+
// Account meta helper.
|
|
33
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
32
34
|
// Original accounts.
|
|
33
35
|
const originalAccounts = {
|
|
34
|
-
owner: { value: input.owner ?? null, isWritable: true },
|
|
35
|
-
position: {
|
|
36
|
-
|
|
36
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
|
|
37
|
+
position: {
|
|
38
|
+
value: input.position ?? null,
|
|
39
|
+
isSigner: false,
|
|
40
|
+
isWritable: true,
|
|
41
|
+
},
|
|
42
|
+
positionMint: {
|
|
43
|
+
value: input.positionMint ?? null,
|
|
44
|
+
isSigner: false,
|
|
45
|
+
isWritable: true,
|
|
46
|
+
},
|
|
37
47
|
positionTokenAccount: {
|
|
38
48
|
value: input.positionTokenAccount ?? null,
|
|
49
|
+
isSigner: false,
|
|
39
50
|
isWritable: true,
|
|
40
51
|
},
|
|
41
|
-
tokenProgram: {
|
|
52
|
+
tokenProgram: {
|
|
53
|
+
value: input.tokenProgram ?? null,
|
|
54
|
+
isSigner: false,
|
|
55
|
+
isWritable: false,
|
|
56
|
+
},
|
|
42
57
|
};
|
|
43
58
|
const accounts = originalAccounts;
|
|
44
59
|
// Resolve default values.
|
|
@@ -51,7 +66,6 @@ export async function getClosePositionInstructionAsync(input, config) {
|
|
|
51
66
|
accounts.tokenProgram.value =
|
|
52
67
|
"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
53
68
|
}
|
|
54
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
55
69
|
return Object.freeze({
|
|
56
70
|
accounts: [
|
|
57
71
|
getAccountMeta("owner", accounts.owner),
|
|
@@ -67,16 +81,31 @@ export async function getClosePositionInstructionAsync(input, config) {
|
|
|
67
81
|
export function getClosePositionInstruction(input, config) {
|
|
68
82
|
// Program address.
|
|
69
83
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
84
|
+
// Account meta helper.
|
|
85
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
70
86
|
// Original accounts.
|
|
71
87
|
const originalAccounts = {
|
|
72
|
-
owner: { value: input.owner ?? null, isWritable: true },
|
|
73
|
-
position: {
|
|
74
|
-
|
|
88
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: true },
|
|
89
|
+
position: {
|
|
90
|
+
value: input.position ?? null,
|
|
91
|
+
isSigner: false,
|
|
92
|
+
isWritable: true,
|
|
93
|
+
},
|
|
94
|
+
positionMint: {
|
|
95
|
+
value: input.positionMint ?? null,
|
|
96
|
+
isSigner: false,
|
|
97
|
+
isWritable: true,
|
|
98
|
+
},
|
|
75
99
|
positionTokenAccount: {
|
|
76
100
|
value: input.positionTokenAccount ?? null,
|
|
101
|
+
isSigner: false,
|
|
77
102
|
isWritable: true,
|
|
78
103
|
},
|
|
79
|
-
tokenProgram: {
|
|
104
|
+
tokenProgram: {
|
|
105
|
+
value: input.tokenProgram ?? null,
|
|
106
|
+
isSigner: false,
|
|
107
|
+
isWritable: false,
|
|
108
|
+
},
|
|
80
109
|
};
|
|
81
110
|
const accounts = originalAccounts;
|
|
82
111
|
// Resolve default values.
|
|
@@ -84,7 +113,6 @@ export function getClosePositionInstruction(input, config) {
|
|
|
84
113
|
accounts.tokenProgram.value =
|
|
85
114
|
"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
86
115
|
}
|
|
87
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
88
116
|
return Object.freeze({
|
|
89
117
|
accounts: [
|
|
90
118
|
getAccountMeta("owner", accounts.owner),
|
|
@@ -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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type WritableAccount, type WritableSignerAccount } 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
|
export declare const CREATE_ADMIN_CONFIG_DISCRIMINATOR: ReadonlyUint8Array;
|
|
11
12
|
export declare function getCreateAdminConfigDiscriminatorBytes(): ReadonlyUint8Array;
|
|
@@ -24,26 +25,26 @@ export type CreateAdminConfigInstructionDataArgs = {};
|
|
|
24
25
|
export declare function getCreateAdminConfigInstructionDataEncoder(): FixedSizeEncoder<CreateAdminConfigInstructionDataArgs>;
|
|
25
26
|
export declare function getCreateAdminConfigInstructionDataDecoder(): FixedSizeDecoder<CreateAdminConfigInstructionData>;
|
|
26
27
|
export declare function getCreateAdminConfigInstructionDataCodec(): FixedSizeCodec<CreateAdminConfigInstructionDataArgs, CreateAdminConfigInstructionData>;
|
|
27
|
-
export type CreateAdminConfigAsyncInput<TAccountDeployer extends
|
|
28
|
-
deployer:
|
|
29
|
-
adminConfig?:
|
|
30
|
-
program?:
|
|
31
|
-
programData:
|
|
32
|
-
systemProgram?:
|
|
28
|
+
export type CreateAdminConfigAsyncInput<TAccountDeployer extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput, TAccountProgramData extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
29
|
+
deployer: TAccountDeployer;
|
|
30
|
+
adminConfig?: TAccountAdminConfig;
|
|
31
|
+
program?: TAccountProgram;
|
|
32
|
+
programData: TAccountProgramData;
|
|
33
|
+
systemProgram?: TAccountSystemProgram;
|
|
33
34
|
};
|
|
34
|
-
export declare function getCreateAdminConfigInstructionAsync<TAccountDeployer extends
|
|
35
|
+
export declare function getCreateAdminConfigInstructionAsync<TAccountDeployer extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TAccountProgramData extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: CreateAdminConfigAsyncInput<TAccountDeployer, TAccountAdminConfig, TAccountProgram, TAccountProgramData, TAccountSystemProgram>, config?: {
|
|
35
36
|
programAddress?: TProgramAddress;
|
|
36
|
-
}): Promise<CreateAdminConfigInstruction<TProgramAddress, TAccountDeployer, TAccountAdminConfig, TAccountProgram, TAccountProgramData, TAccountSystemProgram
|
|
37
|
-
export type CreateAdminConfigInput<TAccountDeployer extends
|
|
38
|
-
deployer:
|
|
39
|
-
adminConfig:
|
|
40
|
-
program?:
|
|
41
|
-
programData:
|
|
42
|
-
systemProgram?:
|
|
37
|
+
}): Promise<CreateAdminConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountDeployer, InstructionAccountInputAddress<TAccountDeployer>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>, ResolvedInstructionAccountMeta<TAccountProgramData, InstructionAccountInputAddress<TAccountProgramData>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>>;
|
|
38
|
+
export type CreateAdminConfigInput<TAccountDeployer extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountProgram extends InstructionAccountInput = InstructionAccountInput, TAccountProgramData extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
39
|
+
deployer: TAccountDeployer;
|
|
40
|
+
adminConfig: TAccountAdminConfig;
|
|
41
|
+
program?: TAccountProgram;
|
|
42
|
+
programData: TAccountProgramData;
|
|
43
|
+
systemProgram?: TAccountSystemProgram;
|
|
43
44
|
};
|
|
44
|
-
export declare function getCreateAdminConfigInstruction<TAccountDeployer extends
|
|
45
|
+
export declare function getCreateAdminConfigInstruction<TAccountDeployer extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountProgram extends InstructionAccountInput, TAccountProgramData extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: CreateAdminConfigInput<TAccountDeployer, TAccountAdminConfig, TAccountProgram, TAccountProgramData, TAccountSystemProgram>, config?: {
|
|
45
46
|
programAddress?: TProgramAddress;
|
|
46
|
-
}): CreateAdminConfigInstruction<TProgramAddress, TAccountDeployer, TAccountAdminConfig, TAccountProgram, TAccountProgramData, TAccountSystemProgram
|
|
47
|
+
}): CreateAdminConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountDeployer, InstructionAccountInputAddress<TAccountDeployer>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountProgram, InstructionAccountInputAddress<TAccountProgram>>, ResolvedInstructionAccountMeta<TAccountProgramData, InstructionAccountInputAddress<TAccountProgramData>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>;
|
|
47
48
|
export type ParsedCreateAdminConfigInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
48
49
|
programAddress: Address<TProgram>;
|
|
49
50
|
accounts: {
|