@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
|
@@ -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 ReadonlySignerAccount, 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 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
|
export declare const DELETE_BIN_ARRAY_DISCRIMINATOR: ReadonlyUint8Array;
|
|
11
12
|
export declare function getDeleteBinArrayDiscriminatorBytes(): ReadonlyUint8Array;
|
|
@@ -29,30 +30,30 @@ export type DeleteBinArrayInstructionDataArgs = {
|
|
|
29
30
|
export declare function getDeleteBinArrayInstructionDataEncoder(): FixedSizeEncoder<DeleteBinArrayInstructionDataArgs>;
|
|
30
31
|
export declare function getDeleteBinArrayInstructionDataDecoder(): FixedSizeDecoder<DeleteBinArrayInstructionData>;
|
|
31
32
|
export declare function getDeleteBinArrayInstructionDataCodec(): FixedSizeCodec<DeleteBinArrayInstructionDataArgs, DeleteBinArrayInstructionData>;
|
|
32
|
-
export type DeleteBinArrayAsyncInput<TAccountAuthority extends
|
|
33
|
-
authority:
|
|
34
|
-
adminConfig?:
|
|
35
|
-
receiver:
|
|
36
|
-
binArray?:
|
|
37
|
-
systemProgram?:
|
|
33
|
+
export type DeleteBinArrayAsyncInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountReceiver extends InstructionAccountInput = InstructionAccountInput, TAccountBinArray extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
34
|
+
authority: TAccountAuthority;
|
|
35
|
+
adminConfig?: TAccountAdminConfig;
|
|
36
|
+
receiver: TAccountReceiver;
|
|
37
|
+
binArray?: TAccountBinArray;
|
|
38
|
+
systemProgram?: TAccountSystemProgram;
|
|
38
39
|
pool: DeleteBinArrayInstructionDataArgs["pool"];
|
|
39
40
|
index: DeleteBinArrayInstructionDataArgs["index"];
|
|
40
41
|
};
|
|
41
|
-
export declare function getDeleteBinArrayInstructionAsync<TAccountAuthority extends
|
|
42
|
+
export declare function getDeleteBinArrayInstructionAsync<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountReceiver extends InstructionAccountInput, TAccountBinArray extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: DeleteBinArrayAsyncInput<TAccountAuthority, TAccountAdminConfig, TAccountReceiver, TAccountBinArray, TAccountSystemProgram>, config?: {
|
|
42
43
|
programAddress?: TProgramAddress;
|
|
43
|
-
}): Promise<DeleteBinArrayInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig, TAccountReceiver, TAccountBinArray, TAccountSystemProgram
|
|
44
|
-
export type DeleteBinArrayInput<TAccountAuthority extends
|
|
45
|
-
authority:
|
|
46
|
-
adminConfig:
|
|
47
|
-
receiver:
|
|
48
|
-
binArray:
|
|
49
|
-
systemProgram?:
|
|
44
|
+
}): Promise<DeleteBinArrayInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountReceiver, InstructionAccountInputAddress<TAccountReceiver>>, ResolvedInstructionAccountMeta<TAccountBinArray, InstructionAccountInputAddress<TAccountBinArray>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>>;
|
|
45
|
+
export type DeleteBinArrayInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountReceiver extends InstructionAccountInput = InstructionAccountInput, TAccountBinArray extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
46
|
+
authority: TAccountAuthority;
|
|
47
|
+
adminConfig: TAccountAdminConfig;
|
|
48
|
+
receiver: TAccountReceiver;
|
|
49
|
+
binArray: TAccountBinArray;
|
|
50
|
+
systemProgram?: TAccountSystemProgram;
|
|
50
51
|
pool: DeleteBinArrayInstructionDataArgs["pool"];
|
|
51
52
|
index: DeleteBinArrayInstructionDataArgs["index"];
|
|
52
53
|
};
|
|
53
|
-
export declare function getDeleteBinArrayInstruction<TAccountAuthority extends
|
|
54
|
+
export declare function getDeleteBinArrayInstruction<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountReceiver extends InstructionAccountInput, TAccountBinArray extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: DeleteBinArrayInput<TAccountAuthority, TAccountAdminConfig, TAccountReceiver, TAccountBinArray, TAccountSystemProgram>, config?: {
|
|
54
55
|
programAddress?: TProgramAddress;
|
|
55
|
-
}): DeleteBinArrayInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig, TAccountReceiver, TAccountBinArray, TAccountSystemProgram
|
|
56
|
+
}): DeleteBinArrayInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountReceiver, InstructionAccountInputAddress<TAccountReceiver>>, ResolvedInstructionAccountMeta<TAccountBinArray, InstructionAccountInputAddress<TAccountBinArray>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>;
|
|
56
57
|
export type ParsedDeleteBinArrayInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
57
58
|
programAddress: Address<TProgram>;
|
|
58
59
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteBinArray.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/deleteBinArray.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,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,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"deleteBinArray.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/deleteBinArray.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,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,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAE3B,KAAK,8BAA8B,EACpC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,eAAO,MAAM,8BAA8B,EAAE,kBACS,CAAC;AAEvD,wBAAgB,mCAAmC,IAAI,kBAAkB,CAIxE;AAED,MAAM,MAAM,yBAAyB,CACnC,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,MAAM,CAAC,GAAG,MAAM,EACjE,gBAAgB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC9D,gBAAgB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC9D,qBAAqB,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GACxD,kCAAkC,EACpC,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MAAM,MAAM,+BAA+B,CACzC,QAAQ,SAAS,MAAM,GAAG,OAAO,0BAA0B,EAC3D,aAAa,SAAS,SAAS,WAAW,EAAE,GAAG,SAAS,WAAW,EAAE,IACnE;IACF,cAAc,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,QAAQ,EAAE;QACR,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC5B,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC3B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC3B,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KACjC,CAAC;IACF,IAAI,EAAE,6BAA6B,CAAC;CACrC,CAAC;AAEF,wBAAgB,8BAA8B,CAC5C,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,+BAA+B,CAAC,QAAQ,EAAE,aAAa,CAAC,CA2B1D"}
|
|
@@ -33,13 +33,35 @@ export function getDeleteBinArrayInstructionDataCodec() {
|
|
|
33
33
|
export async function getDeleteBinArrayInstructionAsync(input, config) {
|
|
34
34
|
// Program address.
|
|
35
35
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
36
|
+
// Account meta helper.
|
|
37
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
36
38
|
// Original accounts.
|
|
37
39
|
const originalAccounts = {
|
|
38
|
-
authority: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
authority: {
|
|
41
|
+
value: input.authority ?? null,
|
|
42
|
+
isSigner: true,
|
|
43
|
+
isWritable: false,
|
|
44
|
+
},
|
|
45
|
+
adminConfig: {
|
|
46
|
+
value: input.adminConfig ?? null,
|
|
47
|
+
isSigner: false,
|
|
48
|
+
isWritable: false,
|
|
49
|
+
},
|
|
50
|
+
receiver: {
|
|
51
|
+
value: input.receiver ?? null,
|
|
52
|
+
isSigner: false,
|
|
53
|
+
isWritable: true,
|
|
54
|
+
},
|
|
55
|
+
binArray: {
|
|
56
|
+
value: input.binArray ?? null,
|
|
57
|
+
isSigner: false,
|
|
58
|
+
isWritable: true,
|
|
59
|
+
},
|
|
60
|
+
systemProgram: {
|
|
61
|
+
value: input.systemProgram ?? null,
|
|
62
|
+
isSigner: false,
|
|
63
|
+
isWritable: false,
|
|
64
|
+
},
|
|
43
65
|
};
|
|
44
66
|
const accounts = originalAccounts;
|
|
45
67
|
// Original args.
|
|
@@ -58,7 +80,6 @@ export async function getDeleteBinArrayInstructionAsync(input, config) {
|
|
|
58
80
|
accounts.systemProgram.value =
|
|
59
81
|
"11111111111111111111111111111111";
|
|
60
82
|
}
|
|
61
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
62
83
|
return Object.freeze({
|
|
63
84
|
accounts: [
|
|
64
85
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -74,13 +95,35 @@ export async function getDeleteBinArrayInstructionAsync(input, config) {
|
|
|
74
95
|
export function getDeleteBinArrayInstruction(input, config) {
|
|
75
96
|
// Program address.
|
|
76
97
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
98
|
+
// Account meta helper.
|
|
99
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
77
100
|
// Original accounts.
|
|
78
101
|
const originalAccounts = {
|
|
79
|
-
authority: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
102
|
+
authority: {
|
|
103
|
+
value: input.authority ?? null,
|
|
104
|
+
isSigner: true,
|
|
105
|
+
isWritable: false,
|
|
106
|
+
},
|
|
107
|
+
adminConfig: {
|
|
108
|
+
value: input.adminConfig ?? null,
|
|
109
|
+
isSigner: false,
|
|
110
|
+
isWritable: false,
|
|
111
|
+
},
|
|
112
|
+
receiver: {
|
|
113
|
+
value: input.receiver ?? null,
|
|
114
|
+
isSigner: false,
|
|
115
|
+
isWritable: true,
|
|
116
|
+
},
|
|
117
|
+
binArray: {
|
|
118
|
+
value: input.binArray ?? null,
|
|
119
|
+
isSigner: false,
|
|
120
|
+
isWritable: true,
|
|
121
|
+
},
|
|
122
|
+
systemProgram: {
|
|
123
|
+
value: input.systemProgram ?? null,
|
|
124
|
+
isSigner: false,
|
|
125
|
+
isWritable: false,
|
|
126
|
+
},
|
|
84
127
|
};
|
|
85
128
|
const accounts = originalAccounts;
|
|
86
129
|
// Original args.
|
|
@@ -90,7 +133,6 @@ export function getDeleteBinArrayInstruction(input, config) {
|
|
|
90
133
|
accounts.systemProgram.value =
|
|
91
134
|
"11111111111111111111111111111111";
|
|
92
135
|
}
|
|
93
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
94
136
|
return Object.freeze({
|
|
95
137
|
accounts: [
|
|
96
138
|
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 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 DistributionMode, type DistributionModeArgs, type RemainingAccountsScheme, type RemainingAccountsSchemeArgs } from "../types/index.js";
|
|
11
12
|
export declare const DEPOSIT_BY_WEIGHT_DISCRIMINATOR: ReadonlyUint8Array;
|
|
@@ -51,21 +52,21 @@ export type DepositByWeightInstructionDataArgs = {
|
|
|
51
52
|
export declare function getDepositByWeightInstructionDataEncoder(): Encoder<DepositByWeightInstructionDataArgs>;
|
|
52
53
|
export declare function getDepositByWeightInstructionDataDecoder(): Decoder<DepositByWeightInstructionData>;
|
|
53
54
|
export declare function getDepositByWeightInstructionDataCodec(): Codec<DepositByWeightInstructionDataArgs, DepositByWeightInstructionData>;
|
|
54
|
-
export type DepositByWeightInput<TAccountOwner extends
|
|
55
|
-
owner:
|
|
56
|
-
pool:
|
|
57
|
-
position:
|
|
58
|
-
positionTokenAccount:
|
|
59
|
-
tokenMintX:
|
|
60
|
-
tokenMintY:
|
|
61
|
-
tokenOwnerAccountX:
|
|
62
|
-
tokenOwnerAccountY:
|
|
63
|
-
tokenVaultX:
|
|
64
|
-
tokenVaultY:
|
|
65
|
-
tokenProgramX:
|
|
66
|
-
tokenProgramY:
|
|
67
|
-
lowerBinArray:
|
|
68
|
-
upperBinArray?:
|
|
55
|
+
export type DepositByWeightInput<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> = {
|
|
56
|
+
owner: TAccountOwner;
|
|
57
|
+
pool: TAccountPool;
|
|
58
|
+
position: TAccountPosition;
|
|
59
|
+
positionTokenAccount: TAccountPositionTokenAccount;
|
|
60
|
+
tokenMintX: TAccountTokenMintX;
|
|
61
|
+
tokenMintY: TAccountTokenMintY;
|
|
62
|
+
tokenOwnerAccountX: TAccountTokenOwnerAccountX;
|
|
63
|
+
tokenOwnerAccountY: TAccountTokenOwnerAccountY;
|
|
64
|
+
tokenVaultX: TAccountTokenVaultX;
|
|
65
|
+
tokenVaultY: TAccountTokenVaultY;
|
|
66
|
+
tokenProgramX: TAccountTokenProgramX;
|
|
67
|
+
tokenProgramY: TAccountTokenProgramY;
|
|
68
|
+
lowerBinArray: TAccountLowerBinArray;
|
|
69
|
+
upperBinArray?: TAccountUpperBinArray;
|
|
69
70
|
amountX: DepositByWeightInstructionDataArgs["amountX"];
|
|
70
71
|
amountY: DepositByWeightInstructionDataArgs["amountY"];
|
|
71
72
|
activeBinId: DepositByWeightInstructionDataArgs["activeBinId"];
|
|
@@ -75,9 +76,9 @@ export type DepositByWeightInput<TAccountOwner extends string = string, TAccount
|
|
|
75
76
|
binWeights: DepositByWeightInstructionDataArgs["binWeights"];
|
|
76
77
|
remainingAccountsScheme: DepositByWeightInstructionDataArgs["remainingAccountsScheme"];
|
|
77
78
|
};
|
|
78
|
-
export declare function getDepositByWeightInstruction<TAccountOwner extends
|
|
79
|
+
export declare function getDepositByWeightInstruction<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: DepositByWeightInput<TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionTokenAccount, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenOwnerAccountX, TAccountTokenOwnerAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY, TAccountLowerBinArray, TAccountUpperBinArray>, config?: {
|
|
79
80
|
programAddress?: TProgramAddress;
|
|
80
|
-
}): DepositByWeightInstruction<TProgramAddress, TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionTokenAccount, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenOwnerAccountX, TAccountTokenOwnerAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY, TAccountLowerBinArray, TAccountUpperBinArray
|
|
81
|
+
}): DepositByWeightInstruction<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>>>;
|
|
81
82
|
export type ParsedDepositByWeightInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
82
83
|
programAddress: Address<TProgram>;
|
|
83
84
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"depositByWeight.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/depositByWeight.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAuBL,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":"depositByWeight.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/depositByWeight.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAuBL,KAAK,WAAW,EAChB,KAAK,iBAA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,CAAC,CAAC;IAClC,QAAQ,EAAE;QACR,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACvB,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC3B,oBAAoB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACvC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC7B,kBAAkB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,kBAAkB,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACrC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QAC9B,aAAa,EAAE,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,8BAA8B,CAAC;CACtC,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,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,gCAAgC,CAAC,QAAQ,EAAE,aAAa,CAAC,CA0C3D"}
|
|
@@ -51,36 +51,76 @@ export function getDepositByWeightInstructionDataCodec() {
|
|
|
51
51
|
export function getDepositByWeightInstruction(input, config) {
|
|
52
52
|
// Program address.
|
|
53
53
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
54
|
+
// Account meta helper.
|
|
55
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
54
56
|
// Original accounts.
|
|
55
57
|
const originalAccounts = {
|
|
56
|
-
owner: { value: input.owner ?? null, isWritable: false },
|
|
57
|
-
pool: { value: input.pool ?? null, isWritable: true },
|
|
58
|
-
position: {
|
|
58
|
+
owner: { value: input.owner ?? null, isSigner: true, isWritable: false },
|
|
59
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
60
|
+
position: {
|
|
61
|
+
value: input.position ?? null,
|
|
62
|
+
isSigner: false,
|
|
63
|
+
isWritable: true,
|
|
64
|
+
},
|
|
59
65
|
positionTokenAccount: {
|
|
60
66
|
value: input.positionTokenAccount ?? null,
|
|
67
|
+
isSigner: false,
|
|
68
|
+
isWritable: false,
|
|
69
|
+
},
|
|
70
|
+
tokenMintX: {
|
|
71
|
+
value: input.tokenMintX ?? null,
|
|
72
|
+
isSigner: false,
|
|
73
|
+
isWritable: false,
|
|
74
|
+
},
|
|
75
|
+
tokenMintY: {
|
|
76
|
+
value: input.tokenMintY ?? null,
|
|
77
|
+
isSigner: false,
|
|
61
78
|
isWritable: false,
|
|
62
79
|
},
|
|
63
|
-
tokenMintX: { value: input.tokenMintX ?? null, isWritable: false },
|
|
64
|
-
tokenMintY: { value: input.tokenMintY ?? null, isWritable: false },
|
|
65
80
|
tokenOwnerAccountX: {
|
|
66
81
|
value: input.tokenOwnerAccountX ?? null,
|
|
82
|
+
isSigner: false,
|
|
67
83
|
isWritable: true,
|
|
68
84
|
},
|
|
69
85
|
tokenOwnerAccountY: {
|
|
70
86
|
value: input.tokenOwnerAccountY ?? null,
|
|
87
|
+
isSigner: false,
|
|
88
|
+
isWritable: true,
|
|
89
|
+
},
|
|
90
|
+
tokenVaultX: {
|
|
91
|
+
value: input.tokenVaultX ?? null,
|
|
92
|
+
isSigner: false,
|
|
93
|
+
isWritable: true,
|
|
94
|
+
},
|
|
95
|
+
tokenVaultY: {
|
|
96
|
+
value: input.tokenVaultY ?? null,
|
|
97
|
+
isSigner: false,
|
|
98
|
+
isWritable: true,
|
|
99
|
+
},
|
|
100
|
+
tokenProgramX: {
|
|
101
|
+
value: input.tokenProgramX ?? null,
|
|
102
|
+
isSigner: false,
|
|
103
|
+
isWritable: false,
|
|
104
|
+
},
|
|
105
|
+
tokenProgramY: {
|
|
106
|
+
value: input.tokenProgramY ?? null,
|
|
107
|
+
isSigner: false,
|
|
108
|
+
isWritable: false,
|
|
109
|
+
},
|
|
110
|
+
lowerBinArray: {
|
|
111
|
+
value: input.lowerBinArray ?? null,
|
|
112
|
+
isSigner: false,
|
|
113
|
+
isWritable: true,
|
|
114
|
+
},
|
|
115
|
+
upperBinArray: {
|
|
116
|
+
value: input.upperBinArray ?? null,
|
|
117
|
+
isSigner: false,
|
|
71
118
|
isWritable: true,
|
|
72
119
|
},
|
|
73
|
-
tokenVaultX: { value: input.tokenVaultX ?? null, isWritable: true },
|
|
74
|
-
tokenVaultY: { value: input.tokenVaultY ?? null, isWritable: true },
|
|
75
|
-
tokenProgramX: { value: input.tokenProgramX ?? null, isWritable: false },
|
|
76
|
-
tokenProgramY: { value: input.tokenProgramY ?? null, isWritable: false },
|
|
77
|
-
lowerBinArray: { value: input.lowerBinArray ?? null, isWritable: true },
|
|
78
|
-
upperBinArray: { value: input.upperBinArray ?? null, isWritable: true },
|
|
79
120
|
};
|
|
80
121
|
const accounts = originalAccounts;
|
|
81
122
|
// Original args.
|
|
82
123
|
const args = { ...input };
|
|
83
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
84
124
|
return Object.freeze({
|
|
85
125
|
accounts: [
|
|
86
126
|
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 OPEN_POSITION_DISCRIMINATOR: ReadonlyUint8Array;
|
|
11
12
|
export declare function getOpenPositionDiscriminatorBytes(): ReadonlyUint8Array;
|
|
@@ -34,40 +35,40 @@ export type OpenPositionInstructionDataArgs = {
|
|
|
34
35
|
export declare function getOpenPositionInstructionDataEncoder(): FixedSizeEncoder<OpenPositionInstructionDataArgs>;
|
|
35
36
|
export declare function getOpenPositionInstructionDataDecoder(): FixedSizeDecoder<OpenPositionInstructionData>;
|
|
36
37
|
export declare function getOpenPositionInstructionDataCodec(): FixedSizeCodec<OpenPositionInstructionDataArgs, OpenPositionInstructionData>;
|
|
37
|
-
export type OpenPositionAsyncInput<TAccountOwner extends
|
|
38
|
-
owner:
|
|
39
|
-
pool:
|
|
40
|
-
position?:
|
|
41
|
-
positionMint:
|
|
42
|
-
positionTokenAccount?:
|
|
43
|
-
adminConfig?:
|
|
44
|
-
metadataUpdateAuthority:
|
|
45
|
-
tokenProgram?:
|
|
46
|
-
associatedTokenProgram?:
|
|
47
|
-
systemProgram?:
|
|
38
|
+
export type OpenPositionAsyncInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountPosition extends InstructionAccountInput = InstructionAccountInput, TAccountPositionMint extends InstructionSignerInput = InstructionSignerInput, TAccountPositionTokenAccount extends InstructionAccountInput = InstructionAccountInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountMetadataUpdateAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountAssociatedTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
39
|
+
owner: TAccountOwner;
|
|
40
|
+
pool: TAccountPool;
|
|
41
|
+
position?: TAccountPosition;
|
|
42
|
+
positionMint: TAccountPositionMint;
|
|
43
|
+
positionTokenAccount?: TAccountPositionTokenAccount;
|
|
44
|
+
adminConfig?: TAccountAdminConfig;
|
|
45
|
+
metadataUpdateAuthority: TAccountMetadataUpdateAuthority;
|
|
46
|
+
tokenProgram?: TAccountTokenProgram;
|
|
47
|
+
associatedTokenProgram?: TAccountAssociatedTokenProgram;
|
|
48
|
+
systemProgram?: TAccountSystemProgram;
|
|
48
49
|
lowerBinId: OpenPositionInstructionDataArgs["lowerBinId"];
|
|
49
50
|
upperBinId: OpenPositionInstructionDataArgs["upperBinId"];
|
|
50
51
|
};
|
|
51
|
-
export declare function getOpenPositionInstructionAsync<TAccountOwner extends
|
|
52
|
+
export declare function getOpenPositionInstructionAsync<TAccountOwner extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountPosition extends InstructionAccountInput, TAccountPositionMint extends InstructionSignerInput, TAccountPositionTokenAccount extends InstructionAccountInput, TAccountAdminConfig extends InstructionAccountInput, TAccountMetadataUpdateAuthority extends InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput, TAccountAssociatedTokenProgram extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: OpenPositionAsyncInput<TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionMint, TAccountPositionTokenAccount, TAccountAdminConfig, TAccountMetadataUpdateAuthority, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
52
53
|
programAddress?: TProgramAddress;
|
|
53
|
-
}): Promise<OpenPositionInstruction<TProgramAddress, TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionMint, TAccountPositionTokenAccount, TAccountAdminConfig, TAccountMetadataUpdateAuthority, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram
|
|
54
|
-
export type OpenPositionInput<TAccountOwner extends
|
|
55
|
-
owner:
|
|
56
|
-
pool:
|
|
57
|
-
position:
|
|
58
|
-
positionMint:
|
|
59
|
-
positionTokenAccount:
|
|
60
|
-
adminConfig:
|
|
61
|
-
metadataUpdateAuthority:
|
|
62
|
-
tokenProgram?:
|
|
63
|
-
associatedTokenProgram?:
|
|
64
|
-
systemProgram?:
|
|
54
|
+
}): Promise<OpenPositionInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountPosition, InstructionAccountInputAddress<TAccountPosition>>, ResolvedInstructionAccountMeta<TAccountPositionMint, InstructionAccountInputAddress<TAccountPositionMint>>, ResolvedInstructionAccountMeta<TAccountPositionTokenAccount, InstructionAccountInputAddress<TAccountPositionTokenAccount>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountMetadataUpdateAuthority, InstructionAccountInputAddress<TAccountMetadataUpdateAuthority>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>, ResolvedInstructionAccountMeta<TAccountAssociatedTokenProgram, InstructionAccountInputAddress<TAccountAssociatedTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>>;
|
|
55
|
+
export type OpenPositionInput<TAccountOwner extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountPosition extends InstructionAccountInput = InstructionAccountInput, TAccountPositionMint extends InstructionSignerInput = InstructionSignerInput, TAccountPositionTokenAccount extends InstructionAccountInput = InstructionAccountInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountMetadataUpdateAuthority extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountAssociatedTokenProgram extends InstructionAccountInput = InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput = InstructionAccountInput> = {
|
|
56
|
+
owner: TAccountOwner;
|
|
57
|
+
pool: TAccountPool;
|
|
58
|
+
position: TAccountPosition;
|
|
59
|
+
positionMint: TAccountPositionMint;
|
|
60
|
+
positionTokenAccount: TAccountPositionTokenAccount;
|
|
61
|
+
adminConfig: TAccountAdminConfig;
|
|
62
|
+
metadataUpdateAuthority: TAccountMetadataUpdateAuthority;
|
|
63
|
+
tokenProgram?: TAccountTokenProgram;
|
|
64
|
+
associatedTokenProgram?: TAccountAssociatedTokenProgram;
|
|
65
|
+
systemProgram?: TAccountSystemProgram;
|
|
65
66
|
lowerBinId: OpenPositionInstructionDataArgs["lowerBinId"];
|
|
66
67
|
upperBinId: OpenPositionInstructionDataArgs["upperBinId"];
|
|
67
68
|
};
|
|
68
|
-
export declare function getOpenPositionInstruction<TAccountOwner extends
|
|
69
|
+
export declare function getOpenPositionInstruction<TAccountOwner extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountPosition extends InstructionAccountInput, TAccountPositionMint extends InstructionSignerInput, TAccountPositionTokenAccount extends InstructionAccountInput, TAccountAdminConfig extends InstructionAccountInput, TAccountMetadataUpdateAuthority extends InstructionAccountInput, TAccountTokenProgram extends InstructionAccountInput, TAccountAssociatedTokenProgram extends InstructionAccountInput, TAccountSystemProgram extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: OpenPositionInput<TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionMint, TAccountPositionTokenAccount, TAccountAdminConfig, TAccountMetadataUpdateAuthority, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
69
70
|
programAddress?: TProgramAddress;
|
|
70
|
-
}): OpenPositionInstruction<TProgramAddress, TAccountOwner, TAccountPool, TAccountPosition, TAccountPositionMint, TAccountPositionTokenAccount, TAccountAdminConfig, TAccountMetadataUpdateAuthority, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram
|
|
71
|
+
}): OpenPositionInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountOwner, InstructionAccountInputAddress<TAccountOwner>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountPosition, InstructionAccountInputAddress<TAccountPosition>>, ResolvedInstructionAccountMeta<TAccountPositionMint, InstructionAccountInputAddress<TAccountPositionMint>>, ResolvedInstructionAccountMeta<TAccountPositionTokenAccount, InstructionAccountInputAddress<TAccountPositionTokenAccount>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountMetadataUpdateAuthority, InstructionAccountInputAddress<TAccountMetadataUpdateAuthority>>, ResolvedInstructionAccountMeta<TAccountTokenProgram, InstructionAccountInputAddress<TAccountTokenProgram>>, ResolvedInstructionAccountMeta<TAccountAssociatedTokenProgram, InstructionAccountInputAddress<TAccountAssociatedTokenProgram>>, ResolvedInstructionAccountMeta<TAccountSystemProgram, InstructionAccountInputAddress<TAccountSystemProgram>>>;
|
|
71
72
|
export type ParsedOpenPositionInstruction<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":"openPosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/openPosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,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":"openPosition.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/openPosition.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,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,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAE3B,KAAK,8BAA8B,EACpC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,eAAO,MAAM,2BAA2B,EAAE,kBAExC,CAAC;AAEH,wBAAgB,iCAAiC,IAAI,kBAAkB,CAItE;AAED,MAAM,MAAM,uBAAuB,CACjC,QAAQ,SAAS,MAAM,GAAG,OAAO,0BAA0B,EAC3D,aAAa,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC3D,YAAY,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,EAC1D,gBAAgB,SAAS,MAAM,GAAG,WAAW,CAA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