@orca-so/whirlpools-automation 0.3.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 +2490 -2092
- package/dist/index.node.js +2497 -2102
- package/dist/pda.d.ts +16 -4
- package/dist/staging.d.ts +1 -1
- package/package.json +3 -3
- package/CHANGELOG.md +0 -13
|
@@ -1,143 +1,211 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Codec,
|
|
3
|
+
Decoder,
|
|
4
|
+
Encoder,
|
|
5
|
+
GetDiscriminatedUnionVariant,
|
|
6
|
+
GetDiscriminatedUnionVariantContent,
|
|
7
|
+
ReadonlyUint8Array,
|
|
8
|
+
} from '@solana/kit';
|
|
2
9
|
import { Address, AddressArgs, FundAutomationMethod, FundAutomationMethodArgs } from '.';
|
|
3
10
|
|
|
4
|
-
export type Event =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
11
|
+
export type Event =
|
|
12
|
+
| {
|
|
13
|
+
__kind: 'CrankRewardDefaultUpdated';
|
|
14
|
+
newCrankRewardDefault: bigint;
|
|
15
|
+
prevCrankRewardDefault: bigint;
|
|
16
|
+
updatedBy: Address;
|
|
17
|
+
}
|
|
18
|
+
| {
|
|
19
|
+
__kind: 'GlobalConfigAuthorityUpdated';
|
|
20
|
+
newGlobalConfigAuthority: Address;
|
|
21
|
+
prevGlobalConfigAuthority: Address;
|
|
22
|
+
}
|
|
23
|
+
| {
|
|
24
|
+
__kind: 'AutomationCreated';
|
|
25
|
+
automation: Address;
|
|
26
|
+
positionTokenAccount: Address;
|
|
27
|
+
position: Address;
|
|
28
|
+
actionData: ReadonlyUint8Array;
|
|
29
|
+
automationIndex: number;
|
|
30
|
+
conditionsData: ReadonlyUint8Array;
|
|
31
|
+
crankReward: bigint;
|
|
32
|
+
}
|
|
33
|
+
| {
|
|
34
|
+
__kind: 'AutomationRemoved';
|
|
35
|
+
automation: Address;
|
|
36
|
+
positionTokenAccount: Address;
|
|
37
|
+
position: Address;
|
|
38
|
+
actionData: ReadonlyUint8Array;
|
|
39
|
+
automationIndex: number;
|
|
40
|
+
conditionsData: ReadonlyUint8Array;
|
|
41
|
+
crankReward: bigint;
|
|
42
|
+
}
|
|
43
|
+
| {
|
|
44
|
+
__kind: 'AutomationFunded';
|
|
45
|
+
automation: Address;
|
|
46
|
+
payer: Address;
|
|
47
|
+
amountFunded: bigint;
|
|
48
|
+
method: FundAutomationMethod;
|
|
49
|
+
value: number;
|
|
50
|
+
}
|
|
51
|
+
| {
|
|
52
|
+
__kind: 'HarvestedAndReinvested';
|
|
53
|
+
automation: Address;
|
|
54
|
+
positionTokenAccount: Address;
|
|
55
|
+
position: Address;
|
|
56
|
+
automationIndex: number;
|
|
57
|
+
conditionsData: ReadonlyUint8Array;
|
|
58
|
+
feesCollectedA: bigint;
|
|
59
|
+
feesCollectedB: bigint;
|
|
60
|
+
liquidityIncreasedA: bigint;
|
|
61
|
+
liquidityIncreasedB: bigint;
|
|
62
|
+
tokenATransferFee: bigint;
|
|
63
|
+
tokenBTransferFee: bigint;
|
|
64
|
+
crankReward: bigint;
|
|
65
|
+
}
|
|
66
|
+
| {
|
|
67
|
+
__kind: 'HarvestSwapAndReinvestPre';
|
|
68
|
+
automation: Address;
|
|
69
|
+
positionTokenAccount: Address;
|
|
70
|
+
position: Address;
|
|
71
|
+
automationIndex: number;
|
|
72
|
+
conditionsData: ReadonlyUint8Array;
|
|
73
|
+
feesCollectedA: bigint;
|
|
74
|
+
feesCollectedB: bigint;
|
|
75
|
+
}
|
|
76
|
+
| {
|
|
77
|
+
__kind: 'HarvestSwapAndReinvestPost';
|
|
78
|
+
automation: Address;
|
|
79
|
+
positionTokenAccount: Address;
|
|
80
|
+
position: Address;
|
|
81
|
+
postSwapAmountA: bigint;
|
|
82
|
+
postSwapAmountB: bigint;
|
|
83
|
+
liquidityIncreasedA: bigint;
|
|
84
|
+
liquidityIncreasedB: bigint;
|
|
85
|
+
tokenATransferFee: bigint;
|
|
86
|
+
tokenBTransferFee: bigint;
|
|
87
|
+
crankReward: bigint;
|
|
88
|
+
amountToTransferToUserA: bigint;
|
|
89
|
+
amountToTransferToUserB: bigint;
|
|
90
|
+
};
|
|
91
|
+
export type EventArgs =
|
|
92
|
+
| {
|
|
93
|
+
__kind: 'CrankRewardDefaultUpdated';
|
|
94
|
+
newCrankRewardDefault: number | bigint;
|
|
95
|
+
prevCrankRewardDefault: number | bigint;
|
|
96
|
+
updatedBy: AddressArgs;
|
|
97
|
+
}
|
|
98
|
+
| {
|
|
99
|
+
__kind: 'GlobalConfigAuthorityUpdated';
|
|
100
|
+
newGlobalConfigAuthority: AddressArgs;
|
|
101
|
+
prevGlobalConfigAuthority: AddressArgs;
|
|
102
|
+
}
|
|
103
|
+
| {
|
|
104
|
+
__kind: 'AutomationCreated';
|
|
105
|
+
automation: AddressArgs;
|
|
106
|
+
positionTokenAccount: AddressArgs;
|
|
107
|
+
position: AddressArgs;
|
|
108
|
+
actionData: ReadonlyUint8Array;
|
|
109
|
+
automationIndex: number;
|
|
110
|
+
conditionsData: ReadonlyUint8Array;
|
|
111
|
+
crankReward: number | bigint;
|
|
112
|
+
}
|
|
113
|
+
| {
|
|
114
|
+
__kind: 'AutomationRemoved';
|
|
115
|
+
automation: AddressArgs;
|
|
116
|
+
positionTokenAccount: AddressArgs;
|
|
117
|
+
position: AddressArgs;
|
|
118
|
+
actionData: ReadonlyUint8Array;
|
|
119
|
+
automationIndex: number;
|
|
120
|
+
conditionsData: ReadonlyUint8Array;
|
|
121
|
+
crankReward: number | bigint;
|
|
122
|
+
}
|
|
123
|
+
| {
|
|
124
|
+
__kind: 'AutomationFunded';
|
|
125
|
+
automation: AddressArgs;
|
|
126
|
+
payer: AddressArgs;
|
|
127
|
+
amountFunded: number | bigint;
|
|
128
|
+
method: FundAutomationMethodArgs;
|
|
129
|
+
value: number;
|
|
130
|
+
}
|
|
131
|
+
| {
|
|
132
|
+
__kind: 'HarvestedAndReinvested';
|
|
133
|
+
automation: AddressArgs;
|
|
134
|
+
positionTokenAccount: AddressArgs;
|
|
135
|
+
position: AddressArgs;
|
|
136
|
+
automationIndex: number;
|
|
137
|
+
conditionsData: ReadonlyUint8Array;
|
|
138
|
+
feesCollectedA: number | bigint;
|
|
139
|
+
feesCollectedB: number | bigint;
|
|
140
|
+
liquidityIncreasedA: number | bigint;
|
|
141
|
+
liquidityIncreasedB: number | bigint;
|
|
142
|
+
tokenATransferFee: number | bigint;
|
|
143
|
+
tokenBTransferFee: number | bigint;
|
|
144
|
+
crankReward: number | bigint;
|
|
145
|
+
}
|
|
146
|
+
| {
|
|
147
|
+
__kind: 'HarvestSwapAndReinvestPre';
|
|
148
|
+
automation: AddressArgs;
|
|
149
|
+
positionTokenAccount: AddressArgs;
|
|
150
|
+
position: AddressArgs;
|
|
151
|
+
automationIndex: number;
|
|
152
|
+
conditionsData: ReadonlyUint8Array;
|
|
153
|
+
feesCollectedA: number | bigint;
|
|
154
|
+
feesCollectedB: number | bigint;
|
|
155
|
+
}
|
|
156
|
+
| {
|
|
157
|
+
__kind: 'HarvestSwapAndReinvestPost';
|
|
158
|
+
automation: AddressArgs;
|
|
159
|
+
positionTokenAccount: AddressArgs;
|
|
160
|
+
position: AddressArgs;
|
|
161
|
+
postSwapAmountA: number | bigint;
|
|
162
|
+
postSwapAmountB: number | bigint;
|
|
163
|
+
liquidityIncreasedA: number | bigint;
|
|
164
|
+
liquidityIncreasedB: number | bigint;
|
|
165
|
+
tokenATransferFee: number | bigint;
|
|
166
|
+
tokenBTransferFee: number | bigint;
|
|
167
|
+
crankReward: number | bigint;
|
|
168
|
+
amountToTransferToUserA: number | bigint;
|
|
169
|
+
amountToTransferToUserB: number | bigint;
|
|
170
|
+
};
|
|
130
171
|
export declare function getEventEncoder(): Encoder<EventArgs>;
|
|
131
172
|
export declare function getEventDecoder(): Decoder<Event>;
|
|
132
173
|
export declare function getEventCodec(): Codec<EventArgs, Event>;
|
|
133
|
-
export declare function event(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
export declare function event(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
export declare function
|
|
142
|
-
|
|
174
|
+
export declare function event(
|
|
175
|
+
kind: 'CrankRewardDefaultUpdated',
|
|
176
|
+
data: GetDiscriminatedUnionVariantContent<EventArgs, '__kind', 'CrankRewardDefaultUpdated'>
|
|
177
|
+
): GetDiscriminatedUnionVariant<EventArgs, '__kind', 'CrankRewardDefaultUpdated'>;
|
|
178
|
+
export declare function event(
|
|
179
|
+
kind: 'GlobalConfigAuthorityUpdated',
|
|
180
|
+
data: GetDiscriminatedUnionVariantContent<EventArgs, '__kind', 'GlobalConfigAuthorityUpdated'>
|
|
181
|
+
): GetDiscriminatedUnionVariant<EventArgs, '__kind', 'GlobalConfigAuthorityUpdated'>;
|
|
182
|
+
export declare function event(
|
|
183
|
+
kind: 'AutomationCreated',
|
|
184
|
+
data: GetDiscriminatedUnionVariantContent<EventArgs, '__kind', 'AutomationCreated'>
|
|
185
|
+
): GetDiscriminatedUnionVariant<EventArgs, '__kind', 'AutomationCreated'>;
|
|
186
|
+
export declare function event(
|
|
187
|
+
kind: 'AutomationRemoved',
|
|
188
|
+
data: GetDiscriminatedUnionVariantContent<EventArgs, '__kind', 'AutomationRemoved'>
|
|
189
|
+
): GetDiscriminatedUnionVariant<EventArgs, '__kind', 'AutomationRemoved'>;
|
|
190
|
+
export declare function event(
|
|
191
|
+
kind: 'AutomationFunded',
|
|
192
|
+
data: GetDiscriminatedUnionVariantContent<EventArgs, '__kind', 'AutomationFunded'>
|
|
193
|
+
): GetDiscriminatedUnionVariant<EventArgs, '__kind', 'AutomationFunded'>;
|
|
194
|
+
export declare function event(
|
|
195
|
+
kind: 'HarvestedAndReinvested',
|
|
196
|
+
data: GetDiscriminatedUnionVariantContent<EventArgs, '__kind', 'HarvestedAndReinvested'>
|
|
197
|
+
): GetDiscriminatedUnionVariant<EventArgs, '__kind', 'HarvestedAndReinvested'>;
|
|
198
|
+
export declare function event(
|
|
199
|
+
kind: 'HarvestSwapAndReinvestPre',
|
|
200
|
+
data: GetDiscriminatedUnionVariantContent<EventArgs, '__kind', 'HarvestSwapAndReinvestPre'>
|
|
201
|
+
): GetDiscriminatedUnionVariant<EventArgs, '__kind', 'HarvestSwapAndReinvestPre'>;
|
|
202
|
+
export declare function event(
|
|
203
|
+
kind: 'HarvestSwapAndReinvestPost',
|
|
204
|
+
data: GetDiscriminatedUnionVariantContent<EventArgs, '__kind', 'HarvestSwapAndReinvestPost'>
|
|
205
|
+
): GetDiscriminatedUnionVariant<EventArgs, '__kind', 'HarvestSwapAndReinvestPost'>;
|
|
206
|
+
export declare function isEvent<K extends Event['__kind']>(
|
|
207
|
+
kind: K,
|
|
208
|
+
value: Event
|
|
209
|
+
): value is Event & {
|
|
210
|
+
__kind: K;
|
|
143
211
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/kit';
|
|
2
2
|
|
|
3
3
|
export declare enum FundAutomationMethod {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
FundByCount = 0,
|
|
5
|
+
FundByDuration = 1,
|
|
6
6
|
}
|
|
7
7
|
export type FundAutomationMethodArgs = FundAutomationMethod;
|
|
8
8
|
export declare function getFundAutomationMethodEncoder(): FixedSizeEncoder<FundAutomationMethodArgs>;
|
|
9
9
|
export declare function getFundAutomationMethodDecoder(): FixedSizeDecoder<FundAutomationMethod>;
|
|
10
|
-
export declare function getFundAutomationMethodCodec(): FixedSizeCodec<
|
|
10
|
+
export declare function getFundAutomationMethodCodec(): FixedSizeCodec<
|
|
11
|
+
FundAutomationMethodArgs,
|
|
12
|
+
FundAutomationMethod
|
|
13
|
+
>;
|
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
FixedSizeCodec,
|
|
3
|
+
FixedSizeDecoder,
|
|
4
|
+
FixedSizeEncoder,
|
|
5
|
+
GetDiscriminatedUnionVariant,
|
|
6
|
+
GetDiscriminatedUnionVariantContent,
|
|
7
|
+
} from '@solana/kit';
|
|
2
8
|
|
|
3
|
-
export type FundAutomationVariant =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
export type FundAutomationVariant =
|
|
10
|
+
| {
|
|
11
|
+
__kind: 'FundByCount';
|
|
12
|
+
count: number;
|
|
13
|
+
}
|
|
14
|
+
| {
|
|
15
|
+
__kind: 'FundByDuration';
|
|
16
|
+
durationSeconds: number;
|
|
17
|
+
};
|
|
10
18
|
export type FundAutomationVariantArgs = FundAutomationVariant;
|
|
11
19
|
export declare function getFundAutomationVariantEncoder(): FixedSizeEncoder<FundAutomationVariantArgs>;
|
|
12
20
|
export declare function getFundAutomationVariantDecoder(): FixedSizeDecoder<FundAutomationVariant>;
|
|
13
|
-
export declare function getFundAutomationVariantCodec(): FixedSizeCodec<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
export declare function getFundAutomationVariantCodec(): FixedSizeCodec<
|
|
22
|
+
FundAutomationVariantArgs,
|
|
23
|
+
FundAutomationVariant
|
|
24
|
+
>;
|
|
25
|
+
export declare function fundAutomationVariant(
|
|
26
|
+
kind: 'FundByCount',
|
|
27
|
+
data: GetDiscriminatedUnionVariantContent<FundAutomationVariantArgs, '__kind', 'FundByCount'>
|
|
28
|
+
): GetDiscriminatedUnionVariant<FundAutomationVariantArgs, '__kind', 'FundByCount'>;
|
|
29
|
+
export declare function fundAutomationVariant(
|
|
30
|
+
kind: 'FundByDuration',
|
|
31
|
+
data: GetDiscriminatedUnionVariantContent<FundAutomationVariantArgs, '__kind', 'FundByDuration'>
|
|
32
|
+
): GetDiscriminatedUnionVariant<FundAutomationVariantArgs, '__kind', 'FundByDuration'>;
|
|
33
|
+
export declare function isFundAutomationVariant<K extends FundAutomationVariant['__kind']>(
|
|
34
|
+
kind: K,
|
|
35
|
+
value: FundAutomationVariant
|
|
36
|
+
): value is FundAutomationVariant & {
|
|
37
|
+
__kind: K;
|
|
18
38
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/kit';
|
|
2
2
|
|
|
3
3
|
export declare enum IncreaseLiquidityByTokenAmountsAccountsType {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
TransferHookA = 0,
|
|
5
|
+
TransferHookB = 1,
|
|
6
|
+
TransferHookReward = 2,
|
|
7
|
+
TransferHookInput = 3,
|
|
8
|
+
TransferHookIntermediate = 4,
|
|
9
|
+
TransferHookOutput = 5,
|
|
10
|
+
SupplementalTickArrays = 6,
|
|
11
|
+
SupplementalTickArraysOne = 7,
|
|
12
|
+
SupplementalTickArraysTwo = 8,
|
|
13
13
|
}
|
|
14
|
-
export type IncreaseLiquidityByTokenAmountsAccountsTypeArgs =
|
|
14
|
+
export type IncreaseLiquidityByTokenAmountsAccountsTypeArgs =
|
|
15
|
+
IncreaseLiquidityByTokenAmountsAccountsType;
|
|
15
16
|
export declare function getIncreaseLiquidityByTokenAmountsAccountsTypeEncoder(): FixedSizeEncoder<IncreaseLiquidityByTokenAmountsAccountsTypeArgs>;
|
|
16
17
|
export declare function getIncreaseLiquidityByTokenAmountsAccountsTypeDecoder(): FixedSizeDecoder<IncreaseLiquidityByTokenAmountsAccountsType>;
|
|
17
|
-
export declare function getIncreaseLiquidityByTokenAmountsAccountsTypeCodec(): FixedSizeCodec<
|
|
18
|
+
export declare function getIncreaseLiquidityByTokenAmountsAccountsTypeCodec(): FixedSizeCodec<
|
|
19
|
+
IncreaseLiquidityByTokenAmountsAccountsTypeArgs,
|
|
20
|
+
IncreaseLiquidityByTokenAmountsAccountsType
|
|
21
|
+
>;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Codec, Decoder, Encoder } from '@solana/kit';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IncreaseLiquidityByTokenAmountsRemainingAccountsSlice,
|
|
4
|
+
IncreaseLiquidityByTokenAmountsRemainingAccountsSliceArgs,
|
|
5
|
+
} from '.';
|
|
3
6
|
|
|
4
7
|
export type IncreaseLiquidityByTokenAmountsRemainingAccountsInfo = {
|
|
5
|
-
|
|
8
|
+
slices: Array<IncreaseLiquidityByTokenAmountsRemainingAccountsSlice>;
|
|
6
9
|
};
|
|
7
10
|
export type IncreaseLiquidityByTokenAmountsRemainingAccountsInfoArgs = {
|
|
8
|
-
|
|
11
|
+
slices: Array<IncreaseLiquidityByTokenAmountsRemainingAccountsSliceArgs>;
|
|
9
12
|
};
|
|
10
13
|
export declare function getIncreaseLiquidityByTokenAmountsRemainingAccountsInfoEncoder(): Encoder<IncreaseLiquidityByTokenAmountsRemainingAccountsInfoArgs>;
|
|
11
14
|
export declare function getIncreaseLiquidityByTokenAmountsRemainingAccountsInfoDecoder(): Decoder<IncreaseLiquidityByTokenAmountsRemainingAccountsInfo>;
|
|
12
|
-
export declare function getIncreaseLiquidityByTokenAmountsRemainingAccountsInfoCodec(): Codec<
|
|
15
|
+
export declare function getIncreaseLiquidityByTokenAmountsRemainingAccountsInfoCodec(): Codec<
|
|
16
|
+
IncreaseLiquidityByTokenAmountsRemainingAccountsInfoArgs,
|
|
17
|
+
IncreaseLiquidityByTokenAmountsRemainingAccountsInfo
|
|
18
|
+
>;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/kit';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IncreaseLiquidityByTokenAmountsAccountsType,
|
|
4
|
+
IncreaseLiquidityByTokenAmountsAccountsTypeArgs,
|
|
5
|
+
} from '.';
|
|
3
6
|
|
|
4
7
|
export type IncreaseLiquidityByTokenAmountsRemainingAccountsSlice = {
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
accountsType: IncreaseLiquidityByTokenAmountsAccountsType;
|
|
9
|
+
length: number;
|
|
7
10
|
};
|
|
8
11
|
export type IncreaseLiquidityByTokenAmountsRemainingAccountsSliceArgs = {
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
accountsType: IncreaseLiquidityByTokenAmountsAccountsTypeArgs;
|
|
13
|
+
length: number;
|
|
11
14
|
};
|
|
12
15
|
export declare function getIncreaseLiquidityByTokenAmountsRemainingAccountsSliceEncoder(): FixedSizeEncoder<IncreaseLiquidityByTokenAmountsRemainingAccountsSliceArgs>;
|
|
13
16
|
export declare function getIncreaseLiquidityByTokenAmountsRemainingAccountsSliceDecoder(): FixedSizeDecoder<IncreaseLiquidityByTokenAmountsRemainingAccountsSlice>;
|
|
14
|
-
export declare function getIncreaseLiquidityByTokenAmountsRemainingAccountsSliceCodec(): FixedSizeCodec<
|
|
17
|
+
export declare function getIncreaseLiquidityByTokenAmountsRemainingAccountsSliceCodec(): FixedSizeCodec<
|
|
18
|
+
IncreaseLiquidityByTokenAmountsRemainingAccountsSliceArgs,
|
|
19
|
+
IncreaseLiquidityByTokenAmountsRemainingAccountsSlice
|
|
20
|
+
>;
|
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
FixedSizeCodec,
|
|
3
|
+
FixedSizeDecoder,
|
|
4
|
+
FixedSizeEncoder,
|
|
5
|
+
GetDiscriminatedUnionVariant,
|
|
6
|
+
GetDiscriminatedUnionVariantContent,
|
|
7
|
+
} from '@solana/kit';
|
|
2
8
|
|
|
3
9
|
export type IncreaseLiquidityMethod = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
__kind: 'ByTokenAmounts';
|
|
11
|
+
tokenMaxA: bigint;
|
|
12
|
+
tokenMaxB: bigint;
|
|
13
|
+
minSqrtPrice: bigint;
|
|
14
|
+
maxSqrtPrice: bigint;
|
|
9
15
|
};
|
|
10
16
|
export type IncreaseLiquidityMethodArgs = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
__kind: 'ByTokenAmounts';
|
|
18
|
+
tokenMaxA: number | bigint;
|
|
19
|
+
tokenMaxB: number | bigint;
|
|
20
|
+
minSqrtPrice: number | bigint;
|
|
21
|
+
maxSqrtPrice: number | bigint;
|
|
16
22
|
};
|
|
17
23
|
export declare function getIncreaseLiquidityMethodEncoder(): FixedSizeEncoder<IncreaseLiquidityMethodArgs>;
|
|
18
24
|
export declare function getIncreaseLiquidityMethodDecoder(): FixedSizeDecoder<IncreaseLiquidityMethod>;
|
|
19
|
-
export declare function getIncreaseLiquidityMethodCodec(): FixedSizeCodec<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
export declare function getIncreaseLiquidityMethodCodec(): FixedSizeCodec<
|
|
26
|
+
IncreaseLiquidityMethodArgs,
|
|
27
|
+
IncreaseLiquidityMethod
|
|
28
|
+
>;
|
|
29
|
+
export declare function increaseLiquidityMethod(
|
|
30
|
+
kind: 'ByTokenAmounts',
|
|
31
|
+
data: GetDiscriminatedUnionVariantContent<IncreaseLiquidityMethodArgs, '__kind', 'ByTokenAmounts'>
|
|
32
|
+
): GetDiscriminatedUnionVariant<IncreaseLiquidityMethodArgs, '__kind', 'ByTokenAmounts'>;
|
|
33
|
+
export declare function isIncreaseLiquidityMethod<K extends IncreaseLiquidityMethod['__kind']>(
|
|
34
|
+
kind: K,
|
|
35
|
+
value: IncreaseLiquidityMethod
|
|
36
|
+
): value is IncreaseLiquidityMethod & {
|
|
37
|
+
__kind: K;
|
|
23
38
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export type NonZeroU32 = number;
|
|
2
2
|
export type NonZeroU32Args = number;
|
|
3
|
-
export declare const getNonZeroU32Encoder: (
|
|
4
|
-
|
|
3
|
+
export declare const getNonZeroU32Encoder: (
|
|
4
|
+
config?: import('@solana/kit').NumberCodecConfig
|
|
5
|
+
) => import('@solana/kit').FixedSizeEncoder<bigint | number, 4>;
|
|
6
|
+
export declare const getNonZeroU32Decoder: (
|
|
7
|
+
config?: import('@solana/kit').NumberCodecConfig
|
|
8
|
+
) => import('@solana/kit').FixedSizeDecoder<number, 4>;
|
|
@@ -2,30 +2,30 @@ import { Codec, Decoder, Encoder, ReadonlyUint8Array } from '@solana/kit';
|
|
|
2
2
|
import { Address, AddressArgs, PositionRewardInfo, PositionRewardInfoArgs } from '.';
|
|
3
3
|
|
|
4
4
|
export type Position = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
discriminator: ReadonlyUint8Array;
|
|
6
|
+
whirlpool: Address;
|
|
7
|
+
positionMint: Address;
|
|
8
|
+
liquidity: bigint;
|
|
9
|
+
tickLowerIndex: number;
|
|
10
|
+
tickUpperIndex: number;
|
|
11
|
+
feeGrowthCheckpointA: bigint;
|
|
12
|
+
feeOwedA: bigint;
|
|
13
|
+
feeGrowthCheckpointB: bigint;
|
|
14
|
+
feeOwedB: bigint;
|
|
15
|
+
rewardInfos: Array<PositionRewardInfo>;
|
|
16
16
|
};
|
|
17
17
|
export type PositionArgs = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
discriminator: ReadonlyUint8Array;
|
|
19
|
+
whirlpool: AddressArgs;
|
|
20
|
+
positionMint: AddressArgs;
|
|
21
|
+
liquidity: number | bigint;
|
|
22
|
+
tickLowerIndex: number;
|
|
23
|
+
tickUpperIndex: number;
|
|
24
|
+
feeGrowthCheckpointA: number | bigint;
|
|
25
|
+
feeOwedA: number | bigint;
|
|
26
|
+
feeGrowthCheckpointB: number | bigint;
|
|
27
|
+
feeOwedB: number | bigint;
|
|
28
|
+
rewardInfos: Array<PositionRewardInfoArgs>;
|
|
29
29
|
};
|
|
30
30
|
export declare function getPositionEncoder(): Encoder<PositionArgs>;
|
|
31
31
|
export declare function getPositionDecoder(): Decoder<Position>;
|