@orca-so/whirlpools-automation 0.1.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 (60) hide show
  1. package/LICENSE +42 -0
  2. package/dist/generated/accounts/automation.d.ts +44 -0
  3. package/dist/generated/accounts/globalConfig.d.ts +28 -0
  4. package/dist/generated/accounts/index.d.ts +2 -0
  5. package/dist/generated/accounts/scratchSpace.d.ts +57 -0
  6. package/dist/generated/accounts/state.d.ts +61 -0
  7. package/dist/generated/constants.d.ts +1 -0
  8. package/dist/generated/errors/index.d.ts +1 -0
  9. package/dist/generated/errors/whirlpoolsAutomationProgram.d.ts +45 -0
  10. package/dist/generated/index.d.ts +6 -0
  11. package/dist/generated/instructions/createAutomation.d.ts +80 -0
  12. package/dist/generated/instructions/fundAutomation.d.ts +41 -0
  13. package/dist/generated/instructions/harvestAndReinvest.d.ts +96 -0
  14. package/dist/generated/instructions/harvestSwapAndReinvestPost.d.ts +93 -0
  15. package/dist/generated/instructions/harvestSwapAndReinvestPre.d.ts +90 -0
  16. package/dist/generated/instructions/index.d.ts +8 -0
  17. package/dist/generated/instructions/initialize.d.ts +104 -0
  18. package/dist/generated/instructions/initializeGlobalConfig.d.ts +44 -0
  19. package/dist/generated/instructions/removeAutomations.d.ts +57 -0
  20. package/dist/generated/instructions/set.d.ts +89 -0
  21. package/dist/generated/instructions/updateGlobalConfig.d.ts +38 -0
  22. package/dist/generated/programs/index.d.ts +1 -0
  23. package/dist/generated/programs/whirlpoolsAutomationProgram.d.ts +39 -0
  24. package/dist/generated/shared/index.d.ts +15 -0
  25. package/dist/generated/types/accountDiscriminator.d.ts +12 -0
  26. package/dist/generated/types/action.d.ts +11 -0
  27. package/dist/generated/types/actionData.d.ts +12 -0
  28. package/dist/generated/types/actionLabel.d.ts +10 -0
  29. package/dist/generated/types/address.d.ts +4 -0
  30. package/dist/generated/types/collectFeesV2AccountsType.d.ts +20 -0
  31. package/dist/generated/types/collectFeesV2RemainingAccountsInfo.d.ts +15 -0
  32. package/dist/generated/types/collectFeesV2RemainingAccountsSlice.d.ts +17 -0
  33. package/dist/generated/types/condition.d.ts +39 -0
  34. package/dist/generated/types/conditionData.d.ts +37 -0
  35. package/dist/generated/types/conditionLabel.d.ts +20 -0
  36. package/dist/generated/types/event.d.ts +143 -0
  37. package/dist/generated/types/fundAutomationMethod.d.ts +10 -0
  38. package/dist/generated/types/fundAutomationVariant.d.ts +18 -0
  39. package/dist/generated/types/globalConfigUpdateInstruction.d.ts +65 -0
  40. package/dist/generated/types/increaseLiquidityByTokenAmountsAccountsType.d.ts +17 -0
  41. package/dist/generated/types/increaseLiquidityByTokenAmountsRemainingAccountsInfo.d.ts +12 -0
  42. package/dist/generated/types/increaseLiquidityByTokenAmountsRemainingAccountsSlice.d.ts +14 -0
  43. package/dist/generated/types/increaseLiquidityMethod.d.ts +23 -0
  44. package/dist/generated/types/index.d.ts +20 -0
  45. package/dist/generated/types/nonZeroU32.d.ts +4 -0
  46. package/dist/generated/types/position.d.ts +32 -0
  47. package/dist/generated/types/positionRewardInfo.d.ts +13 -0
  48. package/dist/generated/types/scratchSpacePayload.d.ts +53 -0
  49. package/dist/generated/types/stateUpdateInstruction.d.ts +55 -0
  50. package/dist/generated/types/tokenAccount.d.ts +32 -0
  51. package/dist/generated/types/tokenAccountState.d.ts +11 -0
  52. package/dist/generated/types/tokenMint.d.ts +24 -0
  53. package/dist/generated/types/updateGlobalConfigInstruction.d.ts +65 -0
  54. package/dist/generated/types/updateGlobalConfigVariant.d.ts +25 -0
  55. package/dist/generated/types/whirlpool.d.ts +50 -0
  56. package/dist/generated/types/whirlpoolRewardInfo.d.ts +20 -0
  57. package/dist/index.browser.js +2927 -0
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.node.js +2922 -0
  60. package/package.json +45 -0
@@ -0,0 +1,93 @@
1
+ import { AccountMeta, AccountSignerMeta, Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from '@solana/kit';
2
+ import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
3
+
4
+ export declare const HARVEST_SWAP_AND_REINVEST_POST_DISCRIMINATOR = 7;
5
+ export declare function getHarvestSwapAndReinvestPostDiscriminatorBytes(): ReadonlyUint8Array;
6
+ export type HarvestSwapAndReinvestPostInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountCrankOperator extends string | AccountMeta<string> = string, TAccountCrankOperatorTokenAccountA extends string | AccountMeta<string> = string, TAccountCrankOperatorTokenAccountB 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, TAccountPositionTokenAccount extends string | AccountMeta<string> = string, TAccountPosition extends string | AccountMeta<string> = string, TAccountPositionOwner extends string | AccountMeta<string> = string, TAccountWhirlpool extends string | AccountMeta<string> = string, 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, TAccountInstructionsSysvar extends string | AccountMeta<string> = 'Sysvar1nstructions1111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
7
+ TAccountCrankOperator extends string ? WritableSignerAccount<TAccountCrankOperator> & AccountSignerMeta<TAccountCrankOperator> : TAccountCrankOperator,
8
+ TAccountCrankOperatorTokenAccountA extends string ? WritableAccount<TAccountCrankOperatorTokenAccountA> : TAccountCrankOperatorTokenAccountA,
9
+ TAccountCrankOperatorTokenAccountB extends string ? WritableAccount<TAccountCrankOperatorTokenAccountB> : TAccountCrankOperatorTokenAccountB,
10
+ TAccountAutomation extends string ? WritableAccount<TAccountAutomation> : TAccountAutomation,
11
+ TAccountAutomationTokenAccountA extends string ? WritableAccount<TAccountAutomationTokenAccountA> : TAccountAutomationTokenAccountA,
12
+ TAccountAutomationTokenAccountB extends string ? WritableAccount<TAccountAutomationTokenAccountB> : TAccountAutomationTokenAccountB,
13
+ TAccountAutomationAuthority extends string ? ReadonlyAccount<TAccountAutomationAuthority> : TAccountAutomationAuthority,
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
+ TAccountTokenMintA extends string ? ReadonlyAccount<TAccountTokenMintA> : TAccountTokenMintA,
19
+ TAccountTokenMintB extends string ? ReadonlyAccount<TAccountTokenMintB> : TAccountTokenMintB,
20
+ TAccountTokenVaultA extends string ? WritableAccount<TAccountTokenVaultA> : TAccountTokenVaultA,
21
+ TAccountTokenVaultB extends string ? WritableAccount<TAccountTokenVaultB> : TAccountTokenVaultB,
22
+ TAccountTokenProgramA extends string ? ReadonlyAccount<TAccountTokenProgramA> : TAccountTokenProgramA,
23
+ TAccountTokenProgramB extends string ? ReadonlyAccount<TAccountTokenProgramB> : TAccountTokenProgramB,
24
+ TAccountMemoProgram extends string ? ReadonlyAccount<TAccountMemoProgram> : TAccountMemoProgram,
25
+ TAccountTickArrayLower extends string ? WritableAccount<TAccountTickArrayLower> : TAccountTickArrayLower,
26
+ TAccountTickArrayUpper extends string ? WritableAccount<TAccountTickArrayUpper> : TAccountTickArrayUpper,
27
+ TAccountWhirlpoolProgram extends string ? ReadonlyAccount<TAccountWhirlpoolProgram> : TAccountWhirlpoolProgram,
28
+ TAccountInstructionsSysvar extends string ? ReadonlyAccount<TAccountInstructionsSysvar> : TAccountInstructionsSysvar,
29
+ ...TRemainingAccounts
30
+ ]>;
31
+ export type HarvestSwapAndReinvestPostInstructionData = {
32
+ discriminator: number;
33
+ };
34
+ export type HarvestSwapAndReinvestPostInstructionDataArgs = {};
35
+ export declare function getHarvestSwapAndReinvestPostInstructionDataEncoder(): FixedSizeEncoder<HarvestSwapAndReinvestPostInstructionDataArgs>;
36
+ export declare function getHarvestSwapAndReinvestPostInstructionDataDecoder(): FixedSizeDecoder<HarvestSwapAndReinvestPostInstructionData>;
37
+ export declare function getHarvestSwapAndReinvestPostInstructionDataCodec(): FixedSizeCodec<HarvestSwapAndReinvestPostInstructionDataArgs, HarvestSwapAndReinvestPostInstructionData>;
38
+ export type HarvestSwapAndReinvestPostInput<TAccountCrankOperator extends string = string, TAccountCrankOperatorTokenAccountA extends string = string, TAccountCrankOperatorTokenAccountB extends string = string, TAccountAutomation extends string = string, TAccountAutomationTokenAccountA extends string = string, TAccountAutomationTokenAccountB extends string = string, TAccountAutomationAuthority extends string = string, TAccountPositionTokenAccount extends string = string, TAccountPosition extends string = string, TAccountPositionOwner extends string = string, TAccountWhirlpool 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, TAccountInstructionsSysvar extends string = string> = {
39
+ crankOperator: TransactionSigner<TAccountCrankOperator>;
40
+ crankOperatorTokenAccountA: Address<TAccountCrankOperatorTokenAccountA>;
41
+ crankOperatorTokenAccountB: Address<TAccountCrankOperatorTokenAccountB>;
42
+ automation: Address<TAccountAutomation>;
43
+ automationTokenAccountA: Address<TAccountAutomationTokenAccountA>;
44
+ automationTokenAccountB: Address<TAccountAutomationTokenAccountB>;
45
+ automationAuthority: Address<TAccountAutomationAuthority>;
46
+ positionTokenAccount: Address<TAccountPositionTokenAccount>;
47
+ position: Address<TAccountPosition>;
48
+ positionOwner: Address<TAccountPositionOwner>;
49
+ whirlpool: Address<TAccountWhirlpool>;
50
+ tokenMintA: Address<TAccountTokenMintA>;
51
+ tokenMintB: Address<TAccountTokenMintB>;
52
+ tokenVaultA: Address<TAccountTokenVaultA>;
53
+ tokenVaultB: Address<TAccountTokenVaultB>;
54
+ tokenProgramA: Address<TAccountTokenProgramA>;
55
+ tokenProgramB: Address<TAccountTokenProgramB>;
56
+ memoProgram: Address<TAccountMemoProgram>;
57
+ tickArrayLower: Address<TAccountTickArrayLower>;
58
+ tickArrayUpper: Address<TAccountTickArrayUpper>;
59
+ whirlpoolProgram: Address<TAccountWhirlpoolProgram>;
60
+ instructionsSysvar?: Address<TAccountInstructionsSysvar>;
61
+ };
62
+ export declare function getHarvestSwapAndReinvestPostInstruction<TAccountCrankOperator extends string, TAccountCrankOperatorTokenAccountA extends string, TAccountCrankOperatorTokenAccountB extends string, TAccountAutomation extends string, TAccountAutomationTokenAccountA extends string, TAccountAutomationTokenAccountB extends string, TAccountAutomationAuthority extends string, TAccountPositionTokenAccount extends string, TAccountPosition extends string, TAccountPositionOwner extends string, TAccountWhirlpool 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, TAccountInstructionsSysvar extends string, TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS>(input: HarvestSwapAndReinvestPostInput<TAccountCrankOperator, TAccountCrankOperatorTokenAccountA, TAccountCrankOperatorTokenAccountB, TAccountAutomation, TAccountAutomationTokenAccountA, TAccountAutomationTokenAccountB, TAccountAutomationAuthority, TAccountPositionTokenAccount, TAccountPosition, TAccountPositionOwner, TAccountWhirlpool, TAccountTokenMintA, TAccountTokenMintB, TAccountTokenVaultA, TAccountTokenVaultB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountMemoProgram, TAccountTickArrayLower, TAccountTickArrayUpper, TAccountWhirlpoolProgram, TAccountInstructionsSysvar>, config?: {
63
+ programAddress?: TProgramAddress;
64
+ }): HarvestSwapAndReinvestPostInstruction<TProgramAddress, TAccountCrankOperator, TAccountCrankOperatorTokenAccountA, TAccountCrankOperatorTokenAccountB, TAccountAutomation, TAccountAutomationTokenAccountA, TAccountAutomationTokenAccountB, TAccountAutomationAuthority, TAccountPositionTokenAccount, TAccountPosition, TAccountPositionOwner, TAccountWhirlpool, TAccountTokenMintA, TAccountTokenMintB, TAccountTokenVaultA, TAccountTokenVaultB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountMemoProgram, TAccountTickArrayLower, TAccountTickArrayUpper, TAccountWhirlpoolProgram, TAccountInstructionsSysvar>;
65
+ export type ParsedHarvestSwapAndReinvestPostInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
66
+ programAddress: Address<TProgram>;
67
+ accounts: {
68
+ crankOperator: TAccountMetas[0];
69
+ crankOperatorTokenAccountA: TAccountMetas[1];
70
+ crankOperatorTokenAccountB: TAccountMetas[2];
71
+ automation: TAccountMetas[3];
72
+ automationTokenAccountA: TAccountMetas[4];
73
+ automationTokenAccountB: TAccountMetas[5];
74
+ automationAuthority: TAccountMetas[6];
75
+ positionTokenAccount: TAccountMetas[7];
76
+ position: TAccountMetas[8];
77
+ positionOwner: TAccountMetas[9];
78
+ whirlpool: TAccountMetas[10];
79
+ tokenMintA: TAccountMetas[11];
80
+ tokenMintB: TAccountMetas[12];
81
+ tokenVaultA: TAccountMetas[13];
82
+ tokenVaultB: TAccountMetas[14];
83
+ tokenProgramA: TAccountMetas[15];
84
+ tokenProgramB: TAccountMetas[16];
85
+ memoProgram: TAccountMetas[17];
86
+ tickArrayLower: TAccountMetas[18];
87
+ tickArrayUpper: TAccountMetas[19];
88
+ whirlpoolProgram: TAccountMetas[20];
89
+ instructionsSysvar: TAccountMetas[21];
90
+ };
91
+ data: HarvestSwapAndReinvestPostInstructionData;
92
+ };
93
+ export declare function parseHarvestSwapAndReinvestPostInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedHarvestSwapAndReinvestPostInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,90 @@
1
+ import { AccountMeta, AccountSignerMeta, Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from '@solana/kit';
2
+ import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
3
+
4
+ export declare const HARVEST_SWAP_AND_REINVEST_PRE_DISCRIMINATOR = 6;
5
+ export declare function getHarvestSwapAndReinvestPreDiscriminatorBytes(): ReadonlyUint8Array;
6
+ export type HarvestSwapAndReinvestPreInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountCrankOperator extends string | AccountMeta<string> = string, TAccountCrankOperatorTokenAccountA extends string | AccountMeta<string> = string, TAccountCrankOperatorTokenAccountB extends string | AccountMeta<string> = string, TAccountAutomation extends string | AccountMeta<string> = string, TAccountAutomationAuthority extends string | AccountMeta<string> = string, TAccountPositionTokenAccount extends string | AccountMeta<string> = string, TAccountPosition extends string | AccountMeta<string> = string, TAccountWhirlpool extends string | AccountMeta<string> = string, 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, TAccountInstructionsSysvar extends string | AccountMeta<string> = 'Sysvar1nstructions1111111111111111111111111', TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', 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
+ TAccountCrankOperatorTokenAccountA extends string ? WritableAccount<TAccountCrankOperatorTokenAccountA> : TAccountCrankOperatorTokenAccountA,
9
+ TAccountCrankOperatorTokenAccountB extends string ? WritableAccount<TAccountCrankOperatorTokenAccountB> : TAccountCrankOperatorTokenAccountB,
10
+ TAccountAutomation extends string ? ReadonlyAccount<TAccountAutomation> : TAccountAutomation,
11
+ TAccountAutomationAuthority extends string ? ReadonlyAccount<TAccountAutomationAuthority> : TAccountAutomationAuthority,
12
+ TAccountPositionTokenAccount extends string ? ReadonlyAccount<TAccountPositionTokenAccount> : TAccountPositionTokenAccount,
13
+ TAccountPosition extends string ? WritableAccount<TAccountPosition> : TAccountPosition,
14
+ TAccountWhirlpool extends string ? WritableAccount<TAccountWhirlpool> : TAccountWhirlpool,
15
+ TAccountTokenMintA extends string ? ReadonlyAccount<TAccountTokenMintA> : TAccountTokenMintA,
16
+ TAccountTokenMintB extends string ? ReadonlyAccount<TAccountTokenMintB> : TAccountTokenMintB,
17
+ TAccountTokenVaultA extends string ? WritableAccount<TAccountTokenVaultA> : TAccountTokenVaultA,
18
+ TAccountTokenVaultB extends string ? WritableAccount<TAccountTokenVaultB> : TAccountTokenVaultB,
19
+ TAccountTokenProgramA extends string ? ReadonlyAccount<TAccountTokenProgramA> : TAccountTokenProgramA,
20
+ TAccountTokenProgramB extends string ? ReadonlyAccount<TAccountTokenProgramB> : TAccountTokenProgramB,
21
+ TAccountMemoProgram extends string ? ReadonlyAccount<TAccountMemoProgram> : TAccountMemoProgram,
22
+ TAccountTickArrayLower extends string ? ReadonlyAccount<TAccountTickArrayLower> : TAccountTickArrayLower,
23
+ TAccountTickArrayUpper extends string ? ReadonlyAccount<TAccountTickArrayUpper> : TAccountTickArrayUpper,
24
+ TAccountWhirlpoolProgram extends string ? ReadonlyAccount<TAccountWhirlpoolProgram> : TAccountWhirlpoolProgram,
25
+ TAccountInstructionsSysvar extends string ? ReadonlyAccount<TAccountInstructionsSysvar> : TAccountInstructionsSysvar,
26
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
27
+ TAccountAtaProgram extends string ? ReadonlyAccount<TAccountAtaProgram> : TAccountAtaProgram,
28
+ ...TRemainingAccounts
29
+ ]>;
30
+ export type HarvestSwapAndReinvestPreInstructionData = {
31
+ discriminator: number;
32
+ };
33
+ export type HarvestSwapAndReinvestPreInstructionDataArgs = {};
34
+ export declare function getHarvestSwapAndReinvestPreInstructionDataEncoder(): FixedSizeEncoder<HarvestSwapAndReinvestPreInstructionDataArgs>;
35
+ export declare function getHarvestSwapAndReinvestPreInstructionDataDecoder(): FixedSizeDecoder<HarvestSwapAndReinvestPreInstructionData>;
36
+ export declare function getHarvestSwapAndReinvestPreInstructionDataCodec(): FixedSizeCodec<HarvestSwapAndReinvestPreInstructionDataArgs, HarvestSwapAndReinvestPreInstructionData>;
37
+ export type HarvestSwapAndReinvestPreInput<TAccountCrankOperator extends string = string, TAccountCrankOperatorTokenAccountA extends string = string, TAccountCrankOperatorTokenAccountB extends string = string, TAccountAutomation extends string = string, TAccountAutomationAuthority extends string = string, TAccountPositionTokenAccount extends string = string, TAccountPosition extends string = string, TAccountWhirlpool 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, TAccountInstructionsSysvar extends string = string, TAccountSystemProgram extends string = string, TAccountAtaProgram extends string = string> = {
38
+ crankOperator: TransactionSigner<TAccountCrankOperator>;
39
+ crankOperatorTokenAccountA: Address<TAccountCrankOperatorTokenAccountA>;
40
+ crankOperatorTokenAccountB: Address<TAccountCrankOperatorTokenAccountB>;
41
+ automation: Address<TAccountAutomation>;
42
+ automationAuthority: Address<TAccountAutomationAuthority>;
43
+ positionTokenAccount: Address<TAccountPositionTokenAccount>;
44
+ position: Address<TAccountPosition>;
45
+ whirlpool: Address<TAccountWhirlpool>;
46
+ tokenMintA: Address<TAccountTokenMintA>;
47
+ tokenMintB: Address<TAccountTokenMintB>;
48
+ tokenVaultA: Address<TAccountTokenVaultA>;
49
+ tokenVaultB: Address<TAccountTokenVaultB>;
50
+ tokenProgramA: Address<TAccountTokenProgramA>;
51
+ tokenProgramB: Address<TAccountTokenProgramB>;
52
+ memoProgram: Address<TAccountMemoProgram>;
53
+ tickArrayLower: Address<TAccountTickArrayLower>;
54
+ tickArrayUpper: Address<TAccountTickArrayUpper>;
55
+ whirlpoolProgram: Address<TAccountWhirlpoolProgram>;
56
+ instructionsSysvar?: Address<TAccountInstructionsSysvar>;
57
+ systemProgram?: Address<TAccountSystemProgram>;
58
+ ataProgram?: Address<TAccountAtaProgram>;
59
+ };
60
+ export declare function getHarvestSwapAndReinvestPreInstruction<TAccountCrankOperator extends string, TAccountCrankOperatorTokenAccountA extends string, TAccountCrankOperatorTokenAccountB extends string, TAccountAutomation extends string, TAccountAutomationAuthority extends string, TAccountPositionTokenAccount extends string, TAccountPosition extends string, TAccountWhirlpool 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, TAccountInstructionsSysvar extends string, TAccountSystemProgram extends string, TAccountAtaProgram extends string, TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS>(input: HarvestSwapAndReinvestPreInput<TAccountCrankOperator, TAccountCrankOperatorTokenAccountA, TAccountCrankOperatorTokenAccountB, TAccountAutomation, TAccountAutomationAuthority, TAccountPositionTokenAccount, TAccountPosition, TAccountWhirlpool, TAccountTokenMintA, TAccountTokenMintB, TAccountTokenVaultA, TAccountTokenVaultB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountMemoProgram, TAccountTickArrayLower, TAccountTickArrayUpper, TAccountWhirlpoolProgram, TAccountInstructionsSysvar, TAccountSystemProgram, TAccountAtaProgram>, config?: {
61
+ programAddress?: TProgramAddress;
62
+ }): HarvestSwapAndReinvestPreInstruction<TProgramAddress, TAccountCrankOperator, TAccountCrankOperatorTokenAccountA, TAccountCrankOperatorTokenAccountB, TAccountAutomation, TAccountAutomationAuthority, TAccountPositionTokenAccount, TAccountPosition, TAccountWhirlpool, TAccountTokenMintA, TAccountTokenMintB, TAccountTokenVaultA, TAccountTokenVaultB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountMemoProgram, TAccountTickArrayLower, TAccountTickArrayUpper, TAccountWhirlpoolProgram, TAccountInstructionsSysvar, TAccountSystemProgram, TAccountAtaProgram>;
63
+ export type ParsedHarvestSwapAndReinvestPreInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
64
+ programAddress: Address<TProgram>;
65
+ accounts: {
66
+ crankOperator: TAccountMetas[0];
67
+ crankOperatorTokenAccountA: TAccountMetas[1];
68
+ crankOperatorTokenAccountB: TAccountMetas[2];
69
+ automation: TAccountMetas[3];
70
+ automationAuthority: TAccountMetas[4];
71
+ positionTokenAccount: TAccountMetas[5];
72
+ position: TAccountMetas[6];
73
+ whirlpool: TAccountMetas[7];
74
+ tokenMintA: TAccountMetas[8];
75
+ tokenMintB: TAccountMetas[9];
76
+ tokenVaultA: TAccountMetas[10];
77
+ tokenVaultB: TAccountMetas[11];
78
+ tokenProgramA: TAccountMetas[12];
79
+ tokenProgramB: TAccountMetas[13];
80
+ memoProgram: TAccountMetas[14];
81
+ tickArrayLower: TAccountMetas[15];
82
+ tickArrayUpper: TAccountMetas[16];
83
+ whirlpoolProgram: TAccountMetas[17];
84
+ instructionsSysvar: TAccountMetas[18];
85
+ systemProgram: TAccountMetas[19];
86
+ ataProgram: TAccountMetas[20];
87
+ };
88
+ data: HarvestSwapAndReinvestPreInstructionData;
89
+ };
90
+ export declare function parseHarvestSwapAndReinvestPreInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedHarvestSwapAndReinvestPreInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,8 @@
1
+ export * from './createAutomation';
2
+ export * from './fundAutomation';
3
+ export * from './harvestAndReinvest';
4
+ export * from './harvestSwapAndReinvestPost';
5
+ export * from './harvestSwapAndReinvestPre';
6
+ export * from './initializeGlobalConfig';
7
+ export * from './removeAutomations';
8
+ export * from './updateGlobalConfig';
@@ -0,0 +1,104 @@
1
+ import {
2
+ AccountMeta,
3
+ AccountSignerMeta,
4
+ Codec,
5
+ Decoder,
6
+ Encoder,
7
+ Instruction,
8
+ InstructionWithAccounts,
9
+ InstructionWithData,
10
+ ReadonlyAccount,
11
+ ReadonlyUint8Array,
12
+ TransactionSigner,
13
+ WritableAccount,
14
+ WritableSignerAccount,
15
+ } from '@solana/kit';
16
+ import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
17
+ import { Address, AddressArgs } from '../types';
18
+
19
+ export declare const INITIALIZE_DISCRIMINATOR = 0;
20
+ export declare function getInitializeDiscriminatorBytes(): ReadonlyUint8Array;
21
+ export type InitializeInstruction<
22
+ TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
23
+ TAccountDeployer extends string | AccountMeta<string> = string,
24
+ TAccountGlobalConfig extends string | AccountMeta<string> = string,
25
+ TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111',
26
+ TRemainingAccounts extends readonly AccountMeta<string>[] = [],
27
+ > = Instruction<TProgram> &
28
+ InstructionWithData<ReadonlyUint8Array> &
29
+ InstructionWithAccounts<
30
+ [
31
+ TAccountDeployer extends string
32
+ ? WritableSignerAccount<TAccountDeployer> & AccountSignerMeta<TAccountDeployer>
33
+ : TAccountDeployer,
34
+ TAccountGlobalConfig extends string
35
+ ? WritableAccount<TAccountGlobalConfig>
36
+ : TAccountGlobalConfig,
37
+ TAccountSystemProgram extends string
38
+ ? ReadonlyAccount<TAccountSystemProgram>
39
+ : TAccountSystemProgram,
40
+ ...TRemainingAccounts,
41
+ ]
42
+ >;
43
+ export type InitializeInstructionData = {
44
+ discriminator: number;
45
+ updateAuthority: Address;
46
+ crankRewardDefault: bigint;
47
+ };
48
+ export type InitializeInstructionDataArgs = {
49
+ updateAuthority: AddressArgs;
50
+ crankRewardDefault: number | bigint;
51
+ };
52
+ export declare function getInitializeInstructionDataEncoder(): Encoder<InitializeInstructionDataArgs>;
53
+ export declare function getInitializeInstructionDataDecoder(): Decoder<InitializeInstructionData>;
54
+ export declare function getInitializeInstructionDataCodec(): Codec<
55
+ InitializeInstructionDataArgs,
56
+ InitializeInstructionData
57
+ >;
58
+ export type InitializeInput<
59
+ TAccountDeployer extends string = string,
60
+ TAccountGlobalConfig extends string = string,
61
+ TAccountSystemProgram extends string = string,
62
+ > = {
63
+ deployer: TransactionSigner<TAccountDeployer>;
64
+ globalConfig: Address<TAccountGlobalConfig>;
65
+ systemProgram?: Address<TAccountSystemProgram>;
66
+ updateAuthority: InitializeInstructionDataArgs['updateAuthority'];
67
+ crankRewardDefault: InitializeInstructionDataArgs['crankRewardDefault'];
68
+ };
69
+ export declare function getInitializeInstruction<
70
+ TAccountDeployer extends string,
71
+ TAccountGlobalConfig extends string,
72
+ TAccountSystemProgram extends string,
73
+ TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
74
+ >(
75
+ input: InitializeInput<TAccountDeployer, TAccountGlobalConfig, TAccountSystemProgram>,
76
+ config?: {
77
+ programAddress?: TProgramAddress;
78
+ }
79
+ ): InitializeInstruction<
80
+ TProgramAddress,
81
+ TAccountDeployer,
82
+ TAccountGlobalConfig,
83
+ TAccountSystemProgram
84
+ >;
85
+ export type ParsedInitializeInstruction<
86
+ TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
87
+ TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
88
+ > = {
89
+ programAddress: Address<TProgram>;
90
+ accounts: {
91
+ deployer: TAccountMetas[0];
92
+ globalConfig: TAccountMetas[1];
93
+ systemProgram: TAccountMetas[2];
94
+ };
95
+ data: InitializeInstructionData;
96
+ };
97
+ export declare function parseInitializeInstruction<
98
+ TProgram extends string,
99
+ TAccountMetas extends readonly AccountMeta[],
100
+ >(
101
+ instruction: Instruction<TProgram> &
102
+ InstructionWithAccounts<TAccountMetas> &
103
+ InstructionWithData<ReadonlyUint8Array>
104
+ ): ParsedInitializeInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,44 @@
1
+ import { AccountMeta, AccountSignerMeta, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from '@solana/kit';
2
+ import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
3
+ import { Address, AddressArgs } from '../types';
4
+
5
+ export declare const INITIALIZE_GLOBAL_CONFIG_DISCRIMINATOR = 0;
6
+ export declare function getInitializeGlobalConfigDiscriminatorBytes(): ReadonlyUint8Array;
7
+ export type InitializeGlobalConfigInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountDeployer extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
8
+ TAccountDeployer extends string ? WritableSignerAccount<TAccountDeployer> & AccountSignerMeta<TAccountDeployer> : TAccountDeployer,
9
+ TAccountGlobalConfig extends string ? WritableAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
10
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
11
+ ...TRemainingAccounts
12
+ ]>;
13
+ export type InitializeGlobalConfigInstructionData = {
14
+ discriminator: number;
15
+ globalConfigAuthority: Address;
16
+ crankRewardDefault: bigint;
17
+ };
18
+ export type InitializeGlobalConfigInstructionDataArgs = {
19
+ globalConfigAuthority: AddressArgs;
20
+ crankRewardDefault: number | bigint;
21
+ };
22
+ export declare function getInitializeGlobalConfigInstructionDataEncoder(): Encoder<InitializeGlobalConfigInstructionDataArgs>;
23
+ export declare function getInitializeGlobalConfigInstructionDataDecoder(): Decoder<InitializeGlobalConfigInstructionData>;
24
+ export declare function getInitializeGlobalConfigInstructionDataCodec(): Codec<InitializeGlobalConfigInstructionDataArgs, InitializeGlobalConfigInstructionData>;
25
+ export type InitializeGlobalConfigInput<TAccountDeployer extends string = string, TAccountGlobalConfig extends string = string, TAccountSystemProgram extends string = string> = {
26
+ deployer: TransactionSigner<TAccountDeployer>;
27
+ globalConfig: Address<TAccountGlobalConfig>;
28
+ systemProgram?: Address<TAccountSystemProgram>;
29
+ globalConfigAuthority: InitializeGlobalConfigInstructionDataArgs['globalConfigAuthority'];
30
+ crankRewardDefault: InitializeGlobalConfigInstructionDataArgs['crankRewardDefault'];
31
+ };
32
+ export declare function getInitializeGlobalConfigInstruction<TAccountDeployer extends string, TAccountGlobalConfig extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS>(input: InitializeGlobalConfigInput<TAccountDeployer, TAccountGlobalConfig, TAccountSystemProgram>, config?: {
33
+ programAddress?: TProgramAddress;
34
+ }): InitializeGlobalConfigInstruction<TProgramAddress, TAccountDeployer, TAccountGlobalConfig, TAccountSystemProgram>;
35
+ export type ParsedInitializeGlobalConfigInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
36
+ programAddress: Address<TProgram>;
37
+ accounts: {
38
+ deployer: TAccountMetas[0];
39
+ globalConfig: TAccountMetas[1];
40
+ systemProgram: TAccountMetas[2];
41
+ };
42
+ data: InitializeGlobalConfigInstructionData;
43
+ };
44
+ export declare function parseInitializeGlobalConfigInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedInitializeGlobalConfigInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,57 @@
1
+ import { AccountMeta, AccountSignerMeta, Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlyAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount, WritableSignerAccount } from '@solana/kit';
2
+ import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
3
+
4
+ export declare const REMOVE_AUTOMATIONS_DISCRIMINATOR = 3;
5
+ export declare function getRemoveAutomationsDiscriminatorBytes(): ReadonlyUint8Array;
6
+ export type RemoveAutomationsInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountPositionOwner extends string | AccountMeta<string> = string, TAccountPositionOwnerTokenAccountA extends string | AccountMeta<string> = string, TAccountPositionOwnerTokenAccountB extends string | AccountMeta<string> = string, TAccountPositionTokenAccount extends string | AccountMeta<string> = string, TAccountTokenMintA extends string | AccountMeta<string> = string, TAccountTokenMintB extends string | AccountMeta<string> = string, TAccountTokenProgramA extends string | AccountMeta<string> = string, TAccountTokenProgramB extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountAtaProgram extends string | AccountMeta<string> = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
7
+ TAccountPositionOwner extends string ? WritableSignerAccount<TAccountPositionOwner> & AccountSignerMeta<TAccountPositionOwner> : TAccountPositionOwner,
8
+ TAccountPositionOwnerTokenAccountA extends string ? WritableAccount<TAccountPositionOwnerTokenAccountA> : TAccountPositionOwnerTokenAccountA,
9
+ TAccountPositionOwnerTokenAccountB extends string ? WritableAccount<TAccountPositionOwnerTokenAccountB> : TAccountPositionOwnerTokenAccountB,
10
+ TAccountPositionTokenAccount extends string ? ReadonlyAccount<TAccountPositionTokenAccount> : TAccountPositionTokenAccount,
11
+ TAccountTokenMintA extends string ? ReadonlyAccount<TAccountTokenMintA> : TAccountTokenMintA,
12
+ TAccountTokenMintB extends string ? ReadonlyAccount<TAccountTokenMintB> : TAccountTokenMintB,
13
+ TAccountTokenProgramA extends string ? ReadonlyAccount<TAccountTokenProgramA> : TAccountTokenProgramA,
14
+ TAccountTokenProgramB extends string ? ReadonlyAccount<TAccountTokenProgramB> : TAccountTokenProgramB,
15
+ TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
16
+ TAccountAtaProgram extends string ? ReadonlyAccount<TAccountAtaProgram> : TAccountAtaProgram,
17
+ ...TRemainingAccounts
18
+ ]>;
19
+ export type RemoveAutomationsInstructionData = {
20
+ discriminator: number;
21
+ };
22
+ export type RemoveAutomationsInstructionDataArgs = {};
23
+ export declare function getRemoveAutomationsInstructionDataEncoder(): FixedSizeEncoder<RemoveAutomationsInstructionDataArgs>;
24
+ export declare function getRemoveAutomationsInstructionDataDecoder(): FixedSizeDecoder<RemoveAutomationsInstructionData>;
25
+ export declare function getRemoveAutomationsInstructionDataCodec(): FixedSizeCodec<RemoveAutomationsInstructionDataArgs, RemoveAutomationsInstructionData>;
26
+ export type RemoveAutomationsInput<TAccountPositionOwner extends string = string, TAccountPositionOwnerTokenAccountA extends string = string, TAccountPositionOwnerTokenAccountB extends string = string, TAccountPositionTokenAccount extends string = string, TAccountTokenMintA extends string = string, TAccountTokenMintB extends string = string, TAccountTokenProgramA extends string = string, TAccountTokenProgramB extends string = string, TAccountSystemProgram extends string = string, TAccountAtaProgram extends string = string> = {
27
+ positionOwner: TransactionSigner<TAccountPositionOwner>;
28
+ positionOwnerTokenAccountA: Address<TAccountPositionOwnerTokenAccountA>;
29
+ positionOwnerTokenAccountB: Address<TAccountPositionOwnerTokenAccountB>;
30
+ positionTokenAccount: Address<TAccountPositionTokenAccount>;
31
+ tokenMintA: Address<TAccountTokenMintA>;
32
+ tokenMintB: Address<TAccountTokenMintB>;
33
+ tokenProgramA: Address<TAccountTokenProgramA>;
34
+ tokenProgramB: Address<TAccountTokenProgramB>;
35
+ systemProgram?: Address<TAccountSystemProgram>;
36
+ ataProgram?: Address<TAccountAtaProgram>;
37
+ };
38
+ export declare function getRemoveAutomationsInstruction<TAccountPositionOwner extends string, TAccountPositionOwnerTokenAccountA extends string, TAccountPositionOwnerTokenAccountB extends string, TAccountPositionTokenAccount extends string, TAccountTokenMintA extends string, TAccountTokenMintB extends string, TAccountTokenProgramA extends string, TAccountTokenProgramB extends string, TAccountSystemProgram extends string, TAccountAtaProgram extends string, TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS>(input: RemoveAutomationsInput<TAccountPositionOwner, TAccountPositionOwnerTokenAccountA, TAccountPositionOwnerTokenAccountB, TAccountPositionTokenAccount, TAccountTokenMintA, TAccountTokenMintB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountSystemProgram, TAccountAtaProgram>, config?: {
39
+ programAddress?: TProgramAddress;
40
+ }): RemoveAutomationsInstruction<TProgramAddress, TAccountPositionOwner, TAccountPositionOwnerTokenAccountA, TAccountPositionOwnerTokenAccountB, TAccountPositionTokenAccount, TAccountTokenMintA, TAccountTokenMintB, TAccountTokenProgramA, TAccountTokenProgramB, TAccountSystemProgram, TAccountAtaProgram>;
41
+ export type ParsedRemoveAutomationsInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
42
+ programAddress: Address<TProgram>;
43
+ accounts: {
44
+ positionOwner: TAccountMetas[0];
45
+ positionOwnerTokenAccountA: TAccountMetas[1];
46
+ positionOwnerTokenAccountB: TAccountMetas[2];
47
+ positionTokenAccount: TAccountMetas[3];
48
+ tokenMintA: TAccountMetas[4];
49
+ tokenMintB: TAccountMetas[5];
50
+ tokenProgramA: TAccountMetas[6];
51
+ tokenProgramB: TAccountMetas[7];
52
+ systemProgram: TAccountMetas[8];
53
+ ataProgram: TAccountMetas[9];
54
+ };
55
+ data: RemoveAutomationsInstructionData;
56
+ };
57
+ export declare function parseRemoveAutomationsInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRemoveAutomationsInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,89 @@
1
+ import {
2
+ Address,
3
+ AccountMeta,
4
+ AccountSignerMeta,
5
+ Codec,
6
+ Decoder,
7
+ Encoder,
8
+ Instruction,
9
+ InstructionWithAccounts,
10
+ InstructionWithData,
11
+ ReadonlySignerAccount,
12
+ ReadonlyUint8Array,
13
+ TransactionSigner,
14
+ WritableAccount,
15
+ } from '@solana/kit';
16
+ import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
17
+ import { GlobalConfigUpdateInstruction, GlobalConfigUpdateInstructionArgs } from '../types';
18
+
19
+ export declare const SET_DISCRIMINATOR = 1;
20
+ export declare function getSetDiscriminatorBytes(): ReadonlyUint8Array;
21
+ export type SetInstruction<
22
+ TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
23
+ TAccountUpdateAuthority extends string | AccountMeta<string> = string,
24
+ TAccountGlobalConfig extends string | AccountMeta<string> = string,
25
+ TRemainingAccounts extends readonly AccountMeta<string>[] = [],
26
+ > = Instruction<TProgram> &
27
+ InstructionWithData<ReadonlyUint8Array> &
28
+ InstructionWithAccounts<
29
+ [
30
+ TAccountUpdateAuthority extends string
31
+ ? ReadonlySignerAccount<TAccountUpdateAuthority> &
32
+ AccountSignerMeta<TAccountUpdateAuthority>
33
+ : TAccountUpdateAuthority,
34
+ TAccountGlobalConfig extends string
35
+ ? WritableAccount<TAccountGlobalConfig>
36
+ : TAccountGlobalConfig,
37
+ ...TRemainingAccounts,
38
+ ]
39
+ >;
40
+ export type SetInstructionData = {
41
+ discriminator: number;
42
+ instructionData: GlobalConfigUpdateInstruction;
43
+ };
44
+ export type SetInstructionDataArgs = {
45
+ instructionData: GlobalConfigUpdateInstructionArgs;
46
+ };
47
+ export declare function getSetInstructionDataEncoder(): Encoder<SetInstructionDataArgs>;
48
+ export declare function getSetInstructionDataDecoder(): Decoder<SetInstructionData>;
49
+ export declare function getSetInstructionDataCodec(): Codec<
50
+ SetInstructionDataArgs,
51
+ SetInstructionData
52
+ >;
53
+ export type SetInput<
54
+ TAccountUpdateAuthority extends string = string,
55
+ TAccountGlobalConfig extends string = string,
56
+ > = {
57
+ updateAuthority: TransactionSigner<TAccountUpdateAuthority>;
58
+ globalConfig: Address<TAccountGlobalConfig>;
59
+ instructionData: SetInstructionDataArgs['instructionData'];
60
+ };
61
+ export declare function getSetInstruction<
62
+ TAccountUpdateAuthority extends string,
63
+ TAccountGlobalConfig extends string,
64
+ TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
65
+ >(
66
+ input: SetInput<TAccountUpdateAuthority, TAccountGlobalConfig>,
67
+ config?: {
68
+ programAddress?: TProgramAddress;
69
+ }
70
+ ): SetInstruction<TProgramAddress, TAccountUpdateAuthority, TAccountGlobalConfig>;
71
+ export type ParsedSetInstruction<
72
+ TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
73
+ TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
74
+ > = {
75
+ programAddress: Address<TProgram>;
76
+ accounts: {
77
+ updateAuthority: TAccountMetas[0];
78
+ globalConfig: TAccountMetas[1];
79
+ };
80
+ data: SetInstructionData;
81
+ };
82
+ export declare function parseSetInstruction<
83
+ TProgram extends string,
84
+ TAccountMetas extends readonly AccountMeta[],
85
+ >(
86
+ instruction: Instruction<TProgram> &
87
+ InstructionWithAccounts<TAccountMetas> &
88
+ InstructionWithData<ReadonlyUint8Array>
89
+ ): ParsedSetInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1,38 @@
1
+ import { Address, AccountMeta, AccountSignerMeta, Codec, Decoder, Encoder, Instruction, InstructionWithAccounts, InstructionWithData, ReadonlySignerAccount, ReadonlyUint8Array, TransactionSigner, WritableAccount } from '@solana/kit';
2
+ import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
3
+ import { UpdateGlobalConfigVariant, UpdateGlobalConfigVariantArgs } from '../types';
4
+
5
+ export declare const UPDATE_GLOBAL_CONFIG_DISCRIMINATOR = 1;
6
+ export declare function getUpdateGlobalConfigDiscriminatorBytes(): ReadonlyUint8Array;
7
+ export type UpdateGlobalConfigInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountGlobalConfigAuthority extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
8
+ TAccountGlobalConfigAuthority extends string ? ReadonlySignerAccount<TAccountGlobalConfigAuthority> & AccountSignerMeta<TAccountGlobalConfigAuthority> : TAccountGlobalConfigAuthority,
9
+ TAccountGlobalConfig extends string ? WritableAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
10
+ ...TRemainingAccounts
11
+ ]>;
12
+ export type UpdateGlobalConfigInstructionData = {
13
+ discriminator: number;
14
+ instructionData: UpdateGlobalConfigVariant;
15
+ };
16
+ export type UpdateGlobalConfigInstructionDataArgs = {
17
+ instructionData: UpdateGlobalConfigVariantArgs;
18
+ };
19
+ export declare function getUpdateGlobalConfigInstructionDataEncoder(): Encoder<UpdateGlobalConfigInstructionDataArgs>;
20
+ export declare function getUpdateGlobalConfigInstructionDataDecoder(): Decoder<UpdateGlobalConfigInstructionData>;
21
+ export declare function getUpdateGlobalConfigInstructionDataCodec(): Codec<UpdateGlobalConfigInstructionDataArgs, UpdateGlobalConfigInstructionData>;
22
+ export type UpdateGlobalConfigInput<TAccountGlobalConfigAuthority extends string = string, TAccountGlobalConfig extends string = string> = {
23
+ globalConfigAuthority: TransactionSigner<TAccountGlobalConfigAuthority>;
24
+ globalConfig: Address<TAccountGlobalConfig>;
25
+ instructionData: UpdateGlobalConfigInstructionDataArgs['instructionData'];
26
+ };
27
+ export declare function getUpdateGlobalConfigInstruction<TAccountGlobalConfigAuthority extends string, TAccountGlobalConfig extends string, TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS>(input: UpdateGlobalConfigInput<TAccountGlobalConfigAuthority, TAccountGlobalConfig>, config?: {
28
+ programAddress?: TProgramAddress;
29
+ }): UpdateGlobalConfigInstruction<TProgramAddress, TAccountGlobalConfigAuthority, TAccountGlobalConfig>;
30
+ export type ParsedUpdateGlobalConfigInstruction<TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
31
+ programAddress: Address<TProgram>;
32
+ accounts: {
33
+ globalConfigAuthority: TAccountMetas[0];
34
+ globalConfig: TAccountMetas[1];
35
+ };
36
+ data: UpdateGlobalConfigInstructionData;
37
+ };
38
+ export declare function parseUpdateGlobalConfigInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedUpdateGlobalConfigInstruction<TProgram, TAccountMetas>;
@@ -0,0 +1 @@
1
+ export * from './whirlpoolsAutomationProgram';
@@ -0,0 +1,39 @@
1
+ import { Address, Instruction, InstructionWithData, ReadonlyUint8Array } from '@solana/kit';
2
+ import { ParsedCreateAutomationInstruction, ParsedFundAutomationInstruction, ParsedHarvestAndReinvestInstruction, ParsedHarvestSwapAndReinvestPostInstruction, ParsedHarvestSwapAndReinvestPreInstruction, ParsedInitializeGlobalConfigInstruction, ParsedRemoveAutomationsInstruction, ParsedUpdateGlobalConfigInstruction } from '../instructions';
3
+
4
+ export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS: Address<"wpAutoU2kNC95CB9SzvSRmhC52ncPabVY225e3pfQA8">;
5
+ export declare enum WhirlpoolsAutomationProgramAccount {
6
+ Automation = 0,
7
+ GlobalConfig = 1
8
+ }
9
+ export declare enum WhirlpoolsAutomationProgramInstruction {
10
+ InitializeGlobalConfig = 0,
11
+ UpdateGlobalConfig = 1,
12
+ CreateAutomation = 2,
13
+ RemoveAutomations = 3,
14
+ FundAutomation = 4,
15
+ HarvestAndReinvest = 5,
16
+ HarvestSwapAndReinvestPre = 6,
17
+ HarvestSwapAndReinvestPost = 7
18
+ }
19
+ export declare function identifyWhirlpoolsAutomationProgramInstruction(instruction: {
20
+ data: ReadonlyUint8Array;
21
+ } | ReadonlyUint8Array): WhirlpoolsAutomationProgramInstruction;
22
+ export type ParsedWhirlpoolsAutomationProgramInstruction<TProgram extends string = 'wpAutoU2kNC95CB9SzvSRmhC52ncPabVY225e3pfQA8'> = ({
23
+ instructionType: WhirlpoolsAutomationProgramInstruction.InitializeGlobalConfig;
24
+ } & ParsedInitializeGlobalConfigInstruction<TProgram>) | ({
25
+ instructionType: WhirlpoolsAutomationProgramInstruction.UpdateGlobalConfig;
26
+ } & ParsedUpdateGlobalConfigInstruction<TProgram>) | ({
27
+ instructionType: WhirlpoolsAutomationProgramInstruction.CreateAutomation;
28
+ } & ParsedCreateAutomationInstruction<TProgram>) | ({
29
+ instructionType: WhirlpoolsAutomationProgramInstruction.RemoveAutomations;
30
+ } & ParsedRemoveAutomationsInstruction<TProgram>) | ({
31
+ instructionType: WhirlpoolsAutomationProgramInstruction.FundAutomation;
32
+ } & ParsedFundAutomationInstruction<TProgram>) | ({
33
+ instructionType: WhirlpoolsAutomationProgramInstruction.HarvestAndReinvest;
34
+ } & ParsedHarvestAndReinvestInstruction<TProgram>) | ({
35
+ instructionType: WhirlpoolsAutomationProgramInstruction.HarvestSwapAndReinvestPre;
36
+ } & ParsedHarvestSwapAndReinvestPreInstruction<TProgram>) | ({
37
+ instructionType: WhirlpoolsAutomationProgramInstruction.HarvestSwapAndReinvestPost;
38
+ } & ParsedHarvestSwapAndReinvestPostInstruction<TProgram>);
39
+ export declare function parseWhirlpoolsAutomationProgramInstruction<TProgram extends string>(instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>): ParsedWhirlpoolsAutomationProgramInstruction<TProgram>;
@@ -0,0 +1,15 @@
1
+ import { AccountMeta, AccountSignerMeta, Address, ProgramDerivedAddress, TransactionSigner } from '@solana/kit';
2
+
3
+ export declare function expectSome<T>(value: T | null | undefined): T;
4
+ export declare function expectAddress<T extends string = string>(value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined): Address<T>;
5
+ export declare function expectProgramDerivedAddress<T extends string = string>(value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined): ProgramDerivedAddress<T>;
6
+ export declare function expectTransactionSigner<T extends string = string>(value: Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null | undefined): TransactionSigner<T>;
7
+ export type ResolvedAccount<T extends string = string, U extends Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null = Address<T> | ProgramDerivedAddress<T> | TransactionSigner<T> | null> = {
8
+ isWritable: boolean;
9
+ value: U;
10
+ };
11
+ export type InstructionWithByteDelta = {
12
+ byteDelta: number;
13
+ };
14
+ export declare function getAccountMetaFactory(programAddress: Address, optionalAccountStrategy: 'omitted' | 'programId'): (account: ResolvedAccount) => AccountMeta | AccountSignerMeta | undefined;
15
+ export declare function isTransactionSigner<TAddress extends string = string>(value: Address<TAddress> | ProgramDerivedAddress<TAddress> | TransactionSigner<TAddress>): value is TransactionSigner<TAddress>;
@@ -0,0 +1,12 @@
1
+ import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/kit';
2
+
3
+ export declare enum AccountDiscriminator {
4
+ Uninitialized = 0,
5
+ Closed = 1,
6
+ GlobalConfig = 2,
7
+ Automation = 3
8
+ }
9
+ export type AccountDiscriminatorArgs = AccountDiscriminator;
10
+ export declare function getAccountDiscriminatorEncoder(): FixedSizeEncoder<AccountDiscriminatorArgs>;
11
+ export declare function getAccountDiscriminatorDecoder(): FixedSizeDecoder<AccountDiscriminator>;
12
+ export declare function getAccountDiscriminatorCodec(): FixedSizeCodec<AccountDiscriminatorArgs, AccountDiscriminator>;