@orca-so/whirlpools-automation 0.4.0 → 0.6.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 CHANGED
@@ -13,11 +13,7 @@ npm install @orca-so/whirlpools-automation
13
13
  This package provides generated TypeScript types, instruction builders, account decoders, and error definitions for the Whirlpools Automation program. It is built on top of [`@solana/kit`](https://github.com/anza-xyz/kit).
14
14
 
15
15
  ```typescript
16
- import {
17
- getCreateAutomationInstruction,
18
- getHarvestAndReinvestInstruction,
19
- fetchAutomation,
20
- } from "@orca-so/whirlpools-automation";
16
+ import { getCreateAutomationInstruction, fetchAutomation } from '@orca-so/whirlpools-automation';
21
17
  ```
22
18
 
23
19
  ## Build
@@ -30,9 +30,8 @@ export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INSUFFICIENT_FUNDS_TO_
30
30
  export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INSUFFICIENT_INSTRUCTION_COUNT_BEFORE = 6027;
31
31
  export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INSUFFICIENT_INSTRUCTION_COUNT_AFTER = 6028;
32
32
  export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_ACCOMPANYING_INSTRUCTION = 6029;
33
- export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_INTERMEDIATE_SWAP = 6030;
34
- export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH = 6031;
35
- export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__UNSUPPORTED_TOKEN_EXTENSION = 6032;
33
+ export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH = 6030;
34
+ export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__UNSUPPORTED_TOKEN_EXTENSION = 6031;
36
35
  export type WhirlpoolsAutomationProgramError =
37
36
  | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__ACCOUNT_ALREADY_INITIALIZED
38
37
  | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__ACCOUNT_NOT_INITIALIZED
@@ -58,7 +57,6 @@ export type WhirlpoolsAutomationProgramError =
58
57
  | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_C_P_I_ACCOUNTS
59
58
  | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_C_P_I_INSTRUCTION_DATA
60
59
  | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_CRANK_REWARD
61
- | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_INTERMEDIATE_SWAP
62
60
  | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_NEXT_VALID_EXECUTION_TIMESTAMP_CONDITION
63
61
  | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_POSITION_TOKEN_AMOUNT
64
62
  | typeof WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH
@@ -82,7 +80,10 @@ export declare function isWhirlpoolsAutomationProgramError<
82
80
  }
83
81
  >;
84
82
  },
85
- code?: TProgramErrorCode
83
+ code?: TProgramErrorCode,
84
+ config?: {
85
+ programAddress?: Address;
86
+ }
86
87
  ): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> &
87
88
  Readonly<{
88
89
  context: Readonly<{
@@ -16,7 +16,7 @@ import {
16
16
  } from '@solana/kit';
17
17
  import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
18
18
 
19
- export declare const HARVEST_SWAP_AND_REINVEST_POST_DISCRIMINATOR = 7;
19
+ export declare const HARVEST_SWAP_AND_REINVEST_POST_DISCRIMINATOR = 6;
20
20
  export declare function getHarvestSwapAndReinvestPostDiscriminatorBytes(): ReadonlyUint8Array;
21
21
  export type HarvestSwapAndReinvestPostInstruction<
22
22
  TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
@@ -16,7 +16,7 @@ import {
16
16
  } from '@solana/kit';
17
17
  import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
18
18
 
19
- export declare const HARVEST_SWAP_AND_REINVEST_PRE_DISCRIMINATOR = 6;
19
+ export declare const HARVEST_SWAP_AND_REINVEST_PRE_DISCRIMINATOR = 5;
20
20
  export declare function getHarvestSwapAndReinvestPreDiscriminatorBytes(): ReadonlyUint8Array;
21
21
  export type HarvestSwapAndReinvestPreInstruction<
22
22
  TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
@@ -1,6 +1,5 @@
1
1
  export * from './createAutomation';
2
2
  export * from './fundAutomation';
3
- export * from './harvestAndReinvest';
4
3
  export * from './harvestSwapAndReinvestPost';
5
4
  export * from './harvestSwapAndReinvestPre';
6
5
  export * from './initializeGlobalConfig';
@@ -2,7 +2,6 @@ import { Address, Instruction, InstructionWithData, ReadonlyUint8Array } from '@
2
2
  import {
3
3
  ParsedCreateAutomationInstruction,
4
4
  ParsedFundAutomationInstruction,
5
- ParsedHarvestAndReinvestInstruction,
6
5
  ParsedHarvestSwapAndReinvestPostInstruction,
7
6
  ParsedHarvestSwapAndReinvestPreInstruction,
8
7
  ParsedInitializeGlobalConfigInstruction,
@@ -10,7 +9,7 @@ import {
10
9
  ParsedUpdateGlobalConfigInstruction,
11
10
  } from '../instructions';
12
11
 
13
- export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS: Address<'wpAutoU2kNC95CB9SzvSRmhC52ncPabVY225e3pfQA8'>;
12
+ export declare const WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS: Address<'J5YZi2SoRbaAFcMJWcvkQRUgpB3YdMHJ4AEKhEV6ED7x'>;
14
13
  export declare enum WhirlpoolsAutomationProgramAccount {
15
14
  Automation = 0,
16
15
  GlobalConfig = 1,
@@ -21,9 +20,8 @@ export declare enum WhirlpoolsAutomationProgramInstruction {
21
20
  CreateAutomation = 2,
22
21
  RemoveAutomations = 3,
23
22
  FundAutomation = 4,
24
- HarvestAndReinvest = 5,
25
- HarvestSwapAndReinvestPre = 6,
26
- HarvestSwapAndReinvestPost = 7,
23
+ HarvestSwapAndReinvestPre = 5,
24
+ HarvestSwapAndReinvestPost = 6,
27
25
  }
28
26
  export declare function identifyWhirlpoolsAutomationProgramInstruction(
29
27
  instruction:
@@ -33,7 +31,7 @@ export declare function identifyWhirlpoolsAutomationProgramInstruction(
33
31
  | ReadonlyUint8Array
34
32
  ): WhirlpoolsAutomationProgramInstruction;
35
33
  export type ParsedWhirlpoolsAutomationProgramInstruction<
36
- TProgram extends string = 'wpAutoU2kNC95CB9SzvSRmhC52ncPabVY225e3pfQA8',
34
+ TProgram extends string = 'J5YZi2SoRbaAFcMJWcvkQRUgpB3YdMHJ4AEKhEV6ED7x',
37
35
  > =
38
36
  | ({
39
37
  instructionType: WhirlpoolsAutomationProgramInstruction.InitializeGlobalConfig;
@@ -50,9 +48,6 @@ export type ParsedWhirlpoolsAutomationProgramInstruction<
50
48
  | ({
51
49
  instructionType: WhirlpoolsAutomationProgramInstruction.FundAutomation;
52
50
  } & ParsedFundAutomationInstruction<TProgram>)
53
- | ({
54
- instructionType: WhirlpoolsAutomationProgramInstruction.HarvestAndReinvest;
55
- } & ParsedHarvestAndReinvestInstruction<TProgram>)
56
51
  | ({
57
52
  instructionType: WhirlpoolsAutomationProgramInstruction.HarvestSwapAndReinvestPre;
58
53
  } & ParsedHarvestSwapAndReinvestPreInstruction<TProgram>)
@@ -2,8 +2,7 @@ import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/kit'
2
2
 
3
3
  export declare enum Action {
4
4
  Uninitialized = 0,
5
- HarvestAndReinvest = 1,
6
- HarvestSwapAndReinvest = 2,
5
+ HarvestSwapAndReinvest = 1,
7
6
  }
8
7
  export type ActionArgs = Action;
9
8
  export declare function getActionEncoder(): FixedSizeEncoder<ActionArgs>;