@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
|
@@ -34,10 +34,20 @@ export function getSetMetadataUpdateAuthorityInstructionDataCodec() {
|
|
|
34
34
|
export async function getSetMetadataUpdateAuthorityInstructionAsync(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 getSetMetadataUpdateAuthorityInstructionAsync(input, confi
|
|
|
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 getSetMetadataUpdateAuthorityInstructionAsync(input, confi
|
|
|
59
68
|
export function getSetMetadataUpdateAuthorityInstruction(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 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
|
import { type DynamicFeeConfig, type DynamicFeeConfigArgs } from "../types/index.js";
|
|
11
12
|
export declare const SET_POOL_DYNAMIC_FEE_CONFIG_DISCRIMINATOR: ReadonlyUint8Array;
|
|
@@ -26,24 +27,24 @@ export type SetPoolDynamicFeeConfigInstructionDataArgs = {
|
|
|
26
27
|
export declare function getSetPoolDynamicFeeConfigInstructionDataEncoder(): FixedSizeEncoder<SetPoolDynamicFeeConfigInstructionDataArgs>;
|
|
27
28
|
export declare function getSetPoolDynamicFeeConfigInstructionDataDecoder(): FixedSizeDecoder<SetPoolDynamicFeeConfigInstructionData>;
|
|
28
29
|
export declare function getSetPoolDynamicFeeConfigInstructionDataCodec(): FixedSizeCodec<SetPoolDynamicFeeConfigInstructionDataArgs, SetPoolDynamicFeeConfigInstructionData>;
|
|
29
|
-
export type SetPoolDynamicFeeConfigAsyncInput<TAccountAuthority extends
|
|
30
|
-
authority:
|
|
31
|
-
adminConfig?:
|
|
32
|
-
pool:
|
|
30
|
+
export type SetPoolDynamicFeeConfigAsyncInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput> = {
|
|
31
|
+
authority: TAccountAuthority;
|
|
32
|
+
adminConfig?: TAccountAdminConfig;
|
|
33
|
+
pool: TAccountPool;
|
|
33
34
|
config: SetPoolDynamicFeeConfigInstructionDataArgs["config"];
|
|
34
35
|
};
|
|
35
|
-
export declare function getSetPoolDynamicFeeConfigInstructionAsync<TAccountAuthority extends
|
|
36
|
+
export declare function getSetPoolDynamicFeeConfigInstructionAsync<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: SetPoolDynamicFeeConfigAsyncInput<TAccountAuthority, TAccountAdminConfig, TAccountPool>, config?: {
|
|
36
37
|
programAddress?: TProgramAddress;
|
|
37
|
-
}): Promise<SetPoolDynamicFeeConfigInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig, TAccountPool
|
|
38
|
-
export type SetPoolDynamicFeeConfigInput<TAccountAuthority extends
|
|
39
|
-
authority:
|
|
40
|
-
adminConfig:
|
|
41
|
-
pool:
|
|
38
|
+
}): Promise<SetPoolDynamicFeeConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>>>;
|
|
39
|
+
export type SetPoolDynamicFeeConfigInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput> = {
|
|
40
|
+
authority: TAccountAuthority;
|
|
41
|
+
adminConfig: TAccountAdminConfig;
|
|
42
|
+
pool: TAccountPool;
|
|
42
43
|
config: SetPoolDynamicFeeConfigInstructionDataArgs["config"];
|
|
43
44
|
};
|
|
44
|
-
export declare function getSetPoolDynamicFeeConfigInstruction<TAccountAuthority extends
|
|
45
|
+
export declare function getSetPoolDynamicFeeConfigInstruction<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: SetPoolDynamicFeeConfigInput<TAccountAuthority, TAccountAdminConfig, TAccountPool>, config?: {
|
|
45
46
|
programAddress?: TProgramAddress;
|
|
46
|
-
}): SetPoolDynamicFeeConfigInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig, TAccountPool
|
|
47
|
+
}): SetPoolDynamicFeeConfigInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>>;
|
|
47
48
|
export type ParsedSetPoolDynamicFeeConfigInstruction<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":"setPoolDynamicFeeConfig.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/setPoolDynamicFeeConfig.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,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"setPoolDynamicFeeConfig.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/setPoolDynamicFeeConfig.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,eAA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AAC;AAEF,wBAAgB,uCAAuC,CACrD,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,wCAAwC,CAAC,QAAQ,EAAE,aAAa,CAAC,CA2BnE"}
|
|
@@ -35,11 +35,21 @@ export function getSetPoolDynamicFeeConfigInstructionDataCodec() {
|
|
|
35
35
|
export async function getSetPoolDynamicFeeConfigInstructionAsync(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
|
-
authority: {
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
authority: {
|
|
43
|
+
value: input.authority ?? null,
|
|
44
|
+
isSigner: true,
|
|
45
|
+
isWritable: false,
|
|
46
|
+
},
|
|
47
|
+
adminConfig: {
|
|
48
|
+
value: input.adminConfig ?? null,
|
|
49
|
+
isSigner: false,
|
|
50
|
+
isWritable: false,
|
|
51
|
+
},
|
|
52
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
43
53
|
};
|
|
44
54
|
const accounts = originalAccounts;
|
|
45
55
|
// Original args.
|
|
@@ -48,7 +58,6 @@ export async function getSetPoolDynamicFeeConfigInstructionAsync(input, config)
|
|
|
48
58
|
if (!accounts.adminConfig.value) {
|
|
49
59
|
accounts.adminConfig.value = await findAdminConfigPda({ programAddress });
|
|
50
60
|
}
|
|
51
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
52
61
|
return Object.freeze({
|
|
53
62
|
accounts: [
|
|
54
63
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -62,16 +71,25 @@ export async function getSetPoolDynamicFeeConfigInstructionAsync(input, config)
|
|
|
62
71
|
export function getSetPoolDynamicFeeConfigInstruction(input, config) {
|
|
63
72
|
// Program address.
|
|
64
73
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
74
|
+
// Account meta helper.
|
|
75
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
65
76
|
// Original accounts.
|
|
66
77
|
const originalAccounts = {
|
|
67
|
-
authority: {
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
authority: {
|
|
79
|
+
value: input.authority ?? null,
|
|
80
|
+
isSigner: true,
|
|
81
|
+
isWritable: false,
|
|
82
|
+
},
|
|
83
|
+
adminConfig: {
|
|
84
|
+
value: input.adminConfig ?? null,
|
|
85
|
+
isSigner: false,
|
|
86
|
+
isWritable: false,
|
|
87
|
+
},
|
|
88
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
70
89
|
};
|
|
71
90
|
const accounts = originalAccounts;
|
|
72
91
|
// Original args.
|
|
73
92
|
const args = { ...input };
|
|
74
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
75
93
|
return Object.freeze({
|
|
76
94
|
accounts: [
|
|
77
95
|
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 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 SET_POOL_PROTOCOL_SHARE_DISCRIMINATOR: ReadonlyUint8Array;
|
|
11
12
|
export declare function getSetPoolProtocolShareDiscriminatorBytes(): ReadonlyUint8Array;
|
|
@@ -25,24 +26,24 @@ export type SetPoolProtocolShareInstructionDataArgs = {
|
|
|
25
26
|
export declare function getSetPoolProtocolShareInstructionDataEncoder(): FixedSizeEncoder<SetPoolProtocolShareInstructionDataArgs>;
|
|
26
27
|
export declare function getSetPoolProtocolShareInstructionDataDecoder(): FixedSizeDecoder<SetPoolProtocolShareInstructionData>;
|
|
27
28
|
export declare function getSetPoolProtocolShareInstructionDataCodec(): FixedSizeCodec<SetPoolProtocolShareInstructionDataArgs, SetPoolProtocolShareInstructionData>;
|
|
28
|
-
export type SetPoolProtocolShareAsyncInput<TAccountAuthority extends
|
|
29
|
-
authority:
|
|
30
|
-
adminConfig?:
|
|
31
|
-
pool:
|
|
29
|
+
export type SetPoolProtocolShareAsyncInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput> = {
|
|
30
|
+
authority: TAccountAuthority;
|
|
31
|
+
adminConfig?: TAccountAdminConfig;
|
|
32
|
+
pool: TAccountPool;
|
|
32
33
|
protocolShare: SetPoolProtocolShareInstructionDataArgs["protocolShare"];
|
|
33
34
|
};
|
|
34
|
-
export declare function getSetPoolProtocolShareInstructionAsync<TAccountAuthority extends
|
|
35
|
+
export declare function getSetPoolProtocolShareInstructionAsync<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: SetPoolProtocolShareAsyncInput<TAccountAuthority, TAccountAdminConfig, TAccountPool>, config?: {
|
|
35
36
|
programAddress?: TProgramAddress;
|
|
36
|
-
}): Promise<SetPoolProtocolShareInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig, TAccountPool
|
|
37
|
-
export type SetPoolProtocolShareInput<TAccountAuthority extends
|
|
38
|
-
authority:
|
|
39
|
-
adminConfig:
|
|
40
|
-
pool:
|
|
37
|
+
}): Promise<SetPoolProtocolShareInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>>>;
|
|
38
|
+
export type SetPoolProtocolShareInput<TAccountAuthority extends InstructionSignerInput = InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput = InstructionAccountInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput> = {
|
|
39
|
+
authority: TAccountAuthority;
|
|
40
|
+
adminConfig: TAccountAdminConfig;
|
|
41
|
+
pool: TAccountPool;
|
|
41
42
|
protocolShare: SetPoolProtocolShareInstructionDataArgs["protocolShare"];
|
|
42
43
|
};
|
|
43
|
-
export declare function getSetPoolProtocolShareInstruction<TAccountAuthority extends
|
|
44
|
+
export declare function getSetPoolProtocolShareInstruction<TAccountAuthority extends InstructionSignerInput, TAccountAdminConfig extends InstructionAccountInput, TAccountPool extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: SetPoolProtocolShareInput<TAccountAuthority, TAccountAdminConfig, TAccountPool>, config?: {
|
|
44
45
|
programAddress?: TProgramAddress;
|
|
45
|
-
}): SetPoolProtocolShareInstruction<TProgramAddress, TAccountAuthority, TAccountAdminConfig, TAccountPool
|
|
46
|
+
}): SetPoolProtocolShareInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountAuthority, InstructionAccountInputAddress<TAccountAuthority>>, ResolvedInstructionAccountMeta<TAccountAdminConfig, InstructionAccountInputAddress<TAccountAdminConfig>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>>;
|
|
46
47
|
export type ParsedSetPoolProtocolShareInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
47
48
|
programAddress: Address<TProgram>;
|
|
48
49
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setPoolProtocolShare.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/setPoolProtocolShare.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,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"setPoolProtocolShare.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/setPoolProtocolShare.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,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,sBA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BhE"}
|
|
@@ -34,11 +34,21 @@ export function getSetPoolProtocolShareInstructionDataCodec() {
|
|
|
34
34
|
export async function getSetPoolProtocolShareInstructionAsync(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
|
-
|
|
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: false,
|
|
50
|
+
},
|
|
51
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
42
52
|
};
|
|
43
53
|
const accounts = originalAccounts;
|
|
44
54
|
// Original args.
|
|
@@ -47,7 +57,6 @@ export async function getSetPoolProtocolShareInstructionAsync(input, config) {
|
|
|
47
57
|
if (!accounts.adminConfig.value) {
|
|
48
58
|
accounts.adminConfig.value = await findAdminConfigPda({ programAddress });
|
|
49
59
|
}
|
|
50
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
51
60
|
return Object.freeze({
|
|
52
61
|
accounts: [
|
|
53
62
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -61,16 +70,25 @@ export async function getSetPoolProtocolShareInstructionAsync(input, config) {
|
|
|
61
70
|
export function getSetPoolProtocolShareInstruction(input, config) {
|
|
62
71
|
// Program address.
|
|
63
72
|
const programAddress = config?.programAddress ?? PICON_DLMM_PROGRAM_ADDRESS;
|
|
73
|
+
// Account meta helper.
|
|
74
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
64
75
|
// Original accounts.
|
|
65
76
|
const originalAccounts = {
|
|
66
|
-
authority: {
|
|
67
|
-
|
|
68
|
-
|
|
77
|
+
authority: {
|
|
78
|
+
value: input.authority ?? null,
|
|
79
|
+
isSigner: true,
|
|
80
|
+
isWritable: false,
|
|
81
|
+
},
|
|
82
|
+
adminConfig: {
|
|
83
|
+
value: input.adminConfig ?? null,
|
|
84
|
+
isSigner: false,
|
|
85
|
+
isWritable: false,
|
|
86
|
+
},
|
|
87
|
+
pool: { value: input.pool ?? null, isSigner: false, isWritable: true },
|
|
69
88
|
};
|
|
70
89
|
const accounts = originalAccounts;
|
|
71
90
|
// Original args.
|
|
72
91
|
const args = { ...input };
|
|
73
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
74
92
|
return Object.freeze({
|
|
75
93
|
accounts: [
|
|
76
94
|
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 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 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 SWAP_EXACT_IN_DISCRIMINATOR: ReadonlyUint8Array;
|
|
@@ -39,25 +40,25 @@ export type SwapExactInInstructionDataArgs = {
|
|
|
39
40
|
export declare function getSwapExactInInstructionDataEncoder(): Encoder<SwapExactInInstructionDataArgs>;
|
|
40
41
|
export declare function getSwapExactInInstructionDataDecoder(): Decoder<SwapExactInInstructionData>;
|
|
41
42
|
export declare function getSwapExactInInstructionDataCodec(): Codec<SwapExactInInstructionDataArgs, SwapExactInInstructionData>;
|
|
42
|
-
export type SwapExactInInput<TAccountUser extends
|
|
43
|
-
user:
|
|
44
|
-
pool:
|
|
45
|
-
tokenMintX:
|
|
46
|
-
tokenMintY:
|
|
47
|
-
tokenUserAccountX:
|
|
48
|
-
tokenUserAccountY:
|
|
49
|
-
tokenVaultX:
|
|
50
|
-
tokenVaultY:
|
|
51
|
-
tokenProgramX:
|
|
52
|
-
tokenProgramY:
|
|
43
|
+
export type SwapExactInInput<TAccountUser extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenUserAccountX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenUserAccountY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput = InstructionAccountInput> = {
|
|
44
|
+
user: TAccountUser;
|
|
45
|
+
pool: TAccountPool;
|
|
46
|
+
tokenMintX: TAccountTokenMintX;
|
|
47
|
+
tokenMintY: TAccountTokenMintY;
|
|
48
|
+
tokenUserAccountX: TAccountTokenUserAccountX;
|
|
49
|
+
tokenUserAccountY: TAccountTokenUserAccountY;
|
|
50
|
+
tokenVaultX: TAccountTokenVaultX;
|
|
51
|
+
tokenVaultY: TAccountTokenVaultY;
|
|
52
|
+
tokenProgramX: TAccountTokenProgramX;
|
|
53
|
+
tokenProgramY: TAccountTokenProgramY;
|
|
53
54
|
amountIn: SwapExactInInstructionDataArgs["amountIn"];
|
|
54
55
|
minAmountOut: SwapExactInInstructionDataArgs["minAmountOut"];
|
|
55
56
|
xToY: SwapExactInInstructionDataArgs["xToY"];
|
|
56
57
|
remainingAccountsScheme: SwapExactInInstructionDataArgs["remainingAccountsScheme"];
|
|
57
58
|
};
|
|
58
|
-
export declare function getSwapExactInInstruction<TAccountUser extends
|
|
59
|
+
export declare function getSwapExactInInstruction<TAccountUser extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput, TAccountTokenUserAccountX extends InstructionAccountInput, TAccountTokenUserAccountY extends InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: SwapExactInInput<TAccountUser, TAccountPool, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenUserAccountX, TAccountTokenUserAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY>, config?: {
|
|
59
60
|
programAddress?: TProgramAddress;
|
|
60
|
-
}): SwapExactInInstruction<TProgramAddress, TAccountUser, TAccountPool, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenUserAccountX, TAccountTokenUserAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY
|
|
61
|
+
}): SwapExactInInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountUser, InstructionAccountInputAddress<TAccountUser>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountTokenMintX, InstructionAccountInputAddress<TAccountTokenMintX>>, ResolvedInstructionAccountMeta<TAccountTokenMintY, InstructionAccountInputAddress<TAccountTokenMintY>>, ResolvedInstructionAccountMeta<TAccountTokenUserAccountX, InstructionAccountInputAddress<TAccountTokenUserAccountX>>, ResolvedInstructionAccountMeta<TAccountTokenUserAccountY, InstructionAccountInputAddress<TAccountTokenUserAccountY>>, ResolvedInstructionAccountMeta<TAccountTokenVaultX, InstructionAccountInputAddress<TAccountTokenVaultX>>, ResolvedInstructionAccountMeta<TAccountTokenVaultY, InstructionAccountInputAddress<TAccountTokenVaultY>>, ResolvedInstructionAccountMeta<TAccountTokenProgramX, InstructionAccountInputAddress<TAccountTokenProgramX>>, ResolvedInstructionAccountMeta<TAccountTokenProgramY, InstructionAccountInputAddress<TAccountTokenProgramY>>>;
|
|
61
62
|
export type ParsedSwapExactInInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
62
63
|
programAddress: Address<TProgram>;
|
|
63
64
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swapExactIn.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/swapExactIn.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,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,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"swapExactIn.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/swapExactIn.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,WAA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@@ -39,29 +39,56 @@ export function getSwapExactInInstructionDataCodec() {
|
|
|
39
39
|
export function getSwapExactInInstruction(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 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 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 SWAP_EXACT_OUT_DISCRIMINATOR: ReadonlyUint8Array;
|
|
@@ -39,25 +40,25 @@ export type SwapExactOutInstructionDataArgs = {
|
|
|
39
40
|
export declare function getSwapExactOutInstructionDataEncoder(): Encoder<SwapExactOutInstructionDataArgs>;
|
|
40
41
|
export declare function getSwapExactOutInstructionDataDecoder(): Decoder<SwapExactOutInstructionData>;
|
|
41
42
|
export declare function getSwapExactOutInstructionDataCodec(): Codec<SwapExactOutInstructionDataArgs, SwapExactOutInstructionData>;
|
|
42
|
-
export type SwapExactOutInput<TAccountUser extends
|
|
43
|
-
user:
|
|
44
|
-
pool:
|
|
45
|
-
tokenMintX:
|
|
46
|
-
tokenMintY:
|
|
47
|
-
tokenUserAccountX:
|
|
48
|
-
tokenUserAccountY:
|
|
49
|
-
tokenVaultX:
|
|
50
|
-
tokenVaultY:
|
|
51
|
-
tokenProgramX:
|
|
52
|
-
tokenProgramY:
|
|
43
|
+
export type SwapExactOutInput<TAccountUser extends InstructionSignerInput = InstructionSignerInput, TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenUserAccountX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenUserAccountY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput = InstructionAccountInput> = {
|
|
44
|
+
user: TAccountUser;
|
|
45
|
+
pool: TAccountPool;
|
|
46
|
+
tokenMintX: TAccountTokenMintX;
|
|
47
|
+
tokenMintY: TAccountTokenMintY;
|
|
48
|
+
tokenUserAccountX: TAccountTokenUserAccountX;
|
|
49
|
+
tokenUserAccountY: TAccountTokenUserAccountY;
|
|
50
|
+
tokenVaultX: TAccountTokenVaultX;
|
|
51
|
+
tokenVaultY: TAccountTokenVaultY;
|
|
52
|
+
tokenProgramX: TAccountTokenProgramX;
|
|
53
|
+
tokenProgramY: TAccountTokenProgramY;
|
|
53
54
|
amountOut: SwapExactOutInstructionDataArgs["amountOut"];
|
|
54
55
|
maxAmountIn: SwapExactOutInstructionDataArgs["maxAmountIn"];
|
|
55
56
|
xToY: SwapExactOutInstructionDataArgs["xToY"];
|
|
56
57
|
remainingAccountsScheme: SwapExactOutInstructionDataArgs["remainingAccountsScheme"];
|
|
57
58
|
};
|
|
58
|
-
export declare function getSwapExactOutInstruction<TAccountUser extends
|
|
59
|
+
export declare function getSwapExactOutInstruction<TAccountUser extends InstructionSignerInput, TAccountPool extends InstructionAccountInput, TAccountTokenMintX extends InstructionAccountInput, TAccountTokenMintY extends InstructionAccountInput, TAccountTokenUserAccountX extends InstructionAccountInput, TAccountTokenUserAccountY extends InstructionAccountInput, TAccountTokenVaultX extends InstructionAccountInput, TAccountTokenVaultY extends InstructionAccountInput, TAccountTokenProgramX extends InstructionAccountInput, TAccountTokenProgramY extends InstructionAccountInput, TProgramAddress extends Address = typeof PICON_DLMM_PROGRAM_ADDRESS>(input: SwapExactOutInput<TAccountUser, TAccountPool, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenUserAccountX, TAccountTokenUserAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY>, config?: {
|
|
59
60
|
programAddress?: TProgramAddress;
|
|
60
|
-
}): SwapExactOutInstruction<TProgramAddress, TAccountUser, TAccountPool, TAccountTokenMintX, TAccountTokenMintY, TAccountTokenUserAccountX, TAccountTokenUserAccountY, TAccountTokenVaultX, TAccountTokenVaultY, TAccountTokenProgramX, TAccountTokenProgramY
|
|
61
|
+
}): SwapExactOutInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountUser, InstructionAccountInputAddress<TAccountUser>>, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountTokenMintX, InstructionAccountInputAddress<TAccountTokenMintX>>, ResolvedInstructionAccountMeta<TAccountTokenMintY, InstructionAccountInputAddress<TAccountTokenMintY>>, ResolvedInstructionAccountMeta<TAccountTokenUserAccountX, InstructionAccountInputAddress<TAccountTokenUserAccountX>>, ResolvedInstructionAccountMeta<TAccountTokenUserAccountY, InstructionAccountInputAddress<TAccountTokenUserAccountY>>, ResolvedInstructionAccountMeta<TAccountTokenVaultX, InstructionAccountInputAddress<TAccountTokenVaultX>>, ResolvedInstructionAccountMeta<TAccountTokenVaultY, InstructionAccountInputAddress<TAccountTokenVaultY>>, ResolvedInstructionAccountMeta<TAccountTokenProgramX, InstructionAccountInputAddress<TAccountTokenProgramX>>, ResolvedInstructionAccountMeta<TAccountTokenProgramY, InstructionAccountInputAddress<TAccountTokenProgramY>>>;
|
|
61
62
|
export type ParsedSwapExactOutInstruction<TProgram extends string = typeof PICON_DLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
62
63
|
programAddress: Address<TProgram>;
|
|
63
64
|
accounts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swapExactOut.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/swapExactOut.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,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,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"swapExactOut.d.ts","sourceRoot":"","sources":["../../../src/generated/instructions/swapExactOut.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAeL,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,eAAe,EACpB,KAAK,qB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