@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,37 +1,34 @@
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.0.1-alpha.5",
6
3
  name: "wormhole_core_bridge_solana",
7
4
  constants: [
8
5
  {
9
6
  name: "SOLANA_CHAIN",
10
7
  type: "u16",
11
- value: "1",
8
+ value: "1"
12
9
  },
13
10
  {
14
11
  name: "FEE_COLLECTOR_SEED_PREFIX",
15
12
  type: "bytes",
16
- value: "[102, 101, 101, 95, 99, 111, 108, 108, 101, 99, 116, 111, 114]",
13
+ value: "[102, 101, 101, 95, 99, 111, 108, 108, 101, 99, 116, 111, 114]"
17
14
  },
18
15
  {
19
16
  name: "UPGRADE_SEED_PREFIX",
20
17
  type: "bytes",
21
- value: "[117, 112, 103, 114, 97, 100, 101]",
18
+ value: "[117, 112, 103, 114, 97, 100, 101]"
22
19
  },
23
20
  {
24
21
  name: "PROGRAM_EMITTER_SEED_PREFIX",
25
22
  type: "bytes",
26
- value: "[101, 109, 105, 116, 116, 101, 114]",
23
+ value: "[101, 109, 105, 116, 116, 101, 114]"
27
24
  },
28
25
  {
29
26
  name: "MAX_MESSAGE_PAYLOAD_SIZE",
30
27
  type: {
31
- defined: "usize",
28
+ defined: "usize"
32
29
  },
33
- value: "30 * 1_024",
34
- },
30
+ value: "30 * 1_024"
31
+ }
35
32
  ],
36
33
  instructions: [
37
34
  {
@@ -52,7 +49,7 @@ exports.IDL = {
52
49
  "",
53
50
  "NOTE: If you wish to publish a small message (one where the data does not overflow the",
54
51
  "Solana transaction size), it is recommended that you use an [sdk](crate::sdk::cpi) method to",
55
- "either prepare your message or post a message as a program ID emitter.",
52
+ "either prepare your message or post a message as a program ID emitter."
56
53
  ],
57
54
  accounts: [
58
55
  {
@@ -60,53 +57,57 @@ exports.IDL = {
60
57
  isMut: false,
61
58
  isSigner: true,
62
59
  docs: [
63
- "This authority is the only one who can write to the draft message account.",
64
- ],
60
+ "This authority is the only one who can write to the draft message account."
61
+ ]
65
62
  },
66
63
  {
67
64
  name: "draftMessage",
68
65
  isMut: true,
69
66
  isSigner: false,
70
- docs: ["Bridge."],
71
- },
67
+ docs: [
68
+ "Bridge."
69
+ ]
70
+ }
72
71
  ],
73
72
  args: [
74
73
  {
75
74
  name: "args",
76
75
  type: {
77
- defined: "InitMessageV1Args",
78
- },
79
- },
80
- ],
76
+ defined: "InitMessageV1Args"
77
+ }
78
+ }
79
+ ]
81
80
  },
82
81
  {
83
82
  name: "writeMessageV1",
84
83
  docs: [
85
84
  "Processor used to write to a draft [PostedMessageV1](crate::state::PostedMessageV1) account.",
86
85
  "This instruction requires an authority (the emitter authority) to interact with the message",
87
- "account.",
86
+ "account."
88
87
  ],
89
88
  accounts: [
90
89
  {
91
90
  name: "emitterAuthority",
92
91
  isMut: false,
93
- isSigner: true,
92
+ isSigner: true
94
93
  },
95
94
  {
96
95
  name: "draftMessage",
97
96
  isMut: true,
98
97
  isSigner: false,
99
- docs: ["only be published when the message is finalized."],
100
- },
98
+ docs: [
99
+ "only be published when the message is finalized."
100
+ ]
101
+ }
101
102
  ],
102
103
  args: [
103
104
  {
104
105
  name: "args",
105
106
  type: {
106
- defined: "WriteMessageV1Args",
107
- },
108
- },
109
- ],
107
+ defined: "WriteMessageV1Args"
108
+ }
109
+ }
110
+ ]
110
111
  },
111
112
  {
112
113
  name: "finalizeMessageV1",
@@ -115,55 +116,59 @@ exports.IDL = {
115
116
  "Once finalized, this message account cannot be written to again. A finalized message is the",
116
117
  "only state the legacy post message instruction can accept before publishing. This",
117
118
  "instruction requires an authority (the emitter authority) to interact with the message",
118
- "account.",
119
+ "account."
119
120
  ],
120
121
  accounts: [
121
122
  {
122
123
  name: "emitterAuthority",
123
124
  isMut: false,
124
- isSigner: true,
125
+ isSigner: true
125
126
  },
126
127
  {
127
128
  name: "draftMessage",
128
129
  isMut: true,
129
130
  isSigner: false,
130
- docs: ["only be published when the message is finalized."],
131
- },
131
+ docs: [
132
+ "only be published when the message is finalized."
133
+ ]
134
+ }
132
135
  ],
133
- args: [],
136
+ args: []
134
137
  },
135
138
  {
136
139
  name: "closeMessageV1",
137
140
  docs: [
138
141
  "Processor used to process a draft [PostedMessageV1](crate::state::PostedMessageV1) account.",
139
142
  "This instruction requires an authority (the emitter authority) to interact with the message",
140
- "account.",
143
+ "account."
141
144
  ],
142
145
  accounts: [
143
146
  {
144
147
  name: "emitterAuthority",
145
148
  isMut: false,
146
- isSigner: true,
149
+ isSigner: true
147
150
  },
148
151
  {
149
152
  name: "draftMessage",
150
153
  isMut: true,
151
154
  isSigner: false,
152
- docs: ["only be published when the message is finalized."],
155
+ docs: [
156
+ "only be published when the message is finalized."
157
+ ]
153
158
  },
154
159
  {
155
160
  name: "closeAccountDestination",
156
161
  isMut: true,
157
- isSigner: false,
158
- },
162
+ isSigner: false
163
+ }
159
164
  ],
160
- args: [],
165
+ args: []
161
166
  },
162
167
  {
163
168
  name: "initEncodedVaa",
164
169
  docs: [
165
170
  "Processor used to intialize a created account as [EncodedVaa](crate::state::EncodedVaa). An",
166
- "authority (the write authority) is established with this instruction.",
171
+ "authority (the write authority) is established with this instruction."
167
172
  ],
168
173
  accounts: [
169
174
  {
@@ -171,23 +176,25 @@ exports.IDL = {
171
176
  isMut: false,
172
177
  isSigner: true,
173
178
  docs: [
174
- "The authority who can write to the VAA account when it is being processed.",
175
- ],
179
+ "The authority who can write to the VAA account when it is being processed."
180
+ ]
176
181
  },
177
182
  {
178
183
  name: "encodedVaa",
179
184
  isMut: true,
180
185
  isSigner: false,
181
- docs: ["Bridge."],
182
- },
186
+ docs: [
187
+ "Bridge."
188
+ ]
189
+ }
183
190
  ],
184
- args: [],
191
+ args: []
185
192
  },
186
193
  {
187
194
  name: "closeEncodedVaa",
188
195
  docs: [
189
196
  "Processor used to close an [EncodedVaa](crate::state::EncodedVaa). This instruction requires",
190
- "an authority (the write authority) to interact witht he encoded VAA account.",
197
+ "an authority (the write authority) to interact witht he encoded VAA account."
191
198
  ],
192
199
  accounts: [
193
200
  {
@@ -197,24 +204,26 @@ exports.IDL = {
197
204
  docs: [
198
205
  "This account is only required to be mutable for the `CloseVaaAccount` directive. This",
199
206
  "authority is the same signer that originally created the VAA accounts, so he is the one that",
200
- "will receive the lamports back for the closed accounts.",
201
- ],
207
+ "will receive the lamports back for the closed accounts."
208
+ ]
202
209
  },
203
210
  {
204
211
  name: "encodedVaa",
205
212
  isMut: true,
206
213
  isSigner: false,
207
- docs: ["written to and then verified."],
208
- },
214
+ docs: [
215
+ "written to and then verified."
216
+ ]
217
+ }
209
218
  ],
210
- args: [],
219
+ args: []
211
220
  },
212
221
  {
213
222
  name: "writeEncodedVaa",
214
223
  docs: [
215
224
  "Processor used to write to an [EncodedVaa](crate::state::EncodedVaa) account. This",
216
225
  "instruction requires an authority (the write authority) to interact with the encoded VAA",
217
- "account.",
226
+ "account."
218
227
  ],
219
228
  accounts: [
220
229
  {
@@ -222,43 +231,47 @@ exports.IDL = {
222
231
  isMut: false,
223
232
  isSigner: true,
224
233
  docs: [
225
- "The only authority that can write to the encoded VAA account.",
226
- ],
234
+ "The only authority that can write to the encoded VAA account."
235
+ ]
227
236
  },
228
237
  {
229
238
  name: "draftVaa",
230
239
  isMut: true,
231
240
  isSigner: false,
232
- docs: ["written to and then verified."],
233
- },
241
+ docs: [
242
+ "written to and then verified."
243
+ ]
244
+ }
234
245
  ],
235
246
  args: [
236
247
  {
237
248
  name: "args",
238
249
  type: {
239
- defined: "WriteEncodedVaaArgs",
240
- },
241
- },
242
- ],
250
+ defined: "WriteEncodedVaaArgs"
251
+ }
252
+ }
253
+ ]
243
254
  },
244
255
  {
245
256
  name: "verifyEncodedVaaV1",
246
257
  docs: [
247
258
  "Processor used to verify an [EncodedVaa](crate::state::EncodedVaa) account as a version 1",
248
259
  "VAA (guardian signatures attesting to this observation). This instruction requires an",
249
- "authority (the write authority) to interact with the encoded VAA account.",
260
+ "authority (the write authority) to interact with the encoded VAA account."
250
261
  ],
251
262
  accounts: [
252
263
  {
253
264
  name: "writeAuthority",
254
265
  isMut: false,
255
- isSigner: true,
266
+ isSigner: true
256
267
  },
257
268
  {
258
269
  name: "draftVaa",
259
270
  isMut: true,
260
271
  isSigner: false,
261
- docs: ["written to and then verified."],
272
+ docs: [
273
+ "written to and then verified."
274
+ ]
262
275
  },
263
276
  {
264
277
  name: "guardianSet",
@@ -266,11 +279,11 @@ exports.IDL = {
266
279
  isSigner: false,
267
280
  docs: [
268
281
  "Guardian set account, which should be the same one that was used to attest for the VAA. The",
269
- "signatures in the encoded VAA are verified against this guardian set.",
270
- ],
271
- },
282
+ "signatures in the encoded VAA are verified against this guardian set."
283
+ ]
284
+ }
272
285
  ],
273
- args: [],
286
+ args: []
274
287
  },
275
288
  {
276
289
  name: "postVaaV1",
@@ -280,7 +293,7 @@ exports.IDL = {
280
293
  "",
281
294
  "NOTE: Because the legacy verify signatures instruction was not required for the Posted VAA",
282
295
  "account to exist, the encoded [SignatureSet](crate::state::SignatureSet) is the default",
283
- "[Pubkey].",
296
+ "[Pubkey]."
284
297
  ],
285
298
  accounts: [
286
299
  {
@@ -289,8 +302,8 @@ exports.IDL = {
289
302
  isSigner: true,
290
303
  docs: [
291
304
  "Payer to create the posted VAA account. This instruction allows anyone with an encoded VAA",
292
- "to create a posted VAA account.",
293
- ],
305
+ "to create a posted VAA account."
306
+ ]
294
307
  },
295
308
  {
296
309
  name: "encodedVaa",
@@ -304,39 +317,41 @@ exports.IDL = {
304
317
  "allow a pathway to convert the encoded VAA into a posted VAA. However, the payload is",
305
318
  "restricted to 9.5KB, which is much larger than what was possible with the old implementation",
306
319
  "using the legacy post vaa instruction. The Core Bridge program will not support posting VAAs",
307
- "larger than this payload size.",
308
- ],
320
+ "larger than this payload size."
321
+ ]
309
322
  },
310
323
  {
311
324
  name: "postedVaa",
312
325
  isMut: true,
313
- isSigner: false,
326
+ isSigner: false
314
327
  },
315
328
  {
316
329
  name: "systemProgram",
317
330
  isMut: false,
318
- isSigner: false,
319
- },
331
+ isSigner: false
332
+ }
320
333
  ],
321
- args: [],
334
+ args: []
322
335
  },
323
336
  {
324
337
  name: "closeSignatureSet",
325
338
  docs: [
326
339
  "Processor used to close a [SignatureSet](crate::state::SignatureSet), which was used to",
327
- "verify the VAA using the legacy parse and verify procedure.",
340
+ "verify the VAA using the legacy parse and verify procedure."
328
341
  ],
329
342
  accounts: [
330
343
  {
331
344
  name: "solDestination",
332
345
  isMut: true,
333
- isSigner: true,
346
+ isSigner: true
334
347
  },
335
348
  {
336
349
  name: "postedVaa",
337
350
  isMut: false,
338
351
  isSigner: false,
339
- docs: ["Posted VAA."],
352
+ docs: [
353
+ "Posted VAA."
354
+ ]
340
355
  },
341
356
  {
342
357
  name: "signatureSet",
@@ -345,12 +360,12 @@ exports.IDL = {
345
360
  docs: [
346
361
  "Signature set that may have been used to create the posted VAA account. If the `post_vaa_v1`",
347
362
  "instruction were used to create the posted VAA account, then the encoded signature set",
348
- "pubkey would be all zeroes.",
349
- ],
350
- },
363
+ "pubkey would be all zeroes."
364
+ ]
365
+ }
351
366
  ],
352
- args: [],
353
- },
367
+ args: []
368
+ }
354
369
  ],
355
370
  accounts: [
356
371
  {
@@ -364,7 +379,7 @@ exports.IDL = {
364
379
  "NOTE: The account schema is the same as legacy guardian sets, but this account now has a",
365
380
  "discriminator generated by Anchor's [account] macro. When the Core Bridge program performs a",
366
381
  "guardian set update with this implementation, guardian sets will now have this Anchor-generated",
367
- "discriminator.",
382
+ "discriminator."
368
383
  ],
369
384
  type: {
370
385
  kind: "struct",
@@ -372,39 +387,44 @@ exports.IDL = {
372
387
  {
373
388
  name: "index",
374
389
  docs: [
375
- "Index representing an incrementing version number for this guardian set.",
390
+ "Index representing an incrementing version number for this guardian set."
376
391
  ],
377
- type: "u32",
392
+ type: "u32"
378
393
  },
379
394
  {
380
395
  name: "keys",
381
- docs: ["Ethereum-style public keys."],
396
+ docs: [
397
+ "Ethereum-style public keys."
398
+ ],
382
399
  type: {
383
400
  vec: {
384
- array: ["u8", 20],
385
- },
386
- },
401
+ array: [
402
+ "u8",
403
+ 20
404
+ ]
405
+ }
406
+ }
387
407
  },
388
408
  {
389
409
  name: "creationTime",
390
410
  docs: [
391
- "Timestamp representing the time this guardian became active.",
411
+ "Timestamp representing the time this guardian became active."
392
412
  ],
393
413
  type: {
394
- defined: "Timestamp",
395
- },
414
+ defined: "Timestamp"
415
+ }
396
416
  },
397
417
  {
398
418
  name: "expirationTime",
399
419
  docs: [
400
- "Expiration time when VAAs issued by this set are no longer valid.",
420
+ "Expiration time when VAAs issued by this set are no longer valid."
401
421
  ],
402
422
  type: {
403
- defined: "Timestamp",
404
- },
405
- },
406
- ],
407
- },
423
+ defined: "Timestamp"
424
+ }
425
+ }
426
+ ]
427
+ }
408
428
  },
409
429
  {
410
430
  name: "signatureSet",
@@ -417,32 +437,38 @@ exports.IDL = {
417
437
  "NOTE: The account schema is the same as legacy signature sets, but this account now has a",
418
438
  "discriminator generated by Anchor's [account] macro. When the Core Bridge program upgrades to",
419
439
  "this implementation from the old one, integrators in the middle of verifying signatures will",
420
- "have to use a new keypair for this account and try again.",
440
+ "have to use a new keypair for this account and try again."
421
441
  ],
422
442
  type: {
423
443
  kind: "struct",
424
444
  fields: [
425
445
  {
426
446
  name: "sigVerifySuccesses",
427
- docs: ["Signatures of validators"],
447
+ docs: [
448
+ "Signatures of validators"
449
+ ],
428
450
  type: {
429
- vec: "bool",
430
- },
451
+ vec: "bool"
452
+ }
431
453
  },
432
454
  {
433
455
  name: "messageHash",
434
- docs: ["Hash of the VAA message body."],
456
+ docs: [
457
+ "Hash of the VAA message body."
458
+ ],
435
459
  type: {
436
- defined: "MessageHash",
437
- },
460
+ defined: "MessageHash"
461
+ }
438
462
  },
439
463
  {
440
464
  name: "guardianSetIndex",
441
- docs: ["Index of the guardian set"],
442
- type: "u32",
443
- },
444
- ],
445
- },
465
+ docs: [
466
+ "Index of the guardian set"
467
+ ],
468
+ type: "u32"
469
+ }
470
+ ]
471
+ }
446
472
  },
447
473
  {
448
474
  name: "encodedVaa",
@@ -450,82 +476,97 @@ exports.IDL = {
450
476
  "Account used to warehouse VAA buffer.",
451
477
  "",
452
478
  "NOTE: This account should not be used by an external application unless the header's status is",
453
- "`Verified`. It is encouraged to use the `EncodedVaa` zero-copy account struct instead.",
479
+ "`Verified`. It is encouraged to use the `EncodedVaa` zero-copy account struct instead."
454
480
  ],
455
481
  type: {
456
482
  kind: "struct",
457
483
  fields: [
458
484
  {
459
485
  name: "header",
460
- docs: ["Status, write authority and VAA version."],
486
+ docs: [
487
+ "Status, write authority and VAA version."
488
+ ],
461
489
  type: {
462
- defined: "Header",
463
- },
490
+ defined: "Header"
491
+ }
464
492
  },
465
493
  {
466
494
  name: "buf",
467
- docs: ["VAA buffer."],
468
- type: "bytes",
469
- },
470
- ],
471
- },
472
- },
495
+ docs: [
496
+ "VAA buffer."
497
+ ],
498
+ type: "bytes"
499
+ }
500
+ ]
501
+ }
502
+ }
473
503
  ],
474
504
  types: [
475
505
  {
476
506
  name: "InitializeArgs",
477
- docs: ["Arguments used to initialize the Core Bridge program."],
507
+ docs: [
508
+ "Arguments used to initialize the Core Bridge program."
509
+ ],
478
510
  type: {
479
511
  kind: "struct",
480
512
  fields: [
481
513
  {
482
514
  name: "guardianSetTtlSeconds",
483
- type: "u32",
515
+ type: "u32"
484
516
  },
485
517
  {
486
518
  name: "feeLamports",
487
- type: "u64",
519
+ type: "u64"
488
520
  },
489
521
  {
490
522
  name: "initialGuardians",
491
523
  type: {
492
524
  vec: {
493
- array: ["u8", 20],
494
- },
495
- },
496
- },
497
- ],
498
- },
525
+ array: [
526
+ "u8",
527
+ 20
528
+ ]
529
+ }
530
+ }
531
+ }
532
+ ]
533
+ }
499
534
  },
500
535
  {
501
536
  name: "PostMessageArgs",
502
537
  docs: [
503
538
  "Arguments used to post a new Wormhole (Core Bridge) message either using",
504
539
  "[post_message](crate::legacy::instruction::post_message) or",
505
- "[post_message_unreliable](crate::legacy::instruction::post_message_unreliable).",
540
+ "[post_message_unreliable](crate::legacy::instruction::post_message_unreliable)."
506
541
  ],
507
542
  type: {
508
543
  kind: "struct",
509
544
  fields: [
510
545
  {
511
546
  name: "nonce",
512
- docs: ["Unique id for this message."],
513
- type: "u32",
547
+ docs: [
548
+ "Unique id for this message."
549
+ ],
550
+ type: "u32"
514
551
  },
515
552
  {
516
553
  name: "payload",
517
- docs: ["Encoded message."],
518
- type: "bytes",
554
+ docs: [
555
+ "Encoded message."
556
+ ],
557
+ type: "bytes"
519
558
  },
520
559
  {
521
560
  name: "commitment",
522
- docs: ["Solana commitment level for Guardian observation."],
561
+ docs: [
562
+ "Solana commitment level for Guardian observation."
563
+ ],
523
564
  type: {
524
- defined: "Commitment",
525
- },
526
- },
527
- ],
528
- },
565
+ defined: "Commitment"
566
+ }
567
+ }
568
+ ]
569
+ }
529
570
  },
530
571
  {
531
572
  name: "PostVaaArgs",
@@ -534,59 +575,79 @@ exports.IDL = {
534
575
  "",
535
576
  "NOTE: It is preferred to use the new process of verifying a VAA using the new Core Bridge Anchor",
536
577
  "instructions. See [init_encoded_vaa](crate::wormhole_core_bridge_solana::init_encoded_vaa) and",
537
- "[write_encoded_vaa](crate::wormhole_core_bridge_solana::write_encoded_vaa) for more info.",
578
+ "[write_encoded_vaa](crate::wormhole_core_bridge_solana::write_encoded_vaa) for more info."
538
579
  ],
539
580
  type: {
540
581
  kind: "struct",
541
582
  fields: [
542
583
  {
543
584
  name: "gap0",
544
- docs: ["Unused data."],
585
+ docs: [
586
+ "Unused data."
587
+ ],
545
588
  type: {
546
- array: ["u8", 5],
547
- },
589
+ array: [
590
+ "u8",
591
+ 5
592
+ ]
593
+ }
548
594
  },
549
595
  {
550
596
  name: "timestamp",
551
- docs: ["Time the message was submitted."],
552
- type: "u32",
597
+ docs: [
598
+ "Time the message was submitted."
599
+ ],
600
+ type: "u32"
553
601
  },
554
602
  {
555
603
  name: "nonce",
556
- docs: ["Unique ID for this message."],
557
- type: "u32",
604
+ docs: [
605
+ "Unique ID for this message."
606
+ ],
607
+ type: "u32"
558
608
  },
559
609
  {
560
610
  name: "emitterChain",
561
611
  docs: [
562
- "The Wormhole chain ID denoting the origin of this message.",
612
+ "The Wormhole chain ID denoting the origin of this message."
563
613
  ],
564
- type: "u16",
614
+ type: "u16"
565
615
  },
566
616
  {
567
617
  name: "emitterAddress",
568
- docs: ["Emitter of the message."],
618
+ docs: [
619
+ "Emitter of the message."
620
+ ],
569
621
  type: {
570
- array: ["u8", 32],
571
- },
622
+ array: [
623
+ "u8",
624
+ 32
625
+ ]
626
+ }
572
627
  },
573
628
  {
574
629
  name: "sequence",
575
- docs: ["Sequence number of this message."],
576
- type: "u64",
630
+ docs: [
631
+ "Sequence number of this message."
632
+ ],
633
+ type: "u64"
577
634
  },
578
635
  {
579
636
  name: "consistencyLevel",
580
- docs: ["Level of consistency requested by the emitter."],
581
- type: "u8",
637
+ docs: [
638
+ "Level of consistency requested by the emitter."
639
+ ],
640
+ type: "u8"
582
641
  },
583
642
  {
584
643
  name: "payload",
585
- docs: ["Message payload."],
586
- type: "bytes",
587
- },
588
- ],
589
- },
644
+ docs: [
645
+ "Message payload."
646
+ ],
647
+ type: "bytes"
648
+ }
649
+ ]
650
+ }
590
651
  },
591
652
  {
592
653
  name: "VerifySignaturesArgs",
@@ -595,7 +656,7 @@ exports.IDL = {
595
656
  "",
596
657
  "NOTE: It is preferred to use the new process of verifying a VAA using the new Core Bridge Anchor",
597
658
  "instructions. See [init_encoded_vaa](crate::wormhole_core_bridge_solana::init_encoded_vaa) and",
598
- "[write_encoded_vaa](crate::wormhole_core_bridge_solana::write_encoded_vaa) for more info.",
659
+ "[write_encoded_vaa](crate::wormhole_core_bridge_solana::write_encoded_vaa) for more info."
599
660
  ],
600
661
  type: {
601
662
  kind: "struct",
@@ -609,29 +670,34 @@ exports.IDL = {
609
670
  "",
610
671
  "NOTE: In the legacy implementation, this argument being a fixed-sized array of 19 only",
611
672
  "allows the first 19 guardians of any size guardian set to be verified. Because of this, it",
612
- "is absolutely important to use the new process of verifying a VAA.",
673
+ "is absolutely important to use the new process of verifying a VAA."
613
674
  ],
614
675
  type: {
615
- array: ["i8", 19],
616
- },
617
- },
618
- ],
619
- },
676
+ array: [
677
+ "i8",
678
+ 19
679
+ ]
680
+ }
681
+ }
682
+ ]
683
+ }
620
684
  },
621
685
  {
622
686
  name: "EmptyArgs",
623
- docs: ["Unit struct used to represent an empty instruction argument."],
687
+ docs: [
688
+ "Unit struct used to represent an empty instruction argument."
689
+ ],
624
690
  type: {
625
691
  kind: "struct",
626
- fields: [],
627
- },
692
+ fields: []
693
+ }
628
694
  },
629
695
  {
630
696
  name: "Config",
631
697
  docs: [
632
698
  "Account used to store the current configuration of the bridge, including tracking Wormhole fee",
633
699
  "payments. For governance decrees, the guardian set index is used to determine whether a decree",
634
- "was attested for using the latest guardian set.",
700
+ "was attested for using the latest guardian set."
635
701
  ],
636
702
  type: {
637
703
  kind: "struct",
@@ -639,45 +705,48 @@ exports.IDL = {
639
705
  {
640
706
  name: "guardianSetIndex",
641
707
  docs: [
642
- "The current guardian set index, used to decide which signature sets to accept.",
708
+ "The current guardian set index, used to decide which signature sets to accept."
643
709
  ],
644
- type: "u32",
710
+ type: "u32"
645
711
  },
646
712
  {
647
713
  name: "gap0",
648
714
  docs: [
649
715
  "Gap. In the old implementation, this was an amount that kept track of message fees that",
650
- "were paid to the program's fee collector.",
716
+ "were paid to the program's fee collector."
651
717
  ],
652
718
  type: {
653
- array: ["u8", 8],
654
- },
719
+ array: [
720
+ "u8",
721
+ 8
722
+ ]
723
+ }
655
724
  },
656
725
  {
657
726
  name: "guardianSetTtl",
658
727
  docs: [
659
728
  "Period for how long a guardian set is valid after it has been replaced by a new one. This",
660
729
  "guarantees that VAAs issued by that set can still be submitted for a certain period. In",
661
- "this period we still trust the old guardian set.",
730
+ "this period we still trust the old guardian set."
662
731
  ],
663
732
  type: {
664
- defined: "Duration",
665
- },
733
+ defined: "Duration"
734
+ }
666
735
  },
667
736
  {
668
737
  name: "feeLamports",
669
738
  docs: [
670
- "Amount of lamports that needs to be paid to the protocol to post a message",
739
+ "Amount of lamports that needs to be paid to the protocol to post a message"
671
740
  ],
672
- type: "u64",
673
- },
674
- ],
675
- },
741
+ type: "u64"
742
+ }
743
+ ]
744
+ }
676
745
  },
677
746
  {
678
747
  name: "LegacyEmitterSequence",
679
748
  docs: [
680
- "Account used to store the current sequence number for a given emitter.",
749
+ "Account used to store the current sequence number for a given emitter."
681
750
  ],
682
751
  type: {
683
752
  kind: "struct",
@@ -685,12 +754,12 @@ exports.IDL = {
685
754
  {
686
755
  name: "value",
687
756
  docs: [
688
- "Current sequence number, which will be used the next time this emitter publishes a message.",
757
+ "Current sequence number, which will be used the next time this emitter publishes a message."
689
758
  ],
690
- type: "u64",
691
- },
692
- ],
693
- },
759
+ type: "u64"
760
+ }
761
+ ]
762
+ }
694
763
  },
695
764
  {
696
765
  name: "EmitterSequence",
@@ -700,57 +769,61 @@ exports.IDL = {
700
769
  {
701
770
  name: "legacy",
702
771
  type: {
703
- defined: "LegacyEmitterSequence",
704
- },
772
+ defined: "LegacyEmitterSequence"
773
+ }
705
774
  },
706
775
  {
707
776
  name: "bump",
708
- type: "u8",
777
+ type: "u8"
709
778
  },
710
779
  {
711
780
  name: "emitterType",
712
781
  type: {
713
- defined: "EmitterType",
714
- },
715
- },
716
- ],
717
- },
782
+ defined: "EmitterType"
783
+ }
784
+ }
785
+ ]
786
+ }
718
787
  },
719
788
  {
720
789
  name: "PostedMessageV1Unreliable",
721
- docs: ["Account used to store a published (reusable) Wormhole message."],
790
+ docs: [
791
+ "Account used to store a published (reusable) Wormhole message."
792
+ ],
722
793
  type: {
723
794
  kind: "struct",
724
795
  fields: [
725
796
  {
726
797
  name: "data",
727
798
  type: {
728
- defined: "PostedMessageV1Data",
729
- },
730
- },
731
- ],
732
- },
799
+ defined: "PostedMessageV1Data"
800
+ }
801
+ }
802
+ ]
803
+ }
733
804
  },
734
805
  {
735
806
  name: "PostedMessageV1Info",
736
807
  docs: [
737
- "Message metadata defining information about a published Wormhole message.",
808
+ "Message metadata defining information about a published Wormhole message."
738
809
  ],
739
810
  type: {
740
811
  kind: "struct",
741
812
  fields: [
742
813
  {
743
814
  name: "consistencyLevel",
744
- docs: ["Level of consistency requested by the emitter."],
745
- type: "u8",
815
+ docs: [
816
+ "Level of consistency requested by the emitter."
817
+ ],
818
+ type: "u8"
746
819
  },
747
820
  {
748
821
  name: "emitterAuthority",
749
822
  docs: [
750
823
  "Authority used to write the message. This field is set to default when the message is",
751
- "posted.",
824
+ "posted."
752
825
  ],
753
- type: "publicKey",
826
+ type: "publicKey"
754
827
  },
755
828
  {
756
829
  name: "status",
@@ -758,35 +831,46 @@ exports.IDL = {
758
831
  "If a message is being written to, this status is used to determine which state this",
759
832
  "account is in (e.g. [MessageStatus::Writing] indicates that the emitter authority is still",
760
833
  "writing its message to this account). When this message is posted, this value will be",
761
- "set to [MessageStatus::Published].",
834
+ "set to [MessageStatus::Published]."
762
835
  ],
763
836
  type: {
764
- defined: "MessageStatus",
765
- },
837
+ defined: "MessageStatus"
838
+ }
766
839
  },
767
840
  {
768
841
  name: "gap0",
769
- docs: ["No data is stored here."],
842
+ docs: [
843
+ "No data is stored here."
844
+ ],
770
845
  type: {
771
- array: ["u8", 3],
772
- },
846
+ array: [
847
+ "u8",
848
+ 3
849
+ ]
850
+ }
773
851
  },
774
852
  {
775
853
  name: "postedTimestamp",
776
- docs: ["Time the posted message was created."],
854
+ docs: [
855
+ "Time the posted message was created."
856
+ ],
777
857
  type: {
778
- defined: "Timestamp",
779
- },
858
+ defined: "Timestamp"
859
+ }
780
860
  },
781
861
  {
782
862
  name: "nonce",
783
- docs: ["Unique id for this message."],
784
- type: "u32",
863
+ docs: [
864
+ "Unique id for this message."
865
+ ],
866
+ type: "u32"
785
867
  },
786
868
  {
787
869
  name: "sequence",
788
- docs: ["Sequence number of this message."],
789
- type: "u64",
870
+ docs: [
871
+ "Sequence number of this message."
872
+ ],
873
+ type: "u64"
790
874
  },
791
875
  {
792
876
  name: "solanaChainId",
@@ -794,45 +878,49 @@ exports.IDL = {
794
878
  "Always `1`.",
795
879
  "",
796
880
  "NOTE: Saving this value is silly, but we are keeping it to be consistent with how the posted",
797
- "message account is written.",
881
+ "message account is written."
798
882
  ],
799
883
  type: {
800
- defined: "ChainIdSolanaOnly",
801
- },
884
+ defined: "ChainIdSolanaOnly"
885
+ }
802
886
  },
803
887
  {
804
888
  name: "emitter",
805
889
  docs: [
806
- "Emitter of the message. This may either be the emitter authority or a program ID.",
890
+ "Emitter of the message. This may either be the emitter authority or a program ID."
807
891
  ],
808
- type: "publicKey",
809
- },
810
- ],
811
- },
892
+ type: "publicKey"
893
+ }
894
+ ]
895
+ }
812
896
  },
813
897
  {
814
898
  name: "PostedMessageV1Data",
815
899
  docs: [
816
900
  "Underlying data for either [PostedMessageV1](crate::legacy::state::PostedMessageV1) or",
817
- "[PostedMessageV1Unreliable](crate::legacy::state::PostedMessageV1Unreliable).",
901
+ "[PostedMessageV1Unreliable](crate::legacy::state::PostedMessageV1Unreliable)."
818
902
  ],
819
903
  type: {
820
904
  kind: "struct",
821
905
  fields: [
822
906
  {
823
907
  name: "info",
824
- docs: ["Message metadata."],
908
+ docs: [
909
+ "Message metadata."
910
+ ],
825
911
  type: {
826
- defined: "PostedMessageV1Info",
827
- },
912
+ defined: "PostedMessageV1Info"
913
+ }
828
914
  },
829
915
  {
830
916
  name: "payload",
831
- docs: ["Encoded message."],
832
- type: "bytes",
833
- },
834
- ],
835
- },
917
+ docs: [
918
+ "Encoded message."
919
+ ],
920
+ type: "bytes"
921
+ }
922
+ ]
923
+ }
836
924
  },
837
925
  {
838
926
  name: "PostedMessageV1",
@@ -840,49 +928,55 @@ exports.IDL = {
840
928
  "Account used to store a published Wormhole message.",
841
929
  "",
842
930
  "NOTE: If your integration requires reusable message accounts, please see",
843
- "[PostedMessageV1Unreliable](crate::legacy::state::PostedMessageV1Unreliable).",
931
+ "[PostedMessageV1Unreliable](crate::legacy::state::PostedMessageV1Unreliable)."
844
932
  ],
845
933
  type: {
846
934
  kind: "struct",
847
935
  fields: [
848
936
  {
849
937
  name: "data",
850
- docs: ["Message data."],
938
+ docs: [
939
+ "Message data."
940
+ ],
851
941
  type: {
852
- defined: "PostedMessageV1Data",
853
- },
854
- },
855
- ],
856
- },
942
+ defined: "PostedMessageV1Data"
943
+ }
944
+ }
945
+ ]
946
+ }
857
947
  },
858
948
  {
859
949
  name: "PostedVaaV1Info",
860
950
  docs: [
861
951
  "VAA metadata defining information about a Wormhole message attested for by an active guardian",
862
- "set.",
952
+ "set."
863
953
  ],
864
954
  type: {
865
955
  kind: "struct",
866
956
  fields: [
867
957
  {
868
958
  name: "consistencyLevel",
869
- docs: ["Level of consistency requested by the emitter."],
870
- type: "u8",
959
+ docs: [
960
+ "Level of consistency requested by the emitter."
961
+ ],
962
+ type: "u8"
871
963
  },
872
964
  {
873
965
  name: "timestamp",
874
- docs: ["Time the message was submitted."],
966
+ docs: [
967
+ "Time the message was submitted."
968
+ ],
875
969
  type: {
876
- defined: "Timestamp",
877
- },
970
+ defined: "Timestamp"
971
+ }
878
972
  },
879
973
  {
880
974
  name: "signatureSet",
881
975
  docs: [
882
976
  "Pubkey of [SignatureSet](crate::state::SignatureSet) account that represents this VAA's",
883
- "signature verification.",
977
+ "signature verification."
884
978
  ],
885
- type: "publicKey",
979
+ type: "publicKey"
886
980
  },
887
981
  {
888
982
  name: "guardianSetIndex",
@@ -893,144 +987,169 @@ exports.IDL = {
893
987
  "which is zero for VAA data (posted messages and VAAs resemble the same account schema). By",
894
988
  "changing this to the guardian set index, we patch a bug with verifying governance VAAs for",
895
989
  "the Core Bridge (other Core Bridge implementations require that the guardian set that",
896
- "attested for the governance VAA is the current one).",
990
+ "attested for the governance VAA is the current one)."
897
991
  ],
898
- type: "u32",
992
+ type: "u32"
899
993
  },
900
994
  {
901
995
  name: "nonce",
902
- docs: ["Unique ID for this message."],
903
- type: "u32",
996
+ docs: [
997
+ "Unique ID for this message."
998
+ ],
999
+ type: "u32"
904
1000
  },
905
1001
  {
906
1002
  name: "sequence",
907
- docs: ["Sequence number of this message."],
908
- type: "u64",
1003
+ docs: [
1004
+ "Sequence number of this message."
1005
+ ],
1006
+ type: "u64"
909
1007
  },
910
1008
  {
911
1009
  name: "emitterChain",
912
1010
  docs: [
913
- "The Wormhole chain ID denoting the origin of this message.",
1011
+ "The Wormhole chain ID denoting the origin of this message."
914
1012
  ],
915
- type: "u16",
1013
+ type: "u16"
916
1014
  },
917
1015
  {
918
1016
  name: "emitterAddress",
919
- docs: ["Emitter of the message."],
1017
+ docs: [
1018
+ "Emitter of the message."
1019
+ ],
920
1020
  type: {
921
- array: ["u8", 32],
922
- },
923
- },
924
- ],
925
- },
1021
+ array: [
1022
+ "u8",
1023
+ 32
1024
+ ]
1025
+ }
1026
+ }
1027
+ ]
1028
+ }
926
1029
  },
927
1030
  {
928
1031
  name: "PostedVaaV1",
929
- docs: ["Account used to store a verified VAA."],
1032
+ docs: [
1033
+ "Account used to store a verified VAA."
1034
+ ],
930
1035
  type: {
931
1036
  kind: "struct",
932
1037
  fields: [
933
1038
  {
934
1039
  name: "info",
935
- docs: ["VAA metadata."],
1040
+ docs: [
1041
+ "VAA metadata."
1042
+ ],
936
1043
  type: {
937
- defined: "PostedVaaV1Info",
938
- },
1044
+ defined: "PostedVaaV1Info"
1045
+ }
939
1046
  },
940
1047
  {
941
1048
  name: "payload",
942
- docs: ["Message payload."],
943
- type: "bytes",
944
- },
945
- ],
946
- },
1049
+ docs: [
1050
+ "Message payload."
1051
+ ],
1052
+ type: "bytes"
1053
+ }
1054
+ ]
1055
+ }
947
1056
  },
948
1057
  {
949
1058
  name: "WriteEncodedVaaArgs",
950
1059
  docs: [
951
1060
  "Arguments for the [write_encoded_vaa](crate::wormhole_core_bridge_solana::write_encoded_vaa)",
952
- "instruction.",
1061
+ "instruction."
953
1062
  ],
954
1063
  type: {
955
1064
  kind: "struct",
956
1065
  fields: [
957
1066
  {
958
1067
  name: "index",
959
- docs: ["Index of VAA buffer."],
960
- type: "u32",
1068
+ docs: [
1069
+ "Index of VAA buffer."
1070
+ ],
1071
+ type: "u32"
961
1072
  },
962
1073
  {
963
1074
  name: "data",
964
1075
  docs: [
965
- "Data representing subset of VAA buffer starting at specified index.",
1076
+ "Data representing subset of VAA buffer starting at specified index."
966
1077
  ],
967
- type: "bytes",
968
- },
969
- ],
970
- },
1078
+ type: "bytes"
1079
+ }
1080
+ ]
1081
+ }
971
1082
  },
972
1083
  {
973
1084
  name: "InitMessageV1Args",
974
1085
  docs: [
975
1086
  "Arguments for the [init_message_v1](crate::wormhole_core_bridge_solana::init_message_v1)",
976
- "instruction.",
1087
+ "instruction."
977
1088
  ],
978
1089
  type: {
979
1090
  kind: "struct",
980
1091
  fields: [
981
1092
  {
982
1093
  name: "nonce",
983
- docs: ["Unique id for this message."],
984
- type: "u32",
1094
+ docs: [
1095
+ "Unique id for this message."
1096
+ ],
1097
+ type: "u32"
985
1098
  },
986
1099
  {
987
1100
  name: "commitment",
988
- docs: ["Solana commitment level for Guardian observation."],
1101
+ docs: [
1102
+ "Solana commitment level for Guardian observation."
1103
+ ],
989
1104
  type: {
990
- defined: "Commitment",
991
- },
1105
+ defined: "Commitment"
1106
+ }
992
1107
  },
993
1108
  {
994
1109
  name: "cpiProgramId",
995
1110
  docs: [
996
1111
  "Optional program ID if the emitter address will be your program ID.",
997
1112
  "",
998
- 'NOTE: If `Some(program_id)`, your emitter authority seeds to be \\[b"emitter\\].',
1113
+ 'NOTE: If `Some(program_id)`, your emitter authority seeds to be \\[b"emitter\\].'
999
1114
  ],
1000
1115
  type: {
1001
- option: "publicKey",
1002
- },
1003
- },
1004
- ],
1005
- },
1116
+ option: "publicKey"
1117
+ }
1118
+ }
1119
+ ]
1120
+ }
1006
1121
  },
1007
1122
  {
1008
1123
  name: "WriteMessageV1Args",
1009
1124
  docs: [
1010
1125
  "Arguments for the [write_message_v1](crate::wormhole_core_bridge_solana::write_message_v1)",
1011
- "instruction.",
1126
+ "instruction."
1012
1127
  ],
1013
1128
  type: {
1014
1129
  kind: "struct",
1015
1130
  fields: [
1016
1131
  {
1017
1132
  name: "index",
1018
- docs: ["Index of message buffer."],
1019
- type: "u32",
1133
+ docs: [
1134
+ "Index of message buffer."
1135
+ ],
1136
+ type: "u32"
1020
1137
  },
1021
1138
  {
1022
1139
  name: "data",
1023
1140
  docs: [
1024
- "Data representing subset of message buffer starting at specified index.",
1141
+ "Data representing subset of message buffer starting at specified index."
1025
1142
  ],
1026
- type: "bytes",
1027
- },
1028
- ],
1029
- },
1143
+ type: "bytes"
1144
+ }
1145
+ ]
1146
+ }
1030
1147
  },
1031
1148
  {
1032
1149
  name: "Header",
1033
- docs: ["`EncodedVaa` account header."],
1150
+ docs: [
1151
+ "`EncodedVaa` account header."
1152
+ ],
1034
1153
  type: {
1035
1154
  kind: "struct",
1036
1155
  fields: [
@@ -1038,90 +1157,97 @@ exports.IDL = {
1038
1157
  name: "status",
1039
1158
  docs: [
1040
1159
  "Processing status. **This encoded VAA is only considered usable when this status is set",
1041
- "to [Verified](ProcessingStatus::Verified).**",
1160
+ "to [Verified](ProcessingStatus::Verified).**"
1042
1161
  ],
1043
1162
  type: {
1044
- defined: "ProcessingStatus",
1045
- },
1163
+ defined: "ProcessingStatus"
1164
+ }
1046
1165
  },
1047
1166
  {
1048
1167
  name: "writeAuthority",
1049
- docs: ["The authority that has write privilege to this account."],
1050
- type: "publicKey",
1168
+ docs: [
1169
+ "The authority that has write privilege to this account."
1170
+ ],
1171
+ type: "publicKey"
1051
1172
  },
1052
1173
  {
1053
1174
  name: "version",
1054
1175
  docs: [
1055
- "VAA version. Only when the VAA is verified is this version set to a value.",
1176
+ "VAA version. Only when the VAA is verified is this version set to a value."
1056
1177
  ],
1057
- type: "u8",
1058
- },
1059
- ],
1060
- },
1178
+ type: "u8"
1179
+ }
1180
+ ]
1181
+ }
1061
1182
  },
1062
1183
  {
1063
1184
  name: "Timestamp",
1064
1185
  docs: [
1065
1186
  "This struct defines unix timestamp as u32 (as opposed to more modern systems that have adopted",
1066
1187
  "i64). Methods for this struct are meant to convert Solana's clock type to this type assuming we",
1067
- "are far from year 2038.",
1188
+ "are far from year 2038."
1068
1189
  ],
1069
1190
  type: {
1070
1191
  kind: "struct",
1071
1192
  fields: [
1072
1193
  {
1073
1194
  name: "value",
1074
- type: "u32",
1075
- },
1076
- ],
1077
- },
1195
+ type: "u32"
1196
+ }
1197
+ ]
1198
+ }
1078
1199
  },
1079
1200
  {
1080
1201
  name: "Duration",
1081
1202
  docs: [
1082
- "To be used with the [Timestamp] type, this struct defines a duration in seconds.",
1203
+ "To be used with the [Timestamp] type, this struct defines a duration in seconds."
1083
1204
  ],
1084
1205
  type: {
1085
1206
  kind: "struct",
1086
1207
  fields: [
1087
1208
  {
1088
1209
  name: "seconds",
1089
- type: "u32",
1090
- },
1091
- ],
1092
- },
1210
+ type: "u32"
1211
+ }
1212
+ ]
1213
+ }
1093
1214
  },
1094
1215
  {
1095
1216
  name: "MessageHash",
1096
- docs: ["This type is used to represent a message hash (keccak)."],
1217
+ docs: [
1218
+ "This type is used to represent a message hash (keccak)."
1219
+ ],
1097
1220
  type: {
1098
1221
  kind: "struct",
1099
1222
  fields: [
1100
1223
  {
1101
1224
  name: "bytes",
1102
1225
  type: {
1103
- array: ["u8", 32],
1104
- },
1105
- },
1106
- ],
1107
- },
1226
+ array: [
1227
+ "u8",
1228
+ 32
1229
+ ]
1230
+ }
1231
+ }
1232
+ ]
1233
+ }
1108
1234
  },
1109
1235
  {
1110
1236
  name: "ChainIdSolanaOnly",
1111
1237
  docs: [
1112
1238
  "This type is kind of silly. But because [PostedMessageV1](crate::state::PostedMessageV1) has the",
1113
1239
  "emitter chain ID as a field, which is unnecessary since it is always Solana's chain ID, we use",
1114
- "this type to guarantee that the encoded chain ID is always `1`.",
1240
+ "this type to guarantee that the encoded chain ID is always `1`."
1115
1241
  ],
1116
1242
  type: {
1117
1243
  kind: "struct",
1118
1244
  fields: [
1119
1245
  {
1120
1246
  name: "chainId",
1121
- type: "u16",
1122
- },
1123
- ],
1124
- },
1247
+ type: "u16"
1248
+ }
1249
+ ]
1250
+ }
1125
1251
  },
1126
1252
  {
1127
1253
  name: "EmitterInfo",
@@ -1130,20 +1256,23 @@ exports.IDL = {
1130
1256
  fields: [
1131
1257
  {
1132
1258
  name: "chain",
1133
- type: "u16",
1259
+ type: "u16"
1134
1260
  },
1135
1261
  {
1136
1262
  name: "address",
1137
1263
  type: {
1138
- array: ["u8", 32],
1139
- },
1264
+ array: [
1265
+ "u8",
1266
+ 32
1267
+ ]
1268
+ }
1140
1269
  },
1141
1270
  {
1142
1271
  name: "sequence",
1143
- type: "u64",
1144
- },
1145
- ],
1146
- },
1272
+ type: "u64"
1273
+ }
1274
+ ]
1275
+ }
1147
1276
  },
1148
1277
  {
1149
1278
  name: "LegacyInstruction",
@@ -1152,40 +1281,40 @@ exports.IDL = {
1152
1281
  "",
1153
1282
  "NOTE: No more instructions should be added to this enum. Instead, add them as Anchor instruction",
1154
1283
  "handlers, which will inevitably live in",
1155
- "[wormhole_core_bridge_solana](crate::wormhole_core_bridge_solana).",
1284
+ "[wormhole_core_bridge_solana](crate::wormhole_core_bridge_solana)."
1156
1285
  ],
1157
1286
  type: {
1158
1287
  kind: "enum",
1159
1288
  variants: [
1160
1289
  {
1161
- name: "Initialize",
1290
+ name: "Initialize"
1162
1291
  },
1163
1292
  {
1164
- name: "PostMessage",
1293
+ name: "PostMessage"
1165
1294
  },
1166
1295
  {
1167
- name: "PostVaa",
1296
+ name: "PostVaa"
1168
1297
  },
1169
1298
  {
1170
- name: "SetMessageFee",
1299
+ name: "SetMessageFee"
1171
1300
  },
1172
1301
  {
1173
- name: "TransferFees",
1302
+ name: "TransferFees"
1174
1303
  },
1175
1304
  {
1176
- name: "UpgradeContract",
1305
+ name: "UpgradeContract"
1177
1306
  },
1178
1307
  {
1179
- name: "GuardianSetUpdate",
1308
+ name: "GuardianSetUpdate"
1180
1309
  },
1181
1310
  {
1182
- name: "VerifySignatures",
1311
+ name: "VerifySignatures"
1183
1312
  },
1184
1313
  {
1185
- name: "PostMessageUnreliable",
1186
- },
1187
- ],
1188
- },
1314
+ name: "PostMessageUnreliable"
1315
+ }
1316
+ ]
1317
+ }
1189
1318
  },
1190
1319
  {
1191
1320
  name: "EmitterType",
@@ -1193,41 +1322,43 @@ exports.IDL = {
1193
1322
  kind: "enum",
1194
1323
  variants: [
1195
1324
  {
1196
- name: "Unset",
1325
+ name: "Unset"
1197
1326
  },
1198
1327
  {
1199
- name: "Legacy",
1328
+ name: "Legacy"
1200
1329
  },
1201
1330
  {
1202
- name: "Executable",
1203
- },
1204
- ],
1205
- },
1331
+ name: "Executable"
1332
+ }
1333
+ ]
1334
+ }
1206
1335
  },
1207
1336
  {
1208
1337
  name: "MessageStatus",
1209
1338
  docs: [
1210
1339
  "Status of a message. When a message is posted, its status is",
1211
- "[Published](MessageStatus::Published).",
1340
+ "[Published](MessageStatus::Published)."
1212
1341
  ],
1213
1342
  type: {
1214
1343
  kind: "enum",
1215
1344
  variants: [
1216
1345
  {
1217
- name: "Published",
1346
+ name: "Published"
1218
1347
  },
1219
1348
  {
1220
- name: "Writing",
1349
+ name: "Writing"
1221
1350
  },
1222
1351
  {
1223
- name: "ReadyForPublishing",
1224
- },
1225
- ],
1226
- },
1352
+ name: "ReadyForPublishing"
1353
+ }
1354
+ ]
1355
+ }
1227
1356
  },
1228
1357
  {
1229
1358
  name: "PublishMessageDirective",
1230
- docs: ["Directive used to determine how to post a Core Bridge message."],
1359
+ docs: [
1360
+ "Directive used to determine how to post a Core Bridge message."
1361
+ ],
1231
1362
  type: {
1232
1363
  kind: "enum",
1233
1364
  variants: [
@@ -1236,66 +1367,68 @@ exports.IDL = {
1236
1367
  fields: [
1237
1368
  {
1238
1369
  name: "nonce",
1239
- type: "u32",
1370
+ type: "u32"
1240
1371
  },
1241
1372
  {
1242
1373
  name: "payload",
1243
- type: "bytes",
1374
+ type: "bytes"
1244
1375
  },
1245
1376
  {
1246
1377
  name: "commitment",
1247
1378
  type: {
1248
- defined: "Commitment",
1249
- },
1250
- },
1251
- ],
1379
+ defined: "Commitment"
1380
+ }
1381
+ }
1382
+ ]
1252
1383
  },
1253
1384
  {
1254
1385
  name: "ProgramMessage",
1255
1386
  fields: [
1256
1387
  {
1257
1388
  name: "programId",
1258
- type: "publicKey",
1389
+ type: "publicKey"
1259
1390
  },
1260
1391
  {
1261
1392
  name: "nonce",
1262
- type: "u32",
1393
+ type: "u32"
1263
1394
  },
1264
1395
  {
1265
1396
  name: "payload",
1266
- type: "bytes",
1397
+ type: "bytes"
1267
1398
  },
1268
1399
  {
1269
1400
  name: "commitment",
1270
1401
  type: {
1271
- defined: "Commitment",
1272
- },
1273
- },
1274
- ],
1402
+ defined: "Commitment"
1403
+ }
1404
+ }
1405
+ ]
1275
1406
  },
1276
1407
  {
1277
- name: "PreparedMessage",
1278
- },
1279
- ],
1280
- },
1408
+ name: "PreparedMessage"
1409
+ }
1410
+ ]
1411
+ }
1281
1412
  },
1282
1413
  {
1283
1414
  name: "ProcessingStatus",
1284
- docs: ["Encoded VAA's processing status."],
1415
+ docs: [
1416
+ "Encoded VAA's processing status."
1417
+ ],
1285
1418
  type: {
1286
1419
  kind: "enum",
1287
1420
  variants: [
1288
1421
  {
1289
- name: "Unset",
1422
+ name: "Unset"
1290
1423
  },
1291
1424
  {
1292
- name: "Writing",
1425
+ name: "Writing"
1293
1426
  },
1294
1427
  {
1295
- name: "Verified",
1296
- },
1297
- ],
1298
- },
1428
+ name: "Verified"
1429
+ }
1430
+ ]
1431
+ }
1299
1432
  },
1300
1433
  {
1301
1434
  name: "Commitment",
@@ -1303,306 +1436,306 @@ exports.IDL = {
1303
1436
  "Representation of Solana's commitment levels. This enum is not exhaustive because Wormhole only",
1304
1437
  "considers these two commitment levels in its Guardian observation.",
1305
1438
  "",
1306
- "See <https://docs.solana.com/cluster/commitments> for more info.",
1439
+ "See <https://docs.solana.com/cluster/commitments> for more info."
1307
1440
  ],
1308
1441
  type: {
1309
1442
  kind: "enum",
1310
1443
  variants: [
1311
1444
  {
1312
- name: "Confirmed",
1445
+ name: "Confirmed"
1313
1446
  },
1314
1447
  {
1315
- name: "Finalized",
1316
- },
1317
- ],
1318
- },
1319
- },
1448
+ name: "Finalized"
1449
+ }
1450
+ ]
1451
+ }
1452
+ }
1320
1453
  ],
1321
1454
  errors: [
1322
1455
  {
1323
1456
  code: 6002,
1324
1457
  name: "InvalidInstructionArgument",
1325
- msg: "InvalidInstructionArgument",
1458
+ msg: "InvalidInstructionArgument"
1326
1459
  },
1327
1460
  {
1328
1461
  code: 6003,
1329
1462
  name: "AccountNotZeroed",
1330
- msg: "AccountNotZeroed",
1463
+ msg: "AccountNotZeroed"
1331
1464
  },
1332
1465
  {
1333
1466
  code: 6004,
1334
1467
  name: "InvalidDataConversion",
1335
- msg: "InvalidDataConversion",
1468
+ msg: "InvalidDataConversion"
1336
1469
  },
1337
1470
  {
1338
1471
  code: 6006,
1339
1472
  name: "U64Overflow",
1340
- msg: "U64Overflow",
1473
+ msg: "U64Overflow"
1341
1474
  },
1342
1475
  {
1343
1476
  code: 6008,
1344
1477
  name: "InvalidComputeSize",
1345
- msg: "InvalidComputeSize",
1478
+ msg: "InvalidComputeSize"
1346
1479
  },
1347
1480
  {
1348
1481
  code: 6016,
1349
1482
  name: "InvalidChain",
1350
- msg: "InvalidChain",
1483
+ msg: "InvalidChain"
1351
1484
  },
1352
1485
  {
1353
1486
  code: 6032,
1354
1487
  name: "InvalidGovernanceEmitter",
1355
- msg: "InvalidGovernanceEmitter",
1488
+ msg: "InvalidGovernanceEmitter"
1356
1489
  },
1357
1490
  {
1358
1491
  code: 6034,
1359
1492
  name: "InvalidGovernanceAction",
1360
- msg: "InvalidGovernanceAction",
1493
+ msg: "InvalidGovernanceAction"
1361
1494
  },
1362
1495
  {
1363
1496
  code: 6036,
1364
1497
  name: "LatestGuardianSetRequired",
1365
- msg: "LatestGuardianSetRequired",
1498
+ msg: "LatestGuardianSetRequired"
1366
1499
  },
1367
1500
  {
1368
1501
  code: 6038,
1369
1502
  name: "GovernanceForAnotherChain",
1370
- msg: "GovernanceForAnotherChain",
1503
+ msg: "GovernanceForAnotherChain"
1371
1504
  },
1372
1505
  {
1373
1506
  code: 6040,
1374
1507
  name: "InvalidGovernanceVaa",
1375
- msg: "InvalidGovernanceVaa",
1508
+ msg: "InvalidGovernanceVaa"
1376
1509
  },
1377
1510
  {
1378
1511
  code: 6256,
1379
1512
  name: "InsufficientFees",
1380
- msg: "InsufficientFees",
1513
+ msg: "InsufficientFees"
1381
1514
  },
1382
1515
  {
1383
1516
  code: 6258,
1384
1517
  name: "EmitterMismatch",
1385
- msg: "EmitterMismatch",
1518
+ msg: "EmitterMismatch"
1386
1519
  },
1387
1520
  {
1388
1521
  code: 6260,
1389
1522
  name: "NotReadyForPublishing",
1390
- msg: "NotReadyForPublishing",
1523
+ msg: "NotReadyForPublishing"
1391
1524
  },
1392
1525
  {
1393
1526
  code: 6262,
1394
1527
  name: "InvalidPreparedMessage",
1395
- msg: "InvalidPreparedMessage",
1528
+ msg: "InvalidPreparedMessage"
1396
1529
  },
1397
1530
  {
1398
1531
  code: 6264,
1399
1532
  name: "ExecutableEmitter",
1400
- msg: "ExecutableEmitter",
1533
+ msg: "ExecutableEmitter"
1401
1534
  },
1402
1535
  {
1403
1536
  code: 6266,
1404
1537
  name: "LegacyEmitter",
1405
- msg: "LegacyEmitter",
1538
+ msg: "LegacyEmitter"
1406
1539
  },
1407
1540
  {
1408
1541
  code: 6512,
1409
1542
  name: "InvalidSignatureSet",
1410
- msg: "InvalidSignatureSet",
1543
+ msg: "InvalidSignatureSet"
1411
1544
  },
1412
1545
  {
1413
1546
  code: 6514,
1414
1547
  name: "InvalidMessageHash",
1415
- msg: "InvalidMessageHash",
1548
+ msg: "InvalidMessageHash"
1416
1549
  },
1417
1550
  {
1418
1551
  code: 6515,
1419
1552
  name: "NoQuorum",
1420
- msg: "NoQuorum",
1553
+ msg: "NoQuorum"
1421
1554
  },
1422
1555
  {
1423
1556
  code: 6516,
1424
1557
  name: "MessageMismatch",
1425
- msg: "MessageMismatch",
1558
+ msg: "MessageMismatch"
1426
1559
  },
1427
1560
  {
1428
1561
  code: 7024,
1429
1562
  name: "NotEnoughLamports",
1430
- msg: "NotEnoughLamports",
1563
+ msg: "NotEnoughLamports"
1431
1564
  },
1432
1565
  {
1433
1566
  code: 7026,
1434
1567
  name: "InvalidFeeRecipient",
1435
- msg: "InvalidFeeRecipient",
1568
+ msg: "InvalidFeeRecipient"
1436
1569
  },
1437
1570
  {
1438
1571
  code: 7280,
1439
1572
  name: "ImplementationMismatch",
1440
- msg: "ImplementationMismatch",
1573
+ msg: "ImplementationMismatch"
1441
1574
  },
1442
1575
  {
1443
1576
  code: 7536,
1444
1577
  name: "InvalidGuardianSetIndex",
1445
- msg: "InvalidGuardianSetIndex",
1578
+ msg: "InvalidGuardianSetIndex"
1446
1579
  },
1447
1580
  {
1448
1581
  code: 7792,
1449
1582
  name: "GuardianSetMismatch",
1450
- msg: "GuardianSetMismatch",
1583
+ msg: "GuardianSetMismatch"
1451
1584
  },
1452
1585
  {
1453
1586
  code: 7794,
1454
1587
  name: "InstructionAtWrongIndex",
1455
- msg: "InstructionAtWrongIndex",
1588
+ msg: "InstructionAtWrongIndex"
1456
1589
  },
1457
1590
  {
1458
1591
  code: 7795,
1459
1592
  name: "EmptySigVerifyInstruction",
1460
- msg: "EmptySigVerifyInstruction",
1593
+ msg: "EmptySigVerifyInstruction"
1461
1594
  },
1462
1595
  {
1463
1596
  code: 7796,
1464
1597
  name: "InvalidSigVerifyInstruction",
1465
- msg: "InvalidSigVerifyInstruction",
1598
+ msg: "InvalidSigVerifyInstruction"
1466
1599
  },
1467
1600
  {
1468
1601
  code: 7798,
1469
1602
  name: "GuardianSetExpired",
1470
- msg: "GuardianSetExpired",
1603
+ msg: "GuardianSetExpired"
1471
1604
  },
1472
1605
  {
1473
1606
  code: 7800,
1474
1607
  name: "InvalidGuardianKeyRecovery",
1475
- msg: "InvalidGuardianKeyRecovery",
1608
+ msg: "InvalidGuardianKeyRecovery"
1476
1609
  },
1477
1610
  {
1478
1611
  code: 7802,
1479
1612
  name: "SignerIndicesMismatch",
1480
- msg: "SignerIndicesMismatch",
1613
+ msg: "SignerIndicesMismatch"
1481
1614
  },
1482
1615
  {
1483
1616
  code: 8048,
1484
1617
  name: "PayloadSizeMismatch",
1485
- msg: "PayloadSizeMismatch",
1618
+ msg: "PayloadSizeMismatch"
1486
1619
  },
1487
1620
  {
1488
1621
  code: 10112,
1489
1622
  name: "ZeroGuardians",
1490
- msg: "ZeroGuardians",
1623
+ msg: "ZeroGuardians"
1491
1624
  },
1492
1625
  {
1493
1626
  code: 10128,
1494
1627
  name: "GuardianZeroAddress",
1495
- msg: "GuardianZeroAddress",
1628
+ msg: "GuardianZeroAddress"
1496
1629
  },
1497
1630
  {
1498
1631
  code: 10144,
1499
1632
  name: "DuplicateGuardianAddress",
1500
- msg: "DuplicateGuardianAddress",
1633
+ msg: "DuplicateGuardianAddress"
1501
1634
  },
1502
1635
  {
1503
1636
  code: 10160,
1504
1637
  name: "MessageAlreadyPublished",
1505
- msg: "MessageAlreadyPublished",
1638
+ msg: "MessageAlreadyPublished"
1506
1639
  },
1507
1640
  {
1508
1641
  code: 10176,
1509
1642
  name: "VaaWritingDisallowed",
1510
- msg: "VaaWritingDisallowed",
1643
+ msg: "VaaWritingDisallowed"
1511
1644
  },
1512
1645
  {
1513
1646
  code: 10192,
1514
1647
  name: "VaaAlreadyVerified",
1515
- msg: "VaaAlreadyVerified",
1648
+ msg: "VaaAlreadyVerified"
1516
1649
  },
1517
1650
  {
1518
1651
  code: 10208,
1519
1652
  name: "InvalidGuardianIndex",
1520
- msg: "InvalidGuardianIndex",
1653
+ msg: "InvalidGuardianIndex"
1521
1654
  },
1522
1655
  {
1523
1656
  code: 10224,
1524
1657
  name: "InvalidSignature",
1525
- msg: "InvalidSignature",
1658
+ msg: "InvalidSignature"
1526
1659
  },
1527
1660
  {
1528
1661
  code: 10256,
1529
1662
  name: "UnverifiedVaa",
1530
- msg: "UnverifiedVaa",
1663
+ msg: "UnverifiedVaa"
1531
1664
  },
1532
1665
  {
1533
1666
  code: 10258,
1534
1667
  name: "VaaStillProcessing",
1535
- msg: "VaaStillProcessing",
1668
+ msg: "VaaStillProcessing"
1536
1669
  },
1537
1670
  {
1538
1671
  code: 10260,
1539
1672
  name: "InWritingStatus",
1540
- msg: "InWritingStatus",
1673
+ msg: "InWritingStatus"
1541
1674
  },
1542
1675
  {
1543
1676
  code: 10262,
1544
1677
  name: "NotInWritingStatus",
1545
- msg: "NotInWritingStatus",
1678
+ msg: "NotInWritingStatus"
1546
1679
  },
1547
1680
  {
1548
1681
  code: 10264,
1549
1682
  name: "InvalidMessageStatus",
1550
- msg: "InvalidMessageStatus",
1683
+ msg: "InvalidMessageStatus"
1551
1684
  },
1552
1685
  {
1553
1686
  code: 10266,
1554
1687
  name: "HashNotComputed",
1555
- msg: "HashNotComputed",
1688
+ msg: "HashNotComputed"
1556
1689
  },
1557
1690
  {
1558
1691
  code: 10268,
1559
1692
  name: "InvalidVaaVersion",
1560
- msg: "InvalidVaaVersion",
1693
+ msg: "InvalidVaaVersion"
1561
1694
  },
1562
1695
  {
1563
1696
  code: 10270,
1564
1697
  name: "InvalidCreatedAccountSize",
1565
- msg: "InvalidCreatedAccountSize",
1698
+ msg: "InvalidCreatedAccountSize"
1566
1699
  },
1567
1700
  {
1568
1701
  code: 10272,
1569
1702
  name: "DataOverflow",
1570
- msg: "DataOverflow",
1703
+ msg: "DataOverflow"
1571
1704
  },
1572
1705
  {
1573
1706
  code: 10274,
1574
1707
  name: "ExceedsMaxPayloadSize",
1575
- msg: "ExceedsMaxPayloadSize (30KB)",
1708
+ msg: "ExceedsMaxPayloadSize (30KB)"
1576
1709
  },
1577
1710
  {
1578
1711
  code: 10276,
1579
1712
  name: "CannotParseVaa",
1580
- msg: "CannotParseVaa",
1713
+ msg: "CannotParseVaa"
1581
1714
  },
1582
1715
  {
1583
1716
  code: 10278,
1584
1717
  name: "EmitterAuthorityMismatch",
1585
- msg: "EmitterAuthorityMismatch",
1718
+ msg: "EmitterAuthorityMismatch"
1586
1719
  },
1587
1720
  {
1588
1721
  code: 10280,
1589
1722
  name: "InvalidProgramEmitter",
1590
- msg: "InvalidProgramEmitter",
1723
+ msg: "InvalidProgramEmitter"
1591
1724
  },
1592
1725
  {
1593
1726
  code: 10282,
1594
1727
  name: "WriteAuthorityMismatch",
1595
- msg: "WriteAuthorityMismatch",
1728
+ msg: "WriteAuthorityMismatch"
1596
1729
  },
1597
1730
  {
1598
1731
  code: 10284,
1599
1732
  name: "PostedVaaPayloadTooLarge",
1600
- msg: "PostedVaaPayloadTooLarge",
1733
+ msg: "PostedVaaPayloadTooLarge"
1601
1734
  },
1602
1735
  {
1603
1736
  code: 10286,
1604
1737
  name: "ExecutableDisallowed",
1605
- msg: "ExecutableDisallowed",
1606
- },
1607
- ],
1738
+ msg: "ExecutableDisallowed"
1739
+ }
1740
+ ]
1608
1741
  };