@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,90 +1,271 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AccountMeta,
|
|
3
|
+
AccountSignerMeta,
|
|
4
|
+
Address,
|
|
5
|
+
FixedSizeCodec,
|
|
6
|
+
FixedSizeDecoder,
|
|
7
|
+
FixedSizeEncoder,
|
|
8
|
+
Instruction,
|
|
9
|
+
InstructionWithAccounts,
|
|
10
|
+
InstructionWithData,
|
|
11
|
+
ReadonlyAccount,
|
|
12
|
+
ReadonlyUint8Array,
|
|
13
|
+
TransactionSigner,
|
|
14
|
+
WritableAccount,
|
|
15
|
+
WritableSignerAccount,
|
|
16
|
+
} from '@solana/kit';
|
|
2
17
|
import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
|
|
3
18
|
|
|
4
19
|
export declare const HARVEST_SWAP_AND_REINVEST_PRE_DISCRIMINATOR = 6;
|
|
5
20
|
export declare function getHarvestSwapAndReinvestPreDiscriminatorBytes(): ReadonlyUint8Array;
|
|
6
|
-
export type HarvestSwapAndReinvestPreInstruction<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
export type HarvestSwapAndReinvestPreInstruction<
|
|
22
|
+
TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
23
|
+
TAccountCrankOperator extends string | AccountMeta<string> = string,
|
|
24
|
+
TAccountCrankOperatorTokenAccountA extends string | AccountMeta<string> = string,
|
|
25
|
+
TAccountCrankOperatorTokenAccountB extends string | AccountMeta<string> = string,
|
|
26
|
+
TAccountAutomation extends string | AccountMeta<string> = string,
|
|
27
|
+
TAccountAutomationAuthority extends string | AccountMeta<string> = string,
|
|
28
|
+
TAccountPositionTokenAccount extends string | AccountMeta<string> = string,
|
|
29
|
+
TAccountPosition extends string | AccountMeta<string> = string,
|
|
30
|
+
TAccountWhirlpool extends string | AccountMeta<string> = string,
|
|
31
|
+
TAccountTokenMintA extends string | AccountMeta<string> = string,
|
|
32
|
+
TAccountTokenMintB extends string | AccountMeta<string> = string,
|
|
33
|
+
TAccountTokenVaultA extends string | AccountMeta<string> = string,
|
|
34
|
+
TAccountTokenVaultB extends string | AccountMeta<string> = string,
|
|
35
|
+
TAccountTokenProgramA extends string | AccountMeta<string> = string,
|
|
36
|
+
TAccountTokenProgramB extends string | AccountMeta<string> = string,
|
|
37
|
+
TAccountMemoProgram extends string | AccountMeta<string> = string,
|
|
38
|
+
TAccountTickArrayLower extends string | AccountMeta<string> = string,
|
|
39
|
+
TAccountTickArrayUpper extends string | AccountMeta<string> = string,
|
|
40
|
+
TAccountWhirlpoolProgram extends string | AccountMeta<string> = string,
|
|
41
|
+
TAccountInstructionsSysvar extends string | AccountMeta<string> =
|
|
42
|
+
'Sysvar1nstructions1111111111111111111111111',
|
|
43
|
+
TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111',
|
|
44
|
+
TAccountAtaProgram extends string | AccountMeta<string> =
|
|
45
|
+
'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',
|
|
46
|
+
TRemainingAccounts extends readonly AccountMeta<string>[] = [],
|
|
47
|
+
> = Instruction<TProgram> &
|
|
48
|
+
InstructionWithData<ReadonlyUint8Array> &
|
|
49
|
+
InstructionWithAccounts<
|
|
50
|
+
[
|
|
51
|
+
TAccountCrankOperator extends string
|
|
52
|
+
? WritableSignerAccount<TAccountCrankOperator> & AccountSignerMeta<TAccountCrankOperator>
|
|
53
|
+
: TAccountCrankOperator,
|
|
54
|
+
TAccountCrankOperatorTokenAccountA extends string
|
|
55
|
+
? WritableAccount<TAccountCrankOperatorTokenAccountA>
|
|
56
|
+
: TAccountCrankOperatorTokenAccountA,
|
|
57
|
+
TAccountCrankOperatorTokenAccountB extends string
|
|
58
|
+
? WritableAccount<TAccountCrankOperatorTokenAccountB>
|
|
59
|
+
: TAccountCrankOperatorTokenAccountB,
|
|
60
|
+
TAccountAutomation extends string ? ReadonlyAccount<TAccountAutomation> : TAccountAutomation,
|
|
61
|
+
TAccountAutomationAuthority extends string
|
|
62
|
+
? ReadonlyAccount<TAccountAutomationAuthority>
|
|
63
|
+
: TAccountAutomationAuthority,
|
|
64
|
+
TAccountPositionTokenAccount extends string
|
|
65
|
+
? ReadonlyAccount<TAccountPositionTokenAccount>
|
|
66
|
+
: TAccountPositionTokenAccount,
|
|
67
|
+
TAccountPosition extends string ? WritableAccount<TAccountPosition> : TAccountPosition,
|
|
68
|
+
TAccountWhirlpool extends string ? WritableAccount<TAccountWhirlpool> : TAccountWhirlpool,
|
|
69
|
+
TAccountTokenMintA extends string ? ReadonlyAccount<TAccountTokenMintA> : TAccountTokenMintA,
|
|
70
|
+
TAccountTokenMintB extends string ? ReadonlyAccount<TAccountTokenMintB> : TAccountTokenMintB,
|
|
71
|
+
TAccountTokenVaultA extends string
|
|
72
|
+
? WritableAccount<TAccountTokenVaultA>
|
|
73
|
+
: TAccountTokenVaultA,
|
|
74
|
+
TAccountTokenVaultB extends string
|
|
75
|
+
? WritableAccount<TAccountTokenVaultB>
|
|
76
|
+
: TAccountTokenVaultB,
|
|
77
|
+
TAccountTokenProgramA extends string
|
|
78
|
+
? ReadonlyAccount<TAccountTokenProgramA>
|
|
79
|
+
: TAccountTokenProgramA,
|
|
80
|
+
TAccountTokenProgramB extends string
|
|
81
|
+
? ReadonlyAccount<TAccountTokenProgramB>
|
|
82
|
+
: TAccountTokenProgramB,
|
|
83
|
+
TAccountMemoProgram extends string
|
|
84
|
+
? ReadonlyAccount<TAccountMemoProgram>
|
|
85
|
+
: TAccountMemoProgram,
|
|
86
|
+
TAccountTickArrayLower extends string
|
|
87
|
+
? ReadonlyAccount<TAccountTickArrayLower>
|
|
88
|
+
: TAccountTickArrayLower,
|
|
89
|
+
TAccountTickArrayUpper extends string
|
|
90
|
+
? ReadonlyAccount<TAccountTickArrayUpper>
|
|
91
|
+
: TAccountTickArrayUpper,
|
|
92
|
+
TAccountWhirlpoolProgram extends string
|
|
93
|
+
? ReadonlyAccount<TAccountWhirlpoolProgram>
|
|
94
|
+
: TAccountWhirlpoolProgram,
|
|
95
|
+
TAccountInstructionsSysvar extends string
|
|
96
|
+
? ReadonlyAccount<TAccountInstructionsSysvar>
|
|
97
|
+
: TAccountInstructionsSysvar,
|
|
98
|
+
TAccountSystemProgram extends string
|
|
99
|
+
? ReadonlyAccount<TAccountSystemProgram>
|
|
100
|
+
: TAccountSystemProgram,
|
|
101
|
+
TAccountAtaProgram extends string ? ReadonlyAccount<TAccountAtaProgram> : TAccountAtaProgram,
|
|
102
|
+
...TRemainingAccounts,
|
|
103
|
+
]
|
|
104
|
+
>;
|
|
30
105
|
export type HarvestSwapAndReinvestPreInstructionData = {
|
|
31
|
-
|
|
106
|
+
discriminator: number;
|
|
32
107
|
};
|
|
33
108
|
export type HarvestSwapAndReinvestPreInstructionDataArgs = {};
|
|
34
109
|
export declare function getHarvestSwapAndReinvestPreInstructionDataEncoder(): FixedSizeEncoder<HarvestSwapAndReinvestPreInstructionDataArgs>;
|
|
35
110
|
export declare function getHarvestSwapAndReinvestPreInstructionDataDecoder(): FixedSizeDecoder<HarvestSwapAndReinvestPreInstructionData>;
|
|
36
|
-
export declare function getHarvestSwapAndReinvestPreInstructionDataCodec(): FixedSizeCodec<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
111
|
+
export declare function getHarvestSwapAndReinvestPreInstructionDataCodec(): FixedSizeCodec<
|
|
112
|
+
HarvestSwapAndReinvestPreInstructionDataArgs,
|
|
113
|
+
HarvestSwapAndReinvestPreInstructionData
|
|
114
|
+
>;
|
|
115
|
+
export type HarvestSwapAndReinvestPreInput<
|
|
116
|
+
TAccountCrankOperator extends string = string,
|
|
117
|
+
TAccountCrankOperatorTokenAccountA extends string = string,
|
|
118
|
+
TAccountCrankOperatorTokenAccountB extends string = string,
|
|
119
|
+
TAccountAutomation extends string = string,
|
|
120
|
+
TAccountAutomationAuthority extends string = string,
|
|
121
|
+
TAccountPositionTokenAccount extends string = string,
|
|
122
|
+
TAccountPosition extends string = string,
|
|
123
|
+
TAccountWhirlpool extends string = string,
|
|
124
|
+
TAccountTokenMintA extends string = string,
|
|
125
|
+
TAccountTokenMintB extends string = string,
|
|
126
|
+
TAccountTokenVaultA extends string = string,
|
|
127
|
+
TAccountTokenVaultB extends string = string,
|
|
128
|
+
TAccountTokenProgramA extends string = string,
|
|
129
|
+
TAccountTokenProgramB extends string = string,
|
|
130
|
+
TAccountMemoProgram extends string = string,
|
|
131
|
+
TAccountTickArrayLower extends string = string,
|
|
132
|
+
TAccountTickArrayUpper extends string = string,
|
|
133
|
+
TAccountWhirlpoolProgram extends string = string,
|
|
134
|
+
TAccountInstructionsSysvar extends string = string,
|
|
135
|
+
TAccountSystemProgram extends string = string,
|
|
136
|
+
TAccountAtaProgram extends string = string,
|
|
137
|
+
> = {
|
|
138
|
+
crankOperator: TransactionSigner<TAccountCrankOperator>;
|
|
139
|
+
crankOperatorTokenAccountA: Address<TAccountCrankOperatorTokenAccountA>;
|
|
140
|
+
crankOperatorTokenAccountB: Address<TAccountCrankOperatorTokenAccountB>;
|
|
141
|
+
automation: Address<TAccountAutomation>;
|
|
142
|
+
automationAuthority: Address<TAccountAutomationAuthority>;
|
|
143
|
+
positionTokenAccount: Address<TAccountPositionTokenAccount>;
|
|
144
|
+
position: Address<TAccountPosition>;
|
|
145
|
+
whirlpool: Address<TAccountWhirlpool>;
|
|
146
|
+
tokenMintA: Address<TAccountTokenMintA>;
|
|
147
|
+
tokenMintB: Address<TAccountTokenMintB>;
|
|
148
|
+
tokenVaultA: Address<TAccountTokenVaultA>;
|
|
149
|
+
tokenVaultB: Address<TAccountTokenVaultB>;
|
|
150
|
+
tokenProgramA: Address<TAccountTokenProgramA>;
|
|
151
|
+
tokenProgramB: Address<TAccountTokenProgramB>;
|
|
152
|
+
memoProgram: Address<TAccountMemoProgram>;
|
|
153
|
+
tickArrayLower: Address<TAccountTickArrayLower>;
|
|
154
|
+
tickArrayUpper: Address<TAccountTickArrayUpper>;
|
|
155
|
+
whirlpoolProgram: Address<TAccountWhirlpoolProgram>;
|
|
156
|
+
instructionsSysvar?: Address<TAccountInstructionsSysvar>;
|
|
157
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
158
|
+
ataProgram?: Address<TAccountAtaProgram>;
|
|
59
159
|
};
|
|
60
|
-
export declare function getHarvestSwapAndReinvestPreInstruction<
|
|
160
|
+
export declare function getHarvestSwapAndReinvestPreInstruction<
|
|
161
|
+
TAccountCrankOperator extends string,
|
|
162
|
+
TAccountCrankOperatorTokenAccountA extends string,
|
|
163
|
+
TAccountCrankOperatorTokenAccountB extends string,
|
|
164
|
+
TAccountAutomation extends string,
|
|
165
|
+
TAccountAutomationAuthority extends string,
|
|
166
|
+
TAccountPositionTokenAccount extends string,
|
|
167
|
+
TAccountPosition extends string,
|
|
168
|
+
TAccountWhirlpool extends string,
|
|
169
|
+
TAccountTokenMintA extends string,
|
|
170
|
+
TAccountTokenMintB extends string,
|
|
171
|
+
TAccountTokenVaultA extends string,
|
|
172
|
+
TAccountTokenVaultB extends string,
|
|
173
|
+
TAccountTokenProgramA extends string,
|
|
174
|
+
TAccountTokenProgramB extends string,
|
|
175
|
+
TAccountMemoProgram extends string,
|
|
176
|
+
TAccountTickArrayLower extends string,
|
|
177
|
+
TAccountTickArrayUpper extends string,
|
|
178
|
+
TAccountWhirlpoolProgram extends string,
|
|
179
|
+
TAccountInstructionsSysvar extends string,
|
|
180
|
+
TAccountSystemProgram extends string,
|
|
181
|
+
TAccountAtaProgram extends string,
|
|
182
|
+
TProgramAddress extends Address = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
183
|
+
>(
|
|
184
|
+
input: HarvestSwapAndReinvestPreInput<
|
|
185
|
+
TAccountCrankOperator,
|
|
186
|
+
TAccountCrankOperatorTokenAccountA,
|
|
187
|
+
TAccountCrankOperatorTokenAccountB,
|
|
188
|
+
TAccountAutomation,
|
|
189
|
+
TAccountAutomationAuthority,
|
|
190
|
+
TAccountPositionTokenAccount,
|
|
191
|
+
TAccountPosition,
|
|
192
|
+
TAccountWhirlpool,
|
|
193
|
+
TAccountTokenMintA,
|
|
194
|
+
TAccountTokenMintB,
|
|
195
|
+
TAccountTokenVaultA,
|
|
196
|
+
TAccountTokenVaultB,
|
|
197
|
+
TAccountTokenProgramA,
|
|
198
|
+
TAccountTokenProgramB,
|
|
199
|
+
TAccountMemoProgram,
|
|
200
|
+
TAccountTickArrayLower,
|
|
201
|
+
TAccountTickArrayUpper,
|
|
202
|
+
TAccountWhirlpoolProgram,
|
|
203
|
+
TAccountInstructionsSysvar,
|
|
204
|
+
TAccountSystemProgram,
|
|
205
|
+
TAccountAtaProgram
|
|
206
|
+
>,
|
|
207
|
+
config?: {
|
|
61
208
|
programAddress?: TProgramAddress;
|
|
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
|
-
|
|
209
|
+
}
|
|
210
|
+
): HarvestSwapAndReinvestPreInstruction<
|
|
211
|
+
TProgramAddress,
|
|
212
|
+
TAccountCrankOperator,
|
|
213
|
+
TAccountCrankOperatorTokenAccountA,
|
|
214
|
+
TAccountCrankOperatorTokenAccountB,
|
|
215
|
+
TAccountAutomation,
|
|
216
|
+
TAccountAutomationAuthority,
|
|
217
|
+
TAccountPositionTokenAccount,
|
|
218
|
+
TAccountPosition,
|
|
219
|
+
TAccountWhirlpool,
|
|
220
|
+
TAccountTokenMintA,
|
|
221
|
+
TAccountTokenMintB,
|
|
222
|
+
TAccountTokenVaultA,
|
|
223
|
+
TAccountTokenVaultB,
|
|
224
|
+
TAccountTokenProgramA,
|
|
225
|
+
TAccountTokenProgramB,
|
|
226
|
+
TAccountMemoProgram,
|
|
227
|
+
TAccountTickArrayLower,
|
|
228
|
+
TAccountTickArrayUpper,
|
|
229
|
+
TAccountWhirlpoolProgram,
|
|
230
|
+
TAccountInstructionsSysvar,
|
|
231
|
+
TAccountSystemProgram,
|
|
232
|
+
TAccountAtaProgram
|
|
233
|
+
>;
|
|
234
|
+
export type ParsedHarvestSwapAndReinvestPreInstruction<
|
|
235
|
+
TProgram extends string = typeof WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
236
|
+
TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[],
|
|
237
|
+
> = {
|
|
238
|
+
programAddress: Address<TProgram>;
|
|
239
|
+
accounts: {
|
|
240
|
+
crankOperator: TAccountMetas[0];
|
|
241
|
+
crankOperatorTokenAccountA: TAccountMetas[1];
|
|
242
|
+
crankOperatorTokenAccountB: TAccountMetas[2];
|
|
243
|
+
automation: TAccountMetas[3];
|
|
244
|
+
automationAuthority: TAccountMetas[4];
|
|
245
|
+
positionTokenAccount: TAccountMetas[5];
|
|
246
|
+
position: TAccountMetas[6];
|
|
247
|
+
whirlpool: TAccountMetas[7];
|
|
248
|
+
tokenMintA: TAccountMetas[8];
|
|
249
|
+
tokenMintB: TAccountMetas[9];
|
|
250
|
+
tokenVaultA: TAccountMetas[10];
|
|
251
|
+
tokenVaultB: TAccountMetas[11];
|
|
252
|
+
tokenProgramA: TAccountMetas[12];
|
|
253
|
+
tokenProgramB: TAccountMetas[13];
|
|
254
|
+
memoProgram: TAccountMetas[14];
|
|
255
|
+
tickArrayLower: TAccountMetas[15];
|
|
256
|
+
tickArrayUpper: TAccountMetas[16];
|
|
257
|
+
whirlpoolProgram: TAccountMetas[17];
|
|
258
|
+
instructionsSysvar: TAccountMetas[18];
|
|
259
|
+
systemProgram: TAccountMetas[19];
|
|
260
|
+
ataProgram: TAccountMetas[20];
|
|
261
|
+
};
|
|
262
|
+
data: HarvestSwapAndReinvestPreInstructionData;
|
|
89
263
|
};
|
|
90
|
-
export declare function parseHarvestSwapAndReinvestPreInstruction<
|
|
264
|
+
export declare function parseHarvestSwapAndReinvestPreInstruction<
|
|
265
|
+
TProgram extends string,
|
|
266
|
+
TAccountMetas extends readonly AccountMeta[],
|
|
267
|
+
>(
|
|
268
|
+
instruction: Instruction<TProgram> &
|
|
269
|
+
InstructionWithAccounts<TAccountMetas> &
|
|
270
|
+
InstructionWithData<ReadonlyUint8Array>
|
|
271
|
+
): ParsedHarvestSwapAndReinvestPreInstruction<TProgram, TAccountMetas>;
|
|
@@ -1,44 +1,104 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
2
16
|
import { WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS } from '../programs';
|
|
3
17
|
import { Address, AddressArgs } from '../types';
|
|
4
18
|
|
|
5
19
|
export declare const INITIALIZE_GLOBAL_CONFIG_DISCRIMINATOR = 0;
|
|
6
20
|
export declare function getInitializeGlobalConfigDiscriminatorBytes(): ReadonlyUint8Array;
|
|
7
|
-
export type InitializeGlobalConfigInstruction<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
]
|
|
21
|
+
export type InitializeGlobalConfigInstruction<
|
|
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
|
+
>;
|
|
13
43
|
export type InitializeGlobalConfigInstructionData = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
44
|
+
discriminator: number;
|
|
45
|
+
globalConfigAuthority: Address;
|
|
46
|
+
crankRewardDefault: bigint;
|
|
17
47
|
};
|
|
18
48
|
export type InitializeGlobalConfigInstructionDataArgs = {
|
|
19
|
-
|
|
20
|
-
|
|
49
|
+
globalConfigAuthority: AddressArgs;
|
|
50
|
+
crankRewardDefault: number | bigint;
|
|
21
51
|
};
|
|
22
52
|
export declare function getInitializeGlobalConfigInstructionDataEncoder(): Encoder<InitializeGlobalConfigInstructionDataArgs>;
|
|
23
53
|
export declare function getInitializeGlobalConfigInstructionDataDecoder(): Decoder<InitializeGlobalConfigInstructionData>;
|
|
24
|
-
export declare function getInitializeGlobalConfigInstructionDataCodec(): Codec<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
54
|
+
export declare function getInitializeGlobalConfigInstructionDataCodec(): Codec<
|
|
55
|
+
InitializeGlobalConfigInstructionDataArgs,
|
|
56
|
+
InitializeGlobalConfigInstructionData
|
|
57
|
+
>;
|
|
58
|
+
export type InitializeGlobalConfigInput<
|
|
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
|
+
globalConfigAuthority: InitializeGlobalConfigInstructionDataArgs['globalConfigAuthority'];
|
|
67
|
+
crankRewardDefault: InitializeGlobalConfigInstructionDataArgs['crankRewardDefault'];
|
|
31
68
|
};
|
|
32
|
-
export declare function getInitializeGlobalConfigInstruction<
|
|
69
|
+
export declare function getInitializeGlobalConfigInstruction<
|
|
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: InitializeGlobalConfigInput<TAccountDeployer, TAccountGlobalConfig, TAccountSystemProgram>,
|
|
76
|
+
config?: {
|
|
33
77
|
programAddress?: TProgramAddress;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
78
|
+
}
|
|
79
|
+
): InitializeGlobalConfigInstruction<
|
|
80
|
+
TProgramAddress,
|
|
81
|
+
TAccountDeployer,
|
|
82
|
+
TAccountGlobalConfig,
|
|
83
|
+
TAccountSystemProgram
|
|
84
|
+
>;
|
|
85
|
+
export type ParsedInitializeGlobalConfigInstruction<
|
|
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: InitializeGlobalConfigInstructionData;
|
|
43
96
|
};
|
|
44
|
-
export declare function parseInitializeGlobalConfigInstruction<
|
|
97
|
+
export declare function parseInitializeGlobalConfigInstruction<
|
|
98
|
+
TProgram extends string,
|
|
99
|
+
TAccountMetas extends readonly AccountMeta[],
|
|
100
|
+
>(
|
|
101
|
+
instruction: Instruction<TProgram> &
|
|
102
|
+
InstructionWithAccounts<TAccountMetas> &
|
|
103
|
+
InstructionWithData<ReadonlyUint8Array>
|
|
104
|
+
): ParsedInitializeGlobalConfigInstruction<TProgram, TAccountMetas>;
|