@layerzerolabs/lz-v2-stellar-sdk 0.2.8 → 0.2.10

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.
@@ -4,6 +4,80 @@ import type { u32, u64, i128, Option } from '@stellar/stellar-sdk/contract';
4
4
  export * from '@stellar/stellar-sdk';
5
5
  export * as contract from '@stellar/stellar-sdk/contract';
6
6
  export * as rpc from '@stellar/stellar-sdk/rpc';
7
+ export declare const Uln302Error: {
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
+ 5: {
21
+ message: string;
22
+ };
23
+ 6: {
24
+ message: string;
25
+ };
26
+ 7: {
27
+ message: string;
28
+ };
29
+ 8: {
30
+ message: string;
31
+ };
32
+ 9: {
33
+ message: string;
34
+ };
35
+ 10: {
36
+ message: string;
37
+ };
38
+ 11: {
39
+ message: string;
40
+ };
41
+ 12: {
42
+ message: string;
43
+ };
44
+ 13: {
45
+ message: string;
46
+ };
47
+ 14: {
48
+ message: string;
49
+ };
50
+ 15: {
51
+ message: string;
52
+ };
53
+ 16: {
54
+ message: string;
55
+ };
56
+ 17: {
57
+ message: string;
58
+ };
59
+ 18: {
60
+ message: string;
61
+ };
62
+ 19: {
63
+ message: string;
64
+ };
65
+ 20: {
66
+ message: string;
67
+ };
68
+ 21: {
69
+ message: string;
70
+ };
71
+ 22: {
72
+ message: string;
73
+ };
74
+ 23: {
75
+ message: string;
76
+ };
77
+ 24: {
78
+ message: string;
79
+ };
80
+ };
7
81
  /**
8
82
  * Ultra Light Node configuration for message verification.
9
83
  */
@@ -128,7 +202,7 @@ export type UlnStorage = {
128
202
  tag: "Confirmations";
129
203
  values: readonly [string, Buffer, Buffer];
130
204
  };
131
- export declare const Uln302Error: {
205
+ export declare const EndpointError: {
132
206
  1: {
133
207
  message: string;
134
208
  };
@@ -388,13 +462,13 @@ export interface OutboundPacket {
388
462
  */
389
463
  export interface FeeRecipient {
390
464
  /**
391
- * Address to receive the fee.
392
- */
393
- address: string;
394
- /**
395
465
  * Amount of fee to pay.
396
466
  */
397
467
  amount: i128;
468
+ /**
469
+ * The address to send the fee to.
470
+ */
471
+ to: string;
398
472
  }
399
473
  /**
400
474
  * Result of send operation containing fees and encoded packet.
@@ -414,76 +488,76 @@ export interface FeesAndPacket {
414
488
  zro_fee_recipients: Array<FeeRecipient>;
415
489
  }
416
490
  export declare const PacketCodecV1Error: {
417
- 11001: {
491
+ 1001: {
418
492
  message: string;
419
493
  };
420
- 11002: {
494
+ 1002: {
421
495
  message: string;
422
496
  };
423
497
  };
424
498
  export declare const WorkerOptionsError: {
425
- 11101: {
499
+ 1101: {
426
500
  message: string;
427
501
  };
428
- 11102: {
502
+ 1102: {
429
503
  message: string;
430
504
  };
431
- 11103: {
505
+ 1103: {
432
506
  message: string;
433
507
  };
434
- 11104: {
508
+ 1104: {
435
509
  message: string;
436
510
  };
437
- 11105: {
511
+ 1105: {
438
512
  message: string;
439
513
  };
440
- 11106: {
514
+ 1106: {
441
515
  message: string;
442
516
  };
443
- 11107: {
517
+ 1107: {
444
518
  message: string;
445
519
  };
446
- 11108: {
520
+ 1108: {
447
521
  message: string;
448
522
  };
449
- 11109: {
523
+ 1109: {
450
524
  message: string;
451
525
  };
452
526
  };
453
527
  export declare const BufferReaderError: {
454
- 10000: {
528
+ 1000: {
455
529
  message: string;
456
530
  };
457
- 10001: {
531
+ 1001: {
458
532
  message: string;
459
533
  };
460
534
  };
461
535
  export declare const BufferWriterError: {
462
- 10100: {
536
+ 1100: {
463
537
  message: string;
464
538
  };
465
539
  };
466
540
  export declare const TtlError: {
467
- 10200: {
541
+ 1200: {
468
542
  message: string;
469
543
  };
470
- 10201: {
544
+ 1201: {
471
545
  message: string;
472
546
  };
473
- 10202: {
547
+ 1202: {
474
548
  message: string;
475
549
  };
476
550
  };
477
551
  export declare const OwnableError: {
478
- 10300: {
552
+ 1300: {
479
553
  message: string;
480
554
  };
481
- 10301: {
555
+ 1301: {
482
556
  message: string;
483
557
  };
484
558
  };
485
559
  export declare const BytesExtError: {
486
- 10400: {
560
+ 1400: {
487
561
  message: string;
488
562
  };
489
563
  };
@@ -504,7 +578,7 @@ export interface TtlConfig {
504
578
  */
505
579
  threshold: u32;
506
580
  }
507
- export type TtlConfigData = {
581
+ export type TtlConfigStorage = {
508
582
  tag: "Frozen";
509
583
  values: void;
510
584
  } | {
@@ -513,22 +587,14 @@ export type TtlConfigData = {
513
587
  } | {
514
588
  tag: "Persistent";
515
589
  values: void;
516
- } | {
517
- tag: "Temporary";
518
- values: void;
519
590
  };
520
591
  export interface Client {
521
592
  /**
522
- * Construct and simulate a verify 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.
523
- * Called by a DVN to verify a message with a specific number of block confirmations.
524
- *
525
- * Stores the DVN's verification attestation which will be checked during commit_verification.
593
+ * Construct and simulate a set_default_executor_configs 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.
594
+ * Sets default executor configurations for multiple destination endpoints.
526
595
  */
527
- verify: ({ dvn, packet_header, payload_hash, confirmations }: {
528
- dvn: string;
529
- packet_header: Buffer;
530
- payload_hash: Buffer;
531
- confirmations: u64;
596
+ set_default_executor_configs: ({ params }: {
597
+ params: Array<SetDefaultExecutorConfigParam>;
532
598
  }, txnOptions?: {
533
599
  /**
534
600
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -544,16 +610,11 @@ export interface Client {
544
610
  simulate?: boolean;
545
611
  }) => Promise<AssembledTransaction<null>>;
546
612
  /**
547
- * Construct and simulate a commit_verification 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.
548
- * Permissonless to commit a verified message to the endpoint after sufficient DVN verification.
549
- *
550
- * Validates the packet header and checks that enough DVNs have verified the message
551
- * (all required DVNs + optional DVN threshold). Once verified, cleans up DVN confirmation
552
- * storage and calls the endpoint to mark the message as verified and executable.
613
+ * Construct and simulate a set_default_send_uln_configs 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.
614
+ * Sets default send ULN configurations for multiple destination endpoints.
553
615
  */
554
- commit_verification: ({ packet_header, payload_hash }: {
555
- packet_header: Buffer;
556
- payload_hash: Buffer;
616
+ set_default_send_uln_configs: ({ params }: {
617
+ params: Array<SetDefaultUlnConfigParam>;
557
618
  }, txnOptions?: {
558
619
  /**
559
620
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -569,14 +630,10 @@ export interface Client {
569
630
  simulate?: boolean;
570
631
  }) => Promise<AssembledTransaction<null>>;
571
632
  /**
572
- * Construct and simulate a set_default_receive_uln_configs 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.
573
- * Sets default receive ULN configurations for multiple source endpoints.
574
- *
575
- * Validates each config and stores it as the default for the specified source EID.
633
+ * 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.
634
+ * Returns the treasury address for fee collection.
576
635
  */
577
- set_default_receive_uln_configs: ({ params }: {
578
- params: Array<SetDefaultUlnConfigParam>;
579
- }, txnOptions?: {
636
+ treasury: (txnOptions?: {
580
637
  /**
581
638
  * The fee to pay for the transaction. Default: BASE_FEE
582
639
  */
@@ -589,15 +646,13 @@ export interface Client {
589
646
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
590
647
  */
591
648
  simulate?: boolean;
592
- }) => Promise<AssembledTransaction<null>>;
649
+ }) => Promise<AssembledTransaction<string>>;
593
650
  /**
594
- * Construct and simulate a confirmations 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.
595
- * Returns the number of block confirmations a DVN has submitted for a specific message.
651
+ * Construct and simulate a default_executor_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.
652
+ * Returns the default executor configuration for a destination endpoint.
596
653
  */
597
- confirmations: ({ dvn, header_hash, payload_hash }: {
598
- dvn: string;
599
- header_hash: Buffer;
600
- payload_hash: Buffer;
654
+ default_executor_config: ({ dst_eid }: {
655
+ dst_eid: u32;
601
656
  }, txnOptions?: {
602
657
  /**
603
658
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -611,14 +666,14 @@ export interface Client {
611
666
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
612
667
  */
613
668
  simulate?: boolean;
614
- }) => Promise<AssembledTransaction<Option<u64>>>;
669
+ }) => Promise<AssembledTransaction<Option<ExecutorConfig>>>;
615
670
  /**
616
- * Construct and simulate a verifiable 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.
617
- * Checks if a message has been sufficiently verified by DVNs and is ready to commit.
671
+ * Construct and simulate a oapp_executor_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.
672
+ * Returns the OApp-specific executor configuration for a destination endpoint.
618
673
  */
619
- verifiable: ({ packet_header, payload_hash }: {
620
- packet_header: Buffer;
621
- payload_hash: Buffer;
674
+ oapp_executor_config: ({ sender, dst_eid }: {
675
+ sender: string;
676
+ dst_eid: u32;
622
677
  }, txnOptions?: {
623
678
  /**
624
679
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -632,13 +687,14 @@ export interface Client {
632
687
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
633
688
  */
634
689
  simulate?: boolean;
635
- }) => Promise<AssembledTransaction<boolean>>;
690
+ }) => Promise<AssembledTransaction<Option<OAppExecutorConfig>>>;
636
691
  /**
637
- * Construct and simulate a default_receive_uln_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.
638
- * Returns the default receive ULN configuration for a source endpoint.
692
+ * Construct and simulate a effective_executor_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.
693
+ * Returns the effective executor configuration by merging OApp config with default.
639
694
  */
640
- default_receive_uln_config: ({ src_eid }: {
641
- src_eid: u32;
695
+ effective_executor_config: ({ sender, dst_eid }: {
696
+ sender: string;
697
+ dst_eid: u32;
642
698
  }, txnOptions?: {
643
699
  /**
644
700
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -652,14 +708,13 @@ export interface Client {
652
708
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
653
709
  */
654
710
  simulate?: boolean;
655
- }) => Promise<AssembledTransaction<Option<UlnConfig>>>;
711
+ }) => Promise<AssembledTransaction<ExecutorConfig>>;
656
712
  /**
657
- * Construct and simulate a oapp_receive_uln_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.
658
- * Returns the OApp-specific receive ULN configuration override for a source endpoint.
713
+ * Construct and simulate a default_send_uln_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.
714
+ * Returns the default send ULN configuration for a destination endpoint.
659
715
  */
660
- oapp_receive_uln_config: ({ receiver, src_eid }: {
661
- receiver: string;
662
- src_eid: u32;
716
+ default_send_uln_config: ({ dst_eid }: {
717
+ dst_eid: u32;
663
718
  }, txnOptions?: {
664
719
  /**
665
720
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -673,14 +728,14 @@ export interface Client {
673
728
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
674
729
  */
675
730
  simulate?: boolean;
676
- }) => Promise<AssembledTransaction<Option<OAppUlnConfig>>>;
731
+ }) => Promise<AssembledTransaction<Option<UlnConfig>>>;
677
732
  /**
678
- * Construct and simulate a effective_receive_uln_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.
679
- * Returns the effective receive ULN configuration by merging OApp config with defaults.
733
+ * Construct and simulate a oapp_send_uln_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
+ * Returns the OApp-specific send ULN configuration for a destination endpoint.
680
735
  */
681
- effective_receive_uln_config: ({ receiver, src_eid }: {
682
- receiver: string;
683
- src_eid: u32;
736
+ oapp_send_uln_config: ({ sender, dst_eid }: {
737
+ sender: string;
738
+ dst_eid: u32;
684
739
  }, txnOptions?: {
685
740
  /**
686
741
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -694,13 +749,14 @@ export interface Client {
694
749
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
695
750
  */
696
751
  simulate?: boolean;
697
- }) => Promise<AssembledTransaction<UlnConfig>>;
752
+ }) => Promise<AssembledTransaction<Option<OAppUlnConfig>>>;
698
753
  /**
699
- * Construct and simulate a set_default_executor_configs 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.
700
- * Sets default executor configurations for multiple destination endpoints.
754
+ * Construct and simulate a effective_send_uln_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.
755
+ * Returns the effective send ULN configuration by merging OApp config with default.
701
756
  */
702
- set_default_executor_configs: ({ params }: {
703
- params: Array<SetDefaultExecutorConfigParam>;
757
+ effective_send_uln_config: ({ sender, dst_eid }: {
758
+ sender: string;
759
+ dst_eid: u32;
704
760
  }, txnOptions?: {
705
761
  /**
706
762
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -714,13 +770,17 @@ export interface Client {
714
770
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
715
771
  */
716
772
  simulate?: boolean;
717
- }) => Promise<AssembledTransaction<null>>;
773
+ }) => Promise<AssembledTransaction<UlnConfig>>;
718
774
  /**
719
- * Construct and simulate a set_default_send_uln_configs 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.
720
- * Sets default send ULN configurations for multiple destination endpoints.
775
+ * 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.
776
+ * Quotes the total fee for sending a cross-chain message.
777
+ *
778
+ * Calculates fees from: executor (message execution), DVNs (verification), and treasury (protocol fee).
721
779
  */
722
- set_default_send_uln_configs: ({ params }: {
723
- params: Array<SetDefaultUlnConfigParam>;
780
+ quote: ({ packet, options, pay_in_zro }: {
781
+ packet: OutboundPacket;
782
+ options: Buffer;
783
+ pay_in_zro: boolean;
724
784
  }, txnOptions?: {
725
785
  /**
726
786
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -734,12 +794,18 @@ export interface Client {
734
794
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
735
795
  */
736
796
  simulate?: boolean;
737
- }) => Promise<AssembledTransaction<null>>;
797
+ }) => Promise<AssembledTransaction<MessagingFee>>;
738
798
  /**
739
- * 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.
740
- * Returns the treasury address for fee collection.
799
+ * 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.
800
+ * Sends a cross-chain message and returns fee recipients for payment.
801
+ *
802
+ * Assigns executor and DVNs, calculates fees, and encodes the packet for transmission.
741
803
  */
742
- treasury: (txnOptions?: {
804
+ send: ({ packet, options, pay_in_zro }: {
805
+ packet: OutboundPacket;
806
+ options: Buffer;
807
+ pay_in_zro: boolean;
808
+ }, txnOptions?: {
743
809
  /**
744
810
  * The fee to pay for the transaction. Default: BASE_FEE
745
811
  */
@@ -752,13 +818,18 @@ export interface Client {
752
818
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
753
819
  */
754
820
  simulate?: boolean;
755
- }) => Promise<AssembledTransaction<string>>;
821
+ }) => Promise<AssembledTransaction<FeesAndPacket>>;
756
822
  /**
757
- * Construct and simulate a default_executor_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.
758
- * Returns the default executor configuration for a destination endpoint.
823
+ * Construct and simulate a verify 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.
824
+ * Called by a DVN to verify a message with a specific number of block confirmations.
825
+ *
826
+ * Stores the DVN's verification attestation which will be checked during commit_verification.
759
827
  */
760
- default_executor_config: ({ dst_eid }: {
761
- dst_eid: u32;
828
+ verify: ({ dvn, packet_header, payload_hash, confirmations }: {
829
+ dvn: string;
830
+ packet_header: Buffer;
831
+ payload_hash: Buffer;
832
+ confirmations: u64;
762
833
  }, txnOptions?: {
763
834
  /**
764
835
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -772,14 +843,18 @@ export interface Client {
772
843
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
773
844
  */
774
845
  simulate?: boolean;
775
- }) => Promise<AssembledTransaction<Option<ExecutorConfig>>>;
846
+ }) => Promise<AssembledTransaction<null>>;
776
847
  /**
777
- * Construct and simulate a oapp_executor_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.
778
- * Returns the OApp-specific executor configuration for a destination endpoint.
848
+ * Construct and simulate a commit_verification 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.
849
+ * Permissonless to commit a verified message to the endpoint after sufficient DVN verification.
850
+ *
851
+ * Validates the packet header and checks that enough DVNs have verified the message
852
+ * (all required DVNs + optional DVN threshold). Once verified, cleans up DVN confirmation
853
+ * storage and calls the endpoint to mark the message as verified and executable.
779
854
  */
780
- oapp_executor_config: ({ sender, dst_eid }: {
781
- sender: string;
782
- dst_eid: u32;
855
+ commit_verification: ({ packet_header, payload_hash }: {
856
+ packet_header: Buffer;
857
+ payload_hash: Buffer;
783
858
  }, txnOptions?: {
784
859
  /**
785
860
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -793,14 +868,15 @@ export interface Client {
793
868
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
794
869
  */
795
870
  simulate?: boolean;
796
- }) => Promise<AssembledTransaction<Option<OAppExecutorConfig>>>;
871
+ }) => Promise<AssembledTransaction<null>>;
797
872
  /**
798
- * Construct and simulate a effective_executor_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.
799
- * Returns the effective executor configuration by merging OApp config with default.
873
+ * Construct and simulate a set_default_receive_uln_configs 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.
874
+ * Sets default receive ULN configurations for multiple source endpoints.
875
+ *
876
+ * Validates each config and stores it as the default for the specified source EID.
800
877
  */
801
- effective_executor_config: ({ sender, dst_eid }: {
802
- sender: string;
803
- dst_eid: u32;
878
+ set_default_receive_uln_configs: ({ params }: {
879
+ params: Array<SetDefaultUlnConfigParam>;
804
880
  }, txnOptions?: {
805
881
  /**
806
882
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -814,13 +890,15 @@ export interface Client {
814
890
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
815
891
  */
816
892
  simulate?: boolean;
817
- }) => Promise<AssembledTransaction<ExecutorConfig>>;
893
+ }) => Promise<AssembledTransaction<null>>;
818
894
  /**
819
- * Construct and simulate a default_send_uln_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.
820
- * Returns the default send ULN configuration for a destination endpoint.
895
+ * Construct and simulate a confirmations 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.
896
+ * Returns the number of block confirmations a DVN has submitted for a specific message.
821
897
  */
822
- default_send_uln_config: ({ dst_eid }: {
823
- dst_eid: u32;
898
+ confirmations: ({ dvn, header_hash, payload_hash }: {
899
+ dvn: string;
900
+ header_hash: Buffer;
901
+ payload_hash: Buffer;
824
902
  }, txnOptions?: {
825
903
  /**
826
904
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -834,14 +912,14 @@ export interface Client {
834
912
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
835
913
  */
836
914
  simulate?: boolean;
837
- }) => Promise<AssembledTransaction<Option<UlnConfig>>>;
915
+ }) => Promise<AssembledTransaction<Option<u64>>>;
838
916
  /**
839
- * Construct and simulate a oapp_send_uln_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.
840
- * Returns the OApp-specific send ULN configuration for a destination endpoint.
917
+ * Construct and simulate a verifiable 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.
918
+ * Checks if a message has been sufficiently verified by DVNs and is ready to commit.
841
919
  */
842
- oapp_send_uln_config: ({ sender, dst_eid }: {
843
- sender: string;
844
- dst_eid: u32;
920
+ verifiable: ({ packet_header, payload_hash }: {
921
+ packet_header: Buffer;
922
+ payload_hash: Buffer;
845
923
  }, txnOptions?: {
846
924
  /**
847
925
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -855,14 +933,13 @@ export interface Client {
855
933
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
856
934
  */
857
935
  simulate?: boolean;
858
- }) => Promise<AssembledTransaction<Option<OAppUlnConfig>>>;
936
+ }) => Promise<AssembledTransaction<boolean>>;
859
937
  /**
860
- * Construct and simulate a effective_send_uln_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.
861
- * Returns the effective send ULN configuration by merging OApp config with default.
938
+ * Construct and simulate a default_receive_uln_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.
939
+ * Returns the default receive ULN configuration for a source endpoint.
862
940
  */
863
- effective_send_uln_config: ({ sender, dst_eid }: {
864
- sender: string;
865
- dst_eid: u32;
941
+ default_receive_uln_config: ({ src_eid }: {
942
+ src_eid: u32;
866
943
  }, txnOptions?: {
867
944
  /**
868
945
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -876,17 +953,14 @@ export interface Client {
876
953
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
877
954
  */
878
955
  simulate?: boolean;
879
- }) => Promise<AssembledTransaction<UlnConfig>>;
956
+ }) => Promise<AssembledTransaction<Option<UlnConfig>>>;
880
957
  /**
881
- * 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.
882
- * Quotes the total fee for sending a cross-chain message.
883
- *
884
- * Calculates fees from: executor (message execution), DVNs (verification), and treasury (protocol fee).
958
+ * Construct and simulate a oapp_receive_uln_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.
959
+ * Returns the OApp-specific receive ULN configuration override for a source endpoint.
885
960
  */
886
- quote: ({ packet, options, pay_in_zro }: {
887
- packet: OutboundPacket;
888
- options: Buffer;
889
- pay_in_zro: boolean;
961
+ oapp_receive_uln_config: ({ receiver, src_eid }: {
962
+ receiver: string;
963
+ src_eid: u32;
890
964
  }, txnOptions?: {
891
965
  /**
892
966
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -900,17 +974,14 @@ export interface Client {
900
974
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
901
975
  */
902
976
  simulate?: boolean;
903
- }) => Promise<AssembledTransaction<MessagingFee>>;
977
+ }) => Promise<AssembledTransaction<Option<OAppUlnConfig>>>;
904
978
  /**
905
- * 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.
906
- * Sends a cross-chain message and returns fee recipients for payment.
907
- *
908
- * Assigns executor and DVNs, calculates fees, and encodes the packet for transmission.
979
+ * Construct and simulate a effective_receive_uln_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.
980
+ * Returns the effective receive ULN configuration by merging OApp config with defaults.
909
981
  */
910
- send: ({ packet, options, pay_in_zro }: {
911
- packet: OutboundPacket;
912
- options: Buffer;
913
- pay_in_zro: boolean;
982
+ effective_receive_uln_config: ({ receiver, src_eid }: {
983
+ receiver: string;
984
+ src_eid: u32;
914
985
  }, txnOptions?: {
915
986
  /**
916
987
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -924,7 +995,7 @@ export interface Client {
924
995
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
925
996
  */
926
997
  simulate?: boolean;
927
- }) => Promise<AssembledTransaction<FeesAndPacket>>;
998
+ }) => Promise<AssembledTransaction<UlnConfig>>;
928
999
  /**
929
1000
  * 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.
930
1001
  * Sets OApp-specific configuration parameters for the message library.
@@ -1099,12 +1170,11 @@ export interface Client {
1099
1170
  simulate?: boolean;
1100
1171
  }) => Promise<AssembledTransaction<null>>;
1101
1172
  /**
1102
- * 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.
1173
+ * Construct and simulate a set_ttl_configs 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.
1103
1174
  */
1104
- set_ttl_config: ({ instance, persistent, temporary }: {
1175
+ set_ttl_configs: ({ instance, persistent }: {
1105
1176
  instance: Option<TtlConfig>;
1106
1177
  persistent: Option<TtlConfig>;
1107
- temporary: Option<TtlConfig>;
1108
1178
  }, txnOptions?: {
1109
1179
  /**
1110
1180
  * The fee to pay for the transaction. Default: BASE_FEE
@@ -1120,9 +1190,9 @@ export interface Client {
1120
1190
  simulate?: boolean;
1121
1191
  }) => Promise<AssembledTransaction<null>>;
1122
1192
  /**
1123
- * 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.
1193
+ * Construct and simulate a ttl_configs 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.
1124
1194
  */
1125
- ttl_config: (txnOptions?: {
1195
+ ttl_configs: (txnOptions?: {
1126
1196
  /**
1127
1197
  * The fee to pay for the transaction. Default: BASE_FEE
1128
1198
  */
@@ -1135,11 +1205,11 @@ export interface Client {
1135
1205
  * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1136
1206
  */
1137
1207
  simulate?: boolean;
1138
- }) => Promise<AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>, Option<TtlConfig>]>>;
1208
+ }) => Promise<AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>>;
1139
1209
  /**
1140
- * 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.
1210
+ * Construct and simulate a freeze_ttl_configs 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.
1141
1211
  */
1142
- freeze_ttl_config: (txnOptions?: {
1212
+ freeze_ttl_configs: (txnOptions?: {
1143
1213
  /**
1144
1214
  * The fee to pay for the transaction. Default: BASE_FEE
1145
1215
  */
@@ -1154,9 +1224,9 @@ export interface Client {
1154
1224
  simulate?: boolean;
1155
1225
  }) => Promise<AssembledTransaction<null>>;
1156
1226
  /**
1157
- * 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.
1227
+ * Construct and simulate a is_ttl_configs_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.
1158
1228
  */
1159
- is_ttl_config_frozen: (txnOptions?: {
1229
+ is_ttl_configs_frozen: (txnOptions?: {
1160
1230
  /**
1161
1231
  * The fee to pay for the transaction. Default: BASE_FEE
1162
1232
  */
@@ -1170,6 +1240,32 @@ export interface Client {
1170
1240
  */
1171
1241
  simulate?: boolean;
1172
1242
  }) => Promise<AssembledTransaction<boolean>>;
1243
+ /**
1244
+ * Construct and simulate a extend_instance_ttl 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.
1245
+ * Extends the instance TTL.
1246
+ *
1247
+ * # Arguments
1248
+ *
1249
+ * * `threshold` - The threshold to extend the TTL.
1250
+ * * `extend_to` - The TTL to extend to.
1251
+ */
1252
+ extend_instance_ttl: ({ threshold, extend_to }: {
1253
+ threshold: u32;
1254
+ extend_to: u32;
1255
+ }, txnOptions?: {
1256
+ /**
1257
+ * The fee to pay for the transaction. Default: BASE_FEE
1258
+ */
1259
+ fee?: number;
1260
+ /**
1261
+ * The maximum amount of time to wait for the transaction to complete. Default: DEFAULT_TIMEOUT
1262
+ */
1263
+ timeoutInSeconds?: number;
1264
+ /**
1265
+ * Whether to automatically simulate the transaction when constructing the AssembledTransaction. Default: true
1266
+ */
1267
+ simulate?: boolean;
1268
+ }) => Promise<AssembledTransaction<null>>;
1173
1269
  }
1174
1270
  export declare class Client extends ContractClient {
1175
1271
  readonly options: ContractClientOptions;
@@ -1191,14 +1287,6 @@ export declare class Client extends ContractClient {
1191
1287
  }): Promise<AssembledTransaction<T>>;
1192
1288
  constructor(options: ContractClientOptions);
1193
1289
  readonly fromJSON: {
1194
- verify: (json: string) => AssembledTransaction<null>;
1195
- commit_verification: (json: string) => AssembledTransaction<null>;
1196
- set_default_receive_uln_configs: (json: string) => AssembledTransaction<null>;
1197
- confirmations: (json: string) => AssembledTransaction<Option<bigint>>;
1198
- verifiable: (json: string) => AssembledTransaction<boolean>;
1199
- default_receive_uln_config: (json: string) => AssembledTransaction<Option<UlnConfig>>;
1200
- oapp_receive_uln_config: (json: string) => AssembledTransaction<Option<OAppUlnConfig>>;
1201
- effective_receive_uln_config: (json: string) => AssembledTransaction<UlnConfig>;
1202
1290
  set_default_executor_configs: (json: string) => AssembledTransaction<null>;
1203
1291
  set_default_send_uln_configs: (json: string) => AssembledTransaction<null>;
1204
1292
  treasury: (json: string) => AssembledTransaction<string>;
@@ -1210,6 +1298,14 @@ export declare class Client extends ContractClient {
1210
1298
  effective_send_uln_config: (json: string) => AssembledTransaction<UlnConfig>;
1211
1299
  quote: (json: string) => AssembledTransaction<MessagingFee>;
1212
1300
  send: (json: string) => AssembledTransaction<FeesAndPacket>;
1301
+ verify: (json: string) => AssembledTransaction<null>;
1302
+ commit_verification: (json: string) => AssembledTransaction<null>;
1303
+ set_default_receive_uln_configs: (json: string) => AssembledTransaction<null>;
1304
+ confirmations: (json: string) => AssembledTransaction<Option<bigint>>;
1305
+ verifiable: (json: string) => AssembledTransaction<boolean>;
1306
+ default_receive_uln_config: (json: string) => AssembledTransaction<Option<UlnConfig>>;
1307
+ oapp_receive_uln_config: (json: string) => AssembledTransaction<Option<OAppUlnConfig>>;
1308
+ effective_receive_uln_config: (json: string) => AssembledTransaction<UlnConfig>;
1213
1309
  set_config: (json: string) => AssembledTransaction<null>;
1214
1310
  get_config: (json: string) => AssembledTransaction<Buffer<ArrayBufferLike>>;
1215
1311
  is_supported_eid: (json: string) => AssembledTransaction<boolean>;
@@ -1219,9 +1315,10 @@ export declare class Client extends ContractClient {
1219
1315
  owner: (json: string) => AssembledTransaction<Option<string>>;
1220
1316
  transfer_ownership: (json: string) => AssembledTransaction<null>;
1221
1317
  renounce_ownership: (json: string) => AssembledTransaction<null>;
1222
- set_ttl_config: (json: string) => AssembledTransaction<null>;
1223
- ttl_config: (json: string) => AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>, Option<TtlConfig>]>;
1224
- freeze_ttl_config: (json: string) => AssembledTransaction<null>;
1225
- is_ttl_config_frozen: (json: string) => AssembledTransaction<boolean>;
1318
+ set_ttl_configs: (json: string) => AssembledTransaction<null>;
1319
+ ttl_configs: (json: string) => AssembledTransaction<readonly [Option<TtlConfig>, Option<TtlConfig>]>;
1320
+ freeze_ttl_configs: (json: string) => AssembledTransaction<null>;
1321
+ is_ttl_configs_frozen: (json: string) => AssembledTransaction<boolean>;
1322
+ extend_instance_ttl: (json: string) => AssembledTransaction<null>;
1226
1323
  };
1227
1324
  }