@orca-so/whirlpools-automation 0.3.0 → 0.4.0
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/README.md +2 -1
- package/dist/generated/accounts/automation.d.ts +72 -35
- package/dist/generated/accounts/globalConfig.d.ts +52 -19
- package/dist/generated/errors/whirlpoolsAutomationProgram.d.ts +54 -8
- package/dist/generated/instructions/createAutomation.d.ts +197 -66
- package/dist/generated/instructions/fundAutomation.d.ts +86 -27
- package/dist/generated/instructions/harvestAndReinvest.d.ts +286 -85
- package/dist/generated/instructions/harvestSwapAndReinvestPost.d.ts +278 -82
- package/dist/generated/instructions/harvestSwapAndReinvestPre.d.ts +259 -78
- package/dist/generated/instructions/initializeGlobalConfig.d.ts +90 -30
- package/dist/generated/instructions/removeAutomations.d.ts +154 -45
- package/dist/generated/instructions/updateGlobalConfig.d.ts +79 -24
- package/dist/generated/programs/whirlpoolsAutomationProgram.d.ts +58 -33
- package/dist/generated/shared/index.d.ts +34 -10
- package/dist/generated/types/accountDiscriminator.d.ts +8 -5
- package/dist/generated/types/action.d.ts +3 -3
- package/dist/generated/types/condition.d.ts +63 -33
- package/dist/generated/types/event.d.ts +205 -137
- package/dist/generated/types/fundAutomationMethod.d.ts +6 -3
- package/dist/generated/types/fundAutomationVariant.d.ts +33 -13
- package/dist/generated/types/increaseLiquidityByTokenAmountsAccountsType.d.ts +15 -11
- package/dist/generated/types/increaseLiquidityByTokenAmountsRemainingAccountsInfo.d.ts +10 -4
- package/dist/generated/types/increaseLiquidityByTokenAmountsRemainingAccountsSlice.d.ts +12 -6
- package/dist/generated/types/increaseLiquidityMethod.d.ts +30 -15
- package/dist/generated/types/nonZeroU32.d.ts +6 -2
- package/dist/generated/types/position.d.ts +22 -22
- package/dist/generated/types/positionRewardInfo.d.ts +8 -5
- package/dist/generated/types/tokenAccount.d.ts +22 -22
- package/dist/generated/types/tokenAccountState.d.ts +7 -4
- package/dist/generated/types/tokenMint.d.ts +14 -14
- package/dist/generated/types/updateGlobalConfigVariant.d.ts +58 -20
- package/dist/generated/types/whirlpool.d.ts +40 -40
- package/dist/generated/types/whirlpoolRewardInfo.d.ts +14 -11
- package/dist/index.browser.js +2490 -2092
- package/dist/index.node.js +2497 -2102
- package/dist/pda.d.ts +16 -4
- package/dist/staging.d.ts +1 -1
- package/package.json +3 -3
- package/CHANGELOG.md +0 -13
|
@@ -1,41 +1,100 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Address,
|
|
3
|
+
AccountMeta,
|
|
4
|
+
AccountSignerMeta,
|
|
5
|
+
FixedSizeCodec,
|
|
6
|
+
FixedSizeDecoder,
|
|
7
|
+
FixedSizeEncoder,
|
|
8
|
+
Instruction,
|
|
9
|
+
InstructionWithAccounts,
|
|
10
|
+
InstructionWithData,
|
|
11
|
+
ReadonlyAccount,
|
|
12
|
+
ReadonlyUint8Array,
|
|
13
|
+
TransactionSigner,
|
|
14
|
+
WritableAccount,
|
|
15
|
+
WritableSignerAccount,
|
|
16
|
+
} from '@solana/kit';
|
|
2
17
|
import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
|
|
3
18
|
import { FundAutomationVariant, FundAutomationVariantArgs } from '../types';
|
|
4
19
|
|
|
5
20
|
export declare const FUND_AUTOMATION_DISCRIMINATOR = 4;
|
|
6
21
|
export declare function getFundAutomationDiscriminatorBytes(): ReadonlyUint8Array;
|
|
7
|
-
export type FundAutomationInstruction<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
]
|
|
22
|
+
export type FundAutomationInstruction<
|
|
23
|
+
TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
24
|
+
TAccountPayer extends string | AccountMeta<string> = string,
|
|
25
|
+
TAccountAutomation extends string | AccountMeta<string> = string,
|
|
26
|
+
TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111',
|
|
27
|
+
TRemainingAccounts extends readonly AccountMeta<string>[] = [],
|
|
28
|
+
> = Instruction<TProgram> &
|
|
29
|
+
InstructionWithData<ReadonlyUint8Array> &
|
|
30
|
+
InstructionWithAccounts<
|
|
31
|
+
[
|
|
32
|
+
TAccountPayer extends string
|
|
33
|
+
? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer>
|
|
34
|
+
: TAccountPayer,
|
|
35
|
+
TAccountAutomation extends string ? WritableAccount<TAccountAutomation> : TAccountAutomation,
|
|
36
|
+
TAccountSystemProgram extends string
|
|
37
|
+
? ReadonlyAccount<TAccountSystemProgram>
|
|
38
|
+
: TAccountSystemProgram,
|
|
39
|
+
...TRemainingAccounts,
|
|
40
|
+
]
|
|
41
|
+
>;
|
|
13
42
|
export type FundAutomationInstructionData = {
|
|
14
|
-
|
|
15
|
-
|
|
43
|
+
discriminator: number;
|
|
44
|
+
instructionData: FundAutomationVariant;
|
|
16
45
|
};
|
|
17
46
|
export type FundAutomationInstructionDataArgs = {
|
|
18
|
-
|
|
47
|
+
instructionData: FundAutomationVariantArgs;
|
|
19
48
|
};
|
|
20
49
|
export declare function getFundAutomationInstructionDataEncoder(): FixedSizeEncoder<FundAutomationInstructionDataArgs>;
|
|
21
50
|
export declare function getFundAutomationInstructionDataDecoder(): FixedSizeDecoder<FundAutomationInstructionData>;
|
|
22
|
-
export declare function getFundAutomationInstructionDataCodec(): FixedSizeCodec<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
51
|
+
export declare function getFundAutomationInstructionDataCodec(): FixedSizeCodec<
|
|
52
|
+
FundAutomationInstructionDataArgs,
|
|
53
|
+
FundAutomationInstructionData
|
|
54
|
+
>;
|
|
55
|
+
export type FundAutomationInput<
|
|
56
|
+
TAccountPayer extends string = string,
|
|
57
|
+
TAccountAutomation extends string = string,
|
|
58
|
+
TAccountSystemProgram extends string = string,
|
|
59
|
+
> = {
|
|
60
|
+
payer: TransactionSigner<TAccountPayer>;
|
|
61
|
+
automation: Address<TAccountAutomation>;
|
|
62
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
63
|
+
instructionData: FundAutomationInstructionDataArgs['instructionData'];
|
|
28
64
|
};
|
|
29
|
-
export declare function getFundAutomationInstruction<
|
|
65
|
+
export declare function getFundAutomationInstruction<
|
|
66
|
+
TAccountPayer extends string,
|
|
67
|
+
TAccountAutomation extends string,
|
|
68
|
+
TAccountSystemProgram extends string,
|
|
69
|
+
TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
70
|
+
>(
|
|
71
|
+
input: FundAutomationInput<TAccountPayer, TAccountAutomation, TAccountSystemProgram>,
|
|
72
|
+
config?: {
|
|
30
73
|
programAddress?: TProgramAddress;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
74
|
+
}
|
|
75
|
+
): FundAutomationInstruction<
|
|
76
|
+
TProgramAddress,
|
|
77
|
+
TAccountPayer,
|
|
78
|
+
TAccountAutomation,
|
|
79
|
+
TAccountSystemProgram
|
|
80
|
+
>;
|
|
81
|
+
export type ParsedFundAutomationInstruction<
|
|
82
|
+
TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
83
|
+
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
84
|
+
> = {
|
|
85
|
+
programAddress: Address<TProgram>;
|
|
86
|
+
accounts: {
|
|
87
|
+
payer: TAccountMetas[0];
|
|
88
|
+
automation: TAccountMetas[1];
|
|
89
|
+
systemProgram: TAccountMetas[2];
|
|
90
|
+
};
|
|
91
|
+
data: FundAutomationInstructionData;
|
|
40
92
|
};
|
|
41
|
-
export declare function parseFundAutomationInstruction<
|
|
93
|
+
export declare function parseFundAutomationInstruction<
|
|
94
|
+
TProgram extends string,
|
|
95
|
+
TAccountMetas extends readonly AccountMeta[],
|
|
96
|
+
>(
|
|
97
|
+
instruction: Instruction<TProgram> &
|
|
98
|
+
InstructionWithAccounts<TAccountMetas> &
|
|
99
|
+
InstructionWithData<ReadonlyUint8Array>
|
|
100
|
+
): ParsedFundAutomationInstruction<TProgram, TAccountMetas>;
|
|
@@ -1,96 +1,297 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AccountMeta,
|
|
3
|
+
AccountSignerMeta,
|
|
4
|
+
Address,
|
|
5
|
+
FixedSizeCodec,
|
|
6
|
+
FixedSizeDecoder,
|
|
7
|
+
FixedSizeEncoder,
|
|
8
|
+
Instruction,
|
|
9
|
+
InstructionWithAccounts,
|
|
10
|
+
InstructionWithData,
|
|
11
|
+
ReadonlyAccount,
|
|
12
|
+
ReadonlyUint8Array,
|
|
13
|
+
TransactionSigner,
|
|
14
|
+
WritableAccount,
|
|
15
|
+
WritableSignerAccount,
|
|
16
|
+
} from '@solana/kit';
|
|
2
17
|
import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
|
|
3
18
|
|
|
4
19
|
export declare const HARVEST_AND_REINVEST_DISCRIMINATOR = 5;
|
|
5
20
|
export declare function getHarvestAndReinvestDiscriminatorBytes(): ReadonlyUint8Array;
|
|
6
|
-
export type HarvestAndReinvestInstruction<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
export type HarvestAndReinvestInstruction<
|
|
22
|
+
TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
23
|
+
TAccountCrankOperator extends string | AccountMeta<string> = string,
|
|
24
|
+
TAccountAutomation extends string | AccountMeta<string> = string,
|
|
25
|
+
TAccountAutomationTokenAccountA extends string | AccountMeta<string> = string,
|
|
26
|
+
TAccountAutomationTokenAccountB extends string | AccountMeta<string> = string,
|
|
27
|
+
TAccountAutomationAuthority extends string | AccountMeta<string> = string,
|
|
28
|
+
TAccountAutomationAuthorityTokenAccountA extends string | AccountMeta<string> = string,
|
|
29
|
+
TAccountAutomationAuthorityTokenAccountB extends string | AccountMeta<string> = string,
|
|
30
|
+
TAccountPositionTokenAccount extends string | AccountMeta<string> = string,
|
|
31
|
+
TAccountPosition extends string | AccountMeta<string> = string,
|
|
32
|
+
TAccountPositionOwner extends string | AccountMeta<string> = string,
|
|
33
|
+
TAccountWhirlpool extends string | AccountMeta<string> = string,
|
|
34
|
+
TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111',
|
|
35
|
+
TAccountTokenMintA extends string | AccountMeta<string> = string,
|
|
36
|
+
TAccountTokenMintB extends string | AccountMeta<string> = string,
|
|
37
|
+
TAccountTokenVaultA extends string | AccountMeta<string> = string,
|
|
38
|
+
TAccountTokenVaultB extends string | AccountMeta<string> = string,
|
|
39
|
+
TAccountTokenProgramA extends string | AccountMeta<string> = string,
|
|
40
|
+
TAccountTokenProgramB extends string | AccountMeta<string> = string,
|
|
41
|
+
TAccountMemoProgram extends string | AccountMeta<string> = string,
|
|
42
|
+
TAccountTickArrayLower extends string | AccountMeta<string> = string,
|
|
43
|
+
TAccountTickArrayUpper extends string | AccountMeta<string> = string,
|
|
44
|
+
TAccountWhirlpoolProgram extends string | AccountMeta<string> = string,
|
|
45
|
+
TAccountAtaProgram extends string | AccountMeta<string> =
|
|
46
|
+
'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',
|
|
47
|
+
TRemainingAccounts extends readonly AccountMeta<string>[] = [],
|
|
48
|
+
> = Instruction<TProgram> &
|
|
49
|
+
InstructionWithData<ReadonlyUint8Array> &
|
|
50
|
+
InstructionWithAccounts<
|
|
51
|
+
[
|
|
52
|
+
TAccountCrankOperator extends string
|
|
53
|
+
? WritableSignerAccount<TAccountCrankOperator> & AccountSignerMeta<TAccountCrankOperator>
|
|
54
|
+
: TAccountCrankOperator,
|
|
55
|
+
TAccountAutomation extends string ? WritableAccount<TAccountAutomation> : TAccountAutomation,
|
|
56
|
+
TAccountAutomationTokenAccountA extends string
|
|
57
|
+
? WritableAccount<TAccountAutomationTokenAccountA>
|
|
58
|
+
: TAccountAutomationTokenAccountA,
|
|
59
|
+
TAccountAutomationTokenAccountB extends string
|
|
60
|
+
? WritableAccount<TAccountAutomationTokenAccountB>
|
|
61
|
+
: TAccountAutomationTokenAccountB,
|
|
62
|
+
TAccountAutomationAuthority extends string
|
|
63
|
+
? ReadonlyAccount<TAccountAutomationAuthority>
|
|
64
|
+
: TAccountAutomationAuthority,
|
|
65
|
+
TAccountAutomationAuthorityTokenAccountA extends string
|
|
66
|
+
? WritableAccount<TAccountAutomationAuthorityTokenAccountA>
|
|
67
|
+
: TAccountAutomationAuthorityTokenAccountA,
|
|
68
|
+
TAccountAutomationAuthorityTokenAccountB extends string
|
|
69
|
+
? WritableAccount<TAccountAutomationAuthorityTokenAccountB>
|
|
70
|
+
: TAccountAutomationAuthorityTokenAccountB,
|
|
71
|
+
TAccountPositionTokenAccount extends string
|
|
72
|
+
? ReadonlyAccount<TAccountPositionTokenAccount>
|
|
73
|
+
: TAccountPositionTokenAccount,
|
|
74
|
+
TAccountPosition extends string ? WritableAccount<TAccountPosition> : TAccountPosition,
|
|
75
|
+
TAccountPositionOwner extends string
|
|
76
|
+
? ReadonlyAccount<TAccountPositionOwner>
|
|
77
|
+
: TAccountPositionOwner,
|
|
78
|
+
TAccountWhirlpool extends string ? WritableAccount<TAccountWhirlpool> : TAccountWhirlpool,
|
|
79
|
+
TAccountSystemProgram extends string
|
|
80
|
+
? ReadonlyAccount<TAccountSystemProgram>
|
|
81
|
+
: TAccountSystemProgram,
|
|
82
|
+
TAccountTokenMintA extends string ? WritableAccount<TAccountTokenMintA> : TAccountTokenMintA,
|
|
83
|
+
TAccountTokenMintB extends string ? WritableAccount<TAccountTokenMintB> : TAccountTokenMintB,
|
|
84
|
+
TAccountTokenVaultA extends string
|
|
85
|
+
? WritableAccount<TAccountTokenVaultA>
|
|
86
|
+
: TAccountTokenVaultA,
|
|
87
|
+
TAccountTokenVaultB extends string
|
|
88
|
+
? WritableAccount<TAccountTokenVaultB>
|
|
89
|
+
: TAccountTokenVaultB,
|
|
90
|
+
TAccountTokenProgramA extends string
|
|
91
|
+
? ReadonlyAccount<TAccountTokenProgramA>
|
|
92
|
+
: TAccountTokenProgramA,
|
|
93
|
+
TAccountTokenProgramB extends string
|
|
94
|
+
? ReadonlyAccount<TAccountTokenProgramB>
|
|
95
|
+
: TAccountTokenProgramB,
|
|
96
|
+
TAccountMemoProgram extends string
|
|
97
|
+
? ReadonlyAccount<TAccountMemoProgram>
|
|
98
|
+
: TAccountMemoProgram,
|
|
99
|
+
TAccountTickArrayLower extends string
|
|
100
|
+
? WritableAccount<TAccountTickArrayLower>
|
|
101
|
+
: TAccountTickArrayLower,
|
|
102
|
+
TAccountTickArrayUpper extends string
|
|
103
|
+
? WritableAccount<TAccountTickArrayUpper>
|
|
104
|
+
: TAccountTickArrayUpper,
|
|
105
|
+
TAccountWhirlpoolProgram extends string
|
|
106
|
+
? ReadonlyAccount<TAccountWhirlpoolProgram>
|
|
107
|
+
: TAccountWhirlpoolProgram,
|
|
108
|
+
TAccountAtaProgram extends string ? ReadonlyAccount<TAccountAtaProgram> : TAccountAtaProgram,
|
|
109
|
+
...TRemainingAccounts,
|
|
110
|
+
]
|
|
111
|
+
>;
|
|
32
112
|
export type HarvestAndReinvestInstructionData = {
|
|
33
|
-
|
|
113
|
+
discriminator: number;
|
|
114
|
+
minSqrtPrice: bigint;
|
|
115
|
+
maxSqrtPrice: bigint;
|
|
116
|
+
};
|
|
117
|
+
export type HarvestAndReinvestInstructionDataArgs = {
|
|
118
|
+
minSqrtPrice: number | bigint;
|
|
119
|
+
maxSqrtPrice: number | bigint;
|
|
34
120
|
};
|
|
35
|
-
export type HarvestAndReinvestInstructionDataArgs = {};
|
|
36
121
|
export declare function getHarvestAndReinvestInstructionDataEncoder(): FixedSizeEncoder<HarvestAndReinvestInstructionDataArgs>;
|
|
37
122
|
export declare function getHarvestAndReinvestInstructionDataDecoder(): FixedSizeDecoder<HarvestAndReinvestInstructionData>;
|
|
38
|
-
export declare function getHarvestAndReinvestInstructionDataCodec(): FixedSizeCodec<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
123
|
+
export declare function getHarvestAndReinvestInstructionDataCodec(): FixedSizeCodec<
|
|
124
|
+
HarvestAndReinvestInstructionDataArgs,
|
|
125
|
+
HarvestAndReinvestInstructionData
|
|
126
|
+
>;
|
|
127
|
+
export type HarvestAndReinvestInput<
|
|
128
|
+
TAccountCrankOperator extends string = string,
|
|
129
|
+
TAccountAutomation extends string = string,
|
|
130
|
+
TAccountAutomationTokenAccountA extends string = string,
|
|
131
|
+
TAccountAutomationTokenAccountB extends string = string,
|
|
132
|
+
TAccountAutomationAuthority extends string = string,
|
|
133
|
+
TAccountAutomationAuthorityTokenAccountA extends string = string,
|
|
134
|
+
TAccountAutomationAuthorityTokenAccountB extends string = string,
|
|
135
|
+
TAccountPositionTokenAccount extends string = string,
|
|
136
|
+
TAccountPosition extends string = string,
|
|
137
|
+
TAccountPositionOwner extends string = string,
|
|
138
|
+
TAccountWhirlpool extends string = string,
|
|
139
|
+
TAccountSystemProgram extends string = string,
|
|
140
|
+
TAccountTokenMintA extends string = string,
|
|
141
|
+
TAccountTokenMintB extends string = string,
|
|
142
|
+
TAccountTokenVaultA extends string = string,
|
|
143
|
+
TAccountTokenVaultB extends string = string,
|
|
144
|
+
TAccountTokenProgramA extends string = string,
|
|
145
|
+
TAccountTokenProgramB extends string = string,
|
|
146
|
+
TAccountMemoProgram extends string = string,
|
|
147
|
+
TAccountTickArrayLower extends string = string,
|
|
148
|
+
TAccountTickArrayUpper extends string = string,
|
|
149
|
+
TAccountWhirlpoolProgram extends string = string,
|
|
150
|
+
TAccountAtaProgram extends string = string,
|
|
151
|
+
> = {
|
|
152
|
+
crankOperator: TransactionSigner<TAccountCrankOperator>;
|
|
153
|
+
automation: Address<TAccountAutomation>;
|
|
154
|
+
automationTokenAccountA: Address<TAccountAutomationTokenAccountA>;
|
|
155
|
+
automationTokenAccountB: Address<TAccountAutomationTokenAccountB>;
|
|
156
|
+
automationAuthority: Address<TAccountAutomationAuthority>;
|
|
157
|
+
automationAuthorityTokenAccountA: Address<TAccountAutomationAuthorityTokenAccountA>;
|
|
158
|
+
automationAuthorityTokenAccountB: Address<TAccountAutomationAuthorityTokenAccountB>;
|
|
159
|
+
positionTokenAccount: Address<TAccountPositionTokenAccount>;
|
|
160
|
+
position: Address<TAccountPosition>;
|
|
161
|
+
positionOwner: Address<TAccountPositionOwner>;
|
|
162
|
+
whirlpool: Address<TAccountWhirlpool>;
|
|
163
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
164
|
+
tokenMintA: Address<TAccountTokenMintA>;
|
|
165
|
+
tokenMintB: Address<TAccountTokenMintB>;
|
|
166
|
+
tokenVaultA: Address<TAccountTokenVaultA>;
|
|
167
|
+
tokenVaultB: Address<TAccountTokenVaultB>;
|
|
168
|
+
tokenProgramA: Address<TAccountTokenProgramA>;
|
|
169
|
+
tokenProgramB: Address<TAccountTokenProgramB>;
|
|
170
|
+
memoProgram: Address<TAccountMemoProgram>;
|
|
171
|
+
tickArrayLower: Address<TAccountTickArrayLower>;
|
|
172
|
+
tickArrayUpper: Address<TAccountTickArrayUpper>;
|
|
173
|
+
whirlpoolProgram: Address<TAccountWhirlpoolProgram>;
|
|
174
|
+
ataProgram?: Address<TAccountAtaProgram>;
|
|
175
|
+
minSqrtPrice: HarvestAndReinvestInstructionDataArgs['minSqrtPrice'];
|
|
176
|
+
maxSqrtPrice: HarvestAndReinvestInstructionDataArgs['maxSqrtPrice'];
|
|
63
177
|
};
|
|
64
|
-
export declare function getHarvestAndReinvestInstruction<
|
|
178
|
+
export declare function getHarvestAndReinvestInstruction<
|
|
179
|
+
TAccountCrankOperator extends string,
|
|
180
|
+
TAccountAutomation extends string,
|
|
181
|
+
TAccountAutomationTokenAccountA extends string,
|
|
182
|
+
TAccountAutomationTokenAccountB extends string,
|
|
183
|
+
TAccountAutomationAuthority extends string,
|
|
184
|
+
TAccountAutomationAuthorityTokenAccountA extends string,
|
|
185
|
+
TAccountAutomationAuthorityTokenAccountB extends string,
|
|
186
|
+
TAccountPositionTokenAccount extends string,
|
|
187
|
+
TAccountPosition extends string,
|
|
188
|
+
TAccountPositionOwner extends string,
|
|
189
|
+
TAccountWhirlpool extends string,
|
|
190
|
+
TAccountSystemProgram extends string,
|
|
191
|
+
TAccountTokenMintA extends string,
|
|
192
|
+
TAccountTokenMintB extends string,
|
|
193
|
+
TAccountTokenVaultA extends string,
|
|
194
|
+
TAccountTokenVaultB extends string,
|
|
195
|
+
TAccountTokenProgramA extends string,
|
|
196
|
+
TAccountTokenProgramB extends string,
|
|
197
|
+
TAccountMemoProgram extends string,
|
|
198
|
+
TAccountTickArrayLower extends string,
|
|
199
|
+
TAccountTickArrayUpper extends string,
|
|
200
|
+
TAccountWhirlpoolProgram extends string,
|
|
201
|
+
TAccountAtaProgram extends string,
|
|
202
|
+
TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
203
|
+
>(
|
|
204
|
+
input: HarvestAndReinvestInput<
|
|
205
|
+
TAccountCrankOperator,
|
|
206
|
+
TAccountAutomation,
|
|
207
|
+
TAccountAutomationTokenAccountA,
|
|
208
|
+
TAccountAutomationTokenAccountB,
|
|
209
|
+
TAccountAutomationAuthority,
|
|
210
|
+
TAccountAutomationAuthorityTokenAccountA,
|
|
211
|
+
TAccountAutomationAuthorityTokenAccountB,
|
|
212
|
+
TAccountPositionTokenAccount,
|
|
213
|
+
TAccountPosition,
|
|
214
|
+
TAccountPositionOwner,
|
|
215
|
+
TAccountWhirlpool,
|
|
216
|
+
TAccountSystemProgram,
|
|
217
|
+
TAccountTokenMintA,
|
|
218
|
+
TAccountTokenMintB,
|
|
219
|
+
TAccountTokenVaultA,
|
|
220
|
+
TAccountTokenVaultB,
|
|
221
|
+
TAccountTokenProgramA,
|
|
222
|
+
TAccountTokenProgramB,
|
|
223
|
+
TAccountMemoProgram,
|
|
224
|
+
TAccountTickArrayLower,
|
|
225
|
+
TAccountTickArrayUpper,
|
|
226
|
+
TAccountWhirlpoolProgram,
|
|
227
|
+
TAccountAtaProgram
|
|
228
|
+
>,
|
|
229
|
+
config?: {
|
|
65
230
|
programAddress?: TProgramAddress;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
231
|
+
}
|
|
232
|
+
): HarvestAndReinvestInstruction<
|
|
233
|
+
TProgramAddress,
|
|
234
|
+
TAccountCrankOperator,
|
|
235
|
+
TAccountAutomation,
|
|
236
|
+
TAccountAutomationTokenAccountA,
|
|
237
|
+
TAccountAutomationTokenAccountB,
|
|
238
|
+
TAccountAutomationAuthority,
|
|
239
|
+
TAccountAutomationAuthorityTokenAccountA,
|
|
240
|
+
TAccountAutomationAuthorityTokenAccountB,
|
|
241
|
+
TAccountPositionTokenAccount,
|
|
242
|
+
TAccountPosition,
|
|
243
|
+
TAccountPositionOwner,
|
|
244
|
+
TAccountWhirlpool,
|
|
245
|
+
TAccountSystemProgram,
|
|
246
|
+
TAccountTokenMintA,
|
|
247
|
+
TAccountTokenMintB,
|
|
248
|
+
TAccountTokenVaultA,
|
|
249
|
+
TAccountTokenVaultB,
|
|
250
|
+
TAccountTokenProgramA,
|
|
251
|
+
TAccountTokenProgramB,
|
|
252
|
+
TAccountMemoProgram,
|
|
253
|
+
TAccountTickArrayLower,
|
|
254
|
+
TAccountTickArrayUpper,
|
|
255
|
+
TAccountWhirlpoolProgram,
|
|
256
|
+
TAccountAtaProgram
|
|
257
|
+
>;
|
|
258
|
+
export type ParsedHarvestAndReinvestInstruction<
|
|
259
|
+
TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
260
|
+
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
261
|
+
> = {
|
|
262
|
+
programAddress: Address<TProgram>;
|
|
263
|
+
accounts: {
|
|
264
|
+
crankOperator: TAccountMetas[0];
|
|
265
|
+
automation: TAccountMetas[1];
|
|
266
|
+
automationTokenAccountA: TAccountMetas[2];
|
|
267
|
+
automationTokenAccountB: TAccountMetas[3];
|
|
268
|
+
automationAuthority: TAccountMetas[4];
|
|
269
|
+
automationAuthorityTokenAccountA: TAccountMetas[5];
|
|
270
|
+
automationAuthorityTokenAccountB: TAccountMetas[6];
|
|
271
|
+
positionTokenAccount: TAccountMetas[7];
|
|
272
|
+
position: TAccountMetas[8];
|
|
273
|
+
positionOwner: TAccountMetas[9];
|
|
274
|
+
whirlpool: TAccountMetas[10];
|
|
275
|
+
systemProgram: TAccountMetas[11];
|
|
276
|
+
tokenMintA: TAccountMetas[12];
|
|
277
|
+
tokenMintB: TAccountMetas[13];
|
|
278
|
+
tokenVaultA: TAccountMetas[14];
|
|
279
|
+
tokenVaultB: TAccountMetas[15];
|
|
280
|
+
tokenProgramA: TAccountMetas[16];
|
|
281
|
+
tokenProgramB: TAccountMetas[17];
|
|
282
|
+
memoProgram: TAccountMetas[18];
|
|
283
|
+
tickArrayLower: TAccountMetas[19];
|
|
284
|
+
tickArrayUpper: TAccountMetas[20];
|
|
285
|
+
whirlpoolProgram: TAccountMetas[21];
|
|
286
|
+
ataProgram: TAccountMetas[22];
|
|
287
|
+
};
|
|
288
|
+
data: HarvestAndReinvestInstructionData;
|
|
95
289
|
};
|
|
96
|
-
export declare function parseHarvestAndReinvestInstruction<
|
|
290
|
+
export declare function parseHarvestAndReinvestInstruction<
|
|
291
|
+
TProgram extends string,
|
|
292
|
+
TAccountMetas extends readonly AccountMeta[],
|
|
293
|
+
>(
|
|
294
|
+
instruction: Instruction<TProgram> &
|
|
295
|
+
InstructionWithAccounts<TAccountMetas> &
|
|
296
|
+
InstructionWithData<ReadonlyUint8Array>
|
|
297
|
+
): ParsedHarvestAndReinvestInstruction<TProgram, TAccountMetas>;
|