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