@orca-so/whirlpools-automation 0.4.0 → 0.5.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 +1 -5
- package/dist/generated/errors/whirlpoolsAutomationProgram.d.ts +2 -4
- package/dist/generated/instructions/harvestSwapAndReinvestPost.d.ts +1 -1
- package/dist/generated/instructions/harvestSwapAndReinvestPre.d.ts +1 -1
- package/dist/generated/instructions/index.d.ts +0 -1
- package/dist/generated/programs/whirlpoolsAutomationProgram.d.ts +2 -7
- package/dist/generated/types/action.d.ts +1 -2
- package/dist/index.browser.js +1631 -1798
- package/dist/index.node.js +1534 -1701
- package/package.json +1 -1
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
|
|
34
|
-
export declare const
|
|
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
|
|
@@ -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 =
|
|
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 =
|
|
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,
|
|
@@ -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,
|
|
@@ -21,9 +20,8 @@ export declare enum WhirlpoolsAutomationProgramInstruction {
|
|
|
21
20
|
CreateAutomation = 2,
|
|
22
21
|
RemoveAutomations = 3,
|
|
23
22
|
FundAutomation = 4,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
HarvestSwapAndReinvestPost = 7,
|
|
23
|
+
HarvestSwapAndReinvestPre = 5,
|
|
24
|
+
HarvestSwapAndReinvestPost = 6,
|
|
27
25
|
}
|
|
28
26
|
export declare function identifyWhirlpoolsAutomationProgramInstruction(
|
|
29
27
|
instruction:
|
|
@@ -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
|
-
|
|
6
|
-
HarvestSwapAndReinvest = 2,
|
|
5
|
+
HarvestSwapAndReinvest = 1,
|
|
7
6
|
}
|
|
8
7
|
export type ActionArgs = Action;
|
|
9
8
|
export declare function getActionEncoder(): FixedSizeEncoder<ActionArgs>;
|