@pythnetwork/pyth-solana-receiver 0.12.0 → 0.14.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.
Files changed (51) hide show
  1. package/README.md +0 -44
  2. package/dist/cjs/PythSolanaReceiver.cjs +442 -0
  3. package/{lib → dist/cjs}/PythSolanaReceiver.d.ts +10 -86
  4. package/dist/cjs/address.cjs +63 -0
  5. package/{lib → dist/cjs}/address.d.ts +0 -1
  6. package/dist/cjs/compute_budget.cjs +42 -0
  7. package/{lib → dist/cjs}/compute_budget.d.ts +0 -5
  8. package/dist/cjs/idl/pyth_push_oracle.cjs +132 -0
  9. package/{lib → dist/cjs}/idl/pyth_push_oracle.d.ts +0 -1
  10. package/dist/cjs/idl/pyth_solana_receiver.cjs +858 -0
  11. package/{lib → dist/cjs}/idl/pyth_solana_receiver.d.ts +0 -1
  12. package/dist/cjs/idl/wormhole_core_bridge_solana.cjs +1751 -0
  13. package/{lib → dist/cjs}/idl/wormhole_core_bridge_solana.d.ts +0 -1
  14. package/dist/cjs/index.cjs +44 -0
  15. package/dist/cjs/index.d.ts +5 -0
  16. package/dist/cjs/package.json +1 -0
  17. package/dist/cjs/vaa.cjs +192 -0
  18. package/{lib → dist/cjs}/vaa.d.ts +4 -30
  19. package/dist/esm/PythSolanaReceiver.d.ts +318 -0
  20. package/dist/esm/PythSolanaReceiver.mjs +462 -0
  21. package/dist/esm/address.d.ts +29 -0
  22. package/dist/esm/address.mjs +45 -0
  23. package/dist/esm/compute_budget.d.ts +28 -0
  24. package/dist/esm/compute_budget.mjs +21 -0
  25. package/dist/esm/idl/pyth_push_oracle.d.ts +117 -0
  26. package/{lib/idl/pyth_push_oracle.js → dist/esm/idl/pyth_push_oracle.mjs} +41 -38
  27. package/dist/esm/idl/pyth_solana_receiver.d.ts +840 -0
  28. package/{lib/idl/pyth_solana_receiver.js → dist/esm/idl/pyth_solana_receiver.mjs} +237 -231
  29. package/dist/esm/idl/wormhole_core_bridge_solana.d.ts +1606 -0
  30. package/{lib/idl/wormhole_core_bridge_solana.js → dist/esm/idl/wormhole_core_bridge_solana.mjs} +598 -465
  31. package/dist/esm/index.d.ts +5 -0
  32. package/dist/esm/index.mjs +5 -0
  33. package/dist/esm/package.json +1 -0
  34. package/dist/esm/vaa.d.ts +75 -0
  35. package/dist/esm/vaa.mjs +197 -0
  36. package/package.json +101 -13
  37. package/lib/PythSolanaReceiver.d.ts.map +0 -1
  38. package/lib/PythSolanaReceiver.js +0 -633
  39. package/lib/address.d.ts.map +0 -1
  40. package/lib/address.js +0 -46
  41. package/lib/compute_budget.d.ts.map +0 -1
  42. package/lib/compute_budget.js +0 -35
  43. package/lib/idl/pyth_push_oracle.d.ts.map +0 -1
  44. package/lib/idl/pyth_solana_receiver.d.ts.map +0 -1
  45. package/lib/idl/pyth_solana_receiver.json +0 -839
  46. package/lib/idl/wormhole_core_bridge_solana.d.ts.map +0 -1
  47. package/lib/index.d.ts +0 -6
  48. package/lib/index.d.ts.map +0 -1
  49. package/lib/index.js +0 -17
  50. package/lib/vaa.d.ts.map +0 -1
  51. package/lib/vaa.js +0 -270
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IDL = void 0;
4
- exports.IDL = {
1
+ export const IDL = {
5
2
  version: "0.2.1",
6
3
  name: "pyth_solana_receiver",
7
4
  instructions: [
@@ -11,27 +8,27 @@ exports.IDL = {
11
8
  {
12
9
  name: "payer",
13
10
  isMut: true,
14
- isSigner: true,
11
+ isSigner: true
15
12
  },
16
13
  {
17
14
  name: "config",
18
15
  isMut: true,
19
- isSigner: false,
16
+ isSigner: false
20
17
  },
21
18
  {
22
19
  name: "systemProgram",
23
20
  isMut: false,
24
- isSigner: false,
25
- },
21
+ isSigner: false
22
+ }
26
23
  ],
27
24
  args: [
28
25
  {
29
26
  name: "initialConfig",
30
27
  type: {
31
- defined: "Config",
32
- },
33
- },
34
- ],
28
+ defined: "Config"
29
+ }
30
+ }
31
+ ]
35
32
  },
36
33
  {
37
34
  name: "requestGovernanceAuthorityTransfer",
@@ -39,20 +36,20 @@ exports.IDL = {
39
36
  {
40
37
  name: "payer",
41
38
  isMut: false,
42
- isSigner: true,
39
+ isSigner: true
43
40
  },
44
41
  {
45
42
  name: "config",
46
43
  isMut: true,
47
- isSigner: false,
48
- },
44
+ isSigner: false
45
+ }
49
46
  ],
50
47
  args: [
51
48
  {
52
49
  name: "targetGovernanceAuthority",
53
- type: "publicKey",
54
- },
55
- ],
50
+ type: "publicKey"
51
+ }
52
+ ]
56
53
  },
57
54
  {
58
55
  name: "cancelGovernanceAuthorityTransfer",
@@ -60,15 +57,15 @@ exports.IDL = {
60
57
  {
61
58
  name: "payer",
62
59
  isMut: false,
63
- isSigner: true,
60
+ isSigner: true
64
61
  },
65
62
  {
66
63
  name: "config",
67
64
  isMut: true,
68
- isSigner: false,
69
- },
65
+ isSigner: false
66
+ }
70
67
  ],
71
- args: [],
68
+ args: []
72
69
  },
73
70
  {
74
71
  name: "acceptGovernanceAuthorityTransfer",
@@ -76,15 +73,15 @@ exports.IDL = {
76
73
  {
77
74
  name: "payer",
78
75
  isMut: false,
79
- isSigner: true,
76
+ isSigner: true
80
77
  },
81
78
  {
82
79
  name: "config",
83
80
  isMut: true,
84
- isSigner: false,
85
- },
81
+ isSigner: false
82
+ }
86
83
  ],
87
- args: [],
84
+ args: []
88
85
  },
89
86
  {
90
87
  name: "setDataSources",
@@ -92,24 +89,24 @@ exports.IDL = {
92
89
  {
93
90
  name: "payer",
94
91
  isMut: false,
95
- isSigner: true,
92
+ isSigner: true
96
93
  },
97
94
  {
98
95
  name: "config",
99
96
  isMut: true,
100
- isSigner: false,
101
- },
97
+ isSigner: false
98
+ }
102
99
  ],
103
100
  args: [
104
101
  {
105
102
  name: "validDataSources",
106
103
  type: {
107
104
  vec: {
108
- defined: "DataSource",
109
- },
110
- },
111
- },
112
- ],
105
+ defined: "DataSource"
106
+ }
107
+ }
108
+ }
109
+ ]
113
110
  },
114
111
  {
115
112
  name: "setFee",
@@ -117,20 +114,20 @@ exports.IDL = {
117
114
  {
118
115
  name: "payer",
119
116
  isMut: false,
120
- isSigner: true,
117
+ isSigner: true
121
118
  },
122
119
  {
123
120
  name: "config",
124
121
  isMut: true,
125
- isSigner: false,
126
- },
122
+ isSigner: false
123
+ }
127
124
  ],
128
125
  args: [
129
126
  {
130
127
  name: "singleUpdateFeeInLamports",
131
- type: "u64",
132
- },
133
- ],
128
+ type: "u64"
129
+ }
130
+ ]
134
131
  },
135
132
  {
136
133
  name: "setWormholeAddress",
@@ -138,20 +135,20 @@ exports.IDL = {
138
135
  {
139
136
  name: "payer",
140
137
  isMut: false,
141
- isSigner: true,
138
+ isSigner: true
142
139
  },
143
140
  {
144
141
  name: "config",
145
142
  isMut: true,
146
- isSigner: false,
147
- },
143
+ isSigner: false
144
+ }
148
145
  ],
149
146
  args: [
150
147
  {
151
148
  name: "wormhole",
152
- type: "publicKey",
153
- },
154
- ],
149
+ type: "publicKey"
150
+ }
151
+ ]
155
152
  },
156
153
  {
157
154
  name: "setMinimumSignatures",
@@ -159,20 +156,20 @@ exports.IDL = {
159
156
  {
160
157
  name: "payer",
161
158
  isMut: false,
162
- isSigner: true,
159
+ isSigner: true
163
160
  },
164
161
  {
165
162
  name: "config",
166
163
  isMut: true,
167
- isSigner: false,
168
- },
164
+ isSigner: false
165
+ }
169
166
  ],
170
167
  args: [
171
168
  {
172
169
  name: "minimumSignatures",
173
- type: "u8",
174
- },
175
- ],
170
+ type: "u8"
171
+ }
172
+ ]
176
173
  },
177
174
  {
178
175
  name: "postUpdateAtomic",
@@ -186,31 +183,31 @@ exports.IDL = {
186
183
  "",
187
184
  "# Warning",
188
185
  "",
189
- "Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update.",
186
+ "Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."
190
187
  ],
191
188
  accounts: [
192
189
  {
193
190
  name: "payer",
194
191
  isMut: true,
195
- isSigner: true,
192
+ isSigner: true
196
193
  },
197
194
  {
198
195
  name: "guardianSet",
199
196
  isMut: false,
200
197
  isSigner: false,
201
198
  docs: [
202
- "Instead we do the same steps in deserialize_guardian_set_checked.",
203
- ],
199
+ "Instead we do the same steps in deserialize_guardian_set_checked."
200
+ ]
204
201
  },
205
202
  {
206
203
  name: "config",
207
204
  isMut: false,
208
- isSigner: false,
205
+ isSigner: false
209
206
  },
210
207
  {
211
208
  name: "treasury",
212
209
  isMut: true,
213
- isSigner: false,
210
+ isSigner: false
214
211
  },
215
212
  {
216
213
  name: "priceUpdateAccount",
@@ -218,56 +215,56 @@ exports.IDL = {
218
215
  isSigner: true,
219
216
  docs: [
220
217
  "The constraint is such that either the price_update_account is uninitialized or the write_authority is the write_authority.",
221
- "Pubkey::default() is the SystemProgram on Solana and it can't sign so it's impossible that price_update_account.write_authority == Pubkey::default() once the account is initialized",
222
- ],
218
+ "Pubkey::default() is the SystemProgram on Solana and it can't sign so it's impossible that price_update_account.write_authority == Pubkey::default() once the account is initialized"
219
+ ]
223
220
  },
224
221
  {
225
222
  name: "systemProgram",
226
223
  isMut: false,
227
- isSigner: false,
224
+ isSigner: false
228
225
  },
229
226
  {
230
227
  name: "writeAuthority",
231
228
  isMut: false,
232
- isSigner: true,
233
- },
229
+ isSigner: true
230
+ }
234
231
  ],
235
232
  args: [
236
233
  {
237
234
  name: "params",
238
235
  type: {
239
- defined: "PostUpdateAtomicParams",
240
- },
241
- },
242
- ],
236
+ defined: "PostUpdateAtomicParams"
237
+ }
238
+ }
239
+ ]
243
240
  },
244
241
  {
245
242
  name: "postUpdate",
246
243
  docs: [
247
244
  "Post a price update using an encoded_vaa account and a MerklePriceUpdate calldata.",
248
245
  "This should be called after the client has already verified the Vaa via the Wormhole contract.",
249
- "Check out target_chains/solana/cli/src/main.rs for an example of how to do this.",
246
+ "Check out target_chains/solana/cli/src/main.rs for an example of how to do this."
250
247
  ],
251
248
  accounts: [
252
249
  {
253
250
  name: "payer",
254
251
  isMut: true,
255
- isSigner: true,
252
+ isSigner: true
256
253
  },
257
254
  {
258
255
  name: "encodedVaa",
259
256
  isMut: false,
260
- isSigner: false,
257
+ isSigner: false
261
258
  },
262
259
  {
263
260
  name: "config",
264
261
  isMut: false,
265
- isSigner: false,
262
+ isSigner: false
266
263
  },
267
264
  {
268
265
  name: "treasury",
269
266
  isMut: true,
270
- isSigner: false,
267
+ isSigner: false
271
268
  },
272
269
  {
273
270
  name: "priceUpdateAccount",
@@ -275,61 +272,61 @@ exports.IDL = {
275
272
  isSigner: true,
276
273
  docs: [
277
274
  "The constraint is such that either the price_update_account is uninitialized or the write_authority is the write_authority.",
278
- "Pubkey::default() is the SystemProgram on Solana and it can't sign so it's impossible that price_update_account.write_authority == Pubkey::default() once the account is initialized",
279
- ],
275
+ "Pubkey::default() is the SystemProgram on Solana and it can't sign so it's impossible that price_update_account.write_authority == Pubkey::default() once the account is initialized"
276
+ ]
280
277
  },
281
278
  {
282
279
  name: "systemProgram",
283
280
  isMut: false,
284
- isSigner: false,
281
+ isSigner: false
285
282
  },
286
283
  {
287
284
  name: "writeAuthority",
288
285
  isMut: false,
289
- isSigner: true,
290
- },
286
+ isSigner: true
287
+ }
291
288
  ],
292
289
  args: [
293
290
  {
294
291
  name: "params",
295
292
  type: {
296
- defined: "PostUpdateParams",
297
- },
298
- },
299
- ],
293
+ defined: "PostUpdateParams"
294
+ }
295
+ }
296
+ ]
300
297
  },
301
298
  {
302
299
  name: "postTwapUpdate",
303
300
  docs: [
304
301
  "Post a TWAP (time weighted average price) update for a given time window.",
305
302
  "This should be called after the client has already verified the VAAs via the Wormhole contract.",
306
- "Check out target_chains/solana/cli/src/main.rs for an example of how to do this.",
303
+ "Check out target_chains/solana/cli/src/main.rs for an example of how to do this."
307
304
  ],
308
305
  accounts: [
309
306
  {
310
307
  name: "payer",
311
308
  isMut: true,
312
- isSigner: true,
309
+ isSigner: true
313
310
  },
314
311
  {
315
312
  name: "startEncodedVaa",
316
313
  isMut: false,
317
- isSigner: false,
314
+ isSigner: false
318
315
  },
319
316
  {
320
317
  name: "endEncodedVaa",
321
318
  isMut: false,
322
- isSigner: false,
319
+ isSigner: false
323
320
  },
324
321
  {
325
322
  name: "config",
326
323
  isMut: false,
327
- isSigner: false,
324
+ isSigner: false
328
325
  },
329
326
  {
330
327
  name: "treasury",
331
328
  isMut: true,
332
- isSigner: false,
329
+ isSigner: false
333
330
  },
334
331
  {
335
332
  name: "twapUpdateAccount",
@@ -337,28 +334,28 @@ exports.IDL = {
337
334
  isSigner: true,
338
335
  docs: [
339
336
  "The constraint is such that either the price_update_account is uninitialized or the write_authority is the write_authority.",
340
- "Pubkey::default() is the SystemProgram on Solana and it can't sign so it's impossible that price_update_account.write_authority == Pubkey::default() once the account is initialized",
341
- ],
337
+ "Pubkey::default() is the SystemProgram on Solana and it can't sign so it's impossible that price_update_account.write_authority == Pubkey::default() once the account is initialized"
338
+ ]
342
339
  },
343
340
  {
344
341
  name: "systemProgram",
345
342
  isMut: false,
346
- isSigner: false,
343
+ isSigner: false
347
344
  },
348
345
  {
349
346
  name: "writeAuthority",
350
347
  isMut: false,
351
- isSigner: true,
352
- },
348
+ isSigner: true
349
+ }
353
350
  ],
354
351
  args: [
355
352
  {
356
353
  name: "params",
357
354
  type: {
358
- defined: "PostTwapUpdateParams",
359
- },
360
- },
361
- ],
355
+ defined: "PostTwapUpdateParams"
356
+ }
357
+ }
358
+ ]
362
359
  },
363
360
  {
364
361
  name: "reclaimRent",
@@ -366,15 +363,15 @@ exports.IDL = {
366
363
  {
367
364
  name: "payer",
368
365
  isMut: true,
369
- isSigner: true,
366
+ isSigner: true
370
367
  },
371
368
  {
372
369
  name: "priceUpdateAccount",
373
370
  isMut: true,
374
- isSigner: false,
375
- },
371
+ isSigner: false
372
+ }
376
373
  ],
377
- args: [],
374
+ args: []
378
375
  },
379
376
  {
380
377
  name: "reclaimTwapRent",
@@ -382,16 +379,16 @@ exports.IDL = {
382
379
  {
383
380
  name: "payer",
384
381
  isMut: true,
385
- isSigner: true,
382
+ isSigner: true
386
383
  },
387
384
  {
388
385
  name: "twapUpdateAccount",
389
386
  isMut: true,
390
- isSigner: false,
391
- },
387
+ isSigner: false
388
+ }
392
389
  ],
393
- args: [],
394
- },
390
+ args: []
391
+ }
395
392
  ],
396
393
  accounts: [
397
394
  {
@@ -401,36 +398,36 @@ exports.IDL = {
401
398
  fields: [
402
399
  {
403
400
  name: "governanceAuthority",
404
- type: "publicKey",
401
+ type: "publicKey"
405
402
  },
406
403
  {
407
404
  name: "targetGovernanceAuthority",
408
405
  type: {
409
- option: "publicKey",
410
- },
406
+ option: "publicKey"
407
+ }
411
408
  },
412
409
  {
413
410
  name: "wormhole",
414
- type: "publicKey",
411
+ type: "publicKey"
415
412
  },
416
413
  {
417
414
  name: "validDataSources",
418
415
  type: {
419
416
  vec: {
420
- defined: "DataSource",
421
- },
422
- },
417
+ defined: "DataSource"
418
+ }
419
+ }
423
420
  },
424
421
  {
425
422
  name: "singleUpdateFeeInLamports",
426
- type: "u64",
423
+ type: "u64"
427
424
  },
428
425
  {
429
426
  name: "minimumSignatures",
430
- type: "u8",
431
- },
432
- ],
433
- },
427
+ type: "u8"
428
+ }
429
+ ]
430
+ }
434
431
  },
435
432
  {
436
433
  name: "priceUpdateV2",
@@ -439,26 +436,26 @@ exports.IDL = {
439
436
  fields: [
440
437
  {
441
438
  name: "writeAuthority",
442
- type: "publicKey",
439
+ type: "publicKey"
443
440
  },
444
441
  {
445
442
  name: "verificationLevel",
446
443
  type: {
447
- defined: "VerificationLevel",
448
- },
444
+ defined: "VerificationLevel"
445
+ }
449
446
  },
450
447
  {
451
448
  name: "priceMessage",
452
449
  type: {
453
- defined: "PriceFeedMessage",
454
- },
450
+ defined: "PriceFeedMessage"
451
+ }
455
452
  },
456
453
  {
457
454
  name: "postedSlot",
458
- type: "u64",
459
- },
460
- ],
461
- },
455
+ type: "u64"
456
+ }
457
+ ]
458
+ }
462
459
  },
463
460
  {
464
461
  name: "twapUpdate",
@@ -467,17 +464,17 @@ exports.IDL = {
467
464
  fields: [
468
465
  {
469
466
  name: "writeAuthority",
470
- type: "publicKey",
467
+ type: "publicKey"
471
468
  },
472
469
  {
473
470
  name: "twap",
474
471
  type: {
475
- defined: "TwapPrice",
476
- },
477
- },
478
- ],
479
- },
480
- },
472
+ defined: "TwapPrice"
473
+ }
474
+ }
475
+ ]
476
+ }
477
+ }
481
478
  ],
482
479
  types: [
483
480
  {
@@ -488,45 +485,48 @@ exports.IDL = {
488
485
  {
489
486
  name: "feedId",
490
487
  type: {
491
- array: ["u8", 32],
492
- },
488
+ array: [
489
+ "u8",
490
+ 32
491
+ ]
492
+ }
493
493
  },
494
494
  {
495
495
  name: "price",
496
- type: "i64",
496
+ type: "i64"
497
497
  },
498
498
  {
499
499
  name: "conf",
500
- type: "u64",
500
+ type: "u64"
501
501
  },
502
502
  {
503
503
  name: "exponent",
504
- type: "i32",
504
+ type: "i32"
505
505
  },
506
506
  {
507
507
  name: "publishTime",
508
- type: "i64",
508
+ type: "i64"
509
509
  },
510
510
  {
511
511
  name: "prevPublishTime",
512
- type: "i64",
512
+ type: "i64"
513
513
  },
514
514
  {
515
515
  name: "emaPrice",
516
- type: "i64",
516
+ type: "i64"
517
517
  },
518
518
  {
519
519
  name: "emaConf",
520
- type: "u64",
521
- },
522
- ],
523
- },
520
+ type: "u64"
521
+ }
522
+ ]
523
+ }
524
524
  },
525
525
  {
526
526
  name: "TwapPrice",
527
527
  docs: [
528
528
  "The time weighted average price & conf for a feed over the window [start_time, end_time].",
529
- "This type is used to persist the calculated TWAP in TwapUpdate accounts on Solana.",
529
+ "This type is used to persist the calculated TWAP in TwapUpdate accounts on Solana."
530
530
  ],
531
531
  type: {
532
532
  kind: "struct",
@@ -534,39 +534,42 @@ exports.IDL = {
534
534
  {
535
535
  name: "feedId",
536
536
  type: {
537
- array: ["u8", 32],
538
- },
537
+ array: [
538
+ "u8",
539
+ 32
540
+ ]
541
+ }
539
542
  },
540
543
  {
541
544
  name: "startTime",
542
- type: "i64",
545
+ type: "i64"
543
546
  },
544
547
  {
545
548
  name: "endTime",
546
- type: "i64",
549
+ type: "i64"
547
550
  },
548
551
  {
549
552
  name: "price",
550
- type: "i64",
553
+ type: "i64"
551
554
  },
552
555
  {
553
556
  name: "conf",
554
- type: "u64",
557
+ type: "u64"
555
558
  },
556
559
  {
557
560
  name: "exponent",
558
- type: "i32",
561
+ type: "i32"
559
562
  },
560
563
  {
561
564
  name: "downSlotsRatio",
562
565
  docs: [
563
566
  "Ratio out of 1_000_000, where a value of 1_000_000 represents",
564
- "all slots were missed and 0 represents no slots were missed.",
567
+ "all slots were missed and 0 represents no slots were missed."
565
568
  ],
566
- type: "u32",
567
- },
568
- ],
569
- },
569
+ type: "u32"
570
+ }
571
+ ]
572
+ }
570
573
  },
571
574
  {
572
575
  name: "MerklePriceUpdate",
@@ -575,18 +578,21 @@ exports.IDL = {
575
578
  fields: [
576
579
  {
577
580
  name: "message",
578
- type: "bytes",
581
+ type: "bytes"
579
582
  },
580
583
  {
581
584
  name: "proof",
582
585
  type: {
583
586
  vec: {
584
- array: ["u8", 20],
585
- },
586
- },
587
- },
588
- ],
589
- },
587
+ array: [
588
+ "u8",
589
+ 20
590
+ ]
591
+ }
592
+ }
593
+ }
594
+ ]
595
+ }
590
596
  },
591
597
  {
592
598
  name: "DataSource",
@@ -595,14 +601,14 @@ exports.IDL = {
595
601
  fields: [
596
602
  {
597
603
  name: "chain",
598
- type: "u16",
604
+ type: "u16"
599
605
  },
600
606
  {
601
607
  name: "emitter",
602
- type: "publicKey",
603
- },
604
- ],
605
- },
608
+ type: "publicKey"
609
+ }
610
+ ]
611
+ }
606
612
  },
607
613
  {
608
614
  name: "PostUpdateAtomicParams",
@@ -611,20 +617,20 @@ exports.IDL = {
611
617
  fields: [
612
618
  {
613
619
  name: "vaa",
614
- type: "bytes",
620
+ type: "bytes"
615
621
  },
616
622
  {
617
623
  name: "merklePriceUpdate",
618
624
  type: {
619
- defined: "MerklePriceUpdate",
620
- },
625
+ defined: "MerklePriceUpdate"
626
+ }
621
627
  },
622
628
  {
623
629
  name: "treasuryId",
624
- type: "u8",
625
- },
626
- ],
627
- },
630
+ type: "u8"
631
+ }
632
+ ]
633
+ }
628
634
  },
629
635
  {
630
636
  name: "PostUpdateParams",
@@ -634,15 +640,15 @@ exports.IDL = {
634
640
  {
635
641
  name: "merklePriceUpdate",
636
642
  type: {
637
- defined: "MerklePriceUpdate",
638
- },
643
+ defined: "MerklePriceUpdate"
644
+ }
639
645
  },
640
646
  {
641
647
  name: "treasuryId",
642
- type: "u8",
643
- },
644
- ],
645
- },
648
+ type: "u8"
649
+ }
650
+ ]
651
+ }
646
652
  },
647
653
  {
648
654
  name: "PostTwapUpdateParams",
@@ -652,26 +658,26 @@ exports.IDL = {
652
658
  {
653
659
  name: "startMerklePriceUpdate",
654
660
  type: {
655
- defined: "MerklePriceUpdate",
656
- },
661
+ defined: "MerklePriceUpdate"
662
+ }
657
663
  },
658
664
  {
659
665
  name: "endMerklePriceUpdate",
660
666
  type: {
661
- defined: "MerklePriceUpdate",
662
- },
667
+ defined: "MerklePriceUpdate"
668
+ }
663
669
  },
664
670
  {
665
671
  name: "treasuryId",
666
- type: "u8",
667
- },
668
- ],
669
- },
672
+ type: "u8"
673
+ }
674
+ ]
675
+ }
670
676
  },
671
677
  {
672
678
  name: "VerificationLevel",
673
679
  docs: [
674
- "* This enum represents how many guardian signatures were checked for a Pythnet price update\n * If full, guardian quorum has been attained\n * If partial, at least config.minimum signatures have been verified, but in the case config.minimum_signatures changes in the future we also include the number of signatures that were checked",
680
+ "* This enum represents how many guardian signatures were checked for a Pythnet price update\n * If full, guardian quorum has been attained\n * If partial, at least config.minimum signatures have been verified, but in the case config.minimum_signatures changes in the future we also include the number of signatures that were checked"
675
681
  ],
676
682
  type: {
677
683
  kind: "enum",
@@ -681,162 +687,162 @@ exports.IDL = {
681
687
  fields: [
682
688
  {
683
689
  name: "numSignatures",
684
- type: "u8",
685
- },
686
- ],
690
+ type: "u8"
691
+ }
692
+ ]
687
693
  },
688
694
  {
689
- name: "Full",
690
- },
691
- ],
692
- },
693
- },
695
+ name: "Full"
696
+ }
697
+ ]
698
+ }
699
+ }
694
700
  ],
695
701
  errors: [
696
702
  {
697
703
  code: 6000,
698
704
  name: "InvalidWormholeMessage",
699
- msg: "Received an invalid wormhole message",
705
+ msg: "Received an invalid wormhole message"
700
706
  },
701
707
  {
702
708
  code: 6001,
703
709
  name: "DeserializeMessageFailed",
704
- msg: "An error occurred when deserializing the message",
710
+ msg: "An error occurred when deserializing the message"
705
711
  },
706
712
  {
707
713
  code: 6002,
708
714
  name: "InvalidPriceUpdate",
709
- msg: "Received an invalid price update",
715
+ msg: "Received an invalid price update"
710
716
  },
711
717
  {
712
718
  code: 6003,
713
719
  name: "UnsupportedMessageType",
714
- msg: "This type of message is not supported currently",
720
+ msg: "This type of message is not supported currently"
715
721
  },
716
722
  {
717
723
  code: 6004,
718
724
  name: "InvalidDataSource",
719
- msg: "The tuple emitter chain, emitter doesn't match one of the valid data sources.",
725
+ msg: "The tuple emitter chain, emitter doesn't match one of the valid data sources."
720
726
  },
721
727
  {
722
728
  code: 6005,
723
729
  name: "InsufficientFunds",
724
- msg: "Funds are insufficient to pay the receiving fee",
730
+ msg: "Funds are insufficient to pay the receiving fee"
725
731
  },
726
732
  {
727
733
  code: 6006,
728
734
  name: "FeedIdMismatch",
729
- msg: "Cannot calculate TWAP, end slot must be greater than start slot",
735
+ msg: "Cannot calculate TWAP, end slot must be greater than start slot"
730
736
  },
731
737
  {
732
738
  code: 6007,
733
739
  name: "ExponentMismatch",
734
- msg: "The start and end messages must have the same feed ID",
740
+ msg: "The start and end messages must have the same feed ID"
735
741
  },
736
742
  {
737
743
  code: 6008,
738
744
  name: "InvalidTwapSlots",
739
- msg: "The start and end messages must have the same exponent",
745
+ msg: "The start and end messages must have the same exponent"
740
746
  },
741
747
  {
742
748
  code: 6009,
743
749
  name: "InvalidTwapStartMessage",
744
- msg: "Start message is not the first update for its timestamp",
750
+ msg: "Start message is not the first update for its timestamp"
745
751
  },
746
752
  {
747
753
  code: 6010,
748
754
  name: "InvalidTwapEndMessage",
749
- msg: "End message is not the first update for its timestamp",
755
+ msg: "End message is not the first update for its timestamp"
750
756
  },
751
757
  {
752
758
  code: 6011,
753
759
  name: "TwapCalculationOverflow",
754
- msg: "Overflow in TWAP calculation",
760
+ msg: "Overflow in TWAP calculation"
755
761
  },
756
762
  {
757
763
  code: 6012,
758
764
  name: "WrongWriteAuthority",
759
- msg: "This signer can't write to price update account",
765
+ msg: "This signer can't write to price update account"
760
766
  },
761
767
  {
762
768
  code: 6013,
763
769
  name: "WrongVaaOwner",
764
- msg: "The posted VAA account has the wrong owner.",
770
+ msg: "The posted VAA account has the wrong owner."
765
771
  },
766
772
  {
767
773
  code: 6014,
768
774
  name: "DeserializeVaaFailed",
769
- msg: "An error occurred when deserializing the VAA.",
775
+ msg: "An error occurred when deserializing the VAA."
770
776
  },
771
777
  {
772
778
  code: 6015,
773
779
  name: "InsufficientGuardianSignatures",
774
- msg: "The number of guardian signatures is below the minimum",
780
+ msg: "The number of guardian signatures is below the minimum"
775
781
  },
776
782
  {
777
783
  code: 6016,
778
784
  name: "InvalidVaaVersion",
779
- msg: "Invalid VAA version",
785
+ msg: "Invalid VAA version"
780
786
  },
781
787
  {
782
788
  code: 6017,
783
789
  name: "GuardianSetMismatch",
784
- msg: "Guardian set version in the VAA doesn't match the guardian set passed",
790
+ msg: "Guardian set version in the VAA doesn't match the guardian set passed"
785
791
  },
786
792
  {
787
793
  code: 6018,
788
794
  name: "InvalidGuardianOrder",
789
- msg: "Guardian signature indices must be increasing",
795
+ msg: "Guardian signature indices must be increasing"
790
796
  },
791
797
  {
792
798
  code: 6019,
793
799
  name: "InvalidGuardianIndex",
794
- msg: "Guardian index exceeds the number of guardians in the set",
800
+ msg: "Guardian index exceeds the number of guardians in the set"
795
801
  },
796
802
  {
797
803
  code: 6020,
798
804
  name: "InvalidSignature",
799
- msg: "A VAA signature is invalid",
805
+ msg: "A VAA signature is invalid"
800
806
  },
801
807
  {
802
808
  code: 6021,
803
809
  name: "InvalidGuardianKeyRecovery",
804
- msg: "The recovered guardian public key doesn't match the guardian set",
810
+ msg: "The recovered guardian public key doesn't match the guardian set"
805
811
  },
806
812
  {
807
813
  code: 6022,
808
814
  name: "WrongGuardianSetOwner",
809
- msg: "The guardian set account is owned by the wrong program",
815
+ msg: "The guardian set account is owned by the wrong program"
810
816
  },
811
817
  {
812
818
  code: 6023,
813
819
  name: "InvalidGuardianSetPda",
814
- msg: "The Guardian Set account doesn't match the PDA derivation",
820
+ msg: "The Guardian Set account doesn't match the PDA derivation"
815
821
  },
816
822
  {
817
823
  code: 6024,
818
824
  name: "GuardianSetExpired",
819
- msg: "The Guardian Set is expired",
825
+ msg: "The Guardian Set is expired"
820
826
  },
821
827
  {
822
828
  code: 6025,
823
829
  name: "GovernanceAuthorityMismatch",
824
- msg: "The signer is not authorized to perform this governance action",
830
+ msg: "The signer is not authorized to perform this governance action"
825
831
  },
826
832
  {
827
833
  code: 6026,
828
834
  name: "TargetGovernanceAuthorityMismatch",
829
- msg: "The signer is not authorized to accept the governance authority",
835
+ msg: "The signer is not authorized to accept the governance authority"
830
836
  },
831
837
  {
832
838
  code: 6027,
833
839
  name: "NonexistentGovernanceAuthorityTransferRequest",
834
- msg: "The governance authority needs to request a transfer first",
840
+ msg: "The governance authority needs to request a transfer first"
835
841
  },
836
842
  {
837
843
  code: 6028,
838
844
  name: "ZeroMinimumSignatures",
839
- msg: "The minimum number of signatures should be at least 1",
840
- },
841
- ],
845
+ msg: "The minimum number of signatures should be at least 1"
846
+ }
847
+ ]
842
848
  };