@picon-finance/dlmm-sdk 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +5 -5
- 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
|
@@ -39,29 +39,56 @@ export function getSwapExactOutInstructionDataCodec() {
|
|
|
39
39
|
export function getSwapExactOutInstruction(input, config) {
|
|
40
40
|
// Program address.
|
|
41
41
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
42
|
+
// Account meta helper.
|
|
43
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
42
44
|
// Original accounts.
|
|
43
45
|
const originalAccounts = {
|
|
44
|
-
user: { value: input.user ?? null, isWritable: false },
|
|
45
|
-
pool: { value: input.pool ?? null, isWritable: true },
|
|
46
|
-
tokenMintX: {
|
|
47
|
-
|
|
46
|
+
user: { value: input.user ?? null, isSigner: true, isWritable: false },
|
|
47
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
48
|
+
tokenMintX: {
|
|
49
|
+
value: input.tokenMintX ?? null,
|
|
50
|
+
isSigner: false,
|
|
51
|
+
isWritable: false,
|
|
52
|
+
},
|
|
53
|
+
tokenMintY: {
|
|
54
|
+
value: input.tokenMintY ?? null,
|
|
55
|
+
isSigner: false,
|
|
56
|
+
isWritable: false,
|
|
57
|
+
},
|
|
48
58
|
tokenUserAccountX: {
|
|
49
59
|
value: input.tokenUserAccountX ?? null,
|
|
60
|
+
isSigner: false,
|
|
50
61
|
isWritable: true,
|
|
51
62
|
},
|
|
52
63
|
tokenUserAccountY: {
|
|
53
64
|
value: input.tokenUserAccountY ?? null,
|
|
65
|
+
isSigner: false,
|
|
66
|
+
isWritable: true,
|
|
67
|
+
},
|
|
68
|
+
tokenVaultX: {
|
|
69
|
+
value: input.tokenVaultX ?? null,
|
|
70
|
+
isSigner: false,
|
|
54
71
|
isWritable: true,
|
|
55
72
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
73
|
+
tokenVaultY: {
|
|
74
|
+
value: input.tokenVaultY ?? null,
|
|
75
|
+
isSigner: false,
|
|
76
|
+
isWritable: true,
|
|
77
|
+
},
|
|
78
|
+
tokenProgramX: {
|
|
79
|
+
value: input.tokenProgramX ?? null,
|
|
80
|
+
isSigner: false,
|
|
81
|
+
isWritable: false,
|
|
82
|
+
},
|
|
83
|
+
tokenProgramY: {
|
|
84
|
+
value: input.tokenProgramY ?? null,
|
|
85
|
+
isSigner: false,
|
|
86
|
+
isWritable: false,
|
|
87
|
+
},
|
|
60
88
|
};
|
|
61
89
|
const accounts = originalAccounts;
|
|
62
90
|
// Original args.
|
|
63
91
|
const args = { ...input };
|
|
64
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
65
92
|
return Object.freeze({
|
|
66
93
|
accounts: [
|
|
67
94
|
getAccountMeta("user", accounts.user),
|
|
@@ -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 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 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 SYNC_POOL_DISCRIMINATOR: ReadonlyUint8Array;
|
|
@@ -27,15 +28,15 @@ export type SyncPoolInstructionDataArgs = {
|
|
|
27
28
|
export declare function getSyncPoolInstructionDataEncoder(): Encoder<SyncPoolInstructionDataArgs>;
|
|
28
29
|
export declare function getSyncPoolInstructionDataDecoder(): Decoder<SyncPoolInstructionData>;
|
|
29
30
|
export declare function getSyncPoolInstructionDataCodec(): Codec<SyncPoolInstructionDataArgs, SyncPoolInstructionData>;
|
|
30
|
-
export type SyncPoolInput<TAccountUser extends
|
|
31
|
-
user:
|
|
32
|
-
pool:
|
|
31
|
+
export type SyncPoolInput<TAccountUser extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput> = {
|
|
32
|
+
user: TAccountUser;
|
|
33
|
+
pool: TAccountPool;
|
|
33
34
|
desiredBinId: SyncPoolInstructionDataArgs["desiredBinId"];
|
|
34
35
|
remainingAccountsScheme: SyncPoolInstructionDataArgs["remainingAccountsScheme"];
|
|
35
36
|
};
|
|
36
|
-
export declare function getSyncPoolInstruction<TAccountUser extends
|
|
37
|
+
export declare function getSyncPoolInstruction<TAccountUser extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: SyncPoolInput<TAccountUser, TAccountPool>, config?: {
|
|
37
38
|
programAddress?: TProgramAddress;
|
|
38
|
-
}): SyncPoolInstruction<TProgramAddress, TAccountUser, TAccountPool
|
|
39
|
+
}): SyncPoolInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountUser, InstructionAccountInputAddress<TAccountUser>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>>;
|
|
39
40
|
export type ParsedSyncPoolInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
40
41
|
programAddress: Address<TProgram>;
|
|
41
42
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncPool.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/syncPool.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,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"syncPool.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/syncPool.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,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;AACrC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EACjC,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,u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
35
|
export function getSyncPoolInstruction(input, config) {
|
|
36
36
|
// Program address.
|
|
37
37
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
38
|
+
// Account meta helper.
|
|
39
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
38
40
|
// Original accounts.
|
|
39
41
|
const originalAccounts = {
|
|
40
|
-
user: { value: input.user ?? null, isWritable: false },
|
|
41
|
-
pool: { value: input.pool ?? null, isWritable: true },
|
|
42
|
+
user: { value: input.user ?? null, isSigner: true, isWritable: false },
|
|
43
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
42
44
|
};
|
|
43
45
|
const accounts = originalAccounts;
|
|
44
46
|
// Original args.
|
|
45
47
|
const args = { ...input };
|
|
46
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
47
48
|
return Object.freeze({
|
|
48
49
|
accounts: [
|
|
49
50
|
getAccountMeta("user", accounts.user),
|
|
@@ -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 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 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 TRANSFER_ADMIN_AUTHORITY_DISCRIMINATOR: ReadonlyUint8Array;
|
|
11
12
|
export declare function getTransferAdminAuthorityDiscriminatorBytes(): ReadonlyUint8Array;
|
|
@@ -24,22 +25,22 @@ export type TransferAdminAuthorityInstructionDataArgs = {
|
|
|
24
25
|
export declare function getTransferAdminAuthorityInstructionDataEncoder(): FixedSizeEncoder<TransferAdminAuthorityInstructionDataArgs>;
|
|
25
26
|
export declare function getTransferAdminAuthorityInstructionDataDecoder(): FixedSizeDecoder<TransferAdminAuthorityInstructionData>;
|
|
26
27
|
export declare function getTransferAdminAuthorityInstructionDataCodec(): FixedSizeCodec<TransferAdminAuthorityInstructionDataArgs, TransferAdminAuthorityInstructionData>;
|
|
27
|
-
export type TransferAdminAuthorityAsyncInput<TAccountAuthority extends
|
|
28
|
-
authority:
|
|
29
|
-
adminConfig?:
|
|
28
|
+
export type TransferAdminAuthorityAsyncInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput> = {
|
|
29
|
+
authority: TAccountAuthority;
|
|
30
|
+
adminConfig?: TAccountAdminConfig;
|
|
30
31
|
newAuthority: TransferAdminAuthorityInstructionDataArgs["newAuthority"];
|
|
31
32
|
};
|
|
32
|
-
export declare function getTransferAdminAuthorityInstructionAsync<TAccountAuthority extends
|
|
33
|
+
export declare function getTransferAdminAuthorityInstructionAsync<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: TransferAdminAuthorityAsyncInput<TAccountAuthority, TAccountAdminConfig>, config?: {
|
|
33
34
|
programAddress?: TProgramAddress;
|
|
34
|
-
}): Promise<TransferAdminAuthorityInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig
|
|
35
|
-
export type TransferAdminAuthorityInput<TAccountAuthority extends
|
|
36
|
-
authority:
|
|
37
|
-
adminConfig:
|
|
35
|
+
}): Promise<TransferAdminAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>>>;
|
|
36
|
+
export type TransferAdminAuthorityInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput> = {
|
|
37
|
+
authority: TAccountAuthority;
|
|
38
|
+
adminConfig: TAccountAdminConfig;
|
|
38
39
|
newAuthority: TransferAdminAuthorityInstructionDataArgs["newAuthority"];
|
|
39
40
|
};
|
|
40
|
-
export declare function getTransferAdminAuthorityInstruction<TAccountAuthority extends
|
|
41
|
+
export declare function getTransferAdminAuthorityInstruction<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: TransferAdminAuthorityInput<TAccountAuthority, TAccountAdminConfig>, config?: {
|
|
41
42
|
programAddress?: TProgramAddress;
|
|
42
|
-
}): TransferAdminAuthorityInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig
|
|
43
|
+
}): TransferAdminAuthorityInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>>;
|
|
43
44
|
export type ParsedTransferAdminAuthorityInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
44
45
|
programAddress: Address<TProgram>;
|
|
45
46
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transferAdminAuthority.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/transferAdminAuthority.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAaL,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,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"transferAdminAuthority.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/transferAdminAuthority.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAaL,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,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;AAElE,eAAO,MAAM,sCAAsC,EAAE,kBACG,CAAC;AAEzD,wBAAgB,2CAA2C,IAAI,kBAAkB,CAIhF;AAED,MAAM,MAAM,iCAAiC,CAC3C,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,kBAAkB,SAAS,SAAS,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,IAC5D,WAAW,CAAC,QAAQ,CAAC,GACvB,mBAAmB,CAAC,kBAAkB,CAAC,GACvC,uBAAuB,CACrB;IACE,iBAAiB,SAAS,MAAM,GAC5B,qBAAq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,aAAa,CAAC,GACtC,mBAAmB,CAAC,kBAAkB,CAAC,GACxC,uCAAuC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAuBlE"}
|
|
@@ -34,10 +34,20 @@ export function getTransferAdminAuthorityInstructionDataCodec() {
|
|
|
34
34
|
export async function getTransferAdminAuthorityInstructionAsync(input, config) {
|
|
35
35
|
// Program address.
|
|
36
36
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
37
|
+
// Account meta helper.
|
|
38
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
37
39
|
// Original accounts.
|
|
38
40
|
const originalAccounts = {
|
|
39
|
-
authority: {
|
|
40
|
-
|
|
41
|
+
authority: {
|
|
42
|
+
value: input.authority ?? null,
|
|
43
|
+
isSigner: true,
|
|
44
|
+
isWritable: false,
|
|
45
|
+
},
|
|
46
|
+
adminConfig: {
|
|
47
|
+
value: input.adminConfig ?? null,
|
|
48
|
+
isSigner: false,
|
|
49
|
+
isWritable: true,
|
|
50
|
+
},
|
|
41
51
|
};
|
|
42
52
|
const accounts = originalAccounts;
|
|
43
53
|
// Original args.
|
|
@@ -46,7 +56,6 @@ export async function getTransferAdminAuthorityInstructionAsync(input, config) {
|
|
|
46
56
|
if (!accounts.adminConfig.value) {
|
|
47
57
|
accounts.adminConfig.value = await findAdminConfigPda({ programAddress });
|
|
48
58
|
}
|
|
49
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
50
59
|
return Object.freeze({
|
|
51
60
|
accounts: [
|
|
52
61
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -59,15 +68,24 @@ export async function getTransferAdminAuthorityInstructionAsync(input, config) {
|
|
|
59
68
|
export function getTransferAdminAuthorityInstruction(input, config) {
|
|
60
69
|
// Program address.
|
|
61
70
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
71
|
+
// Account meta helper.
|
|
72
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
62
73
|
// Original accounts.
|
|
63
74
|
const originalAccounts = {
|
|
64
|
-
authority: {
|
|
65
|
-
|
|
75
|
+
authority: {
|
|
76
|
+
value: input.authority ?? null,
|
|
77
|
+
isSigner: true,
|
|
78
|
+
isWritable: false,
|
|
79
|
+
},
|
|
80
|
+
adminConfig: {
|
|
81
|
+
value: input.adminConfig ?? null,
|
|
82
|
+
isSigner: false,
|
|
83
|
+
isWritable: true,
|
|
84
|
+
},
|
|
66
85
|
};
|
|
67
86
|
const accounts = originalAccounts;
|
|
68
87
|
// Original args.
|
|
69
88
|
const args = { ...input };
|
|
70
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
71
89
|
return Object.freeze({
|
|
72
90
|
accounts: [
|
|
73
91
|
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 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
|
|
47
|
-
owner:
|
|
48
|
-
pool:
|
|
49
|
-
position:
|
|
50
|
-
positionTokenAccount:
|
|
51
|
-
tokenMintX:
|
|
52
|
-
tokenMintY:
|
|
53
|
-
tokenOwnerAccountX:
|
|
54
|
-
tokenOwnerAccountY:
|
|
55
|
-
tokenVaultX:
|
|
56
|
-
tokenVaultY:
|
|
57
|
-
tokenProgramX:
|
|
58
|
-
tokenProgramY:
|
|
59
|
-
lowerBinArray:
|
|
60
|
-
upperBinArray?:
|
|
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
|
|
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 @@
|
|
|
1
|
-
{"version":3,"file":"withdraw.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/withdraw.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAiBL,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":"withdraw.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/withdraw.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAiBL,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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B,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: {
|
|
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.
|
|
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.
|
|
48
|
+
"@solana-program/token-2022": "^0.18.0",
|
|
49
49
|
"@solana/kit": "^8.3.0",
|
|
50
50
|
"@solana/program-client-core": "^8.3.0",
|
|
51
51
|
"@solana/transaction-messages": "^8.3.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/bun": "latest",
|
|
55
|
-
"@codama/nodes-from-anchor": "^1.5.
|
|
56
|
-
"@codama/renderers-js": "^2.
|
|
57
|
-
"codama": "^1.
|
|
55
|
+
"@codama/nodes-from-anchor": "^1.5.6",
|
|
56
|
+
"@codama/renderers-js": "^2.5.0",
|
|
57
|
+
"codama": "^1.11.0"
|
|
58
58
|
}
|
|
59
59
|
}
|