@layerzerolabs/lz-solana-sdk-v2 3.0.15 → 3.0.17

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/dist/index.d.mts CHANGED
@@ -8,122 +8,417 @@ import BN from 'bn.js';
8
8
  import { EndpointId, Environment, Network } from '@layerzerolabs/lz-definitions';
9
9
  import { HashSigner } from '@layerzerolabs/lz-foundation';
10
10
 
11
+ /**
12
+ * Seed for the endpoint.
13
+ */
11
14
  declare const ENDPOINT_SEED = "Endpoint";
15
+ /**
16
+ * Seed for the message library.
17
+ */
12
18
  declare const MESSAGE_LIB_SEED = "MessageLib";
19
+ /**
20
+ * Seed for the send library configuration.
21
+ */
13
22
  declare const SEND_LIBRARY_CONFIG_SEED = "SendLibraryConfig";
23
+ /**
24
+ * Seed for the receive library configuration.
25
+ */
14
26
  declare const RECEIVE_LIBRARY_CONFIG_SEED = "ReceiveLibraryConfig";
27
+ /**
28
+ * Seed for the nonce.
29
+ */
15
30
  declare const NONCE_SEED = "Nonce";
31
+ /**
32
+ * Seed for the pending nonce.
33
+ */
16
34
  declare const PENDING_NONCE_SEED = "PendingNonce";
35
+ /**
36
+ * Seed for the payload hash.
37
+ */
17
38
  declare const PAYLOAD_HASH_SEED = "PayloadHash";
39
+ /**
40
+ * Seed for the composed message hash.
41
+ */
18
42
  declare const COMPOSED_MESSAGE_HASH_SEED = "ComposedMessageHash";
43
+ /**
44
+ * Seed for the OApp.
45
+ */
19
46
  declare const OAPP_SEED = "OApp";
47
+ /**
48
+ * Seed for the count.
49
+ */
20
50
  declare const COUNT_SEED = "Count";
51
+ /**
52
+ * Seed for the remote.
53
+ */
21
54
  declare const REMOTE_SEED = "Remote";
55
+ /**
56
+ * Seed for the LzReceive types.
57
+ */
22
58
  declare const LZ_RECEIVE_TYPES_SEED = "LzReceiveTypes";
59
+ /**
60
+ * Seed for the LzCompose types.
61
+ */
23
62
  declare const LZ_COMPOSE_TYPES_SEED = "LzComposeTypes";
63
+ /**
64
+ * Seed for the ULN.
65
+ */
24
66
  declare const ULN_SEED = "MessageLib";
67
+ /**
68
+ * Seed for the ULN configuration.
69
+ */
25
70
  declare const ULN_CONFIG_SEED = "UlnConfig";
71
+ /**
72
+ * Seed for the send configuration.
73
+ */
26
74
  declare const SEND_CONFIG_SEED = "SendConfig";
75
+ /**
76
+ * Seed for the receive configuration.
77
+ */
27
78
  declare const RECEIVE_CONFIG_SEED = "ReceiveConfig";
79
+ /**
80
+ * Seed for the options.
81
+ */
28
82
  declare const OPTIONS_SEED = "Options";
83
+ /**
84
+ * Seed for the confirmations.
85
+ */
29
86
  declare const CONFIRMATIONS_SEED = "Confirmations";
87
+ /**
88
+ * Seed for the worker.
89
+ */
30
90
  declare const WORKER_SEED = "Worker";
91
+ /**
92
+ * Seed for the DVN configuration.
93
+ */
31
94
  declare const DVN_CONFIG_SEED = "DvnConfig";
95
+ /**
96
+ * Seed for the event authority.
97
+ */
32
98
  declare const EVENT_SEED = "__event_authority";
99
+ /**
100
+ * Seed for the executor configuration.
101
+ */
33
102
  declare const EXECUTOR_CONFIG_SEED = "ExecutorConfig";
103
+ /**
104
+ * Seed for the price feed.
105
+ */
34
106
  declare const PRICE_FEED_SEED = "PriceFeed";
107
+ /**
108
+ * Seed for the peer.
109
+ */
35
110
  declare const PEER_SEED = "Peer";
111
+ /**
112
+ * Seed for the mint.
113
+ */
36
114
  declare const MINT_SEED = "Mint";
115
+ /**
116
+ * Seed for the enforced options.
117
+ */
37
118
  declare const ENFORCED_OPTIONS_SEED = "EnforcedOptions";
38
119
  /**
39
- * derive address for endpoint program
120
+ * Class to derive addresses for the endpoint program.
40
121
  */
41
122
  declare class EndpointPDADeriver {
42
123
  program: PublicKey;
124
+ /**
125
+ * Creates an instance of the EndpointPDADeriver class.
126
+ *
127
+ * @param {PublicKey} program - The program public key.
128
+ */
43
129
  constructor(program: PublicKey);
130
+ /**
131
+ * Derives the setting address.
132
+ *
133
+ * @returns {[PublicKey, number]} The derived address and bump seed.
134
+ */
44
135
  setting(): [PublicKey, number];
136
+ /**
137
+ * Derives the default send library configuration address.
138
+ *
139
+ * @param {number} dstEndpointId - The destination endpoint ID.
140
+ * @returns {[PublicKey, number]} The derived address and bump seed.
141
+ */
45
142
  defaultSendLibraryConfig(dstEndpointId: number): [PublicKey, number];
143
+ /**
144
+ * Derives the send library configuration address.
145
+ *
146
+ * @param {PublicKey} sender - The sender public key.
147
+ * @param {number} dstEndpointId - The destination endpoint ID.
148
+ * @returns {[PublicKey, number]} The derived address and bump seed.
149
+ */
46
150
  sendLibraryConfig(sender: PublicKey, dstEndpointId: number): [PublicKey, number];
47
151
  /**
48
- * @param messageLibrary PDA(derive by message lib program)
152
+ * Derives the message library information address.
153
+ *
154
+ * @param {PublicKey} messageLibrary - The message library public key, PDA(derive by message lib program)
155
+ * @returns {[PublicKey, number]} The derived address and bump seed.
49
156
  */
50
157
  messageLibraryInfo(messageLibrary: PublicKey): [PublicKey, number];
158
+ /**
159
+ * Derives the default receive library configuration address.
160
+ *
161
+ * @param {number} srcEndpointId - The source endpoint ID.
162
+ * @returns {[PublicKey, number]} The derived address and bump seed.
163
+ */
51
164
  defaultReceiveLibraryConfig(srcEndpointId: number): [PublicKey, number];
165
+ /**
166
+ * Derives the receive library configuration address.
167
+ *
168
+ * @param {PublicKey} receiver - The receiver public key.
169
+ * @param {number} srcEndpointId - The source endpoint ID.
170
+ * @returns {[PublicKey, number]} The derived address and bump seed.
171
+ */
52
172
  receiveLibraryConfig(receiver: PublicKey, srcEndpointId: number): [PublicKey, number];
53
173
  receiveLibraryTimeout(_dstEndpointId: number): [PublicKey, number];
54
174
  defaultMessageLib(): [PublicKey, number];
55
175
  blockMessageLib(blockMsgLib: PublicKey): [PublicKey, number];
56
176
  /**
57
- * @param localOapp
58
- * @param remoteChainId
59
- * @param remoteOapp
177
+ * Derives the nonce address.
178
+ *
179
+ * @param {PublicKey} localOapp - The local OApp public key.
180
+ * @param {number} remoteChainId - The remote chain ID.
181
+ * @param {Uint8Array} remoteOapp - The remote OApp address.
182
+ * @returns {[PublicKey, number]} The derived address and bump seed.
60
183
  */
61
184
  nonce(localOapp: PublicKey, remoteChainId: number, remoteOapp: Uint8Array): [PublicKey, number];
185
+ /**
186
+ * Derives the pending nonce address.
187
+ *
188
+ * @param {PublicKey} localOapp - The local OApp public key.
189
+ * @param {number} remoteChainId - The remote chain ID.
190
+ * @param {Uint8Array} remoteOapp - The remote OApp address.
191
+ * @returns {[PublicKey, number]} The derived address and bump seed.
192
+ */
62
193
  pendingNonce(localOapp: PublicKey, remoteChainId: number, remoteOapp: Uint8Array): [PublicKey, number];
194
+ /**
195
+ * Derives the OApp registry address.
196
+ *
197
+ * @param {PublicKey} localOapp - The local OApp public key.
198
+ * @returns {[PublicKey, number]} The derived address and bump seed.
199
+ */
63
200
  oappRegistry(localOapp: PublicKey): [PublicKey, number];
64
- /***
65
- * @param receiver
66
- * @param srcEid
67
- * @param sender
68
- * @param nonce
69
- * @param payloadHash
70
- * @srcChainId u32 to Uint8Array([0,0,0,0])
71
- * @sender [u8; 32] sender Address
72
- * @nonce u64 to Uint8Array([0,0,0,0,0,0,0,0])
73
- * @payloadHash [u8; 32]
201
+ /**
202
+ * Derives the payload hash address.
203
+ *
204
+ * @param {PublicKey} receiver - The receiver public key.
205
+ * @param {number} srcEid - The source endpoint ID.
206
+ * @param {Uint8Array} sender - The sender address.
207
+ * @param {number} nonce - The nonce.
208
+ * @returns {[PublicKey, number]} The derived address and bump seed.
74
209
  */
75
210
  payloadHash(receiver: PublicKey, srcEid: number, sender: Uint8Array, nonce: number): [PublicKey, number];
211
+ /**
212
+ * Derives the composed message address.
213
+ *
214
+ * @param {PublicKey} from - The sender public key.
215
+ * @param {Uint8Array} guid - The GUID.
216
+ * @param {number} index - The index.
217
+ * @param {PublicKey} to - The receiver public key.
218
+ * @param {Uint8Array} messageHash - The message hash.
219
+ * @returns {[PublicKey, number]} The derived address and bump seed.
220
+ */
76
221
  composedMessage(from: PublicKey, guid: Uint8Array, index: number, to: PublicKey, messageHash: Uint8Array): [PublicKey, number];
77
222
  }
78
- /***
79
- * derive address by message lib program
223
+ /**
224
+ * Class to derive addresses by message library program.
80
225
  */
81
226
  declare class MessageLibPDADeriver {
82
227
  program: PublicKey;
228
+ /**
229
+ * Creates an instance of the MessageLibPDADeriver class.
230
+ *
231
+ * @param {PublicKey} program - The program public key.
232
+ */
83
233
  constructor(program: PublicKey);
234
+ /**
235
+ * Derives the message library address.
236
+ *
237
+ * @returns {[PublicKey, number]} The derived address and bump seed.
238
+ */
84
239
  messageLib(): [PublicKey, number];
240
+ /**
241
+ * Derives the send configuration address.
242
+ *
243
+ * @param {number} eid - The endpoint ID.
244
+ * @param {PublicKey} oapp - The OApp public key.
245
+ * @returns {[PublicKey, number]} The derived address and bump seed.
246
+ */
85
247
  sendConfig(eid: number, oapp: PublicKey): [PublicKey, number];
248
+ /**
249
+ * Derives the receive configuration address.
250
+ *
251
+ * @param {number} eid - The endpoint ID.
252
+ * @param {PublicKey} oapp - The OApp public key.
253
+ * @returns {[PublicKey, number]} The derived address and bump seed.
254
+ */
86
255
  receiveConfig(eid: number, oapp: PublicKey): [PublicKey, number];
87
256
  }
257
+ /**
258
+ * Class to derive addresses for the ULN program.
259
+ * @see {@link MessageLibPDADeriver}
260
+ */
88
261
  declare class UlnPDADeriver extends MessageLibPDADeriver {
262
+ /**
263
+ * Derives the setting address.
264
+ *
265
+ * @returns {[PublicKey, number]} The derived address and bump seed.
266
+ */
89
267
  setting(): [PublicKey, number];
268
+ /**
269
+ * Derives the configuration address.
270
+ *
271
+ * @param {number} eid - The endpoint ID.
272
+ * @returns {[PublicKey, number]} The derived address and bump seed.
273
+ */
90
274
  config(eid: number): [PublicKey, number];
275
+ /**
276
+ * Derives the default send configuration address.
277
+ *
278
+ * @param {number} eid - The endpoint ID.
279
+ * @returns {[PublicKey, number]} The derived address and bump seed.
280
+ */
91
281
  defaultSendConfig(eid: number): [PublicKey, number];
282
+ /**
283
+ * Derives the default receive configuration address.
284
+ *
285
+ * @param {number} eid - The endpoint ID.
286
+ * @returns {[PublicKey, number]} The derived address and bump seed.
287
+ */
92
288
  defaultReceiveConfig(eid: number): [PublicKey, number];
289
+ /**
290
+ * Derives the options address.
291
+ *
292
+ * @param {number} eit - The endpoint ID.
293
+ * @returns {[PublicKey, number]} The derived address and bump seed.
294
+ */
93
295
  options(eit: number): [PublicKey, number];
296
+ /**
297
+ * Derives the worker configuration address.
298
+ *
299
+ * @param {PublicKey} worker - The worker public key.
300
+ * @returns {[PublicKey, number]} The derived address and bump seed.
301
+ */
94
302
  workerConfig(worker: PublicKey): [PublicKey, number];
303
+ /**
304
+ * Derives the confirmations address.
305
+ *
306
+ * @param {Uint8Array} headerHash - The header hash.
307
+ * @param {Uint8Array} payloadHash - The payload hash.
308
+ * @param {PublicKey} dvn - The DVN public key.
309
+ * @returns {[PublicKey, number]} The derived address and bump seed.
310
+ */
95
311
  confirmations(headerHash: Uint8Array, payloadHash: Uint8Array, dvn: PublicKey): [PublicKey, number];
96
312
  }
97
313
  /**
98
- * derive address by base oapp program
314
+ * Class to derive addresses by base OApp program.
99
315
  */
100
316
  declare class OAppBasePDADeriver {
101
317
  program: PublicKey;
318
+ /**
319
+ * Creates an instance of the OAppBasePDADeriver class.
320
+ *
321
+ * @param {PublicKey} program - The program public key.
322
+ */
102
323
  constructor(program: PublicKey);
324
+ /**
325
+ * Derives the remote address.
326
+ *
327
+ * @param {number} dstChainId - The destination chain ID.
328
+ * @returns {[PublicKey, number]} The derived address and bump seed.
329
+ */
103
330
  remote(dstChainId: number): [PublicKey, number];
331
+ /**
332
+ * Derives the LzReceive types accounts address.
333
+ *
334
+ * @returns {[PublicKey, number]} The derived address and bump seed.
335
+ */
104
336
  lzReceiveTypesAccounts(): [PublicKey, number];
337
+ /**
338
+ * Derives the LzCompose types accounts address.
339
+ *
340
+ * @returns {[PublicKey, number]} The derived address and bump seed.
341
+ */
105
342
  lzComposeTypesAccounts(): [PublicKey, number];
106
343
  }
344
+ /**
345
+ * Class to derive addresses for the DVN program.
346
+ */
107
347
  declare class DVNDeriver {
108
348
  program: PublicKey;
109
349
  constructor(program: PublicKey);
350
+ /**
351
+ * Derives the authority address.
352
+ *
353
+ * @returns {[PublicKey, number]} The derived address and bump seed.
354
+ */
110
355
  authority(): [PublicKey, number];
356
+ /**
357
+ * Derives the configuration address.
358
+ *
359
+ * @returns {[PublicKey, number]} The derived address and bump seed.
360
+ */
111
361
  config(): [PublicKey, number];
362
+ /**
363
+ * Derives the execute hash address.
364
+ *
365
+ * @param {Buffer} digestHash - The digest hash.
366
+ * @returns {[PublicKey, number]} The derived address and bump seed.
367
+ */
112
368
  executeHash(digestHash: Buffer): [PublicKey, number];
113
369
  }
370
+ /**
371
+ * Class for deriving PDA (Program Derived Address) for events.
372
+ */
114
373
  declare class EventPDADeriver {
115
374
  program: PublicKey;
375
+ /**
376
+ * Creates an instance of the EventPDADeriver class.
377
+ *
378
+ * @param {PublicKey} program - The program public key.
379
+ */
116
380
  constructor(program: PublicKey);
381
+ /**
382
+ * Derives the event authority PDA.
383
+ *
384
+ * @returns {[PublicKey, number]} The event authority PDA and bump seed.
385
+ */
117
386
  eventAuthority(): [PublicKey, number];
118
387
  }
388
+ /**
389
+ * Class for deriving PDA (Program Derived Address) for executors.
390
+ */
119
391
  declare class ExecutorPDADeriver {
120
392
  program: PublicKey;
393
+ /**
394
+ * Creates an instance of the ExecutorPDADeriver class.
395
+ *
396
+ * @param {PublicKey} program - The program public key.
397
+ */
121
398
  constructor(program: PublicKey);
399
+ /**
400
+ * Derives the executor configuration PDA.
401
+ *
402
+ * @returns {[PublicKey, number]} The executor configuration PDA and bump seed.
403
+ */
122
404
  config(): [PublicKey, number];
123
405
  }
406
+ /**
407
+ * Class for deriving PDA (Program Derived Address) for price feeds.
408
+ */
124
409
  declare class PriceFeedPDADeriver {
125
410
  program: PublicKey;
411
+ /**
412
+ * Creates an instance of the PriceFeedPDADeriver class.
413
+ *
414
+ * @param {PublicKey} program - The program public key.
415
+ */
126
416
  constructor(program: PublicKey);
417
+ /**
418
+ * Derives the price feed PDA.
419
+ *
420
+ * @returns {[PublicKey, number]} The price feed PDA and bump seed.
421
+ */
127
422
  priceFeed(): [PublicKey, number];
128
423
  }
129
424
 
@@ -6482,33 +6777,143 @@ declare const PROGRAM_ID$5: PublicKey;
6482
6777
 
6483
6778
  declare const EventEmitDiscriminator = "e445a52e51cb9a1d";
6484
6779
  declare const DefaultMessageLib: PublicKey;
6780
+ /**
6781
+ * Class representing an Endpoint.
6782
+ */
6485
6783
  declare class Endpoint {
6486
6784
  program: PublicKey;
6487
6785
  deriver: EndpointPDADeriver;
6488
6786
  eventAuthorityPDA: PublicKey;
6787
+ /**
6788
+ * Creates an instance of the Endpoint class.
6789
+ *
6790
+ * @param {PublicKey} program - The program public key.
6791
+ */
6489
6792
  constructor(program: PublicKey);
6490
6793
  /**
6491
- * init endpoint settings, including eid, admin, it also registers the blocked message lib
6794
+ * Initializes the endpoint settings, including eid and admin, and registers the blocked message library.
6795
+ *
6796
+ * @param {number} endpointId - The endpoint ID.
6797
+ * @param {PublicKey} payer - The payer public key.
6798
+ * @param {PublicKey} admin - The admin public key.
6799
+ * @returns {TransactionInstruction} The transaction instruction.
6492
6800
  */
6493
6801
  initEndpoint(endpointId: number, payer: PublicKey, admin: PublicKey): TransactionInstruction;
6494
- /***
6802
+ /**
6803
+ * Registers a library.
6495
6804
  * call this function after endpoint initialized. Only admin can call this function.
6805
+ *
6806
+ * @param {PublicKey} admin - The admin public key.
6807
+ * @param {PublicKey} messageLibProgram - The message library program public key.
6808
+ * @param {types.MessageLibType} [libType=types.MessageLibType.SendAndReceive] - The library type.
6809
+ * @returns {TransactionInstruction} The transaction instruction.
6496
6810
  */
6497
6811
  registerLibrary(admin: PublicKey, messageLibProgram: PublicKey, libType?: MessageLibType): TransactionInstruction;
6812
+ /**
6813
+ * Sets the default send library.
6814
+ *
6815
+ * @param {Connection} connection - The connection to the Solana cluster.
6816
+ * @param {PublicKey} admin - The admin public key.
6817
+ * @param {PublicKey} messageLibProgram - The message library program public key.
6818
+ * @param {number} dstEid - The destination endpoint ID.
6819
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
6820
+ * @returns {Promise<TransactionInstruction | null>} A promise that resolves to the transaction instruction or null if not needed.
6821
+ */
6498
6822
  setDefaultSendLibrary(connection: Connection, admin: PublicKey, messageLibProgram: PublicKey, dstEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction | null>;
6823
+ /**
6824
+ * Sets the default receive library.
6825
+ *
6826
+ * @param {Connection} connection - The connection to the Solana cluster.
6827
+ * @param {PublicKey} admin - The admin public key.
6828
+ * @param {PublicKey} messageLibProgram - The message library program public key.
6829
+ * @param {number} srcEid - The source endpoint ID.
6830
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
6831
+ * @returns {Promise<TransactionInstruction | null>} A promise that resolves to the transaction instruction or null if not needed.
6832
+ */
6499
6833
  setDefaultReceiveLibrary(connection: Connection, admin: PublicKey, messageLibProgram: PublicKey, srcEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction | null>;
6834
+ /**
6835
+ * Initializes the OApp configuration.
6836
+ *
6837
+ * @param {PublicKey} delegate - The delegate public key.
6838
+ * @param {MessageLibInterface} msgLibSDK - The message library SDK.
6839
+ * @param {PublicKey} payer - The payer public key.
6840
+ * @param {PublicKey} oappID - The OApp ID public key.
6841
+ * @param {number} eid - The endpoint ID.
6842
+ * @returns {TransactionInstruction} The transaction instruction.
6843
+ */
6500
6844
  initOAppConfig(delegate: PublicKey, msgLibSDK: MessageLibInterface, payer: PublicKey, oappID: PublicKey, eid: number): TransactionInstruction;
6845
+ /**
6846
+ * Initializes the OApp nonce.
6847
+ *
6848
+ * @param {PublicKey} delegate - The delegate public key.
6849
+ * @param {number} dstEid - The destination endpoint ID.
6850
+ * @param {PublicKey} oappIDPDA - The OApp ID PDA.
6851
+ * @param {Uint8Array} remoteOappAddr - The remote OApp address.
6852
+ * @returns {TransactionInstruction} The transaction instruction.
6853
+ */
6501
6854
  initOAppNonce(delegate: PublicKey, // payer
6502
6855
  dstEid: number, oappIDPDA: PublicKey, remoteOappAddr: Uint8Array): TransactionInstruction;
6856
+ /**
6857
+ * Initializes the send library.
6858
+ *
6859
+ * @param {PublicKey} delegate - The delegate public key.
6860
+ * @param {PublicKey} sender - The sender public key.
6861
+ * @param {number} dstEid - The destination endpoint ID.
6862
+ * @returns {TransactionInstruction} The transaction instruction.
6863
+ */
6503
6864
  initSendLibrary(delegate: PublicKey, sender: PublicKey, dstEid: number): TransactionInstruction;
6865
+ /**
6866
+ * Sets the send library.
6867
+ *
6868
+ * @param {PublicKey} oappAdmin - The OApp admin public key.
6869
+ * @param {PublicKey} oappIDPDA - The OApp ID PDA.
6870
+ * @param {PublicKey} newSendLibProgram - The new send library program public key.
6871
+ * @param {number} dstEid - The destination endpoint ID.
6872
+ * @returns {TransactionInstruction} The transaction instruction.
6873
+ */
6504
6874
  setSendLibrary(oappAdmin: PublicKey, oappIDPDA: PublicKey, newSendLibProgram: PublicKey, dstEid: number): TransactionInstruction;
6875
+ /**
6876
+ * Initializes the receive library.
6877
+ *
6878
+ * @param {PublicKey} delegate - The delegate public key.
6879
+ * @param {PublicKey} receiver - The receiver public key.
6880
+ * @param {number} srcEid - The source endpoint ID.
6881
+ * @returns {TransactionInstruction} The transaction instruction.
6882
+ */
6505
6883
  initReceiveLibrary(delegate: PublicKey, receiver: PublicKey, srcEid: number): TransactionInstruction;
6884
+ /**
6885
+ * Sets the receive library.
6886
+ *
6887
+ * @param {PublicKey} oappAdmin - The OApp admin public key.
6888
+ * @param {PublicKey} oappIDPDA - The OApp ID PDA.
6889
+ * @param {PublicKey} newReceiveLibProgram - The new receive library program public key.
6890
+ * @param {number} srcEid - The source endpoint ID.
6891
+ * @param {bigint | number} [gracePeriod] - The grace period.
6892
+ * @returns {TransactionInstruction} The transaction instruction.
6893
+ */
6506
6894
  setReceiveLibrary(oappAdmin: PublicKey, oappIDPDA: PublicKey, newReceiveLibProgram: PublicKey, srcEid: number, gracePeriod?: bigint | number): TransactionInstruction;
6895
+ /**
6896
+ * Sets the OApp configuration.
6897
+ *
6898
+ * @param {Connection} connection - The connection to the Solana cluster.
6899
+ * @param {PublicKey} oappDelegate - The OApp delegate public key.
6900
+ * @param {PublicKey} oappID - The OApp ID public key.
6901
+ * @param {PublicKey} msgLibProgram - The message library program public key.
6902
+ * @param {number} eid - The endpoint ID.
6903
+ * @param {object} config - The configuration object.
6904
+ * @param {SetConfigType} config.configType - The configuration type.
6905
+ * @param {UlnProgram.types.ExecutorConfig | UlnProgram.types.UlnConfig} config.value - The configuration value.
6906
+ * @param {Commitment} [commitment='confirmed'] - The commitment level.
6907
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
6908
+ * @throws {Error} If the message library version is unsupported.
6909
+ */
6507
6910
  setOappConfig(connection: Connection, oappDelegate: PublicKey, oappID: PublicKey, msgLibProgram: PublicKey, eid: number, config: {
6508
6911
  configType: SetConfigType;
6509
6912
  value: ExecutorConfig | UlnConfig;
6510
6913
  }, commitment?: Commitment): Promise<TransactionInstruction>;
6511
- /***
6914
+ /**
6915
+ *
6916
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the quote instruction.
6512
6917
  *
6513
6918
  * caculate the fee for sending a message with ULN:
6514
6919
  * 1. executorFee: feeForGas + feeForOptionType
@@ -6519,14 +6924,58 @@ declare class Endpoint {
6519
6924
  *
6520
6925
  * The priceRatioDenominator is 10^20
6521
6926
  * totalFee = executorFee + oracleFee * numOracles(requiredOracles + optionalOracles)
6927
+ *
6928
+ * @param {Connection} connection - The connection to the Solana cluster.
6929
+ * @param {PublicKey} payer - The payer public key.
6930
+ * @param {PacketPath} path - The packet path.
6931
+ * @param {MessageLibInterface} msgLibProgram - The message library program.
6932
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
6933
+ * @throws {Error} If the default send library is not initialized or the message library is blocked.
6522
6934
  */
6523
6935
  getQuoteIXAccountMetaForCPI(connection: Connection, payer: PublicKey, path: PacketPath, msgLibProgram: MessageLibInterface): Promise<AccountMeta[]>;
6524
- /***
6525
- * Get the account meta of the send instruction for CPI(Cross-Program Invocation )
6936
+ /**
6937
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the send instruction.
6938
+ *
6939
+ * @param {Connection} connection - The connection to the Solana cluster.
6940
+ * @param {PublicKey} payer - The payer public key.
6941
+ * @param {PacketPath} path - The packet path.
6942
+ * @param {MessageLibInterface} msgLibProgram - The message library program.
6943
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
6944
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
6945
+ * @throws {Error} If the default send library is not initialized or the message library is blocked.
6526
6946
  */
6527
6947
  getSendIXAccountMetaForCPI(connection: Connection, payer: PublicKey, path: PacketPath, msgLibProgram: MessageLibInterface, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<AccountMeta[]>;
6948
+ /**
6949
+ * Skips a message.
6950
+ *
6951
+ * @param {PublicKey} payer - The payer public key.
6952
+ * @param {PublicKey} sender - The sender public key.
6953
+ * @param {PublicKey} receiver - The receiver public key.
6954
+ * @param {number} srcEid - The source endpoint ID.
6955
+ * @param {string} nonce - The nonce.
6956
+ * @returns {Promise<TransactionInstruction | null>} A promise that resolves to the transaction instruction or null if not needed.
6957
+ */
6528
6958
  skip(payer: PublicKey, sender: PublicKey, receiver: PublicKey, srcEid: number, nonce: string): Promise<TransactionInstruction | null>;
6959
+ /**
6960
+ * Initializes the verification process.
6961
+ *
6962
+ * @param {Connection} connection - The connection to the Solana cluster.
6963
+ * @param {PublicKey} payer - The payer public key.
6964
+ * @param {PublicKey} sender - The sender public key.
6965
+ * @param {PublicKey} receiver - The receiver public key.
6966
+ * @param {number} srcEid - The source endpoint ID.
6967
+ * @param {string} nonce - The nonce.
6968
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
6969
+ * @returns {Promise<TransactionInstruction | null>} A promise that resolves to the transaction instruction or null if not needed.
6970
+ */
6529
6971
  initVerify(connection: Connection, payer: PublicKey, sender: PublicKey, receiver: PublicKey, srcEid: number, nonce: string, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction | null>;
6972
+ /**
6973
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the verify instruction.
6974
+ *
6975
+ * @param {PacketV1Codec} packet - The packet.
6976
+ * @param {PublicKey} receiveLibrary - The receive library public key.
6977
+ * @returns {AccountMeta[]} An array of account metadata.
6978
+ */
6530
6979
  getVerifyIXAccountMetaForCPI(packet: PacketV1Codec, receiveLibrary: PublicKey): AccountMeta[];
6531
6980
  /***
6532
6981
  * resetConfig is only supported by ULN
@@ -6540,27 +6989,93 @@ declare class Endpoint {
6540
6989
  /**
6541
6990
  * @param composer. The composer is usually the PDA of the app's ID. It depends on the oapp's implementation.
6542
6991
  */
6992
+ /**
6993
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the register OApp instruction.
6994
+ *
6995
+ * @param {PublicKey} payer - The payer public key.
6996
+ * @param {PublicKey} oapp - The OApp public key.
6997
+ * @returns {AccountMeta[]} An array of account metadata.
6998
+ */
6543
6999
  getRegisterOappIxAccountMetaForCPI(payer: PublicKey, oapp: PublicKey): AccountMeta[];
7000
+ /**
7001
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the skip instruction.
7002
+ *
7003
+ * @param {PublicKey} receiver - The receiver public key.
7004
+ * @param {Uint8Array} sender - The sender address.
7005
+ * @param {number} srcEid - The source endpoint ID.
7006
+ * @param {number} nonce - The nonce.
7007
+ * @returns {AccountMeta[]} An array of account metadata.
7008
+ */
6544
7009
  getSkipIxAccountMetaForCPI(receiver: PublicKey, sender: Uint8Array, srcEid: number, nonce: number): AccountMeta[];
7010
+ /**
7011
+ * Checks if the given message library program is the default send library.
7012
+ *
7013
+ * @param {Connection} connection - The connection to the Solana cluster.
7014
+ * @param {PublicKey} messageLibProgram - The message library program public key.
7015
+ * @param {number} dstEid - The destination endpoint ID.
7016
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7017
+ * @returns {Promise<boolean>} A promise that resolves to true if the message library program is the default send library, false otherwise.
7018
+ */
6545
7019
  isDefaultSendLibrary(connection: Connection, messageLibProgram: PublicKey, dstEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<boolean>;
7020
+ /**
7021
+ * Checks if the given message library program is the default receive library.
7022
+ *
7023
+ * @param {Connection} connection - The connection to the Solana cluster.
7024
+ * @param {PublicKey} messageLibProgram - The message library program public key.
7025
+ * @param {number} srcEid - The source endpoint ID.
7026
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7027
+ * @returns {Promise<boolean>} A promise that resolves to true if the message library program is the default receive library, false otherwise.
7028
+ */
6546
7029
  isDefaultReceiveLibrary(connection: Connection, messageLibProgram: PublicKey, srcEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<boolean>;
7030
+ /**
7031
+ * Gets the endpoint settings.
7032
+ *
7033
+ * @param {Connection} connection - The connection to the Solana cluster.
7034
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7035
+ * @returns {Promise<EndpointSettings | null>} A promise that resolves to the endpoint settings or null if not found.
7036
+ */
6547
7037
  getSetting(connection: Connection, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<EndpointSettings | null>;
6548
7038
  /**
7039
+ * Gets the message library information.
6549
7040
  *
6550
- * @param messageLib It is a PDA of the message library program
7041
+ * @param {Connection} connection - The connection to the Solana cluster.
7042
+ * @param {PublicKey} messageLibProgram - The message library program public key, It is a PDA of the message library program
7043
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7044
+ * @returns {Promise<MessageLibInfo | null>} A promise that resolves to the message library information or null if not found.
6551
7045
  */
6552
7046
  getMessageLibInfo(connection: Connection, messageLibProgram: PublicKey, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<MessageLibInfo | null>;
7047
+ /**
7048
+ * Gets the default receive library.
7049
+ *
7050
+ * @param {Connection} connection - The connection to the Solana cluster.
7051
+ * @param {number} srcEid - The source endpoint ID.
7052
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7053
+ * @returns {Promise<{ msgLib: PublicKey; owner?: PublicKey } | null>} A promise that resolves to the default receive library or null if not found.
7054
+ */
6553
7055
  getDefaultReceiveLibrary(connection: Connection, srcEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<{
6554
7056
  msgLib: PublicKey;
6555
7057
  owner?: PublicKey;
6556
7058
  } | null>;
7059
+ /**
7060
+ * Gets the default send library.
7061
+ *
7062
+ * @param {Connection} connection - The connection to the Solana cluster.
7063
+ * @param {number} dstEid - The destination endpoint ID.
7064
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7065
+ * @returns {Promise<{ msgLib: PublicKey; owner?: PublicKey } | null>} A promise that resolves to the default send library or null if not found.
7066
+ */
6557
7067
  getDefaultSendLibrary(connection: Connection, dstEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<{
6558
7068
  msgLib: PublicKey;
6559
7069
  owner?: PublicKey;
6560
7070
  } | null>;
6561
7071
  /**
6562
- * get app configured send library
6563
- * 2 RPC calls
7072
+ * Gets the configured send library for the app.
7073
+ *
7074
+ * @param {Connection} connection - The connection to the Solana cluster.
7075
+ * @param {PublicKey} oappPda - The OApp PDA.
7076
+ * @param {number} dstEid - The destination endpoint ID.
7077
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig='confirmed'] - The commitment level or account info configuration.
7078
+ * @returns {Promise<{ msgLib: PublicKey; programId?: PublicKey; isDefault: boolean } | null>} A promise that resolves to the configured send library or null if not found.
6564
7079
  */
6565
7080
  getSendLibrary(connection: Connection, oappPda: PublicKey, dstEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<{
6566
7081
  msgLib: PublicKey;
@@ -6568,7 +7083,13 @@ declare class Endpoint {
6568
7083
  isDefault: boolean;
6569
7084
  } | null>;
6570
7085
  /**
6571
- * get app configured receive library
7086
+ * Gets the configured receive library for the app.
7087
+ *
7088
+ * @param {Connection} connection - The connection to the Solana cluster.
7089
+ * @param {PublicKey} oappPda - The OApp PDA.
7090
+ * @param {number} srcEid - The source endpoint ID.
7091
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7092
+ * @returns {Promise<{ msgLib: PublicKey; programId?: PublicKey; isDefault: boolean; timeout: { msgLib: PublicKey; expiry: bigint } | null } | null>} A promise that resolves to the configured receive library or null if not found.
6572
7093
  */
6573
7094
  getReceiveLibrary(connection: Connection, oappPda: PublicKey, srcEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<{
6574
7095
  msgLib: PublicKey;
@@ -6579,11 +7100,70 @@ declare class Endpoint {
6579
7100
  expiry: bigint;
6580
7101
  } | null;
6581
7102
  } | null>;
7103
+ /**
7104
+ * Gets the inbound payload hash.
7105
+ *
7106
+ * @param {Connection} connection - The connection to the Solana cluster.
7107
+ * @param {PublicKey} receiver - The receiver public key.
7108
+ * @param {number} srcEid - The source endpoint ID.
7109
+ * @param {Uint8Array} sender - The sender address.
7110
+ * @param {number} nonce - The nonce.
7111
+ * @param {Uint8Array} _payloadHash - The payload hash.
7112
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7113
+ * @returns {Promise<PayloadHash | null>} A promise that resolves to the payload hash or null if not found.
7114
+ */
6582
7115
  getInboundPayloadHash(connection: Connection, receiver: PublicKey, srcEid: number, sender: Uint8Array, nonce: number, _payloadHash: Uint8Array, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<PayloadHash | null>;
7116
+ /**
7117
+ * Gets the composed message state.
7118
+ *
7119
+ * @param {Connection} connection - The connection to the Solana cluster.
7120
+ * @param {PublicKey} from - The sender public key.
7121
+ * @param {types.SendComposeParams} params - The send compose parameters.
7122
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7123
+ * @returns {Promise<ComposeMessageState | null>} A promise that resolves to the composed message state or null if not found.
7124
+ */
6583
7125
  getComposedMessageState(connection: Connection, from: PublicKey, params: SendComposeParams, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<ComposeMessageState | null>;
7126
+ /**
7127
+ * Gets the nonce.
7128
+ *
7129
+ * @param {Connection} connection - The connection to the Solana cluster.
7130
+ * @param {PublicKey} oappIDPDA - The OApp ID PDA.
7131
+ * @param {number} remoteEid - The remote endpoint ID.
7132
+ * @param {Uint8Array} remoteOappAddr - The remote OApp address.
7133
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7134
+ * @returns {Promise<accounts.Nonce | null>} A promise that resolves to the nonce or null if not found.
7135
+ */
6584
7136
  getNonce(connection: Connection, oappIDPDA: PublicKey, remoteEid: number, remoteOappAddr: Uint8Array, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<Nonce$1 | null>;
7137
+ /**
7138
+ * Gets the pending inbound nonce.
7139
+ *
7140
+ * @param {Connection} connection - The connection to the Solana cluster.
7141
+ * @param {PublicKey} oappIDPDA - The OApp ID PDA.
7142
+ * @param {number} remoteEid - The remote endpoint ID.
7143
+ * @param {Uint8Array} remoteOappAddr - The remote OApp address.
7144
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
7145
+ * @returns {Promise<accounts.PendingInboundNonce | null>} A promise that resolves to the pending inbound nonce or null if not found.
7146
+ */
6585
7147
  getPendingInboundNonce(connection: Connection, oappIDPDA: PublicKey, remoteEid: number, remoteOappAddr: Uint8Array, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<PendingInboundNonce | null>;
7148
+ /**
7149
+ * Gets the message library version.
7150
+ *
7151
+ * @param {Connection} connection - The connection to the Solana cluster.
7152
+ * @param {PublicKey} payer - The payer public key.
7153
+ * @param {PublicKey} messageLibProgram - The message library program public key.
7154
+ * @param {Commitment} [commitment='confirmed'] - The commitment level.
7155
+ * @returns {Promise<Version | null>} A promise that resolves to the version or null if not found.
7156
+ */
6586
7157
  getMessageLibVersion(connection: Connection, payer: PublicKey, messageLibProgram: PublicKey, commitment?: Commitment): Promise<Version$1 | null>;
7158
+ /**
7159
+ * Transfers the admin role to a new admin.
7160
+ *
7161
+ * @param {Connection} connection - The connection to the Solana cluster.
7162
+ * @param {PublicKey} admin - The current admin public key.
7163
+ * @param {PublicKey} newAdmin - The new admin public key.
7164
+ * @param {Commitment} [commitment='confirmed'] - The commitment level.
7165
+ * @returns {Promise<TransactionInstruction | null>} A promise that resolves to the transaction instruction or null if not needed.
7166
+ */
6587
7167
  transferAdmin(connection: Connection, admin: PublicKey, newAdmin: PublicKey, commitment?: Commitment): Promise<TransactionInstruction | null>;
6588
7168
  }
6589
7169
 
@@ -6595,24 +7175,114 @@ declare namespace endpoint {
6595
7175
  export { endpoint_DefaultMessageLib as DefaultMessageLib, endpoint_Endpoint as Endpoint, endpoint_EventEmitDiscriminator as EventEmitDiscriminator, PROGRAM_ID$6 as PROGRAM_ID, index$r as accounts, index$q as errors, index$n as events, index$p as instructions, index$o as types };
6596
7176
  }
6597
7177
 
7178
+ /**
7179
+ * Class representing the SimpleMessageLib.
7180
+ * @see {@link MessageLibInterface}
7181
+ */
6598
7182
  declare class SimpleMessageLib implements MessageLibInterface {
6599
7183
  program: PublicKey;
7184
+ /**
7185
+ * The PDA deriver for the message library.
7186
+ */
6600
7187
  deriver: MessageLibPDADeriver;
7188
+ /**
7189
+ * Creates an instance of the SimpleMessageLib class.
7190
+ *
7191
+ * @param {PublicKey} program - The program public key.
7192
+ */
6601
7193
  constructor(program: PublicKey);
7194
+ /**
7195
+ * Initializes the SimpleMessageLib.
7196
+ *
7197
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
7198
+ * @param {PublicKey} payer - The payer public key.
7199
+ * @param {PublicKey} admin - The admin public key.
7200
+ * @param {number} eid - The endpoint ID.
7201
+ * @param {number} nativeFee - The native fee.
7202
+ * @param {number} [lzTokenFee=0] - The LayerZero token fee.
7203
+ *
7204
+ * @returns {TransactionInstruction} The transaction instruction.
7205
+ */
6602
7206
  initSimpleMessageLib(endpointProgram: PublicKey, payer: PublicKey, admin: PublicKey, eid: number, nativeFee: number, lzTokenFee?: number): TransactionInstruction;
7207
+ /**
7208
+ * Sets the whitelist caller.
7209
+ *
7210
+ * @param {PublicKey} admin - The admin public key.
7211
+ * @param {PublicKey} newCaller - The new caller public key.
7212
+ *
7213
+ * @returns {TransactionInstruction} The transaction instruction.
7214
+ */
6603
7215
  setWhitelistCaller(admin: PublicKey, newCaller: PublicKey): TransactionInstruction;
7216
+ /**
7217
+ * Checks if a caller is whitelisted.
7218
+ *
7219
+ * @param {Connection} connection - The connection object.
7220
+ * @param {PublicKey} caller - The caller public key.
7221
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment or config.
7222
+ *
7223
+ * @returns {Promise<boolean>} A promise that resolves to true if the caller is whitelisted, false otherwise.
7224
+ */
6604
7225
  isWhiteListed(connection: Connection, caller: PublicKey, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<boolean>;
7226
+ /**
7227
+ * Gets the whitelisted caller.
7228
+ *
7229
+ * @param {Connection} connection - The connection object.
7230
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment or config.
7231
+ *
7232
+ * @returns {Promise<PublicKey>} A promise that resolves to the whitelisted caller public key.
7233
+ */
6605
7234
  getWhiteListCaller(connection: Connection, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<PublicKey>;
7235
+ /**
7236
+ * Validates a packet.
7237
+ *
7238
+ * @param {Connection} _connection - The connection object.
7239
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
7240
+ * @param {PublicKey} payer - The payer public key.
7241
+ * @param {Uint8Array} encodedPacket - The encoded packet.
7242
+ *
7243
+ * @returns {TransactionInstruction} The transaction instruction.
7244
+ */
6606
7245
  validatePacket(_connection: Connection, endpointProgram: PublicKey, payer: PublicKey, encodedPacket: Uint8Array): TransactionInstruction;
6607
- /***
6608
- * Get the account meta of the send instruction for CPI(Cross-Program Invocation )
7246
+ /**
7247
+ * Gets the account meta of the send instruction for CPI (Cross-Program Invocation).
7248
+ *
7249
+ * @param {Connection} _connection - The connection object.
7250
+ * @param {PublicKey} payer - The payer public key.
7251
+ * @param {PacketPath} _path - The packet path.
7252
+ *
7253
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account meta.
6609
7254
  */
6610
7255
  getSendIXAccountMetaForCPI(_connection: Connection, payer: PublicKey, _path: PacketPath): Promise<AccountMeta[]>;
7256
+ /**
7257
+ * Gets the account meta of the quote instruction for CPI (Cross-Program Invocation).
7258
+ *
7259
+ * @param {Connection} _connection - The connection object.
7260
+ * @param {PublicKey} _payer - The payer public key.
7261
+ * @param {PacketPath} _path - The packet path.
7262
+ * @param {Commitment} [commitment] - The commitment.
7263
+ *
7264
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account meta.
7265
+ */
6611
7266
  getQuoteIXAccountMetaForCPI(_connection: Connection, _payer: PublicKey, _path: PacketPath, _commitment?: Commitment): Promise<AccountMeta[]>;
6612
- /***
6613
- * Get the account meta of the send instruction for CPI(Cross-Program Invocation )
7267
+ /**
7268
+ * Gets the account meta of the init config instruction for CPI (Cross-Program Invocation).
7269
+ *
7270
+ * @param {PublicKey} payer - The payer public key.
7271
+ * @param {PublicKey} oappID - The oapp ID public key.
7272
+ * @param {number} eid - The endpoint ID.
7273
+ *
7274
+ * @returns {AccountMeta[]} An array of account meta.
6614
7275
  */
6615
7276
  getInitConfigIXAccountMetaForCPI(payer: PublicKey, oappID: PublicKey, eid: number): AccountMeta[];
7277
+ /**
7278
+ * Gets the account meta of the set config instruction for CPI (Cross-Program Invocation).
7279
+ *
7280
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
7281
+ * @param {PublicKey} oappID - The oapp ID public key.
7282
+ * @param {number} eid - The endpoint ID.
7283
+ *
7284
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account meta.
7285
+ */
6616
7286
  getSetConfigIXAccountMetaForCPI(endpointProgram: PublicKey, oappID: PublicKey, eid: number): Promise<AccountMeta[]>;
6617
7287
  }
6618
7288
 
@@ -8370,47 +9040,227 @@ declare namespace index$d {
8370
9040
  export { type index$d_AdminConfigSetEvent as AdminConfigSetEvent, type index$d_FeeWithdrawnEvent as FeeWithdrawnEvent, type index$d_MultisigConfigSetEvent as MultisigConfigSetEvent, index$d_adminConfigSetEventBeet as adminConfigSetEventBeet, index$d_feeWithdrawnEventBeet as feeWithdrawnEventBeet, index$d_multisigConfigSetEventBeet as multisigConfigSetEventBeet };
8371
9041
  }
8372
9042
 
9043
+ /**
9044
+ * Interface representing a sign function.
9045
+ */
8373
9046
  interface SignFunc {
9047
+ /**
9048
+ * Signs a message.
9049
+ *
9050
+ * @param {Buffer} message - The message to sign.
9051
+ * @returns {Promise<{ signature: Uint8Array; recoveryId: number }[]>} A promise that resolves to an array of signature objects.
9052
+ */
8374
9053
  sign(message: Buffer): Promise<{
8375
9054
  signature: Uint8Array;
8376
9055
  recoveryId: number;
8377
9056
  }[]>;
8378
9057
  }
9058
+ /**
9059
+ * Class representing a Solana signer extension.
9060
+ */
8379
9061
  declare class SolanaSignerExt implements SignFunc {
8380
9062
  private readonly signers;
8381
9063
  private constructor();
9064
+ /**
9065
+ * Creates an instance of the SolanaSignerExt class.
9066
+ *
9067
+ * @param {HashSigner[]} signers - The signers.
9068
+ * @returns {SolanaSignerExt} The SolanaSignerExt instance.
9069
+ */
8382
9070
  static from(signers: HashSigner[]): SolanaSignerExt;
9071
+ /**
9072
+ * Signs a message.
9073
+ *
9074
+ * @param {Buffer} message - The message to sign.
9075
+ * @returns {Promise<{ signature: Uint8Array; recoveryId: number }[]>} A promise that resolves to an array of signature objects.
9076
+ */
8383
9077
  sign(message: Buffer): Promise<{
8384
9078
  signature: Uint8Array;
8385
9079
  recoveryId: number;
8386
9080
  }[]>;
8387
9081
  }
9082
+ /**
9083
+ * Class representing a DVN (Decentralized Validator Network).
9084
+ */
8388
9085
  declare class DVN {
8389
9086
  readonly programId: PublicKey;
8390
9087
  dvnDeriver: DVNDeriver;
8391
9088
  vid: number;
8392
9089
  eventAuthority: PublicKey;
9090
+ /**
9091
+ * Creates an instance of the DVN class.
9092
+ *
9093
+ * @param {PublicKey} programId - The program ID.
9094
+ * @param {EndpointId} [endpointId=EndpointId.SOLANA_V2_SANDBOX] - The endpoint ID.
9095
+ */
8393
9096
  constructor(programId: PublicKey, endpointId?: EndpointId);
9097
+ /**
9098
+ * Initializes the DVN.
9099
+ *
9100
+ * @param {Connection} connection - The connection.
9101
+ * @param {PublicKey} payer - The payer.
9102
+ * @param {InitDvnParams} params - The initialization parameters.
9103
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
9104
+ * @throws {Error} If the DVN is already initialized.
9105
+ */
8394
9106
  initDVN(connection: Connection, payer: PublicKey, params: InitDvnParams): Promise<TransactionInstruction>;
9107
+ /**
9108
+ * Gets the digest for a transaction.
9109
+ *
9110
+ * @param {number} vid - The validator ID.
9111
+ * @param {TransactionInstruction} instruction - The transaction instruction.
9112
+ * @param {number} expiration - The expiration time.
9113
+ * @returns {types.ExecuteTransactionDigest} The transaction digest.
9114
+ */
8395
9115
  getDigest(vid: number, instruction: TransactionInstruction, expiration: number): ExecuteTransactionDigest;
9116
+ /**
9117
+ * Gets the execute hash for a given hash bytes.
9118
+ *
9119
+ * @param {Buffer} hashBytes - The hash bytes.
9120
+ * @returns {PublicKey} The execute hash.
9121
+ */
8396
9122
  getExecuteHash(hashBytes: Buffer): PublicKey;
9123
+ /**
9124
+ * Gets the hash bytes for a given digest.
9125
+ *
9126
+ * @param {types.ExecuteTransactionDigest} digest - The transaction digest.
9127
+ * @returns {Buffer} The hash bytes.
9128
+ */
8397
9129
  getHashBytes(digest: ExecuteTransactionDigest): Buffer;
9130
+ /**
9131
+ * Invokes a transaction.
9132
+ *
9133
+ * @param {Connection} connection - The connection.
9134
+ * @param {number} vid - The validator ID.
9135
+ * @param {PublicKey} payer - The payer.
9136
+ * @param {TransactionInstruction} instruction - The transaction instruction.
9137
+ * @param {number} expiration - The expiration time.
9138
+ * @param {SignFunc} sign - The sign function.
9139
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
9140
+ * @throws {Error} If the DVN is not initialized.
9141
+ */
8398
9142
  invoke(connection: Connection, vid: number, payer: PublicKey, instruction: TransactionInstruction, expiration: number, sign: SignFunc): Promise<TransactionInstruction>;
9143
+ /**
9144
+ * Creates a transaction instruction to set the quorum.
9145
+ *
9146
+ * @param {number} quorum - The quorum.
9147
+ * @returns {TransactionInstruction} The transaction instruction.
9148
+ */
8399
9149
  createSetQuorumInstruction(quorum: number): TransactionInstruction;
9150
+ /**
9151
+ * Creates a transaction instruction to set the admins.
9152
+ *
9153
+ * @param {PublicKey[]} admins - The admin public keys.
9154
+ * @returns {TransactionInstruction} The transaction instruction.
9155
+ */
8400
9156
  createSetAdminsInstruction(admins: PublicKey[]): TransactionInstruction;
9157
+ /**
9158
+ * Creates a transaction instruction to set the signers.
9159
+ *
9160
+ * @param {Uint8Array[]} signers - The signer public keys.
9161
+ * @returns {TransactionInstruction} The transaction instruction.
9162
+ */
8401
9163
  createSetSignersInstruction(signers: Uint8Array[]): TransactionInstruction;
9164
+ /**
9165
+ * Creates a transaction instruction to set the allowlist.
9166
+ *
9167
+ * @param {PublicKey[]} allowlist - The allowlist public keys.
9168
+ * @returns {TransactionInstruction} The transaction instruction.
9169
+ */
8402
9170
  createSetAllowlistInstruction(allowlist: PublicKey[]): TransactionInstruction;
9171
+ /**
9172
+ * Creates a transaction instruction to set the denylist.
9173
+ *
9174
+ * @param {PublicKey[]} denylist - The denylist public keys.
9175
+ * @returns {TransactionInstruction} The transaction instruction.
9176
+ */
8403
9177
  createSetDenylistInstruction(denylist: PublicKey[]): TransactionInstruction;
9178
+ /**
9179
+ * Creates a transaction instruction to set the pause state.
9180
+ *
9181
+ * @param {boolean} pause - The pause state.
9182
+ * @returns {TransactionInstruction} The transaction instruction.
9183
+ */
8404
9184
  createSetPauseInstruction(pause: boolean): TransactionInstruction;
9185
+ /**
9186
+ * Creates a transaction instruction to set the default multiplier basis points.
9187
+ *
9188
+ * @param {PublicKey} admin - The admin public key.
9189
+ * @param {number} defaultMultiplierBps - The default multiplier basis points.
9190
+ * @returns {TransactionInstruction} The transaction instruction.
9191
+ */
8405
9192
  createSetDefaultMultiplierBpsInstruction(admin: PublicKey, defaultMultiplierBps: number): TransactionInstruction;
9193
+ /**
9194
+ * Creates a transaction instruction to change the admins.
9195
+ *
9196
+ * @param {PublicKey} admin - The admin public key.
9197
+ * @param {PublicKey[]} admins - The new admin public keys.
9198
+ * @returns {TransactionInstruction} The transaction instruction.
9199
+ */
8406
9200
  createChangeAdminsInstruction(admin: PublicKey, admins: PublicKey[]): TransactionInstruction;
9201
+ /**
9202
+ * Creates a transaction instruction to set the destination configurations.
9203
+ *
9204
+ * @param {PublicKey} admin - The admin public key.
9205
+ * @param {types.DstConfig[]} dstConfigs - The destination configurations.
9206
+ * @returns {TransactionInstruction} The transaction instruction.
9207
+ */
8407
9208
  createSetDstConfigInstruction(admin: PublicKey, dstConfigs: DstConfig$1[]): TransactionInstruction;
9209
+ /**
9210
+ * Creates a transaction instruction to remove the destination configurations.
9211
+ *
9212
+ * @param {PublicKey} admin - The admin public key.
9213
+ * @param {number[]} removeEids - The endpoint IDs to remove.
9214
+ * @returns {TransactionInstruction} The transaction instruction.
9215
+ */
8408
9216
  createRemoveDstConfigInstruction(admin: PublicKey, removeEids: number[]): TransactionInstruction;
9217
+ /**
9218
+ * Creates a transaction instruction to set the message libraries.
9219
+ *
9220
+ * @param {PublicKey[]} msglibPrograms - The message library public keys.
9221
+ * @returns {TransactionInstruction} The transaction instruction.
9222
+ */
8409
9223
  createSetMsgLibsInstruction(msglibPrograms: PublicKey[]): TransactionInstruction;
9224
+ /**
9225
+ * Gets the expiration time.
9226
+ *
9227
+ * @returns {number} The expiration time.
9228
+ */
8410
9229
  _getExpiration(): number;
9230
+ /**
9231
+ * Sets the message libraries.
9232
+ *
9233
+ * @param {Connection} connection - The connection.
9234
+ * @param {PublicKey} payer - The payer.
9235
+ * @param {PublicKey[]} msgLibs - The message library public keys.
9236
+ * @param {SignFunc} sign - The sign function.
9237
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
9238
+ */
8411
9239
  setMsgLibs(connection: Connection, payer: PublicKey, msgLibs: PublicKey[], sign: SignFunc): Promise<TransactionInstruction>;
9240
+ /**
9241
+ * Creates a transaction instruction to set the price feed.
9242
+ *
9243
+ * @param {PublicKey} admin - The admin public key.
9244
+ * @param {PublicKey} priceFeedProgram - The price feed program public key.
9245
+ * @returns {TransactionInstruction} The transaction instruction.
9246
+ */
8412
9247
  createSetPriceFeedInstruction(admin: PublicKey, priceFeedProgram: PublicKey): TransactionInstruction;
9248
+ /**
9249
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the quote instruction.
9250
+ *
9251
+ * @param {PublicKey} priceFeedConfig - The price feed configuration public key.
9252
+ * @param {PublicKey} priceFeedProgram - The price feed program public key.
9253
+ * @param {boolean} payment - Indicates if payment is required.
9254
+ * @returns {AccountMeta[]} An array of account metadata.
9255
+ */
8413
9256
  getQuoteIXAccountMetaForCPI(priceFeedConfig: PublicKey, priceFeedProgram: PublicKey, payment: boolean): AccountMeta[];
9257
+ /**
9258
+ * Gets the configuration state.
9259
+ *
9260
+ * @param {Connection} connection - The connection to the Solana cluster.
9261
+ * @param {Commitment | GetAccountInfoConfig} [commitment='confirmed'] - The commitment level or account info configuration.
9262
+ * @returns {Promise<accounts.DvnConfig | null>} A promise that resolves to the configuration state or null if not found.
9263
+ */
8414
9264
  getConfigState(connection: Connection, commitment?: Commitment | GetAccountInfoConfig): Promise<DvnConfig | null>;
8415
9265
  }
8416
9266
 
@@ -9950,25 +10800,178 @@ declare const PROGRAM_ADDRESS$2 = "6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn"
9950
10800
  */
9951
10801
  declare const PROGRAM_ID$3: PublicKey;
9952
10802
 
10803
+ /**
10804
+ * Class representing the Executor.
10805
+ */
9953
10806
  declare class Executor {
9954
10807
  program: PublicKey;
9955
10808
  deriver: ExecutorPDADeriver;
10809
+ /**
10810
+ * Creates an instance of the Executor class.
10811
+ *
10812
+ * @param {PublicKey} program - The program public key.
10813
+ */
9956
10814
  constructor(program: PublicKey);
10815
+ /**
10816
+ * Initializes the executor.
10817
+ *
10818
+ * @param {PublicKey} payer - The payer public key.
10819
+ * @param {PublicKey} owner - The owner public key.
10820
+ * @param {PublicKey[]} admins - The admin public keys.
10821
+ * @param {PublicKey[]} executors - The executor public keys.
10822
+ * @param {PublicKey[]} msglibs - The message library public keys.
10823
+ * @param {PublicKey} priceFeed - The price feed public key.
10824
+ *
10825
+ * @returns {TransactionInstruction} The transaction instruction.
10826
+ */
9957
10827
  initExecutor(payer: PublicKey, owner: PublicKey, admins: PublicKey[], executors: PublicKey[], msglibs: PublicKey[], priceFeed: PublicKey): TransactionInstruction;
10828
+ /**
10829
+ * Sets the owner.
10830
+ *
10831
+ * @param {PublicKey} owner - The current owner public key.
10832
+ * @param {PublicKey} newOwner - The new owner public key.
10833
+ *
10834
+ * @returns {TransactionInstruction} The transaction instruction.
10835
+ */
9958
10836
  setOwner(owner: PublicKey, newOwner: PublicKey): TransactionInstruction;
10837
+ /**
10838
+ * Sets the admins.
10839
+ *
10840
+ * @param {PublicKey} owner - The owner public key.
10841
+ * @param {PublicKey[]} admins - The admin public keys.
10842
+ *
10843
+ * @returns {TransactionInstruction} The transaction instruction.
10844
+ */
9959
10845
  setAdmins(owner: PublicKey, admins: PublicKey[]): TransactionInstruction;
10846
+ /**
10847
+ * Sets the allow list.
10848
+ *
10849
+ * @param {PublicKey} owner - The owner public key.
10850
+ * @param {PublicKey[]} allowlist - The allow list public keys.
10851
+ *
10852
+ * @returns {TransactionInstruction} The transaction instruction.
10853
+ */
9960
10854
  setAllowList(owner: PublicKey, allowlist: PublicKey[]): TransactionInstruction;
10855
+ /**
10856
+ * Sets the deny list.
10857
+ *
10858
+ * @param {PublicKey} owner - The owner public key.
10859
+ * @param {PublicKey[]} denylist - The deny list public keys.
10860
+ *
10861
+ * @returns {TransactionInstruction} The transaction instruction.
10862
+ */
9961
10863
  setDenyList(owner: PublicKey, denylist: PublicKey[]): TransactionInstruction;
10864
+ /**
10865
+ * Sets the paused state.
10866
+ *
10867
+ * @param {PublicKey} owner - The owner public key.
10868
+ * @param {boolean} paused - The paused state.
10869
+ *
10870
+ * @returns {TransactionInstruction} The transaction instruction.
10871
+ */
9962
10872
  setPaused(owner: PublicKey, paused: boolean): TransactionInstruction;
10873
+ /**
10874
+ * Sets the executors.
10875
+ *
10876
+ * @param {PublicKey} owner - The owner public key.
10877
+ * @param {PublicKey[]} executors - The executor public keys.
10878
+ *
10879
+ * @returns {TransactionInstruction} The transaction instruction.
10880
+ */
9963
10881
  setExecutors(owner: PublicKey, executors: PublicKey[]): TransactionInstruction;
10882
+ /**
10883
+ * Sets the message libraries by programs.
10884
+ *
10885
+ * @param {PublicKey} owner - The owner public key.
10886
+ * @param {PublicKey[]} msglibPrograms - The message library program public keys.
10887
+ *
10888
+ * @returns {TransactionInstruction} The transaction instruction.
10889
+ */
9964
10890
  setMsglibByPrograms(owner: PublicKey, msglibPrograms: PublicKey[]): TransactionInstruction;
10891
+ /**
10892
+ * Sets the message libraries by PDAs.
10893
+ *
10894
+ * @param {PublicKey} owner - The owner public key.
10895
+ * @param {PublicKey[]} msglibPDAs - The message library PDA public keys.
10896
+ *
10897
+ * @returns {TransactionInstruction} The transaction instruction.
10898
+ */
9965
10899
  setMsglibByPDAs(owner: PublicKey, msglibPDAs: PublicKey[]): TransactionInstruction;
10900
+ /**
10901
+ * Sets the default multiplier BPS.
10902
+ *
10903
+ * @param {PublicKey} admin - The admin public key.
10904
+ * @param {number} defaultMultiplierBps - The default multiplier BPS.
10905
+ *
10906
+ * @returns {TransactionInstruction} The transaction instruction.
10907
+ */
9966
10908
  setDefaultMultiplierBps(admin: PublicKey, defaultMultiplierBps: number): TransactionInstruction;
10909
+ /**
10910
+ * Sets the destination configurations.
10911
+ *
10912
+ * @param {PublicKey} admin - The admin public key.
10913
+ * @param {types.DstConfig[]} dstConfigs - The destination configurations.
10914
+ *
10915
+ * @returns {TransactionInstruction} The transaction instruction.
10916
+ */
9967
10917
  setDstConfig(admin: PublicKey, dstConfigs: DstConfig[]): TransactionInstruction;
10918
+ /**
10919
+ * Sets the price feed.
10920
+ *
10921
+ * @param {PublicKey} admin - The admin public key.
10922
+ * @param {PublicKey} priceFeedProgram - The price feed program public key.
10923
+ *
10924
+ * @returns {TransactionInstruction} The transaction instruction.
10925
+ */
9968
10926
  setPriceFeed(admin: PublicKey, priceFeedProgram: PublicKey): TransactionInstruction;
10927
+ /**
10928
+ * Gets the executor configuration.
10929
+ *
10930
+ * @param {Connection} connection - The connection.
10931
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment or configuration.
10932
+ *
10933
+ * @returns {Promise<accounts.ExecutorConfig | null>} A promise that resolves to the executor configuration or null.
10934
+ */
9969
10935
  getExecutorConfig(connection: Connection, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<ExecutorConfig$1 | null>;
10936
+ /**
10937
+ * Gets the quote instruction account meta for CPI.
10938
+ *
10939
+ * @param {PublicKey} priceFeedConfig - The price feed configuration public key.
10940
+ * @param {PublicKey} priceFeedProgram - The price feed program public key.
10941
+ * @param {boolean} payment - Whether payment is required.
10942
+ *
10943
+ * @returns {AccountMeta[]} The account meta array.
10944
+ */
9970
10945
  getQuoteIXAccountMetaForCPI(priceFeedConfig: PublicKey, priceFeedProgram: PublicKey, payment: boolean): AccountMeta[];
10946
+ /**
10947
+ * Executes a transaction.
10948
+ *
10949
+ * @param {Connection} connection - The connection.
10950
+ * @param {PublicKey} executor - The executor public key.
10951
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
10952
+ * @param {Packet} packet - The packet.
10953
+ * @param {Uint8Array} extraData - The extra data.
10954
+ * @param {BN} [value] - The value.
10955
+ * @param {number} [computeUnits] - The compute units.
10956
+ * @param {Commitment} [commitmentOrConfig] - The commitment or configuration.
10957
+ *
10958
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
10959
+ */
9971
10960
  execute(connection: Connection, executor: PublicKey, endpointProgram: PublicKey, packet: Packet$2, extraData: Uint8Array, value?: BN, computeUnits?: number, commitmentOrConfig?: Commitment): Promise<TransactionInstruction>;
10961
+ /**
10962
+ * Composes a transaction.
10963
+ *
10964
+ * @param {Connection} connection - The connection.
10965
+ * @param {PublicKey} executor - The executor public key.
10966
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
10967
+ * @param {ComposeSentEvent} event - The compose sent event.
10968
+ * @param {Uint8Array} extraData - The extra data.
10969
+ * @param {BN} [value] - The value.
10970
+ * @param {number} [computeUnits] - The compute units.
10971
+ * @param {Commitment} [commitmentOrConfig] - The commitment or configuration.
10972
+ *
10973
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
10974
+ */
9972
10975
  compose(connection: Connection, executor: PublicKey, endpointProgram: PublicKey, event: ComposeSentEvent, extraData: Uint8Array, value?: BN, computeUnits?: number, commitmentOrConfig?: Commitment): Promise<TransactionInstruction>;
9973
10976
  }
9974
10977
 
@@ -12820,41 +13823,134 @@ declare const PROGRAM_ADDRESS$1 = "7a4WjyR8VZ7yZz5XJAKm39BUGn5iT9CKcv2pmG9tdXVH"
12820
13823
  */
12821
13824
  declare const PROGRAM_ID$2: PublicKey;
12822
13825
 
13826
+ /**
13827
+ * Interface representing the maximum message size.
13828
+ */
12823
13829
  interface MaxMessageSize {
13830
+ /**
13831
+ * The size of the message.
13832
+ */
12824
13833
  size: number;
13834
+ /**
13835
+ * The kind of the message size.
13836
+ */
12825
13837
  __kind: 'MaxMessageSize';
12826
13838
  }
13839
+ /**
13840
+ * Interface representing the outbound confirmations.
13841
+ */
12827
13842
  interface OutboundConfirmations {
13843
+ /**
13844
+ * The number of confirmations.
13845
+ */
12828
13846
  confirmations: number;
13847
+ /**
13848
+ * The kind of the outbound confirmations.
13849
+ */
12829
13850
  __kind: 'OutboundConfirmations';
12830
13851
  }
13852
+ /**
13853
+ * Interface representing the inbound confirmations.
13854
+ */
12831
13855
  interface InboundConfirmations {
13856
+ /**
13857
+ * The number of confirmations.
13858
+ */
12832
13859
  confirmations: number;
13860
+ /**
13861
+ * The kind of the inbound confirmations.
13862
+ */
12833
13863
  __kind: 'InboundConfirmations';
12834
13864
  }
13865
+ /**
13866
+ * Interface representing the oracles.
13867
+ */
12835
13868
  interface Oracles {
13869
+ /**
13870
+ * Indicates if custom oracles are used.
13871
+ */
12836
13872
  useCustomOracles: boolean;
13873
+ /**
13874
+ * The array of oracle public keys.
13875
+ */
12837
13876
  oracles: PublicKey[];
13877
+ /**
13878
+ * The kind of the oracles.
13879
+ */
12838
13880
  __kind: 'Oracles';
12839
13881
  }
13882
+ /**
13883
+ * Interface representing the optional oracles.
13884
+ */
12840
13885
  interface OptionalOracles {
13886
+ /**
13887
+ * Indicates if custom optional oracles are used.
13888
+ */
12841
13889
  useCustomOptionalOracles: boolean;
13890
+ /**
13891
+ * The array of optional oracle public keys.
13892
+ */
12842
13893
  optionalOracles: PublicKey[];
13894
+ /**
13895
+ * The threshold for the optional oracles.
13896
+ */
12843
13897
  threshold: number;
13898
+ /**
13899
+ * The kind of the optional oracles.
13900
+ */
12844
13901
  __kind: 'OptionalOracles';
12845
13902
  }
13903
+ /**
13904
+ * Class representing the ULN (Ultra Light Node).
13905
+ * @see {@link MessageLibInterface}
13906
+ */
12846
13907
  declare class Uln implements MessageLibInterface {
12847
13908
  program: PublicKey;
12848
13909
  deriver: UlnPDADeriver;
12849
13910
  eventAuthorityPDA: PublicKey;
13911
+ /**
13912
+ * Creates an instance of the Uln class.
13913
+ *
13914
+ * @param {PublicKey} program - The program public key.
13915
+ */
12850
13916
  constructor(program: PublicKey);
13917
+ /**
13918
+ * Initializes the ULN.
13919
+ *
13920
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
13921
+ * @param {PublicKey} payer - The payer public key.
13922
+ * @param {PublicKey} admin - The admin public key.
13923
+ * @param {number} eid - The endpoint ID.
13924
+ * @returns {TransactionInstruction} The transaction instruction.
13925
+ */
12851
13926
  initUln(endpointProgram: PublicKey, payer: PublicKey, admin: PublicKey, eid: number): TransactionInstruction;
12852
13927
  /**
13928
+ * Initializes or updates the default configuration.
12853
13929
  * before calling this function, you should call initUln to initialize the uln
13930
+ *
13931
+ * @param {Connection} connection - The connection to the Solana cluster.
13932
+ * @param {PublicKey} admin - The admin public key.
13933
+ * @param {number} eid - The endpoint ID.
13934
+ * @param {types.UlnConfig} sendUlnConfig - The send ULN configuration.
13935
+ * @param {types.UlnConfig} receiveUlnConfig - The receive ULN configuration.
13936
+ * @param {types.ExecutorConfig} executorConfig - The executor configuration.
13937
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
13938
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
12854
13939
  */
12855
13940
  initOrUpdateDefaultConfig(connection: Connection, admin: PublicKey, eid: number, sendUlnConfig: UlnConfig, receiveUlnConfig: UlnConfig, executorConfig: ExecutorConfig, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction>;
12856
13941
  /**
13942
+ * Sets the treasury.
12857
13943
  * before calling this function, you should call initUln to initialize the uln
13944
+ *
13945
+ * @param {PublicKey} admin - The admin public key.
13946
+ * @param {object} treasury - The treasury object.
13947
+ * @param {PublicKey} treasury.admin - The treasury admin public key.
13948
+ * @param {PublicKey} treasury.nativeReceiver - The native receiver public key.
13949
+ * @param {number} treasury.nativeFeeBps - The native fee basis points.
13950
+ * @param {object} treasury.lzToken - The LZ token object.
13951
+ * @param {PublicKey} treasury.lzToken.receiver - The LZ token receiver public key.
13952
+ * @param {number} treasury.lzToken.fee - The LZ token fee.
13953
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
12858
13954
  */
12859
13955
  setTreasury(admin: PublicKey, treasury: {
12860
13956
  admin: PublicKey;
@@ -12865,27 +13961,57 @@ declare class Uln implements MessageLibInterface {
12865
13961
  fee: number;
12866
13962
  } | null;
12867
13963
  } | null): Promise<TransactionInstruction>;
12868
- transferAdmin(connection: Connection, admin: PublicKey, newAdmin: PublicKey, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction>;
12869
13964
  /**
13965
+ * Transfers the admin role to a new admin.
12870
13966
  *
12871
- * @param connection
13967
+ * @param {Connection} connection - The connection to the Solana cluster.
13968
+ * @param {PublicKey} admin - The current admin public key.
13969
+ * @param {PublicKey} newAdmin - The new admin public key.
13970
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
13971
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
13972
+ * @throws {Error} If the ULN is not initialized.
13973
+ */
13974
+ transferAdmin(connection: Connection, admin: PublicKey, newAdmin: PublicKey, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction>;
13975
+ /**
13976
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the quote instruction.
12872
13977
  *
12873
- * @param sender the oApp PDA
12874
- * @param sendLibraryAuthority
12875
- * @param dstEid
12876
- * @param payInLzToken
12877
- * @param commitment
12878
- * @returns
13978
+ * @param {Connection} connection - The connection to the Solana cluster.
13979
+ * @param {PublicKey} _payer - The payer public key.
13980
+ * @param {PacketPath} path - The packet path.
13981
+ * @param {Commitment} [commitment] - The commitment level.
13982
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
12879
13983
  */
12880
13984
  getQuoteIXAccountMetaForCPI(connection: Connection, _payer: PublicKey, path: PacketPath, commitment?: Commitment): Promise<AccountMeta[]>;
12881
- /***
12882
- * Get the account meta of the send instruction for CPI(Cross-Program Invocation )
13985
+ /**
13986
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the send instruction.
13987
+ *
13988
+ * @param {Connection} connection - The connection to the Solana cluster.
13989
+ * @param {PublicKey} payer - The payer public key.
13990
+ * @param {PacketPath} path - The packet path.
13991
+ * @param {Commitment} [commitment='confirmed'] - The commitment level.
13992
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
12883
13993
  */
12884
13994
  getSendIXAccountMetaForCPI(connection: Connection, payer: PublicKey, path: PacketPath, commitment?: Commitment): Promise<AccountMeta[]>;
13995
+ /**
13996
+ * Gets the remaining accounts for the send instruction.
13997
+ *
13998
+ * @param {Connection} connection - The connection to the Solana cluster.
13999
+ * @param {PublicKey} sender - The sender public key.
14000
+ * @param {number} dstEid - The destination endpoint ID.
14001
+ * @param {boolean} payment - Indicates if payment is required.
14002
+ * @param {Commitment | GetAccountInfoConfig} [commitment='confirmed'] - The commitment level or account info configuration.
14003
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
14004
+ */
12885
14005
  getSendIxRemainingAccounts(connection: Connection, sender: PublicKey, dstEid: number, payment: boolean, commitment?: Commitment | GetAccountInfoConfig): Promise<AccountMeta[]>;
12886
- /***
12887
- * Get all workers(executor&DVN)
14006
+ /**
14007
+ * Gets all workers (executor and DVN).
12888
14008
  * 2 RPC requests
14009
+ *
14010
+ * @param {Connection} connection - The connection to the Solana cluster.
14011
+ * @param {PublicKey} sender - The sender public key.
14012
+ * @param {number} eid - The endpoint ID.
14013
+ * @param {Commitment | GetAccountInfoConfig} [commitment='confirmed'] - The commitment level or account info configuration.
14014
+ * @returns {Promise<{ executor: { config: ExecutorAccounts.ExecutorConfig; owner: PublicKey }; dvns: { config: DvnAccounts.DvnConfig; owner: PublicKey }[] }>} A promise that resolves to an object containing the executor and DVN configurations.
12889
14015
  */
12890
14016
  getWorkers(connection: Connection, sender: PublicKey, eid: number, commitment?: Commitment | GetAccountInfoConfig): Promise<{
12891
14017
  executor: {
@@ -12897,26 +14023,138 @@ declare class Uln implements MessageLibInterface {
12897
14023
  owner: PublicKey;
12898
14024
  }[];
12899
14025
  }>;
14026
+ /**
14027
+ * Initializes the verification process.
14028
+ *
14029
+ * @param {Connection} connection - The connection to the Solana cluster.
14030
+ * @param {PublicKey} payer - The payer public key.
14031
+ * @param {PublicKey} dvn - The DVN public key.
14032
+ * @param {Uint8Array} packetBytes - The packet bytes.
14033
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
14034
+ * @returns {Promise<TransactionInstruction | null>} A promise that resolves to the transaction instruction or null if not needed.
14035
+ */
12900
14036
  initVerify(connection: Connection, payer: PublicKey, dvn: PublicKey, packetBytes: Uint8Array, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction | null>;
14037
+ /**
14038
+ * Verifies the packet.
14039
+ *
14040
+ * @param {PublicKey} dvn - The DVN public key.
14041
+ * @param {Uint8Array} packetBytes - The packet bytes.
14042
+ * @param {number | string} confirmations - The number of confirmations.
14043
+ * @returns {TransactionInstruction} The transaction instruction.
14044
+ */
12901
14045
  verify(dvn: PublicKey, packetBytes: Uint8Array, confirmations: number | string): TransactionInstruction;
14046
+ /**
14047
+ * Closes the verification process.
14048
+ *
14049
+ * @param {PublicKey} dvn - The DVN public key.
14050
+ * @param {PublicKey} receiver - The receiver public key.
14051
+ * @param {Uint8Array} packetBytes - The packet bytes.
14052
+ * @returns {TransactionInstruction} The transaction instruction.
14053
+ */
12902
14054
  closeVerify(dvn: PublicKey, receiver: PublicKey, packetBytes: Uint8Array): TransactionInstruction;
14055
+ /**
14056
+ * Checks if the DVN is verified.
14057
+ *
14058
+ * @param {Connection} connection - The connection to the Solana cluster.
14059
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
14060
+ * @param {PublicKey} dvn - The DVN public key.
14061
+ * @param {Uint8Array} packetBytes - The packet bytes.
14062
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig='confirmed'] - The commitment level or account info configuration.
14063
+ * @returns {Promise<boolean>} A promise that resolves to true if the DVN is verified, false otherwise.
14064
+ */
12903
14065
  isDvnVerified(connection: Connection, endpointProgram: PublicKey, dvn: PublicKey, packetBytes: Uint8Array, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<boolean>;
14066
+ /**
14067
+ * Commits the verification process.
14068
+ *
14069
+ * @param {Connection} connection - The connection to the Solana cluster.
14070
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
14071
+ * @param {Uint8Array} packetBytes - The packet bytes.
14072
+ * @returns {Promise<TransactionInstruction>} A promise that resolves to the transaction instruction.
14073
+ */
12904
14074
  commitVerification(connection: Connection, endpointProgram: PublicKey, packetBytes: Uint8Array): Promise<TransactionInstruction>;
12905
- /***
12906
- * Get the account meta of the send instruction for CPI(Cross-Program Invocation )
14075
+ /**
14076
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the init config instruction.
14077
+ *
14078
+ * @param {PublicKey} payer - The payer public key.
14079
+ * @param {PublicKey} oappID - The OApp ID public key.
14080
+ * @param {number} eid - The endpoint ID.
14081
+ * @returns {AccountMeta[]} An array of account metadata.
12907
14082
  */
12908
14083
  getInitConfigIXAccountMetaForCPI(payer: PublicKey, oappID: PublicKey, eid: number): AccountMeta[];
14084
+ /**
14085
+ * Constructs the set config data.
14086
+ *
14087
+ * @param {SetConfigType} configType - The configuration type.
14088
+ * @param {types.ExecutorConfig | types.UlnConfig} configData - The configuration data.
14089
+ * @returns {Uint8Array} The constructed set config data.
14090
+ * @throws {Error} If the configuration type is invalid.
14091
+ */
12909
14092
  static constructSetConfigData(configType: SetConfigType, configData: ExecutorConfig | UlnConfig): Uint8Array;
12910
14093
  /**
12911
- * @param oappID the oApp PDA
14094
+ * Gets the account metadata for the CPI (Cross-Program Invocation) of the set config instruction.
12912
14095
  *
14096
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
14097
+ * @param {PublicKey} oappID - The OApp ID public key.
14098
+ * @param {number} eid - The endpoint ID.
14099
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
12913
14100
  */
12914
14101
  getSetConfigIXAccountMetaForCPI(endpointProgram: PublicKey, oappID: PublicKey, eid: number): Promise<AccountMeta[]>;
14102
+ /**
14103
+ * Gets the ULN settings.
14104
+ *
14105
+ * @param {Connection} connection - The connection to the Solana cluster.
14106
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
14107
+ * @returns {Promise<accounts.UlnSettings | null>} A promise that resolves to the ULN settings or null if not found.
14108
+ */
12915
14109
  getSetting(connection: Connection, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<UlnSettings | null>;
14110
+ /**
14111
+ * Gets the default send configuration state.
14112
+ *
14113
+ * @param {Connection} connection - The connection to the Solana cluster.
14114
+ * @param {number} eid - The endpoint ID.
14115
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
14116
+ * @returns {Promise<accounts.SendConfig | null>} A promise that resolves to the default send configuration state or null if not found.
14117
+ */
12916
14118
  getDefaultSendConfigState(connection: Connection, eid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<SendConfig | null>;
14119
+ /**
14120
+ * Gets the send configuration state.
14121
+ *
14122
+ * @param {Connection} connection - The connection to the Solana cluster.
14123
+ * @param {PublicKey} sender - The sender public key.
14124
+ * @param {number} eid - The endpoint ID.
14125
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
14126
+ * @returns {Promise<accounts.SendConfig | null>} A promise that resolves to the send configuration state or null if not found.
14127
+ */
12917
14128
  getSendConfigState(connection: Connection, sender: PublicKey, eid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<SendConfig | null>;
14129
+ /**
14130
+ * Gets the default receive configuration state.
14131
+ *
14132
+ * @param {Connection} connection - The connection to the Solana cluster.
14133
+ * @param {number} eid - The endpoint ID.
14134
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
14135
+ * @returns {Promise<accounts.ReceiveConfig | null>} A promise that resolves to the default receive configuration state or null if not found.
14136
+ */
12918
14137
  getDefaultReceiveConfigState(connection: Connection, eid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<ReceiveConfig | null>;
14138
+ /**
14139
+ * Gets the receive configuration state.
14140
+ *
14141
+ * @param {Connection} connection - The connection to the Solana cluster.
14142
+ * @param {PublicKey} receiver - The receiver public key.
14143
+ * @param {number} eid - The endpoint ID.
14144
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
14145
+ * @returns {Promise<accounts.ReceiveConfig | null>} A promise that resolves to the receive configuration state or null if not found.
14146
+ */
12919
14147
  getReceiveConfigState(connection: Connection, receiver: PublicKey, eid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<ReceiveConfig | null>;
14148
+ /**
14149
+ * Gets the final receive configuration state.
14150
+ *
14151
+ * @param {Connection} connection - The connection to the Solana cluster.
14152
+ * @param {PublicKey} receiver - The receiver public key.
14153
+ * @param {number} eid - The endpoint ID.
14154
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig='confirmed'] - The commitment level or account info configuration.
14155
+ * @returns {Promise<accounts.ReceiveConfig>} A promise that resolves to the final receive configuration state.
14156
+ * @throws {Error} If no DVN is found.
14157
+ */
12920
14158
  getFinalReceiveConfigState(connection: Connection, receiver: PublicKey, eid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<ReceiveConfig>;
12921
14159
  }
12922
14160
 
@@ -13908,15 +15146,80 @@ declare namespace index$1 {
13908
15146
  */
13909
15147
  declare const PROGRAM_ID$1: PublicKey;
13910
15148
 
15149
+ /**
15150
+ * Class representing the PriceFeed.
15151
+ */
13911
15152
  declare class PriceFeed {
13912
15153
  readonly program: PublicKey;
13913
15154
  deriver: PriceFeedPDADeriver;
15155
+ /**
15156
+ * Creates an instance of the PriceFeed class.
15157
+ *
15158
+ * @param {PublicKey} program - The public key of the program.
15159
+ */
13914
15160
  constructor(program: PublicKey);
15161
+ /**
15162
+ * Initializes the price feed.
15163
+ *
15164
+ * @param {Connection} connection - The Solana connection object.
15165
+ * @param {PublicKey} payer - The public key of the payer.
15166
+ * @param {PublicKey} admin - The public key of the admin.
15167
+ * @param {PublicKey[]} updaters - The list of public keys of the updaters.
15168
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - Optional commitment or configuration.
15169
+ *
15170
+ * @returns {Promise<TransactionInstruction>} The transaction instruction.
15171
+ */
13915
15172
  initPriceFeed(connection: Connection, payer: PublicKey, admin: PublicKey, updaters: PublicKey[], commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction>;
15173
+ /**
15174
+ * Sets the price feed.
15175
+ *
15176
+ * @param {PublicKey} admin - The public key of the admin.
15177
+ * @param {PublicKey[]} updaters - The list of public keys of the updaters.
15178
+ * @param {bignum} priceRatioDenominator - The price ratio denominator.
15179
+ * @param {number} arbitrumCompressionPercent - The Arbitrum compression percentage.
15180
+ *
15181
+ * @returns {TransactionInstruction} The transaction instruction.
15182
+ */
13916
15183
  setPriceFeed(admin: PublicKey, updaters: PublicKey[], priceRatioDenominator: bignum, arbitrumCompressionPercent: number): TransactionInstruction;
15184
+ /**
15185
+ * Sets the price.
15186
+ *
15187
+ * @param {PublicKey} updater - The public key of the updater.
15188
+ * @param {number} dstEid - The destination EID.
15189
+ * @param {bignum} priceRatio - The price ratio.
15190
+ * @param {bignum} gasPriceInUnit - The gas price in unit.
15191
+ * @param {number} gasPerByte - The gas per byte.
15192
+ * @param {types.ModelType | null} modelType - The model type.
15193
+ *
15194
+ * @returns {TransactionInstruction} The transaction instruction.
15195
+ */
13917
15196
  setPrice(updater: PublicKey, dstEid: number, priceRatio: bignum, gasPriceInUnit: bignum, gasPerByte: number, modelType: ModelType | null): TransactionInstruction;
15197
+ /**
15198
+ * Sets the SOL price.
15199
+ *
15200
+ * @param {PublicKey} updater - The public key of the updater.
15201
+ * @param {bignum | null} nativeTokenPriceUsd - The native token price in USD.
15202
+ *
15203
+ * @returns {TransactionInstruction} The transaction instruction.
15204
+ */
13918
15205
  setSolPrice(updater: PublicKey, nativeTokenPriceUsd: bignum | null): TransactionInstruction;
15206
+ /**
15207
+ * Transfers the admin role.
15208
+ *
15209
+ * @param {PublicKey} admin - The public key of the current admin.
15210
+ * @param {PublicKey} newAdmin - The public key of the new admin.
15211
+ *
15212
+ * @returns {TransactionInstruction} The transaction instruction.
15213
+ */
13919
15214
  transferAdmin(admin: PublicKey, newAdmin: PublicKey): TransactionInstruction;
15215
+ /**
15216
+ * Retrieves the price feed account.
15217
+ *
15218
+ * @param {Connection} connection - The Solana connection object.
15219
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - Optional commitment or configuration.
15220
+ *
15221
+ * @returns {Promise<accounts.PriceFeed | null>} The price feed account or null if not found.
15222
+ */
13920
15223
  getPriceFeed(connection: Connection, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<PriceFeed$1 | null>;
13921
15224
  }
13922
15225
 
@@ -13926,75 +15229,361 @@ declare namespace pricefeed {
13926
15229
  export { PROGRAM_ID$1 as PROGRAM_ID, pricefeed_PriceFeed as PriceFeed, index$3 as accounts, index$2 as instructions, index$1 as types };
13927
15230
  }
13928
15231
 
15232
+ /**
15233
+ * Derives the OApp ID PDA.
15234
+ *
15235
+ * @param {PublicKey} program - The program public key.
15236
+ * @param {string} [seed=COUNT_SEED] - The seed.
15237
+ * @param {number} [id] - The ID.
15238
+ * @returns {[PublicKey, number]} The derived PDA and bump.
15239
+ */
13929
15240
  declare function oappIDPDA(program: PublicKey, seed?: string, id?: number): [PublicKey, number];
15241
+ /**
15242
+ * Derives the LZ receive types accounts PDA.
15243
+ *
15244
+ * @param {PublicKey} program - The program public key.
15245
+ * @param {PublicKey} [oappId] - The OApp ID.
15246
+ * @returns {[PublicKey, number]} The derived PDA and bump.
15247
+ */
13930
15248
  declare function deriveLzReceiveTypesAccountsPDA(program: PublicKey, oappId?: PublicKey): [PublicKey, number];
15249
+ /**
15250
+ * Derives the LZ compose types accounts PDA.
15251
+ *
15252
+ * @param {PublicKey} program - The program public key.
15253
+ * @param {PublicKey} [oappId] - The OApp ID.
15254
+ * @returns {[PublicKey, number]} The derived PDA and bump.
15255
+ */
13931
15256
  declare function deriveLzComposeTypesAccountsPDA(program: PublicKey, oappId?: PublicKey): [PublicKey, number];
15257
+ /**
15258
+ * Abstract class representing a base OApp.
15259
+ */
13932
15260
  declare abstract class BaseOApp {
13933
15261
  program: PublicKey;
13934
15262
  oappBaseDeriver: OAppBasePDADeriver;
15263
+ /**
15264
+ * Creates an instance of the BaseOApp class.
15265
+ *
15266
+ * @param {PublicKey} program - The program public key.
15267
+ */
13935
15268
  constructor(program: PublicKey);
15269
+ /**
15270
+ * Gets the endpoint.
15271
+ *
15272
+ * @param {Connection} connection - The connection.
15273
+ * @returns {Promise<EndpointProgram.Endpoint>} The endpoint.
15274
+ */
13936
15275
  abstract getEndpoint(connection: Connection): Promise<Endpoint>;
15276
+ /**
15277
+ * Gets the send library program.
15278
+ *
15279
+ * @param {Connection} connection - The connection.
15280
+ * @param {PublicKey} payer - The payer public key.
15281
+ * @param {number} dstEid - The destination endpoint ID.
15282
+ * @param {EndpointProgram.Endpoint} [endpoint] - The endpoint.
15283
+ * @returns {Promise<SimpleMessageLibProgram.SimpleMessageLib | UlnProgram.Uln>} The send library program.
15284
+ */
13937
15285
  abstract getSendLibraryProgram(connection: Connection, payer: PublicKey, dstEid: number, endpoint?: Endpoint): Promise<SimpleMessageLib | Uln>;
15286
+ /**
15287
+ * Queries the ID PDA info.
15288
+ *
15289
+ * @param {Connection} connection - The connection.
15290
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment or config.
15291
+ * @returns {Promise<AccountInfo<Buffer> | null>} The account info.
15292
+ */
13938
15293
  queryIDPDAInfo(connection: Connection, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<AccountInfo<Buffer> | null>;
15294
+ /**
15295
+ * Queries the PDA info.
15296
+ *
15297
+ * @param {Connection} connection - The connection.
15298
+ * @param {PublicKey} pda - The PDA public key.
15299
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment or config.
15300
+ * @returns {Promise<AccountInfo<Buffer> | null>} The account info.
15301
+ */
13939
15302
  queryPDAInfo(connection: Connection, pda: PublicKey, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<AccountInfo<Buffer> | null>;
15303
+ /**
15304
+ * Gets the ID PDA.
15305
+ *
15306
+ * @returns {[PublicKey, number]} The ID PDA and bump.
15307
+ */
13940
15308
  idPDA(): [PublicKey, number];
15309
+ /**
15310
+ * Gets the remote.
15311
+ *
15312
+ * @param {Connection} connection - The connection.
15313
+ * @param {number} dstEid - The destination endpoint ID.
15314
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment or config.
15315
+ * @returns {Promise<Uint8Array | null>} The remote data.
15316
+ */
13941
15317
  getRemote(connection: Connection, dstEid: number, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<Uint8Array | null>;
13942
15318
  }
13943
15319
 
15320
+ /**
15321
+ * Extracts the sent packet event by transaction hash.
15322
+ *
15323
+ * @param {Connection} connection - The connection to the Solana cluster.
15324
+ * @param {PublicKey} program - The program public key.
15325
+ * @param {TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>} signature - The transaction signature or parsed transaction.
15326
+ * @param {Finality | GetVersionedTransactionConfig} [commitment] - The commitment level.
15327
+ * @param {boolean} [unsafeParseErr=false] - Whether to parse the event even if the transaction failed.
15328
+ * @returns {Promise<PacketSentEvent[] | null>} A promise that resolves to an array of sent packet events or null if not found.
15329
+ */
13944
15330
  declare function extractSentPacketEventByTxHash(connection: Connection, program: PublicKey, signature: TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>, commitment?: Finality | GetVersionedTransactionConfig, unsafeParseErr?: boolean): Promise<PacketSentEvent[] | null>;
15331
+ /**
15332
+ * Extracts the verified packet event by transaction hash.
15333
+ *
15334
+ * @param {Connection} connection - The connection to the Solana cluster.
15335
+ * @param {PublicKey} program - The program public key.
15336
+ * @param {TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>} signature - The transaction signature or parsed transaction.
15337
+ * @param {Finality | GetVersionedTransactionConfig} [commitment] - The commitment level.
15338
+ * @param {boolean} [unsafeParseErr=false] - Whether to parse the event even if the transaction failed.
15339
+ * @returns {Promise<PacketVerifiedEvent[] | null>} A promise that resolves to an array of verified packet events or null if not found.
15340
+ */
13945
15341
  declare function extractVerifiedPacketEventByTxHash(connection: Connection, program: PublicKey, signature: TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>, commitment?: Finality | GetVersionedTransactionConfig, unsafeParseErr?: boolean): Promise<PacketVerifiedEvent[] | null>;
15342
+ /**
15343
+ * Extracts the received packet event by transaction hash.
15344
+ *
15345
+ * @param {Connection} connection - The connection to the Solana cluster.
15346
+ * @param {PublicKey} program - The program public key.
15347
+ * @param {TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>} signature - The transaction signature or parsed transaction.
15348
+ * @param {Finality | GetVersionedTransactionConfig} [commitment] - The commitment level.
15349
+ * @param {boolean} [unsafeParseErr=false] - Whether to parse the event even if the transaction failed.
15350
+ * @returns {Promise<PacketDeliveredEvent[] | null>} A promise that resolves to an array of received packet events or null if not found.
15351
+ */
13946
15352
  declare function extractReceivedPacketEventByTxHash(connection: Connection, program: PublicKey, signature: TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>, commitment?: Finality | GetVersionedTransactionConfig, unsafeParseErr?: boolean): Promise<PacketDeliveredEvent[] | null>;
15353
+ /**
15354
+ * Extracts the compose sent event by transaction hash.
15355
+ *
15356
+ * @param {Connection} connection - The connection to the Solana cluster.
15357
+ * @param {PublicKey} program - The program public key.
15358
+ * @param {TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>} signature - The transaction signature or parsed transaction.
15359
+ * @param {Finality | GetVersionedTransactionConfig} [commitment] - The commitment level.
15360
+ * @param {boolean} [unsafeParseErr=false] - Whether to parse the event even if the transaction failed.
15361
+ * @returns {Promise<ComposeSentEvent[] | null>} A promise that resolves to an array of compose sent events or null if not found.
15362
+ */
13947
15363
  declare function extractComposeSentEventByTxHash(connection: Connection, program: PublicKey, signature: TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>, commitment?: Finality | GetVersionedTransactionConfig, unsafeParseErr?: boolean): Promise<ComposeSentEvent[] | null>;
15364
+ /**
15365
+ * Extracts the compose delivered event by transaction hash.
15366
+ *
15367
+ * @param {Connection} connection - The connection to the Solana cluster.
15368
+ * @param {PublicKey} program - The program public key.
15369
+ * @param {TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>} signature - The transaction signature or parsed transaction.
15370
+ * @param {Finality | GetVersionedTransactionConfig} [commitment] - The commitment level.
15371
+ * @param {boolean} [unsafeParseErr=false] - Whether to parse the event even if the transaction failed.
15372
+ * @returns {Promise<ComposeDeliveredEvent[] | null>} A promise that resolves to an array of compose delivered events or null if not found.
15373
+ */
13948
15374
  declare function extractComposeDeliveredEventByTxHash(connection: Connection, program: PublicKey, signature: TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>, commitment?: Finality | GetVersionedTransactionConfig, unsafeParseErr?: boolean): Promise<ComposeDeliveredEvent[] | null>;
15375
+ /**
15376
+ * Extracts the worker fee paid event by transaction hash.
15377
+ *
15378
+ * @param {Connection} connection - The connection to the Solana cluster.
15379
+ * @param {PublicKey} program - The program public key.
15380
+ * @param {TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>} signature - The transaction signature or parsed transaction.
15381
+ * @param {Finality | GetVersionedTransactionConfig} [commitment] - The commitment level.
15382
+ * @param {boolean} [unsafeParseErr=false] - Whether to parse the event even if the transaction failed.
15383
+ * @returns {Promise<FeesPaidEvent[] | null>} A promise that resolves to an array of worker fee paid events or null if not found.
15384
+ */
13949
15385
  declare function extractWorkerFeePaidEventByTxHash(connection: Connection, program: PublicKey, signature: TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>, commitment?: Finality | GetVersionedTransactionConfig, unsafeParseErr?: boolean): Promise<FeesPaidEvent[] | null>;
13950
15386
  /**
13951
- * @param connection
13952
- * @param program extract event from specific program id
13953
- * @signature transaction signature(tx hash) or parsed transaction
13954
- * @eventBeet beet struct for event
13955
- * @commitment commitment level
13956
- * @unsafeParseErr Default is false, only parse event if transaction succeeded. if true, will parse event even if transaction failed. Please set this to false if you want to ignore failed transaction and set `true` with caution as it may lead to unexpected behavior.
13957
- * @returns array of events or null if no event found
15387
+ * Extracts events from a transaction signature.
15388
+ *
15389
+ * @param {Connection} connection - The connection to the Solana cluster.
15390
+ * @param {PublicKey} program - The program public key, extract event from specific program id
15391
+ * @param {TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>} signature - The transaction signature(tx hash) or parsed transaction.
15392
+ * @param {beet.FixableBeetArgsStruct<E> | beet.BeetArgsStruct<E>} eventBeet - The beet struct for the event.
15393
+ * @param {Finality | GetVersionedTransactionConfig} [commitment] - The commitment level.
15394
+ * @param {boolean} [unsafeParseErr=false] - Whether to parse the event even if the transaction failed. Default is false, only parse event if transaction succeeded. if true, will parse event even if transaction failed. Please set this to false if you want to ignore failed transaction and set `true` with caution as it may lead to unexpected behavior.
15395
+ * @returns {Promise<E[] | null>} A promise that resolves to an array of events or null if not found.
13958
15396
  */
13959
15397
  declare function extractEventFromTransactionSignature<E>(connection: Connection, program: PublicKey, signature: TransactionSignature | Awaited<ReturnType<typeof connection.getParsedTransaction>>, eventBeet: beet.FixableBeetArgsStruct<E> | beet.BeetArgsStruct<E>, commitment?: Finality | GetVersionedTransactionConfig, unsafeParseErr?: boolean): Promise<E[] | null>;
15398
+ /**
15399
+ * Generates an address lookup table.
15400
+ *
15401
+ * @param {Connection} connection - The connection to the Solana cluster.
15402
+ * @param {PublicKey} payer - The payer public key.
15403
+ * @param {PublicKey} authority - The authority public key.
15404
+ * @param {PublicKey[]} addresses - The addresses to include in the lookup table.
15405
+ * @returns {Promise<{ instructions: TransactionInstruction[]; address: PublicKey }>} A promise that resolves to the instructions and lookup table address.
15406
+ */
13960
15407
  declare function generateAddressLookupTable(connection: Connection, payer: PublicKey, authority: PublicKey, addresses: PublicKey[]): Promise<{
13961
15408
  instructions: TransactionInstruction[];
13962
15409
  address: PublicKey;
13963
15410
  }>;
15411
+ /**
15412
+ * Deactivates an address lookup table.
15413
+ * To properly terminate the lookup table, it is advisable to initially invoke `deactivateLookupTable`,
15414
+ * pause for a duration of 500 blocks, and subsequently invoke `closeLookupTable`.
15415
+ *
15416
+ * @param {PublicKey} authority - The authority public key.
15417
+ * @param {PublicKey} lookupTable - The lookup table public key.
15418
+ * @returns {TransactionInstruction} The transaction instruction.
15419
+ */
13964
15420
  declare function deactivateLookupTable(authority: PublicKey, lookupTable: PublicKey): TransactionInstruction;
15421
+ /**
15422
+ * Closes an address lookup table.
15423
+ * To properly terminate the lookup table, it is advisable to initially invoke `deactivateLookupTable`,
15424
+ * pause for a duration of 500 blocks, and subsequently invoke `closeLookupTable`.
15425
+ *
15426
+ * @param {PublicKey} recipient - The recipient public key.
15427
+ * @param {PublicKey} authority - The authority public key.
15428
+ * @param {PublicKey} lookupTable - The lookup table public key.
15429
+ * @returns {TransactionInstruction} The transaction instruction.
15430
+ */
13965
15431
  declare function closeLookupTable(recipient: PublicKey, authority: PublicKey, lookupTable: PublicKey): TransactionInstruction;
15432
+ /**
15433
+ * Creates a versioned transaction with an address lookup table.
15434
+ *
15435
+ * @param {Connection} connection - The connection to the Solana cluster.
15436
+ * @param {PublicKey} payer - The payer public key.
15437
+ * @param {TransactionInstruction[]} instructions - The transaction instructions.
15438
+ * @param {Blockhash} [recentBlockHash] - The recent block hash.
15439
+ * @param {PublicKey} [tableAddr] - The address lookup table public key.
15440
+ * @returns {Promise<VersionedTransaction>} A promise that resolves to the versioned transaction.
15441
+ */
13966
15442
  declare function txWithAddressLookupTable(connection: Connection, payer: PublicKey, instructions: TransactionInstruction[], recentBlockHash?: Blockhash, tableAddr?: PublicKey): Promise<VersionedTransaction>;
15443
+ /**
15444
+ * Creates a nonce account transaction.
15445
+ *
15446
+ * @param {Connection} connection - The connection to the Solana cluster.
15447
+ * @param {PublicKey} auth - The authorized public key.
15448
+ * @param {number} [lamportsForRent] - The lamports for rent.
15449
+ * @returns {Promise<{ tx: Transaction; nonceAccount: Keypair }>} A promise that resolves to the transaction and nonce account.
15450
+ */
13967
15451
  declare function createNonceAccountTX(connection: Connection, auth: PublicKey, lamportsForRent?: number): Promise<{
13968
15452
  tx: Transaction;
13969
15453
  nonceAccount: Keypair;
13970
15454
  }>;
15455
+ /**
15456
+ * Creates a transaction with a nonce.
15457
+ *
15458
+ * @param {Connection} connection - The connection to the Solana cluster.
15459
+ * @param {PublicKey} noncePubkey - The nonce public key.
15460
+ * @param {TransactionInstruction[]} instructions - The transaction instructions.
15461
+ * @param {NonceAccount} [nonceInfo] - The nonce account information.
15462
+ * @returns {Promise<Transaction | null>} A promise that resolves to the transaction or null if not found.
15463
+ */
13971
15464
  declare function txWithNonce(connection: Connection, noncePubkey: PublicKey, instructions: TransactionInstruction[], nonceInfo?: NonceAccount): Promise<Transaction | null>;
15465
+ /**
15466
+ * Checks if an account is initialized.
15467
+ *
15468
+ * @param {Connection} connection - The connection to the Solana cluster.
15469
+ * @param {PublicKey} account - The account public key.
15470
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - The commitment level or account info configuration.
15471
+ * @returns {Promise<boolean>} A promise that resolves to true if the account is initialized, false otherwise.
15472
+ */
13972
15473
  declare function isAccountInitialized(connection: Connection, account: PublicKey, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<boolean>;
15474
+ /**
15475
+ * Builds a version 0 message.
15476
+ *
15477
+ * @param {Connection} connection - The connection to the Solana cluster.
15478
+ * @param {PublicKey} payerKey - The payer public key.
15479
+ * @param {TransactionInstruction[]} instructions - The transaction instructions.
15480
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig='confirmed'] - The commitment level or account info configuration.
15481
+ * @param {Blockhash} [blockhash] - The blockhash.
15482
+ * @returns {Promise<MessageV0>} A promise that resolves to the version 0 message.
15483
+ */
13973
15484
  declare function buildMessageV0(connection: Connection, payerKey: PublicKey, instructions: TransactionInstruction[], commitmentOrConfig?: Commitment | GetAccountInfoConfig, blockhash?: Blockhash): Promise<MessageV0>;
15485
+ /**
15486
+ * Builds a versioned transaction.
15487
+ *
15488
+ * @param {Connection} connection - The connection to the Solana cluster.
15489
+ * @param {PublicKey} payerKey - The payer public key.
15490
+ * @param {TransactionInstruction[]} instructions - The transaction instructions.
15491
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig='confirmed'] - The commitment level or account info configuration.
15492
+ * @param {Blockhash} [blockhash] - The blockhash.
15493
+ * @param {PublicKey} [lookupTableAddress] - The lookup table address.
15494
+ * @returns {Promise<VersionedTransaction>} A promise that resolves to the versioned transaction.
15495
+ */
13974
15496
  declare function buildVersionedTransaction(connection: Connection, payerKey: PublicKey, instructions: TransactionInstruction[], commitmentOrConfig?: Commitment | GetAccountInfoConfig, blockhash?: Blockhash, lookupTableAddress?: PublicKey): Promise<VersionedTransaction>;
15497
+ /**
15498
+ * Generates an instruction discriminator.
15499
+ *
15500
+ * @param {string} method - The method name.
15501
+ * @returns {Buffer} The instruction discriminator.
15502
+ */
13975
15503
  declare function instructionDiscriminator(method: string): Buffer;
15504
+ /**
15505
+ * Simulates a transaction.
15506
+ *
15507
+ * @param {Connection} connection - The connection to the Solana cluster.
15508
+ * @param {TransactionInstruction[]} instructions - The transaction instructions.
15509
+ * @param {PublicKey} programId - The program public key.
15510
+ * @param {PublicKey} payer - The payer public key.
15511
+ * @param {Commitment} [commitment='confirmed'] - The commitment level.
15512
+ * @param {Blockhash} [blockhash] - The blockhash.
15513
+ * @param {PublicKey} [lookupTableAddress] - The lookup table address.
15514
+ * @returns {Promise<Buffer>} A promise that resolves to the simulation result.
15515
+ * @throws {Error} If the simulation fails.
15516
+ */
13976
15517
  declare function simulateTransaction(connection: Connection, instructions: TransactionInstruction[], programId: PublicKey, payer: PublicKey, commitment?: Commitment, blockhash?: Blockhash, lookupTableAddress?: PublicKey): Promise<Buffer>;
13977
15518
 
15519
+ /**
15520
+ * Array of IDL types.
15521
+ */
13978
15522
  declare const idlTypes: string[];
15523
+ /**
15524
+ * Array of message libraries.
15525
+ */
13979
15526
  declare const messageLibs: string[];
15527
+ /**
15528
+ * Faucet URLs for different environments.
15529
+ */
13980
15530
  declare const FAUCET_URL: {
13981
15531
  [env in Environment]: string;
13982
15532
  };
13983
15533
 
15534
+ /**
15535
+ * Represents the address type as a fixed-size array of 32 bytes.
15536
+ */
13984
15537
  declare const AddressType: beet.ElementCollectionBeet & beet.BeetBase & beet.BeetReadWrite<number[], number[]>;
15538
+ /**
15539
+ * Offset for message type.
15540
+ */
13985
15541
  declare const MSG_TYPE_OFFSET = 0;
15542
+ /**
15543
+ * Enum representing different message types.
15544
+ */
13986
15545
  declare enum MessageType {
15546
+ /**
15547
+ * Vanilla message type.
15548
+ */
13987
15549
  VANILLA = 1,
15550
+ /**
15551
+ * Composed message type.
15552
+ */
13988
15553
  COMPOSED_TYPE = 2
13989
15554
  }
15555
+ /**
15556
+ * Interface representing the parameters for LzReceive.
15557
+ */
13990
15558
  interface LzReceiveParams {
15559
+ /**
15560
+ * Source EID.
15561
+ */
13991
15562
  srcEid: number;
15563
+ /**
15564
+ * Sender address (size: 32).
15565
+ */
13992
15566
  sender: number[];
15567
+ /**
15568
+ * Nonce value.
15569
+ */
13993
15570
  nonce: bignum;
15571
+ /**
15572
+ * GUID (size: 32).
15573
+ */
13994
15574
  guid: number[];
15575
+ /**
15576
+ * Message content.
15577
+ */
13995
15578
  message: Uint8Array;
15579
+ /**
15580
+ * Caller parameters.
15581
+ */
13996
15582
  callerParams: Uint8Array;
13997
15583
  }
15584
+ /**
15585
+ * Struct for serializing and deserializing LzReceiveParams.
15586
+ */
13998
15587
  declare const LzReceiveParamsBeet: FixableBeetArgsStruct<LzReceiveParams>;
13999
15588
  /**
14000
15589
  *
@@ -14005,61 +15594,232 @@ pub index: u16,
14005
15594
  pub message: Vec<u8>,
14006
15595
  pub extra_data: Vec<u8>,
14007
15596
  **/
15597
+ /**
15598
+ * Interface representing the parameters for LzCompose.
15599
+ */
14008
15600
  interface LzComposeParams {
15601
+ /**
15602
+ * Sender public key.
15603
+ */
14009
15604
  from: PublicKey;
15605
+ /**
15606
+ * Recipient public key.
15607
+ */
14010
15608
  to: PublicKey;
15609
+ /**
15610
+ * GUID (size: 32).
15611
+ */
14011
15612
  guid: number[];
15613
+ /**
15614
+ * Index value.
15615
+ */
14012
15616
  index: number;
15617
+ /**
15618
+ * Message content.
15619
+ */
14013
15620
  message: Uint8Array;
15621
+ /**
15622
+ * Extra data.
15623
+ */
14014
15624
  extraData: Uint8Array;
14015
15625
  }
14016
15626
  /**
15627
+ * Struct for serializing and deserializing LzComposeParams.
15628
+ *
14017
15629
  * @category userTypes
14018
15630
  * @category generated
14019
15631
  */
14020
15632
  declare const LzComposeParamsBeet: FixableBeetArgsStruct<LzComposeParams>;
15633
+ /**
15634
+ * Interface representing an LzReceive account.
15635
+ */
14021
15636
  interface LzReceiveAccount {
15637
+ /**
15638
+ * Public key of the account.
15639
+ */
14022
15640
  pubkey: PublicKey;
15641
+ /**
15642
+ * Indicates if the account is a signer.
15643
+ */
14023
15644
  isSigner: boolean;
15645
+ /**
15646
+ * Indicates if the account is writable.
15647
+ */
14024
15648
  isWritable: boolean;
14025
15649
  }
14026
15650
  /**
15651
+ * Struct for serializing and deserializing LzReceiveAccount.
15652
+ *
14027
15653
  * @category userTypes
14028
15654
  * @category generated
14029
15655
  */
14030
15656
  declare const LzReceiveAccountBeet: BeetArgsStruct<LzReceiveAccount>;
15657
+ /**
15658
+ * Enum representing different executor option types.
15659
+ */
14031
15660
  declare enum ExecutorOptionType {
15661
+ /**
15662
+ * Placeholder option type.
15663
+ */
14032
15664
  PlaceHolder = 0,
15665
+ /**
15666
+ * LzReceive option type.
15667
+ */
14033
15668
  LzReceive = 1,
15669
+ /**
15670
+ * NativeDrop option type.
15671
+ */
14034
15672
  NativeDrop = 2,
15673
+ /**
15674
+ * LzCompose option type.
15675
+ */
14035
15676
  LzCompose = 3,
15677
+ /**
15678
+ * OrderExecution option type.
15679
+ */
14036
15680
  OrderExecution = 4
14037
15681
  }
15682
+ /**
15683
+ * Maximum length for executor option types.
15684
+ */
14038
15685
  declare const MaxExecutorOptionTypeLength = 10;
14039
15686
 
14040
15687
  /**
14041
- * @param payer. If the msgType is COMPOSED_TYPE, then the payer is required to pay for initializing the account.
15688
+ * Receives a LayerZero message.
15689
+ *
15690
+ * @param {Connection} connection - The Solana connection object.
15691
+ * @param {PublicKey} payer - The public key of the payer.
15692
+ * @param {Packet} packet - The packet containing the message.
15693
+ * @param {Uint8Array} [callerParams] - Optional caller parameters.
15694
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - Optional commitment or configuration.
15695
+ *
15696
+ * @returns {Promise<TransactionInstruction>} The transaction instruction.
14042
15697
  */
14043
15698
  declare function lzReceive(connection: Connection, payer: PublicKey, packet: Packet$2, callerParams?: Uint8Array, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction>;
15699
+ /**
15700
+ * Composes a LayerZero message.
15701
+ *
15702
+ * @param {Connection} connection - The Solana connection object.
15703
+ * @param {PublicKey} payer - The public key of the payer.
15704
+ * @param {ComposeSentEvent} event - The event containing the message details.
15705
+ * @param {Uint8Array} [extraData] - Optional extra data.
15706
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - Optional commitment or configuration.
15707
+ *
15708
+ * @returns {Promise<TransactionInstruction>} The transaction instruction.
15709
+ */
14044
15710
  declare function lzCompose(connection: Connection, payer: PublicKey, event: ComposeSentEvent, extraData?: Uint8Array, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<TransactionInstruction>;
15711
+ /**
15712
+ * Retrieves the accounts required for the LzReceive instruction.
15713
+ *
15714
+ * @param {Connection} connection - The Solana connection object.
15715
+ * @param {PublicKey} payer - The public key of the payer.
15716
+ * @param {PublicKey} receiver - The public key of the receiver.
15717
+ * @param {PublicKey} receiverProgram - The public key of the receiver program.
15718
+ * @param {LzReceiveParams} params - The parameters for the LzReceive instruction.
15719
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - Optional commitment or configuration.
15720
+ *
15721
+ * @returns {Promise<AccountMeta[]>} The list of account metadata.
15722
+ */
14045
15723
  declare function getLzReceiveAccounts(connection: Connection, payer: PublicKey, receiver: PublicKey, receiverProgram: PublicKey, params: LzReceiveParams, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<AccountMeta[]>;
15724
+ /**
15725
+ * Retrieves the accounts required for the LzCompose instruction.
15726
+ *
15727
+ * @param {Connection} connection - The Solana connection object.
15728
+ * @param {PublicKey} payer - The public key of the payer.
15729
+ * @param {PublicKey} to - The public key of the recipient.
15730
+ * @param {PublicKey} composerProgram - The public key of the composer program.
15731
+ * @param {LzComposeParams} params - The parameters for the LzCompose instruction.
15732
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig] - Optional commitment or configuration.
15733
+ *
15734
+ * @returns {Promise<AccountMeta[]>} The list of account metadata.
15735
+ */
14046
15736
  declare function getLzComposeAccountMeta(connection: Connection, payer: PublicKey, to: PublicKey, composerProgram: PublicKey, params: LzComposeParams, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<AccountMeta[]>;
14047
15737
 
15738
+ /**
15739
+ * Supported programs.
15740
+ */
14048
15741
  type SupportedPrograms = 'endpoint' | 'simple_messagelib' | 'uln' | 'blocked_messagelib' | 'executor' | 'pricefeed' | 'dvn';
15742
+ /**
15743
+ * Interface representing a deployment.
15744
+ */
14049
15745
  interface Deployment {
15746
+ /**
15747
+ * The name of the supported program.
15748
+ */
14050
15749
  name: SupportedPrograms;
15750
+ /**
15751
+ * The network of the deployment.
15752
+ */
14051
15753
  network: Network;
15754
+ /**
15755
+ * The address of the deployment.
15756
+ */
14052
15757
  address: string;
15758
+ /**
15759
+ * Compatible versions of the deployment.
15760
+ */
14053
15761
  compatibleVersions: string[];
15762
+ /**
15763
+ * The deployer of the deployment.
15764
+ */
14054
15765
  deployer: string;
14055
15766
  }
15767
+ /**
15768
+ * Gets the program keypair.
15769
+ *
15770
+ * @param {Network | 'default'} network - The network.
15771
+ * @param {SupportedPrograms} program - The supported program.
15772
+ * @returns {PublicKey} The public key of the program.
15773
+ */
14056
15774
  declare function getProgramKeypair(network: Network | 'default', program: SupportedPrograms): PublicKey;
15775
+ /**
15776
+ * Gets the endpoint program ID.
15777
+ *
15778
+ * @param {Network | 'default'} network - The network.
15779
+ * @returns {PublicKey} The public key of the endpoint program.
15780
+ */
14057
15781
  declare function getEndpointProgramId(network: Network | 'default'): PublicKey;
15782
+ /**
15783
+ * Gets the simple message library program ID.
15784
+ *
15785
+ * @param {Network | 'default'} network - The network.
15786
+ * @returns {PublicKey} The public key of the simple message library program.
15787
+ */
14058
15788
  declare function getSimpleMessageLibProgramId(network: Network | 'default'): PublicKey;
15789
+ /**
15790
+ * Gets the ULN program ID.
15791
+ *
15792
+ * @param {Network | 'default'} network - The network.
15793
+ * @returns {PublicKey} The public key of the ULN program.
15794
+ */
14059
15795
  declare function getULNProgramId(network: Network | 'default'): PublicKey;
15796
+ /**
15797
+ * Gets the DVN program ID.
15798
+ *
15799
+ * @param {Network | 'default'} network - The network.
15800
+ * @returns {PublicKey} The public key of the DVN program.
15801
+ */
14060
15802
  declare function getDVNProgramId(network: Network | 'default'): PublicKey;
15803
+ /**
15804
+ * Gets the blocked message library program ID.
15805
+ *
15806
+ * @param {Network | 'default'} network - The network.
15807
+ * @returns {PublicKey} The public key of the blocked message library program.
15808
+ */
14061
15809
  declare function getBlockedMessageLibProgramId(network: Network | 'default'): PublicKey;
15810
+ /**
15811
+ * Gets the executor program ID.
15812
+ *
15813
+ * @param {Network | 'default'} network - The network.
15814
+ * @returns {PublicKey} The public key of the executor program.
15815
+ */
14062
15816
  declare function getExecutorProgramId(network: Network | 'default'): PublicKey;
15817
+ /**
15818
+ * Gets the pricefeed program ID.
15819
+ *
15820
+ * @param {Network | 'default'} network - The network.
15821
+ * @returns {PublicKey} The public key of the pricefeed program.
15822
+ */
14063
15823
  declare function getPricefeedProgramId(network: Network | 'default'): PublicKey;
14064
15824
 
14065
15825
  /**
@@ -14120,6 +15880,9 @@ declare namespace index {
14120
15880
  export { index_PROGRAM_ADDRESS as PROGRAM_ADDRESS, index_PROGRAM_ID as PROGRAM_ID, index_createVersionInstruction as createVersionInstruction, index_createVersionInstructionAccounts as createVersionInstructionAccounts, index_versionInstructionDiscriminator as versionInstructionDiscriminator, index_versionStruct as versionStruct };
14121
15881
  }
14122
15882
 
15883
+ /**
15884
+ * Class representing a helper for sending transactions.
15885
+ */
14123
15886
  declare class SendHelper {
14124
15887
  readonly endpointProgram: PublicKey;
14125
15888
  readonly ulnProgram: PublicKey;
@@ -14128,25 +15891,89 @@ declare class SendHelper {
14128
15891
  private uln;
14129
15892
  private simpleMsgLib;
14130
15893
  private accounts;
15894
+ /**
15895
+ * Creates an instance of the SendHelper class.
15896
+ *
15897
+ * @param {PublicKey} [endpointProgram=EndpointProgram.PROGRAM_ID] - The endpoint program public key.
15898
+ * @param {PublicKey} [ulnProgram=UlnProgram.PROGRAM_ID] - The ULN program public key.
15899
+ * @param {PublicKey} [simpleMsgLibProgram=SimpleMessageLibProgram.PROGRAM_ID] - The simple message library program public key.
15900
+ */
14131
15901
  constructor(endpointProgram?: PublicKey, ulnProgram?: PublicKey, simpleMsgLibProgram?: PublicKey);
15902
+ /**
15903
+ * Fetches multiple account information.
15904
+ *
15905
+ * @param {Connection} connection - The connection to the Solana cluster.
15906
+ * @param {PublicKey[]} keys - The public keys of the accounts.
15907
+ * @param {Commitment | GetAccountInfoConfig} [commitment] - The commitment level or account info configuration.
15908
+ * @returns {Promise<(AccountInfo<Buffer> | null)[]>} A promise that resolves to an array of account information.
15909
+ */
14132
15910
  private getMultipleAccountsInfo;
15911
+ /**
15912
+ * Gets the account metadata for the quote instruction.
15913
+ *
15914
+ * @param {Connection} connection - The connection to the Solana cluster.
15915
+ * @param {PublicKey} payer - The payer public key.
15916
+ * @param {PublicKey} sender - The sender public key.
15917
+ * @param {number} dstEid - The destination endpoint ID.
15918
+ * @param {string} receiver - The receiver address.
15919
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig='confirmed'] - The commitment level or account info configuration.
15920
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
15921
+ */
14133
15922
  getQuoteAccounts(connection: Connection, payer: PublicKey, sender: PublicKey, dstEid: number, receiver: string, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<AccountMeta[]>;
14134
15923
  /**
14135
- * @param connection
14136
- * @param payer
14137
- * @param sender the PDA of the oApp
14138
- * @param dstEid the destination endpoint id
14139
- * @param receiver the remote peer's address
14140
- * @param commitmentOrConfig
14141
- * 1 or 3(1+2) RPC calls
14142
- * */
15924
+ * Gets the account metadata for the send instruction.
15925
+ *
15926
+ * @param {Connection} connection - The connection to the Solana cluster.
15927
+ * @param {PublicKey} payer - The payer public key.
15928
+ * @param {PublicKey} sender - The sender public key.
15929
+ * @param {number} dstEid - The destination endpoint ID.
15930
+ * @param {string} receiver - The receiver address.
15931
+ * @param {Commitment | GetAccountInfoConfig} [commitmentOrConfig='confirmed'] - The commitment level or account info configuration.
15932
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
15933
+ */
14143
15934
  getSendAccounts(connection: Connection, payer: PublicKey, sender: PublicKey, dstEid: number, receiver: string, commitmentOrConfig?: Commitment | GetAccountInfoConfig): Promise<AccountMeta[]>;
15935
+ /**
15936
+ * Gets the account metadata for the endpoint.
15937
+ *
15938
+ * @param {PublicKey} msgLibProgram - The message library program public key.
15939
+ * @param {PublicKey} msgLib - The message library public key.
15940
+ * @param {PublicKey} sender - The sender public key.
15941
+ * @param {number} dstEid - The destination endpoint ID.
15942
+ * @param {string} receiver - The receiver address.
15943
+ * @param {QuoteOrSend} quoteOrSend - The quote or send action.
15944
+ * @returns {AccountMeta[]} An array of account metadata.
15945
+ */
14144
15946
  private getEndpointAccounts;
15947
+ /**
15948
+ * Gets the account metadata for the simple message library.
15949
+ *
15950
+ * @param {PublicKey} payer - The payer public key.
15951
+ * @param {QuoteOrSend} quoteOrSend - The quote or send action.
15952
+ * @returns {AccountMeta[]} An array of account metadata.
15953
+ */
14145
15954
  private getSimpleMsgLibAccounts;
15955
+ /**
15956
+ * Gets the account metadata for the ULN.
15957
+ *
15958
+ * @param {Connection} connection - The connection to the Solana cluster.
15959
+ * @param {PublicKey} payer - The payer public key.
15960
+ * @param {KeyedAccountInfo} ulnInfo - The ULN account information.
15961
+ * @param {KeyedAccountInfo} ulnDefaultSendConfigInfo - The ULN default send configuration account information.
15962
+ * @param {KeyedAccountInfo} ulnSendConfigInfo - The ULN send configuration account information.
15963
+ * @param {QuoteOrSend} quoteOrSend - The quote or send action.
15964
+ * @param {Commitment | GetAccountInfoConfig} [commitment] - The commitment level or account info configuration.
15965
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
15966
+ */
14146
15967
  private getUlnAccounts;
14147
15968
  }
14148
15969
 
15970
+ /**
15971
+ * Object representing the IDL (Interface Definition Language) types.
15972
+ */
14149
15973
  declare const IdlTypes: {
15974
+ /**
15975
+ * The endpoint types.
15976
+ */
14150
15977
  endpoint: ({
14151
15978
  name: string;
14152
15979
  type: {
@@ -14241,16 +16068,67 @@ declare const IdlTypes: {
14241
16068
  };
14242
16069
  })[];
14243
16070
  };
16071
+ /**
16072
+ * Enum representing different configuration types.
16073
+ */
14244
16074
  declare enum SetConfigType {
16075
+ /**
16076
+ * Executor configuration type.
16077
+ */
14245
16078
  EXECUTOR = 1,
16079
+ /**
16080
+ * Send ULN configuration type.
16081
+ */
14246
16082
  SEND_ULN = 2,
16083
+ /**
16084
+ * Receive ULN configuration type.
16085
+ */
14247
16086
  RECEIVE_ULN = 3
14248
16087
  }
16088
+ /**
16089
+ * Interface representing the Message Library.
16090
+ */
14249
16091
  interface MessageLibInterface {
16092
+ /**
16093
+ * The program public key.
16094
+ */
14250
16095
  program: PublicKey;
16096
+ /**
16097
+ * Gets the account metadata for a quote instruction.
16098
+ *
16099
+ * @param {Connection} connection - The Solana connection.
16100
+ * @param {PublicKey} payer - The payer public key.
16101
+ * @param {PacketPath} path - The packet path.
16102
+ * @param {Commitment} [commitment] - The commitment level.
16103
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
16104
+ */
14251
16105
  getQuoteIXAccountMetaForCPI(connection: Connection, payer: PublicKey, path: PacketPath, commitment?: Commitment): Promise<AccountMeta[]>;
16106
+ /**
16107
+ * Gets the account metadata for a send instruction.
16108
+ *
16109
+ * @param {Connection} connection - The Solana connection.
16110
+ * @param {PublicKey} payer - The payer public key.
16111
+ * @param {PacketPath} path - The packet path.
16112
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
16113
+ */
14252
16114
  getSendIXAccountMetaForCPI(connection: Connection, payer: PublicKey, path: PacketPath): Promise<AccountMeta[]>;
16115
+ /**
16116
+ * Gets the account metadata for an init config instruction.
16117
+ *
16118
+ * @param {PublicKey} payer - The payer public key.
16119
+ * @param {PublicKey} oappID - The OAPP ID.
16120
+ * @param {number} eid - The endpoint ID.
16121
+ * @returns {AccountMeta[]} An array of account metadata.
16122
+ */
14253
16123
  getInitConfigIXAccountMetaForCPI(payer: PublicKey, oappID: PublicKey, eid: number): AccountMeta[];
16124
+ /**
16125
+ * Gets the account metadata for a set config instruction.
16126
+ *
16127
+ * @param {PublicKey} endpointProgram - The endpoint program public key.
16128
+ * @param {PublicKey} oappID - The OAPP ID.
16129
+ * @param {number} eid - The endpoint ID.
16130
+ * @returns {Promise<AccountMeta[]>} A promise that resolves to an array of account metadata.
16131
+ */
14254
16132
  getSetConfigIXAccountMetaForCPI(endpointProgram: PublicKey, oappID: PublicKey, eid: number): Promise<AccountMeta[]>;
14255
16133
  }
14256
16134