@@ -107,11 +107,6 @@ export type GetConfigParams =
107
107
} & CoreConfigParams )
108
108
| ( { programType : ProgramType . PYTH_LAZER } & LazerConfigParams ) ;
109
109
110
- /**
111
- * Function to get configuration data
112
- */
113
- export type GetConfigFn = ( params : GetConfigParams ) => ProgramConfig ;
114
-
115
110
/**
116
111
* Lazer feed configuration
117
112
* TODO: Change to actual Lazer feed type
@@ -145,9 +140,7 @@ export type DownloadableProduct = {
145
140
/**
146
141
* Type for downloadable configuration
147
142
*/
148
- export type DownloadableConfig = {
149
- [ symbol : string ] : DownloadableProduct ;
150
- } ;
143
+ export type DownloadableConfig = Record < string , DownloadableProduct > ;
151
144
152
145
/**
153
146
* Type for configuration that can be either RawConfig for Pyth Core or LazerConfig for Lazer
@@ -191,23 +184,6 @@ export type InstructionAccountsTypeMap = {
191
184
[ ProgramType . PYTH_LAZER ] : LazerInstructionAccounts ;
192
185
} ;
193
186
194
- /**
195
- * Function to get the program address for the given cluster and program type
196
- */
197
- export type GetProgramAddressFn = ( cluster : PythCluster ) => PublicKey ;
198
-
199
- /**
200
- * Function to check if a program is available on a specific cluster
201
- */
202
- export type IsAvailableOnClusterFn = ( cluster : PythCluster ) => boolean ;
203
-
204
- /**
205
- * Function to format the configuration for downloading as a JSON file
206
- */
207
- export type GetDownloadableConfigFn = (
208
- config : ProgramConfig ,
209
- ) => DownloadableConfig ;
210
-
211
187
/**
212
188
* Result of validating an uploaded configuration
213
189
*/
@@ -216,39 +192,3 @@ export interface ValidationResult {
216
192
error ?: string ;
217
193
changes ?: any ;
218
194
}
219
-
220
- /**
221
- * Function to validate an uploaded configuration against the current configuration
222
- */
223
- export type ValidateUploadedConfigFn = (
224
- existingConfig : DownloadableConfig ,
225
- uploadedConfig : unknown ,
226
- cluster : PythCluster ,
227
- ) => ValidationResult ;
228
-
229
- /**
230
- * Generic type for generate instructions functions for a specific program type
231
- */
232
- export type GenerateInstructionsFn < T extends ProgramType = ProgramType > = (
233
- changes : Record <
234
- string ,
235
- {
236
- prev ?: Partial < DownloadableProduct > ;
237
- new ?: Partial < DownloadableProduct > ;
238
- }
239
- > ,
240
- cluster : PythCluster ,
241
- accounts : InstructionAccountsTypeMap [ T ] ,
242
- ) => Promise < TransactionInstruction [ ] > ;
243
-
244
- /**
245
- * Collection of functions for each program type
246
- */
247
- export interface ProgramFunctions < T extends ProgramType = ProgramType > {
248
- getProgramAddress : GetProgramAddressFn ;
249
- isAvailableOnCluster : IsAvailableOnClusterFn ;
250
- getConfig : GetConfigFn ;
251
- getDownloadableConfig : GetDownloadableConfigFn ;
252
- validateUploadedConfig : ValidateUploadedConfigFn ;
253
- generateInstructions : GenerateInstructionsFn < T > ;
254
- }
0 commit comments