@layerzerolabs/lz-v2-stellar-sdk 0.2.8

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.
@@ -0,0 +1,824 @@
1
+ import { Buffer } from "buffer";
2
+ import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, MethodOptions } from '@stellar/stellar-sdk/contract';
3
+ import type { u32, u64, i128, Option } from '@stellar/stellar-sdk/contract';
4
+ export * from '@stellar/stellar-sdk';
5
+ export * as contract from '@stellar/stellar-sdk/contract';
6
+ export * as rpc from '@stellar/stellar-sdk/rpc';
7
+ export declare const CounterError: {
8
+ 1: {
9
+ message: string;
10
+ };
11
+ 2: {
12
+ message: string;
13
+ };
14
+ 3: {
15
+ message: string;
16
+ };
17
+ 4: {
18
+ message: string;
19
+ };
20
+ };
21
+ export type CounterStorage = {
22
+ tag: "EID";
23
+ values: void;
24
+ } | {
25
+ tag: "MaxReceivedNonce";
26
+ values: readonly [u32, Buffer];
27
+ } | {
28
+ tag: "OrderedNonce";
29
+ values: void;
30
+ } | {
31
+ tag: "Count";
32
+ values: void;
33
+ } | {
34
+ tag: "ComposedCount";
35
+ values: void;
36
+ } | {
37
+ tag: "InboundCount";
38
+ values: readonly [u32];
39
+ } | {
40
+ tag: "OutboundCount";
41
+ values: readonly [u32];
42
+ };
43
+ /**
44
+ * Parameters for sending a cross-chain message.
45
+ */
46
+ export interface MessagingParams {
47
+ /**
48
+ * Destination endpoint ID (chain identifier).
49
+ */
50
+ dst_eid: u32;
51
+ /**
52
+ * The message payload to send.
53
+ */
54
+ message: Buffer;
55
+ /**
56
+ * Encoded executor and DVN options.
57
+ */
58
+ options: Buffer;
59
+ /**
60
+ * Whether to pay fees in ZRO token instead of native token.
61
+ */
62
+ pay_in_zro: boolean;
63
+ /**
64
+ * Receiver address on the destination chain (32 bytes).
65
+ */
66
+ receiver: Buffer;
67
+ }
68
+ /**
69
+ * Source message information identifying where a cross-chain message came from.
70
+ */
71
+ export interface Origin {
72
+ /**
73
+ * Nonce for this pathway.
74
+ */
75
+ nonce: u64;
76
+ /**
77
+ * Sender address on the source chain (32 bytes).
78
+ */
79
+ sender: Buffer;
80
+ /**
81
+ * Source endpoint ID (chain identifier).
82
+ */
83
+ src_eid: u32;
84
+ }
85
+ /**
86
+ * Fee structure for cross-chain messaging.
87
+ */
88
+ export interface MessagingFee {
89
+ /**
90
+ * Fee paid in native token (XLM).
91
+ */
92
+ native_fee: i128;
93
+ /**
94
+ * Fee paid in ZRO token (LayerZero token).
95
+ */
96
+ zro_fee: i128;
97
+ }
98
+ /**
99
+ * Receipt returned after successfully sending a cross-chain message.
100
+ */
101
+ export interface MessagingReceipt {
102
+ /**
103
+ * The fees charged for sending the message.
104
+ */
105
+ fee: MessagingFee;
106
+ /**
107
+ * Globally unique identifier for the message.
108
+ */
109
+ guid: Buffer;
110
+ /**
111
+ * The outbound nonce for this pathway.
112
+ */
113
+ nonce: u64;
114
+ }
115
+ /**
116
+ * Type of message library indicating supported operations.
117
+ */
118
+ export type MessageLibType = {
119
+ tag: "Send";
120
+ values: void;
121
+ } | {
122
+ tag: "Receive";
123
+ values: void;
124
+ } | {
125
+ tag: "SendAndReceive";
126
+ values: void;
127
+ };
128
+ /**
129
+ * Version information for a message library.
130
+ *
131
+ * Note: `minor` and `endpoint_version` use `u32` instead of `u8` because Stellar does not
132
+ * support `u8` types in contract interface functions.
133
+ */
134
+ export interface MessageLibVersion {
135
+ /**
136
+ * Endpoint version (should not exceed u8::MAX = 255).
137
+ */
138
+ endpoint_version: u32;
139
+ /**
140
+ * Major version number.
141
+ */
142
+ major: u64;
143
+ /**
144
+ * Minor version number (should not exceed u8::MAX = 255).
145
+ */
146
+ minor: u32;
147
+ }
148
+ /**
149
+ * Timeout configuration for receive library transitions.
150
+ */
151
+ export interface Timeout {
152
+ /**
153
+ * Unix timestamp when the timeout expires.
154
+ */
155
+ expiry: u64;
156
+ /**
157
+ * The new library address to transition to.
158
+ */
159
+ lib: string;
160
+ }
161
+ /**
162
+ * Parameters for setting message library configuration.
163
+ */
164
+ export interface SetConfigParam {
165
+ /**
166
+ * XDR-encoded configuration data.
167
+ */
168
+ config: Buffer;
169
+ /**
170
+ * The type of configuration (e.g., executor, ULN).
171
+ */
172
+ config_type: u32;
173
+ /**
174
+ * The endpoint ID this config applies to.
175
+ */
176
+ eid: u32;
177
+ }
178
+ /**
179
+ * Resolved library information with default status.
180
+ */
181
+ export interface ResolvedLibrary {
182
+ /**
183
+ * Whether this is the default library (true) or OApp-specific (false).
184
+ */
185
+ is_default: boolean;
186
+ /**
187
+ * The resolved library address.
188
+ */
189
+ lib: string;
190
+ }
191
+ /**
192
+ * Outbound packet containing all information for cross-chain transmission.
193
+ */
194
+ export interface OutboundPacket {
195
+ /**
196
+ * Destination endpoint ID.
197
+ */
198
+ dst_eid: u32;
199
+ /**
200
+ * Globally unique identifier for this message.
201
+ */
202
+ guid: Buffer;
203
+ /**
204
+ * The message payload.
205
+ */
206
+ message: Buffer;
207
+ /**
208
+ * Outbound nonce for this pathway.
209
+ */
210
+ nonce: u64;
211
+ /**
212
+ * Receiver address on destination chain (32 bytes).
213
+ */
214
+ receiver: Buffer;
215
+ /**
216
+ * Sender address on source chain.
217
+ */
218
+ sender: string;
219
+ /**
220
+ * Source endpoint ID.
221
+ */
222
+ src_eid: u32;
223
+ }
224
+ /**
225
+ * A fee recipient with the amount to be paid.
226
+ */
227
+ export interface FeeRecipient {
228
+ /**
229
+ * Address to receive the fee.
230
+ */
231
+ address: string;
232
+ /**
233
+ * Amount of fee to pay.
234
+ */
235
+ amount: i128;
236
+ }
237
+ /**
238
+ * Result of send operation containing fees and encoded packet.
239
+ */
240
+ export interface FeesAndPacket {
241
+ /**
242
+ * The encoded packet ready for transmission.
243
+ */
244
+ encoded_packet: Buffer;
245
+ /**
246
+ * List of native token fee recipients (executor, DVNs, treasury).
247
+ */
248
+ native_fee_recipients: Array<FeeRecipient>;
249
+ /**
250
+ * List of ZRO token fee recipients (treasury).
251
+ */
252
+ zro_fee_recipients: Array<FeeRecipient>;
253
+ }
254
+ export declare const OAppError: {
255
+ 20000: {
256
+ message: string;
257
+ };
258
+ 20001: {
259
+ message: string;
260
+ };
261
+ 20002: {
262
+ message: string;
263
+ };
264
+ 20003: {
265
+ message: string;
266
+ };
267
+ };
268
+ export type OAppCoreStorage = {
269
+ tag: "Endpoint";
270
+ values: void;
271
+ } | {
272
+ tag: "Peer";
273
+ values: readonly [u32];
274
+ };
275
+ export interface EnforcedOptionParam {
276
+ eid: u32;
277
+ msg_type: u32;
278
+ options: Buffer;
279
+ }
280
+ export type OAppOptionsType3Storage = {
281
+ tag: "EnforcedOptions";
282
+ values: readonly [u32, u32];
283
+ };
284
+ export declare const BufferReaderError: {
285
+ 10000: {
286
+ message: string;
287
+ };
288
+ 10001: {
289
+ message: string;
290
+ };
291
+ };
292
+ export declare const BufferWriterError: {
293
+ 10100: {
294
+ message: string;
295
+ };
296
+ };
297
+ export declare const TtlError: {
298
+ 10200: {
299
+ message: string;
300
+ };
301
+ 10201: {
302
+ message: string;
303
+ };
304
+ 10202: {
305
+ message: string;
306
+ };
307
+ };
308
+ export declare const OwnableError: {
309
+ 10300: {
310
+ message: string;
311
+ };
312
+ 10301: {
313
+ message: string;
314
+ };
315
+ };
316
+ export declare const BytesExtError: {
317
+ 10400: {
318
+ message: string;
319
+ };
320
+ };
321
+ export type DefaultOwnableStorage = {
322
+ tag: "Owner";
323
+ values: void;
324
+ };
325
+ /**
326
+ * A pair of TTL values: threshold (when to trigger extension) and extend_to (target TTL).
327
+ */
328
+ export interface TtlConfig {
329
+ /**
330
+ * Target TTL after extension (in ledgers).
331
+ */
332
+ extend_to: u32;
333
+ /**
334
+ * TTL threshold that triggers extension (in ledgers).
335
+ */
336
+ threshold: u32;
337
+ }
338
+ export type TtlConfigData = {
339
+ tag: "Frozen";
340
+ values: void;
341
+ } | {
342
+ tag: "Instance";
343
+ values: void;
344
+ } | {
345
+ tag: "Persistent";
346
+ values: void;
347
+ } | {
348
+ tag: "Temporary";
349
+ values: void;
350
+ };
351
+ export interface Client {
352
+ /**
353
+ * Construct and simulate a owner transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
354
+ */
355
+ owner: (txnOptions?: {
356
+ /**
357
+ * The fee to pay for the transaction. Default: BASE_FEE
358
+ */
359
+ fee?: number;
360
+ /**
361
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
362
+ */
363
+ timeoutInSeconds?: number;
364
+ /**
365
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
366
+ */
367
+ simulate?: boolean;
368
+ }) => Promise<AssembledTransaction<Option<string>>>;
369
+ /**
370
+ * Construct and simulate a transfer_ownership transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
371
+ */
372
+ transfer_ownership: ({ new_owner }: {
373
+ new_owner: string;
374
+ }, txnOptions?: {
375
+ /**
376
+ * The fee to pay for the transaction. Default: BASE_FEE
377
+ */
378
+ fee?: number;
379
+ /**
380
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
381
+ */
382
+ timeoutInSeconds?: number;
383
+ /**
384
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
385
+ */
386
+ simulate?: boolean;
387
+ }) => Promise<AssembledTransaction<null>>;
388
+ /**
389
+ * Construct and simulate a renounce_ownership transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
390
+ */
391
+ renounce_ownership: (txnOptions?: {
392
+ /**
393
+ * The fee to pay for the transaction. Default: BASE_FEE
394
+ */
395
+ fee?: number;
396
+ /**
397
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
398
+ */
399
+ timeoutInSeconds?: number;
400
+ /**
401
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
402
+ */
403
+ simulate?: boolean;
404
+ }) => Promise<AssembledTransaction<null>>;
405
+ /**
406
+ * Construct and simulate a set_peer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
407
+ */
408
+ set_peer: ({ eid, peer }: {
409
+ eid: u32;
410
+ peer: Option<Buffer>;
411
+ }, txnOptions?: {
412
+ /**
413
+ * The fee to pay for the transaction. Default: BASE_FEE
414
+ */
415
+ fee?: number;
416
+ /**
417
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
418
+ */
419
+ timeoutInSeconds?: number;
420
+ /**
421
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
422
+ */
423
+ simulate?: boolean;
424
+ }) => Promise<AssembledTransaction<null>>;
425
+ /**
426
+ * Construct and simulate a set_delegate transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
427
+ */
428
+ set_delegate: ({ delegate }: {
429
+ delegate: Option<string>;
430
+ }, txnOptions?: {
431
+ /**
432
+ * The fee to pay for the transaction. Default: BASE_FEE
433
+ */
434
+ fee?: number;
435
+ /**
436
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
437
+ */
438
+ timeoutInSeconds?: number;
439
+ /**
440
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
441
+ */
442
+ simulate?: boolean;
443
+ }) => Promise<AssembledTransaction<null>>;
444
+ /**
445
+ * Construct and simulate a peer transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
446
+ */
447
+ peer: ({ eid }: {
448
+ eid: u32;
449
+ }, txnOptions?: {
450
+ /**
451
+ * The fee to pay for the transaction. Default: BASE_FEE
452
+ */
453
+ fee?: number;
454
+ /**
455
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
456
+ */
457
+ timeoutInSeconds?: number;
458
+ /**
459
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
460
+ */
461
+ simulate?: boolean;
462
+ }) => Promise<AssembledTransaction<Option<Buffer>>>;
463
+ /**
464
+ * Construct and simulate a oapp_version transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
465
+ */
466
+ oapp_version: (txnOptions?: {
467
+ /**
468
+ * The fee to pay for the transaction. Default: BASE_FEE
469
+ */
470
+ fee?: number;
471
+ /**
472
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
473
+ */
474
+ timeoutInSeconds?: number;
475
+ /**
476
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
477
+ */
478
+ simulate?: boolean;
479
+ }) => Promise<AssembledTransaction<readonly [u64, u64]>>;
480
+ /**
481
+ * Construct and simulate a endpoint transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
482
+ */
483
+ endpoint: (txnOptions?: {
484
+ /**
485
+ * The fee to pay for the transaction. Default: BASE_FEE
486
+ */
487
+ fee?: number;
488
+ /**
489
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
490
+ */
491
+ timeoutInSeconds?: number;
492
+ /**
493
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
494
+ */
495
+ simulate?: boolean;
496
+ }) => Promise<AssembledTransaction<string>>;
497
+ /**
498
+ * Construct and simulate a allow_initialize_path transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
499
+ */
500
+ allow_initialize_path: ({ origin }: {
501
+ origin: Origin;
502
+ }, txnOptions?: {
503
+ /**
504
+ * The fee to pay for the transaction. Default: BASE_FEE
505
+ */
506
+ fee?: number;
507
+ /**
508
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
509
+ */
510
+ timeoutInSeconds?: number;
511
+ /**
512
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
513
+ */
514
+ simulate?: boolean;
515
+ }) => Promise<AssembledTransaction<boolean>>;
516
+ /**
517
+ * Construct and simulate a next_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
518
+ */
519
+ next_nonce: ({ src_eid, sender }: {
520
+ src_eid: u32;
521
+ sender: Buffer;
522
+ }, txnOptions?: {
523
+ /**
524
+ * The fee to pay for the transaction. Default: BASE_FEE
525
+ */
526
+ fee?: number;
527
+ /**
528
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
529
+ */
530
+ timeoutInSeconds?: number;
531
+ /**
532
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
533
+ */
534
+ simulate?: boolean;
535
+ }) => Promise<AssembledTransaction<u64>>;
536
+ /**
537
+ * Construct and simulate a lz_receive transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
538
+ */
539
+ lz_receive: ({ executor, origin, guid, message, extra_data, value }: {
540
+ executor: string;
541
+ origin: Origin;
542
+ guid: Buffer;
543
+ message: Buffer;
544
+ extra_data: Buffer;
545
+ value: i128;
546
+ }, txnOptions?: {
547
+ /**
548
+ * The fee to pay for the transaction. Default: BASE_FEE
549
+ */
550
+ fee?: number;
551
+ /**
552
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
553
+ */
554
+ timeoutInSeconds?: number;
555
+ /**
556
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
557
+ */
558
+ simulate?: boolean;
559
+ }) => Promise<AssembledTransaction<null>>;
560
+ /**
561
+ * Construct and simulate a is_compose_msg_sender transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
562
+ */
563
+ is_compose_msg_sender: ({ origin, message, sender }: {
564
+ origin: Origin;
565
+ message: Buffer;
566
+ sender: string;
567
+ }, txnOptions?: {
568
+ /**
569
+ * The fee to pay for the transaction. Default: BASE_FEE
570
+ */
571
+ fee?: number;
572
+ /**
573
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
574
+ */
575
+ timeoutInSeconds?: number;
576
+ /**
577
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
578
+ */
579
+ simulate?: boolean;
580
+ }) => Promise<AssembledTransaction<boolean>>;
581
+ /**
582
+ * Construct and simulate a quote transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
583
+ */
584
+ quote: ({ dst_eid, msg_type, options, pay_in_zro }: {
585
+ dst_eid: u32;
586
+ msg_type: u32;
587
+ options: Buffer;
588
+ pay_in_zro: boolean;
589
+ }, txnOptions?: {
590
+ /**
591
+ * The fee to pay for the transaction. Default: BASE_FEE
592
+ */
593
+ fee?: number;
594
+ /**
595
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
596
+ */
597
+ timeoutInSeconds?: number;
598
+ /**
599
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
600
+ */
601
+ simulate?: boolean;
602
+ }) => Promise<AssembledTransaction<MessagingFee>>;
603
+ /**
604
+ * Construct and simulate a increment transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
605
+ */
606
+ increment: ({ sender, dst_eid, msg_type, options, fee }: {
607
+ sender: string;
608
+ dst_eid: u32;
609
+ msg_type: u32;
610
+ options: Buffer;
611
+ fee: MessagingFee;
612
+ }, txnOptions?: {
613
+ /**
614
+ * The fee to pay for the transaction. Default: BASE_FEE
615
+ */
616
+ fee?: number;
617
+ /**
618
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
619
+ */
620
+ timeoutInSeconds?: number;
621
+ /**
622
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
623
+ */
624
+ simulate?: boolean;
625
+ }) => Promise<AssembledTransaction<null>>;
626
+ /**
627
+ * Construct and simulate a set_ordered_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
628
+ */
629
+ set_ordered_nonce: ({ ordered_nonce }: {
630
+ ordered_nonce: boolean;
631
+ }, txnOptions?: {
632
+ /**
633
+ * The fee to pay for the transaction. Default: BASE_FEE
634
+ */
635
+ fee?: number;
636
+ /**
637
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
638
+ */
639
+ timeoutInSeconds?: number;
640
+ /**
641
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
642
+ */
643
+ simulate?: boolean;
644
+ }) => Promise<AssembledTransaction<null>>;
645
+ /**
646
+ * Construct and simulate a skip_inbound_nonce transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
647
+ */
648
+ skip_inbound_nonce: ({ src_eid, sender, nonce }: {
649
+ src_eid: u32;
650
+ sender: Buffer;
651
+ nonce: u64;
652
+ }, txnOptions?: {
653
+ /**
654
+ * The fee to pay for the transaction. Default: BASE_FEE
655
+ */
656
+ fee?: number;
657
+ /**
658
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
659
+ */
660
+ timeoutInSeconds?: number;
661
+ /**
662
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
663
+ */
664
+ simulate?: boolean;
665
+ }) => Promise<AssembledTransaction<null>>;
666
+ /**
667
+ * Construct and simulate a eid transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
668
+ */
669
+ eid: (txnOptions?: {
670
+ /**
671
+ * The fee to pay for the transaction. Default: BASE_FEE
672
+ */
673
+ fee?: number;
674
+ /**
675
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
676
+ */
677
+ timeoutInSeconds?: number;
678
+ /**
679
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
680
+ */
681
+ simulate?: boolean;
682
+ }) => Promise<AssembledTransaction<u32>>;
683
+ /**
684
+ * Construct and simulate a count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
685
+ */
686
+ count: (txnOptions?: {
687
+ /**
688
+ * The fee to pay for the transaction. Default: BASE_FEE
689
+ */
690
+ fee?: number;
691
+ /**
692
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
693
+ */
694
+ timeoutInSeconds?: number;
695
+ /**
696
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
697
+ */
698
+ simulate?: boolean;
699
+ }) => Promise<AssembledTransaction<u64>>;
700
+ /**
701
+ * Construct and simulate a composed_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
702
+ */
703
+ composed_count: (txnOptions?: {
704
+ /**
705
+ * The fee to pay for the transaction. Default: BASE_FEE
706
+ */
707
+ fee?: number;
708
+ /**
709
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
710
+ */
711
+ timeoutInSeconds?: number;
712
+ /**
713
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
714
+ */
715
+ simulate?: boolean;
716
+ }) => Promise<AssembledTransaction<u64>>;
717
+ /**
718
+ * Construct and simulate a inbound_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
719
+ */
720
+ inbound_count: ({ eid }: {
721
+ eid: u32;
722
+ }, txnOptions?: {
723
+ /**
724
+ * The fee to pay for the transaction. Default: BASE_FEE
725
+ */
726
+ fee?: number;
727
+ /**
728
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
729
+ */
730
+ timeoutInSeconds?: number;
731
+ /**
732
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
733
+ */
734
+ simulate?: boolean;
735
+ }) => Promise<AssembledTransaction<u64>>;
736
+ /**
737
+ * Construct and simulate a outbound_count transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
738
+ */
739
+ outbound_count: ({ eid }: {
740
+ eid: u32;
741
+ }, txnOptions?: {
742
+ /**
743
+ * The fee to pay for the transaction. Default: BASE_FEE
744
+ */
745
+ fee?: number;
746
+ /**
747
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
748
+ */
749
+ timeoutInSeconds?: number;
750
+ /**
751
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
752
+ */
753
+ simulate?: boolean;
754
+ }) => Promise<AssembledTransaction<u64>>;
755
+ /**
756
+ * Construct and simulate a lz_compose transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
757
+ */
758
+ lz_compose: ({ executor, from, guid, index, message, extra_data, value }: {
759
+ executor: string;
760
+ from: string;
761
+ guid: Buffer;
762
+ index: u32;
763
+ message: Buffer;
764
+ extra_data: Buffer;
765
+ value: i128;
766
+ }, txnOptions?: {
767
+ /**
768
+ * The fee to pay for the transaction. Default: BASE_FEE
769
+ */
770
+ fee?: number;
771
+ /**
772
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
773
+ */
774
+ timeoutInSeconds?: number;
775
+ /**
776
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
777
+ */
778
+ simulate?: boolean;
779
+ }) => Promise<AssembledTransaction<null>>;
780
+ }
781
+ export declare class Client extends ContractClient {
782
+ readonly options: ContractClientOptions;
783
+ static deploy<T = Client>(
784
+ /** Constructor/Initialization Args for the contract's `__constructor` method */
785
+ { owner, endpoint, delegate }: {
786
+ owner: string;
787
+ endpoint: string;
788
+ delegate: string;
789
+ },
790
+ /** Options for initializing a Client as well as for calling a method, with extras specific to deploying. */
791
+ options: MethodOptions & Omit<ContractClientOptions, "contractId"> & {
792
+ /** The hash of the Wasm blob, which must already be installed on-chain. */
793
+ wasmHash: Buffer | string;
794
+ /** Salt used to generate the contract's ID. Passed through to {@link Operation.createCustomContract}. Default: random. */
795
+ salt?: Buffer | Uint8Array;
796
+ /** The format used to decode `wasmHash`, if it's provided as a string. */
797
+ format?: "hex" | "base64";
798
+ }): Promise<AssembledTransaction<T>>;
799
+ constructor(options: ContractClientOptions);
800
+ readonly fromJSON: {
801
+ owner: (json: string) => AssembledTransaction<Option<string>>;
802
+ transfer_ownership: (json: string) => AssembledTransaction<null>;
803
+ renounce_ownership: (json: string) => AssembledTransaction<null>;
804
+ set_peer: (json: string) => AssembledTransaction<null>;
805
+ set_delegate: (json: string) => AssembledTransaction<null>;
806
+ peer: (json: string) => AssembledTransaction<Option<Buffer<ArrayBufferLike>>>;
807
+ oapp_version: (json: string) => AssembledTransaction<readonly [bigint, bigint]>;
808
+ endpoint: (json: string) => AssembledTransaction<string>;
809
+ allow_initialize_path: (json: string) => AssembledTransaction<boolean>;
810
+ next_nonce: (json: string) => AssembledTransaction<bigint>;
811
+ lz_receive: (json: string) => AssembledTransaction<null>;
812
+ is_compose_msg_sender: (json: string) => AssembledTransaction<boolean>;
813
+ quote: (json: string) => AssembledTransaction<MessagingFee>;
814
+ increment: (json: string) => AssembledTransaction<null>;
815
+ set_ordered_nonce: (json: string) => AssembledTransaction<null>;
816
+ skip_inbound_nonce: (json: string) => AssembledTransaction<null>;
817
+ eid: (json: string) => AssembledTransaction<number>;
818
+ count: (json: string) => AssembledTransaction<bigint>;
819
+ composed_count: (json: string) => AssembledTransaction<bigint>;
820
+ inbound_count: (json: string) => AssembledTransaction<bigint>;
821
+ outbound_count: (json: string) => AssembledTransaction<bigint>;
822
+ lz_compose: (json: string) => AssembledTransaction<null>;
823
+ };
824
+ }