@orca-so/whirlpools-automation 0.2.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.
Files changed (39) hide show
  1. package/README.md +2 -1
  2. package/dist/generated/accounts/automation.d.ts +72 -35
  3. package/dist/generated/accounts/globalConfig.d.ts +52 -19
  4. package/dist/generated/errors/whirlpoolsAutomationProgram.d.ts +54 -8
  5. package/dist/generated/instructions/createAutomation.d.ts +197 -66
  6. package/dist/generated/instructions/fundAutomation.d.ts +86 -27
  7. package/dist/generated/instructions/harvestAndReinvest.d.ts +286 -85
  8. package/dist/generated/instructions/harvestSwapAndReinvestPost.d.ts +278 -82
  9. package/dist/generated/instructions/harvestSwapAndReinvestPre.d.ts +259 -78
  10. package/dist/generated/instructions/initializeGlobalConfig.d.ts +90 -30
  11. package/dist/generated/instructions/removeAutomations.d.ts +154 -45
  12. package/dist/generated/instructions/updateGlobalConfig.d.ts +79 -24
  13. package/dist/generated/programs/whirlpoolsAutomationProgram.d.ts +58 -33
  14. package/dist/generated/shared/index.d.ts +34 -10
  15. package/dist/generated/types/accountDiscriminator.d.ts +8 -5
  16. package/dist/generated/types/action.d.ts +3 -3
  17. package/dist/generated/types/condition.d.ts +63 -33
  18. package/dist/generated/types/event.d.ts +205 -137
  19. package/dist/generated/types/fundAutomationMethod.d.ts +6 -3
  20. package/dist/generated/types/fundAutomationVariant.d.ts +33 -13
  21. package/dist/generated/types/increaseLiquidityByTokenAmountsAccountsType.d.ts +15 -11
  22. package/dist/generated/types/increaseLiquidityByTokenAmountsRemainingAccountsInfo.d.ts +10 -4
  23. package/dist/generated/types/increaseLiquidityByTokenAmountsRemainingAccountsSlice.d.ts +12 -6
  24. package/dist/generated/types/increaseLiquidityMethod.d.ts +30 -15
  25. package/dist/generated/types/nonZeroU32.d.ts +6 -2
  26. package/dist/generated/types/position.d.ts +22 -22
  27. package/dist/generated/types/positionRewardInfo.d.ts +8 -5
  28. package/dist/generated/types/tokenAccount.d.ts +22 -22
  29. package/dist/generated/types/tokenAccountState.d.ts +7 -4
  30. package/dist/generated/types/tokenMint.d.ts +14 -14
  31. package/dist/generated/types/updateGlobalConfigVariant.d.ts +58 -20
  32. package/dist/generated/types/whirlpool.d.ts +40 -40
  33. package/dist/generated/types/whirlpoolRewardInfo.d.ts +14 -11
  34. package/dist/index.browser.js +2980 -2310
  35. package/dist/index.node.js +2969 -2302
  36. package/dist/pda.d.ts +17 -2
  37. package/dist/staging.d.ts +1 -1
  38. package/package.json +4 -3
  39. package/CHANGELOG.md +0 -7
@@ -1,41 +1,100 @@
1
- import { Address, AccountMeta, AccountSignerMeta, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from '@solana/kit';
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<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountPayer extends string | AccountMeta<string> = string, TAccountAutomation extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
8
- TAccountPayer extends string ? WritableSignerAccount<TAccountPayer> & AccountSignerMeta<TAccountPayer> : TAccountPayer,
9
- TAccountAutomation extends string ? WritableAccount<TAccountAutomation> : TAccountAutomation,
10
- TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
11
- ...TRemainingAccounts
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
- discriminator: number;
15
- instructionData: FundAutomationVariant;
43
+ discriminator: number;
44
+ instructionData: FundAutomationVariant;
16
45
  };
17
46
  export type FundAutomationInstructionDataArgs = {
18
- instructionData: FundAutomationVariantArgs;
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<FundAutomationInstructionDataArgs, FundAutomationInstructionData>;
23
- export type FundAutomationInput<TAccountPayer extends string = string, TAccountAutomation extends string = string, TAccountSystemProgram extends string = string> = {
24
- payer: TransactionSigner<TAccountPayer>;
25
- automation: Address<TAccountAutomation>;
26
- systemProgram?: Address<TAccountSystemProgram>;
27
- instructionData: FundAutomationInstructionDataArgs['instructionData'];
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<TAccountPayer extends string, TAccountAutomation extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS>(input: FundAutomationInput<TAccountPayer, TAccountAutomation, TAccountSystemProgram>, config?: {
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
- }): FundAutomationInstruction<TProgramAddress, TAccountPayer, TAccountAutomation, TAccountSystemProgram>;
32
- export type ParsedFundAutomationInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
33
- programAddress: Address<TProgram>;
34
- accounts: {
35
- payer: TAccountMetas[0];
36
- automation: TAccountMetas[1];
37
- systemProgram: TAccountMetas[2];
38
- };
39
- data: FundAutomationInstructionData;
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<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedFundAutomationInstruction<TProgram, TAccountMetas>;
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 { AccountMeta, AccountSignerMeta, Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from '@solana/kit';
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<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountCrankOperator extends string | AccountMeta<string> = string, TAccountAutomation extends string | AccountMeta<string> = string, TAccountAutomationTokenAccountA extends string | AccountMeta<string> = string, TAccountAutomationTokenAccountB extends string | AccountMeta<string> = string, TAccountAutomationAuthority extends string | AccountMeta<string> = string, TAccountAutomationAuthorityTokenAccountA extends string | AccountMeta<string> = string, TAccountAutomationAuthorityTokenAccountB extends string | AccountMeta<string> = string, TAccountPositionTokenAccount extends string | AccountMeta<string> = string, TAccountPosition extends string | AccountMeta<string> = string, TAccountPositionOwner extends string | AccountMeta<string> = string, TAccountWhirlpool extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountTokenMintA extends string | AccountMeta<string> = string, TAccountTokenMintB extends string | AccountMeta<string> = string, TAccountTokenVaultA extends string | AccountMeta<string> = string, TAccountTokenVaultB extends string | AccountMeta<string> = string, TAccountTokenProgramA extends string | AccountMeta<string> = string, TAccountTokenProgramB extends string | AccountMeta<string> = string, TAccountMemoProgram extends string | AccountMeta<string> = string, TAccountTickArrayLower extends string | AccountMeta<string> = string, TAccountTickArrayUpper extends string | AccountMeta<string> = string, TAccountWhirlpoolProgram extends string | AccountMeta<string> = string, TAccountAtaProgram extends string | AccountMeta<string> = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
7
- TAccountCrankOperator extends string ? WritableSignerAccount<TAccountCrankOperator> & AccountSignerMeta<TAccountCrankOperator> : TAccountCrankOperator,
8
- TAccountAutomation extends string ? WritableAccount<TAccountAutomation> : TAccountAutomation,
9
- TAccountAutomationTokenAccountA extends string ? WritableAccount<TAccountAutomationTokenAccountA> : TAccountAutomationTokenAccountA,
10
- TAccountAutomationTokenAccountB extends string ? WritableAccount<TAccountAutomationTokenAccountB> : TAccountAutomationTokenAccountB,
11
- TAccountAutomationAuthority extends string ? ReadonlyAccount<TAccountAutomationAuthority> : TAccountAutomationAuthority,
12
- TAccountAutomationAuthorityTokenAccountA extends string ? WritableAccount<TAccountAutomationAuthorityTokenAccountA> : TAccountAutomationAuthorityTokenAccountA,
13
- TAccountAutomationAuthorityTokenAccountB extends string ? WritableAccount<TAccountAutomationAuthorityTokenAccountB> : TAccountAutomationAuthorityTokenAccountB,
14
- TAccountPositionTokenAccount extends string ? ReadonlyAccount<TAccountPositionTokenAccount> : TAccountPositionTokenAccount,
15
- TAccountPosition extends string ? WritableAccount<TAccountPosition> : TAccountPosition,
16
- TAccountPositionOwner extends string ? ReadonlyAccount<TAccountPositionOwner> : TAccountPositionOwner,
17
- TAccountWhirlpool extends string ? WritableAccount<TAccountWhirlpool> : TAccountWhirlpool,
18
- TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
19
- TAccountTokenMintA extends string ? ReadonlyAccount<TAccountTokenMintA> : TAccountTokenMintA,
20
- TAccountTokenMintB extends string ? ReadonlyAccount<TAccountTokenMintB> : TAccountTokenMintB,
21
- TAccountTokenVaultA extends string ? WritableAccount<TAccountTokenVaultA> : TAccountTokenVaultA,
22
- TAccountTokenVaultB extends string ? WritableAccount<TAccountTokenVaultB> : TAccountTokenVaultB,
23
- TAccountTokenProgramA extends string ? ReadonlyAccount<TAccountTokenProgramA> : TAccountTokenProgramA,
24
- TAccountTokenProgramB extends string ? ReadonlyAccount<TAccountTokenProgramB> : TAccountTokenProgramB,
25
- TAccountMemoProgram extends string ? ReadonlyAccount<TAccountMemoProgram> : TAccountMemoProgram,
26
- TAccountTickArrayLower extends string ? WritableAccount<TAccountTickArrayLower> : TAccountTickArrayLower,
27
- TAccountTickArrayUpper extends string ? WritableAccount<TAccountTickArrayUpper> : TAccountTickArrayUpper,
28
- TAccountWhirlpoolProgram extends string ? ReadonlyAccount<TAccountWhirlpoolProgram> : TAccountWhirlpoolProgram,
29
- TAccountAtaProgram extends string ? ReadonlyAccount<TAccountAtaProgram> : TAccountAtaProgram,
30
- ...TRemainingAccounts
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
- discriminator: number;
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<HarvestAndReinvestInstructionDataArgs, HarvestAndReinvestInstructionData>;
39
- export type HarvestAndReinvestInput<TAccountCrankOperator extends string = string, TAccountAutomation extends string = string, TAccountAutomationTokenAccountA extends string = string, TAccountAutomationTokenAccountB extends string = string, TAccountAutomationAuthority extends string = string, TAccountAutomationAuthorityTokenAccountA extends string = string, TAccountAutomationAuthorityTokenAccountB extends string = string, TAccountPositionTokenAccount extends string = string, TAccountPosition extends string = string, TAccountPositionOwner extends string = string, TAccountWhirlpool extends string = string, TAccountSystemProgram extends string = string, TAccountTokenMintA extends string = string, TAccountTokenMintB extends string = string, TAccountTokenVaultA extends string = string, TAccountTokenVaultB extends string = string, TAccountTokenProgramA extends string = string, TAccountTokenProgramB extends string = string, TAccountMemoProgram extends string = string, TAccountTickArrayLower extends string = string, TAccountTickArrayUpper extends string = string, TAccountWhirlpoolProgram extends string = string, TAccountAtaProgram extends string = string> = {
40
- crankOperator: TransactionSigner<TAccountCrankOperator>;
41
- automation: Address<TAccountAutomation>;
42
- automationTokenAccountA: Address<TAccountAutomationTokenAccountA>;
43
- automationTokenAccountB: Address<TAccountAutomationTokenAccountB>;
44
- automationAuthority: Address<TAccountAutomationAuthority>;
45
- automationAuthorityTokenAccountA: Address<TAccountAutomationAuthorityTokenAccountA>;
46
- automationAuthorityTokenAccountB: Address<TAccountAutomationAuthorityTokenAccountB>;
47
- positionTokenAccount: Address<TAccountPositionTokenAccount>;
48
- position: Address<TAccountPosition>;
49
- positionOwner: Address<TAccountPositionOwner>;
50
- whirlpool: Address<TAccountWhirlpool>;
51
- systemProgram?: Address<TAccountSystemProgram>;
52
- tokenMintA: Address<TAccountTokenMintA>;
53
- tokenMintB: Address<TAccountTokenMintB>;
54
- tokenVaultA: Address<TAccountTokenVaultA>;
55
- tokenVaultB: Address<TAccountTokenVaultB>;
56
- tokenProgramA: Address<TAccountTokenProgramA>;
57
- tokenProgramB: Address<TAccountTokenProgramB>;
58
- memoProgram: Address<TAccountMemoProgram>;
59
- tickArrayLower: Address<TAccountTickArrayLower>;
60
- tickArrayUpper: Address<TAccountTickArrayUpper>;
61
- whirlpoolProgram: Address<TAccountWhirlpoolProgram>;
62
- ataProgram?: Address<TAccountAtaProgram>;
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<TAccountCrankOperator extends string, TAccountAutomation extends string, TAccountAutomationTokenAccountA extends string, TAccountAutomationTokenAccountB extends string, TAccountAutomationAuthority extends string, TAccountAutomationAuthorityTokenAccountA extends string, TAccountAutomationAuthorityTokenAccountB extends string, TAccountPositionTokenAccount extends string, TAccountPosition extends string, TAccountPositionOwner extends string, TAccountWhirlpool extends string, TAccountSystemProgram extends string, TAccountTokenMintA extends string, TAccountTokenMintB extends string, TAccountTokenVaultA extends string, TAccountTokenVaultB extends string, TAccountTokenProgramA extends string, TAccountTokenProgramB extends string, TAccountMemoProgram extends string, TAccountTickArrayLower extends string, TAccountTickArrayUpper extends string, TAccountWhirlpoolProgram extends string, TAccountAtaProgram extends string, TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS>(input: HarvestAndReinvestInput<TAccountCrankOperator, TAccountAutomation, TAccountAutomationTokenAccountA, TAccountAutomationTokenAccountB, TAccountAutomationAuthority, TAccountAutomationAuthorityTokenAccountA, TAccountAutomationAuthorityTokenAccountB, TAccountPositionTokenAccount, TAccountPosition, TAccountPositionOwner, TAccountWhirlpool, TAccountSystemProgram, TAccountTokenMintA, TAccountTokenMintB, TAccountTokenVaultA, TAccountTokenVaultB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountMemoProgram, TAccountTickArrayLower, TAccountTickArrayUpper, TAccountWhirlpoolProgram, TAccountAtaProgram>, config?: {
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
- }): HarvestAndReinvestInstruction<TProgramAddress, TAccountCrankOperator, TAccountAutomation, TAccountAutomationTokenAccountA, TAccountAutomationTokenAccountB, TAccountAutomationAuthority, TAccountAutomationAuthorityTokenAccountA, TAccountAutomationAuthorityTokenAccountB, TAccountPositionTokenAccount, TAccountPosition, TAccountPositionOwner, TAccountWhirlpool, TAccountSystemProgram, TAccountTokenMintA, TAccountTokenMintB, TAccountTokenVaultA, TAccountTokenVaultB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountMemoProgram, TAccountTickArrayLower, TAccountTickArrayUpper, TAccountWhirlpoolProgram, TAccountAtaProgram>;
67
- export type ParsedHarvestAndReinvestInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
68
- programAddress: Address<TProgram>;
69
- accounts: {
70
- crankOperator: TAccountMetas[0];
71
- automation: TAccountMetas[1];
72
- automationTokenAccountA: TAccountMetas[2];
73
- automationTokenAccountB: TAccountMetas[3];
74
- automationAuthority: TAccountMetas[4];
75
- automationAuthorityTokenAccountA: TAccountMetas[5];
76
- automationAuthorityTokenAccountB: TAccountMetas[6];
77
- positionTokenAccount: TAccountMetas[7];
78
- position: TAccountMetas[8];
79
- positionOwner: TAccountMetas[9];
80
- whirlpool: TAccountMetas[10];
81
- systemProgram: TAccountMetas[11];
82
- tokenMintA: TAccountMetas[12];
83
- tokenMintB: TAccountMetas[13];
84
- tokenVaultA: TAccountMetas[14];
85
- tokenVaultB: TAccountMetas[15];
86
- tokenProgramA: TAccountMetas[16];
87
- tokenProgramB: TAccountMetas[17];
88
- memoProgram: TAccountMetas[18];
89
- tickArrayLower: TAccountMetas[19];
90
- tickArrayUpper: TAccountMetas[20];
91
- whirlpoolProgram: TAccountMetas[21];
92
- ataProgram: TAccountMetas[22];
93
- };
94
- data: HarvestAndReinvestInstructionData;
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<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedHarvestAndReinvestInstruction<TProgram, TAccountMetas>;
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>;