@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.
- package/README.md +2 -1
- package/dist/generated/accounts/automation.d.ts +72 -35
- package/dist/generated/accounts/globalConfig.d.ts +52 -19
- package/dist/generated/errors/whirlpoolsAutomationProgram.d.ts +54 -8
- package/dist/generated/instructions/createAutomation.d.ts +197 -66
- package/dist/generated/instructions/fundAutomation.d.ts +86 -27
- package/dist/generated/instructions/harvestAndReinvest.d.ts +286 -85
- package/dist/generated/instructions/harvestSwapAndReinvestPost.d.ts +278 -82
- package/dist/generated/instructions/harvestSwapAndReinvestPre.d.ts +259 -78
- package/dist/generated/instructions/initializeGlobalConfig.d.ts +90 -30
- package/dist/generated/instructions/removeAutomations.d.ts +154 -45
- package/dist/generated/instructions/updateGlobalConfig.d.ts +79 -24
- package/dist/generated/programs/whirlpoolsAutomationProgram.d.ts +58 -33
- package/dist/generated/shared/index.d.ts +34 -10
- package/dist/generated/types/accountDiscriminator.d.ts +8 -5
- package/dist/generated/types/action.d.ts +3 -3
- package/dist/generated/types/condition.d.ts +63 -33
- package/dist/generated/types/event.d.ts +205 -137
- package/dist/generated/types/fundAutomationMethod.d.ts +6 -3
- package/dist/generated/types/fundAutomationVariant.d.ts +33 -13
- package/dist/generated/types/increaseLiquidityByTokenAmountsAccountsType.d.ts +15 -11
- package/dist/generated/types/increaseLiquidityByTokenAmountsRemainingAccountsInfo.d.ts +10 -4
- package/dist/generated/types/increaseLiquidityByTokenAmountsRemainingAccountsSlice.d.ts +12 -6
- package/dist/generated/types/increaseLiquidityMethod.d.ts +30 -15
- package/dist/generated/types/nonZeroU32.d.ts +6 -2
- package/dist/generated/types/position.d.ts +22 -22
- package/dist/generated/types/positionRewardInfo.d.ts +8 -5
- package/dist/generated/types/tokenAccount.d.ts +22 -22
- package/dist/generated/types/tokenAccountState.d.ts +7 -4
- package/dist/generated/types/tokenMint.d.ts +14 -14
- package/dist/generated/types/updateGlobalConfigVariant.d.ts +58 -20
- package/dist/generated/types/whirlpool.d.ts +40 -40
- package/dist/generated/types/whirlpoolRewardInfo.d.ts +14 -11
- package/dist/index.browser.js +2980 -2310
- package/dist/index.node.js +2969 -2302
- package/dist/pda.d.ts +17 -2
- package/dist/staging.d.ts +1 -1
- package/package.json +4 -3
- package/CHANGELOG.md +0 -7
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/kit';
|
|
2
2
|
|
|
3
3
|
export type PositionRewardInfo = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
growthInsideCheckpoint: bigint;
|
|
5
|
+
amountOwed: bigint;
|
|
6
6
|
};
|
|
7
7
|
export type PositionRewardInfoArgs = {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
growthInsideCheckpoint: number | bigint;
|
|
9
|
+
amountOwed: number | bigint;
|
|
10
10
|
};
|
|
11
11
|
export declare function getPositionRewardInfoEncoder(): FixedSizeEncoder<PositionRewardInfoArgs>;
|
|
12
12
|
export declare function getPositionRewardInfoDecoder(): FixedSizeDecoder<PositionRewardInfo>;
|
|
13
|
-
export declare function getPositionRewardInfoCodec(): FixedSizeCodec<
|
|
13
|
+
export declare function getPositionRewardInfoCodec(): FixedSizeCodec<
|
|
14
|
+
PositionRewardInfoArgs,
|
|
15
|
+
PositionRewardInfo
|
|
16
|
+
>;
|
|
@@ -2,30 +2,30 @@ import { Codec, Decoder, Encoder } from '@solana/kit';
|
|
|
2
2
|
import { Address, AddressArgs, TokenAccountState, TokenAccountStateArgs } from '.';
|
|
3
3
|
|
|
4
4
|
export type TokenAccount = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
mint: Address;
|
|
6
|
+
owner: Address;
|
|
7
|
+
amount: bigint;
|
|
8
|
+
delegateFlag: number;
|
|
9
|
+
delegate: Address;
|
|
10
|
+
state: TokenAccountState;
|
|
11
|
+
isNativeFlag: number;
|
|
12
|
+
nativeAmount: bigint;
|
|
13
|
+
delegateAmount: bigint;
|
|
14
|
+
closeAuthorityFlag: number;
|
|
15
|
+
closeAuthority: Address;
|
|
16
16
|
};
|
|
17
17
|
export type TokenAccountArgs = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
mint: AddressArgs;
|
|
19
|
+
owner: AddressArgs;
|
|
20
|
+
amount: number | bigint;
|
|
21
|
+
delegateFlag: number;
|
|
22
|
+
delegate: AddressArgs;
|
|
23
|
+
state: TokenAccountStateArgs;
|
|
24
|
+
isNativeFlag: number;
|
|
25
|
+
nativeAmount: number | bigint;
|
|
26
|
+
delegateAmount: number | bigint;
|
|
27
|
+
closeAuthorityFlag: number;
|
|
28
|
+
closeAuthority: AddressArgs;
|
|
29
29
|
};
|
|
30
30
|
export declare function getTokenAccountEncoder(): Encoder<TokenAccountArgs>;
|
|
31
31
|
export declare function getTokenAccountDecoder(): Decoder<TokenAccount>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/kit';
|
|
2
2
|
|
|
3
3
|
export declare enum TokenAccountState {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Uninitialized = 0,
|
|
5
|
+
Initialized = 1,
|
|
6
|
+
Frozen = 2,
|
|
7
7
|
}
|
|
8
8
|
export type TokenAccountStateArgs = TokenAccountState;
|
|
9
9
|
export declare function getTokenAccountStateEncoder(): FixedSizeEncoder<TokenAccountStateArgs>;
|
|
10
10
|
export declare function getTokenAccountStateDecoder(): FixedSizeDecoder<TokenAccountState>;
|
|
11
|
-
export declare function getTokenAccountStateCodec(): FixedSizeCodec<
|
|
11
|
+
export declare function getTokenAccountStateCodec(): FixedSizeCodec<
|
|
12
|
+
TokenAccountStateArgs,
|
|
13
|
+
TokenAccountState
|
|
14
|
+
>;
|
|
@@ -2,22 +2,22 @@ import { Codec, Decoder, Encoder } from '@solana/kit';
|
|
|
2
2
|
import { Address, AddressArgs } from '.';
|
|
3
3
|
|
|
4
4
|
export type TokenMint = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
mintAuthorityFlag: number;
|
|
6
|
+
mintAuthority: Address;
|
|
7
|
+
supply: bigint;
|
|
8
|
+
decimals: number;
|
|
9
|
+
isInitialized: boolean;
|
|
10
|
+
freezeAuthorityFlag: number;
|
|
11
|
+
freezeAuthority: Address;
|
|
12
12
|
};
|
|
13
13
|
export type TokenMintArgs = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
mintAuthorityFlag: number;
|
|
15
|
+
mintAuthority: AddressArgs;
|
|
16
|
+
supply: number | bigint;
|
|
17
|
+
decimals: number;
|
|
18
|
+
isInitialized: boolean;
|
|
19
|
+
freezeAuthorityFlag: number;
|
|
20
|
+
freezeAuthority: AddressArgs;
|
|
21
21
|
};
|
|
22
22
|
export declare function getTokenMintEncoder(): Encoder<TokenMintArgs>;
|
|
23
23
|
export declare function getTokenMintDecoder(): Decoder<TokenMint>;
|
|
@@ -1,25 +1,63 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Codec,
|
|
3
|
+
Decoder,
|
|
4
|
+
Encoder,
|
|
5
|
+
GetDiscriminatedUnionVariant,
|
|
6
|
+
GetDiscriminatedUnionVariantContent,
|
|
7
|
+
} from '@solana/kit';
|
|
2
8
|
import { Address, AddressArgs } from '.';
|
|
3
9
|
|
|
4
|
-
export type UpdateGlobalConfigVariant =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
10
|
+
export type UpdateGlobalConfigVariant =
|
|
11
|
+
| {
|
|
12
|
+
__kind: 'UpdateCrankRewardDefault';
|
|
13
|
+
newCrankRewardDefault: bigint;
|
|
14
|
+
}
|
|
15
|
+
| {
|
|
16
|
+
__kind: 'UpdateGlobalConfigAuthority';
|
|
17
|
+
newAuthority: Address;
|
|
18
|
+
};
|
|
19
|
+
export type UpdateGlobalConfigVariantArgs =
|
|
20
|
+
| {
|
|
21
|
+
__kind: 'UpdateCrankRewardDefault';
|
|
22
|
+
newCrankRewardDefault: number | bigint;
|
|
23
|
+
}
|
|
24
|
+
| {
|
|
25
|
+
__kind: 'UpdateGlobalConfigAuthority';
|
|
26
|
+
newAuthority: AddressArgs;
|
|
27
|
+
};
|
|
18
28
|
export declare function getUpdateGlobalConfigVariantEncoder(): Encoder<UpdateGlobalConfigVariantArgs>;
|
|
19
29
|
export declare function getUpdateGlobalConfigVariantDecoder(): Decoder<UpdateGlobalConfigVariant>;
|
|
20
|
-
export declare function getUpdateGlobalConfigVariantCodec(): Codec<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
export declare function getUpdateGlobalConfigVariantCodec(): Codec<
|
|
31
|
+
UpdateGlobalConfigVariantArgs,
|
|
32
|
+
UpdateGlobalConfigVariant
|
|
33
|
+
>;
|
|
34
|
+
export declare function updateGlobalConfigVariant(
|
|
35
|
+
kind: 'UpdateCrankRewardDefault',
|
|
36
|
+
data: GetDiscriminatedUnionVariantContent<
|
|
37
|
+
UpdateGlobalConfigVariantArgs,
|
|
38
|
+
'__kind',
|
|
39
|
+
'UpdateCrankRewardDefault'
|
|
40
|
+
>
|
|
41
|
+
): GetDiscriminatedUnionVariant<
|
|
42
|
+
UpdateGlobalConfigVariantArgs,
|
|
43
|
+
'__kind',
|
|
44
|
+
'UpdateCrankRewardDefault'
|
|
45
|
+
>;
|
|
46
|
+
export declare function updateGlobalConfigVariant(
|
|
47
|
+
kind: 'UpdateGlobalConfigAuthority',
|
|
48
|
+
data: GetDiscriminatedUnionVariantContent<
|
|
49
|
+
UpdateGlobalConfigVariantArgs,
|
|
50
|
+
'__kind',
|
|
51
|
+
'UpdateGlobalConfigAuthority'
|
|
52
|
+
>
|
|
53
|
+
): GetDiscriminatedUnionVariant<
|
|
54
|
+
UpdateGlobalConfigVariantArgs,
|
|
55
|
+
'__kind',
|
|
56
|
+
'UpdateGlobalConfigAuthority'
|
|
57
|
+
>;
|
|
58
|
+
export declare function isUpdateGlobalConfigVariant<K extends UpdateGlobalConfigVariant['__kind']>(
|
|
59
|
+
kind: K,
|
|
60
|
+
value: UpdateGlobalConfigVariant
|
|
61
|
+
): value is UpdateGlobalConfigVariant & {
|
|
62
|
+
__kind: K;
|
|
25
63
|
};
|
|
@@ -2,48 +2,48 @@ import { Codec, Decoder, Encoder, ReadonlyUint8Array } from '@solana/kit';
|
|
|
2
2
|
import { Address, AddressArgs, WhirlpoolRewardInfo, WhirlpoolRewardInfoArgs } from '.';
|
|
3
3
|
|
|
4
4
|
export type Whirlpool = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
discriminator: ReadonlyUint8Array;
|
|
6
|
+
whirlpoolsConfig: Address;
|
|
7
|
+
whirlpoolBump: ReadonlyUint8Array;
|
|
8
|
+
tickSpacing: number;
|
|
9
|
+
feeTierIndexSeed: ReadonlyUint8Array;
|
|
10
|
+
feeRate: number;
|
|
11
|
+
protocolFeeRate: number;
|
|
12
|
+
liquidity: bigint;
|
|
13
|
+
sqrtPrice: bigint;
|
|
14
|
+
tickCurrentIndex: number;
|
|
15
|
+
protocolFeeOwedA: bigint;
|
|
16
|
+
protocolFeeOwedB: bigint;
|
|
17
|
+
tokenMintA: Address;
|
|
18
|
+
tokenVaultA: Address;
|
|
19
|
+
feeGrowthGlobalA: bigint;
|
|
20
|
+
tokenMintB: Address;
|
|
21
|
+
tokenVaultB: Address;
|
|
22
|
+
feeGrowthGlobalB: bigint;
|
|
23
|
+
rewardLastUpdatedTimestamp: bigint;
|
|
24
|
+
rewardInfos: Array<WhirlpoolRewardInfo>;
|
|
25
25
|
};
|
|
26
26
|
export type WhirlpoolArgs = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
27
|
+
discriminator: ReadonlyUint8Array;
|
|
28
|
+
whirlpoolsConfig: AddressArgs;
|
|
29
|
+
whirlpoolBump: ReadonlyUint8Array;
|
|
30
|
+
tickSpacing: number;
|
|
31
|
+
feeTierIndexSeed: ReadonlyUint8Array;
|
|
32
|
+
feeRate: number;
|
|
33
|
+
protocolFeeRate: number;
|
|
34
|
+
liquidity: number | bigint;
|
|
35
|
+
sqrtPrice: number | bigint;
|
|
36
|
+
tickCurrentIndex: number;
|
|
37
|
+
protocolFeeOwedA: number | bigint;
|
|
38
|
+
protocolFeeOwedB: number | bigint;
|
|
39
|
+
tokenMintA: AddressArgs;
|
|
40
|
+
tokenVaultA: AddressArgs;
|
|
41
|
+
feeGrowthGlobalA: number | bigint;
|
|
42
|
+
tokenMintB: AddressArgs;
|
|
43
|
+
tokenVaultB: AddressArgs;
|
|
44
|
+
feeGrowthGlobalB: number | bigint;
|
|
45
|
+
rewardLastUpdatedTimestamp: number | bigint;
|
|
46
|
+
rewardInfos: Array<WhirlpoolRewardInfoArgs>;
|
|
47
47
|
};
|
|
48
48
|
export declare function getWhirlpoolEncoder(): Encoder<WhirlpoolArgs>;
|
|
49
49
|
export declare function getWhirlpoolDecoder(): Decoder<Whirlpool>;
|
|
@@ -2,19 +2,22 @@ import { Codec, Decoder, Encoder, ReadonlyUint8Array } from '@solana/kit';
|
|
|
2
2
|
import { Address, AddressArgs } from '.';
|
|
3
3
|
|
|
4
4
|
export type WhirlpoolRewardInfo = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
mint: Address;
|
|
6
|
+
vault: Address;
|
|
7
|
+
extension: ReadonlyUint8Array;
|
|
8
|
+
emissionsPerSecondX64: bigint;
|
|
9
|
+
growthGlobalX64: bigint;
|
|
10
10
|
};
|
|
11
11
|
export type WhirlpoolRewardInfoArgs = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
mint: AddressArgs;
|
|
13
|
+
vault: AddressArgs;
|
|
14
|
+
extension: ReadonlyUint8Array;
|
|
15
|
+
emissionsPerSecondX64: number | bigint;
|
|
16
|
+
growthGlobalX64: number | bigint;
|
|
17
17
|
};
|
|
18
18
|
export declare function getWhirlpoolRewardInfoEncoder(): Encoder<WhirlpoolRewardInfoArgs>;
|
|
19
19
|
export declare function getWhirlpoolRewardInfoDecoder(): Decoder<WhirlpoolRewardInfo>;
|
|
20
|
-
export declare function getWhirlpoolRewardInfoCodec(): Codec<
|
|
20
|
+
export declare function getWhirlpoolRewardInfoCodec(): Codec<
|
|
21
|
+
WhirlpoolRewardInfoArgs,
|
|
22
|
+
WhirlpoolRewardInfo
|
|
23
|
+
>;
|