@layerzerolabs/lz-sui-sdk-v2 3.0.137 → 3.0.138

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/deployments/sui-sandbox-local/blocked_message_lib.json +21 -21
  3. package/deployments/sui-sandbox-local/blocked_msglib_ptb_builder.json +25 -25
  4. package/deployments/sui-sandbox-local/counter.json +28 -28
  5. package/deployments/sui-sandbox-local/dvn.json +19 -19
  6. package/deployments/sui-sandbox-local/dvn_fee_lib.json +22 -22
  7. package/deployments/sui-sandbox-local/dvn_layerzero.json +21 -21
  8. package/deployments/sui-sandbox-local/dvn_ptb_builder.json +17 -17
  9. package/deployments/sui-sandbox-local/endpoint_ptb_builder.json +29 -29
  10. package/deployments/sui-sandbox-local/executor.json +14 -14
  11. package/deployments/sui-sandbox-local/executor_call_type.json +28 -28
  12. package/deployments/sui-sandbox-local/executor_fee_lib.json +27 -27
  13. package/deployments/sui-sandbox-local/executor_layerzero.json +17 -17
  14. package/deployments/sui-sandbox-local/executor_ptb_builder.json +21 -21
  15. package/deployments/sui-sandbox-local/layerzero_views.json +18 -18
  16. package/deployments/sui-sandbox-local/msglib_ptb_builder_call_types.json +17 -17
  17. package/deployments/sui-sandbox-local/oapp.json +18 -18
  18. package/deployments/sui-sandbox-local/object-BlockedMessageLib.json +4 -4
  19. package/deployments/sui-sandbox-local/object-BlockedMsglibPtbBuilder.json +4 -4
  20. package/deployments/sui-sandbox-local/object-Counter.json +4 -4
  21. package/deployments/sui-sandbox-local/object-CounterAdminCap.json +4 -4
  22. package/deployments/sui-sandbox-local/object-CounterOApp.json +4 -4
  23. package/deployments/sui-sandbox-local/object-DVN.json +2 -2
  24. package/deployments/sui-sandbox-local/object-DVNCap.json +3 -3
  25. package/deployments/sui-sandbox-local/object-DVNFeeLib.json +4 -4
  26. package/deployments/sui-sandbox-local/object-EndpointPtbBuilder.json +4 -4
  27. package/deployments/sui-sandbox-local/object-EndpointPtbBuilderAdminCap.json +4 -4
  28. package/deployments/sui-sandbox-local/object-Executor.json +2 -2
  29. package/deployments/sui-sandbox-local/object-ExecutorCap.json +4 -4
  30. package/deployments/sui-sandbox-local/object-ExecutorFeeLib.json +5 -5
  31. package/deployments/sui-sandbox-local/object-ExecutorOwnerCap.json +1 -1
  32. package/deployments/sui-sandbox-local/object-PackageWhitelistValidator.json +4 -4
  33. package/deployments/sui-sandbox-local/object-PriceFeed.json +4 -4
  34. package/deployments/sui-sandbox-local/object-PriceFeedOwnerCap.json +4 -4
  35. package/deployments/sui-sandbox-local/object-SimpleMessageLib.json +4 -4
  36. package/deployments/sui-sandbox-local/object-SimpleMessageLibAdminCap.json +4 -4
  37. package/deployments/sui-sandbox-local/object-SmlPtbBuilder.json +4 -4
  38. package/deployments/sui-sandbox-local/object-Treasury.json +4 -4
  39. package/deployments/sui-sandbox-local/object-TreasuryAdminCap.json +4 -4
  40. package/deployments/sui-sandbox-local/object-ULN302.json +4 -4
  41. package/deployments/sui-sandbox-local/object-ULN302AdminCap.json +4 -4
  42. package/deployments/sui-sandbox-local/object-Uln302PtbBuilder.json +4 -4
  43. package/deployments/sui-sandbox-local/object-Uln302Verification.json +4 -4
  44. package/deployments/sui-sandbox-local/package_whitelist_validator.json +39 -39
  45. package/deployments/sui-sandbox-local/price_feed.json +28 -28
  46. package/deployments/sui-sandbox-local/ptb_move_call.json +9 -9
  47. package/deployments/sui-sandbox-local/simple_message_lib.json +16 -16
  48. package/deployments/sui-sandbox-local/simple_msglib_ptb_builder.json +20 -20
  49. package/deployments/sui-sandbox-local/treasury.json +27 -27
  50. package/deployments/sui-sandbox-local/uln_302.json +35 -35
  51. package/deployments/sui-sandbox-local/uln_302_ptb_builder.json +20 -20
  52. package/dist/index.cjs +83 -74
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.d.mts +19 -16
  55. package/dist/index.d.ts +19 -16
  56. package/dist/index.mjs +83 -74
  57. package/dist/index.mjs.map +1 -1
  58. package/package.json +7 -7
  59. package/src/generated/addresses.ts +48 -48
  60. package/src/modules/oapps/oapp.ts +41 -27
package/dist/index.d.mts CHANGED
@@ -4522,8 +4522,6 @@ declare class OApp {
4522
4522
  /**
4523
4523
  * Set enforced options for OApp messaging
4524
4524
  * @param tx - The transaction to add the move call to
4525
- * @param oapp - The OApp object ID or transaction argument
4526
- * @param adminCap - The admin capability object ID or transaction argument
4527
4525
  * @param eid - Endpoint ID or transaction argument
4528
4526
  * @param msgType - Message type or transaction argument
4529
4527
  * @param options - Enforced options as bytes or transaction argument
@@ -4532,8 +4530,6 @@ declare class OApp {
4532
4530
  /**
4533
4531
  * Set peer OApp on another chain
4534
4532
  * @param tx - The transaction to add the move call to
4535
- * @param oapp - The OApp object ID or transaction argument
4536
- * @param adminCap - The admin capability object ID or transaction argument
4537
4533
  * @param eid - Peer endpoint ID or transaction argument
4538
4534
  * @param peer - Peer OApp address as bytes or transaction argument
4539
4535
  */
@@ -4554,20 +4550,17 @@ declare class OApp {
4554
4550
  /**
4555
4551
  * Get OApp CallCap identifier
4556
4552
  * @param tx - The transaction to add the move call to
4557
- * @param oapp - The OApp object ID or transaction argument
4558
4553
  * @returns Transaction result containing the OApp CallCap identifier
4559
4554
  */
4560
4555
  getOAppCapIdMoveCall(tx: Transaction): Promise<TransactionResult>;
4561
4556
  /**
4562
4557
  * Get OApp CallCap identifier
4563
- * @param oapp - The OApp object ID (optional, uses configured oapp if not provided)
4564
4558
  * @returns Promise<string> - The OApp CallCap identifier
4565
4559
  */
4566
4560
  getOAppCapId(): Promise<string>;
4567
4561
  /**
4568
4562
  * Combine enforced options with extra options for message execution
4569
4563
  * @param tx - The transaction to add the move call to
4570
- * @param oapp - The OApp object ID or transaction argument
4571
4564
  * @param eid - Destination endpoint ID or transaction argument
4572
4565
  * @param msgType - Message type or transaction argument
4573
4566
  * @param extraOptions - Extra options to combine with enforced options or transaction argument
@@ -4576,7 +4569,6 @@ declare class OApp {
4576
4569
  combineOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument, extraOptions: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4577
4570
  /**
4578
4571
  * Combine enforced options with extra options for message execution
4579
- * @param oapp - The OApp object ID
4580
4572
  * @param eid - Destination endpoint ID
4581
4573
  * @param msgType - Message type
4582
4574
  * @param extraOptions - Extra options to combine with enforced options
@@ -4586,7 +4578,6 @@ declare class OApp {
4586
4578
  /**
4587
4579
  * Get enforced options for a specific destination and message type
4588
4580
  * @param tx - The transaction to add the move call to
4589
- * @param oapp - The OApp object ID or transaction argument
4590
4581
  * @param eid - Destination endpoint ID or transaction argument
4591
4582
  * @param msgType - Message type or transaction argument
4592
4583
  * @returns Transaction result containing enforced options
@@ -4594,7 +4585,6 @@ declare class OApp {
4594
4585
  getEnforcedOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument): Promise<TransactionResult>;
4595
4586
  /**
4596
4587
  * Get enforced options for a specific destination and message type
4597
- * @param oapp - The OApp object ID
4598
4588
  * @param eid - Destination endpoint ID
4599
4589
  * @param msgType - Message type
4600
4590
  * @returns Promise<Uint8Array> - Enforced options as bytes
@@ -4603,14 +4593,12 @@ declare class OApp {
4603
4593
  /**
4604
4594
  * Check if a peer is configured for a specific destination chain
4605
4595
  * @param tx - The transaction to add the move call to
4606
- * @param oapp - The OApp object ID or transaction argument
4607
4596
  * @param dstEid - Destination endpoint ID or transaction argument
4608
4597
  * @returns Transaction result containing boolean result
4609
4598
  */
4610
4599
  hasPeerMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
4611
4600
  /**
4612
4601
  * Check if a peer is configured for a specific destination chain
4613
- * @param oapp - The OApp object ID
4614
4602
  * @param dstEid - Destination endpoint ID
4615
4603
  * @returns Promise<boolean> - True if peer is configured, false otherwise
4616
4604
  */
@@ -4618,27 +4606,36 @@ declare class OApp {
4618
4606
  /**
4619
4607
  * Get the configured peer address for a specific destination chain
4620
4608
  * @param tx - The transaction to add the move call to
4621
- * @param oapp - The OApp object ID or transaction argument
4622
4609
  * @param dstEid - Destination endpoint ID or transaction argument
4623
4610
  * @returns Transaction result containing peer address
4624
4611
  */
4625
4612
  getPeerMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
4626
4613
  /**
4627
4614
  * Get the configured peer address for a specific destination chain
4628
- * @param oapp - The OApp object ID
4629
4615
  * @param dstEid - Destination endpoint ID
4630
4616
  * @returns Promise<Uint8Array> - Peer address as bytes32
4631
4617
  */
4632
4618
  getPeer(dstEid: number): Promise<Uint8Array>;
4619
+ /**
4620
+ * Get OApp information V1 structure
4621
+ * @param tx - The transaction to add the move call to
4622
+ * @returns Transaction result containing the OApp information V1
4623
+ */
4633
4624
  getOAppInfoV1MoveCall(tx: Transaction): TransactionResult;
4625
+ /**
4626
+ * Get OApp information V1 structure
4627
+ * @returns Promise<OAppInfoV1> - The OApp information V1
4628
+ */
4634
4629
  getOAppInfoV1(): Promise<OAppInfoV1>;
4630
+ getOAppInfoV1ExtraInfoMoveCall(tx: Transaction, oappInfo: TransactionArgument): TransactionResult;
4635
4631
  /**
4636
4632
  * Register OApp with the endpoint
4637
4633
  * @param tx - The transaction to add the move call to
4634
+ * @param oappObjectId - The OApp object ID
4638
4635
  * @param oappInfo - OApp information as bytes (optional)
4639
4636
  * @returns Transaction result containing the messaging channel address
4640
4637
  */
4641
- registerOAppMoveCall(tx: Transaction, oappInfo?: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4638
+ registerOAppMoveCall(tx: Transaction, oappObjectId: string, oappInfo?: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4642
4639
  /**
4643
4640
  * Set delegate for OApp
4644
4641
  * @param tx - The transaction to add the move call to
@@ -4649,8 +4646,9 @@ declare class OApp {
4649
4646
  * Set OApp information in the endpoint
4650
4647
  * @param tx - The transaction to add the move call to
4651
4648
  * @param oappInfo - OApp information as bytes
4649
+ * @param oappObjectId - Optional OApp object ID (uses configured oapp if not provided)
4652
4650
  */
4653
- setOAppInfoMoveCall(tx: Transaction, oappInfo: Uint8Array | TransactionArgument): Promise<void>;
4651
+ setOAppInfoMoveCall(tx: Transaction, oappInfo: Uint8Array | TransactionArgument, oappObjectId?: string): Promise<void>;
4654
4652
  /**
4655
4653
  * Initialize channel with remote OApp
4656
4654
  * @param tx - The transaction to add the move call to
@@ -4727,6 +4725,11 @@ declare class OApp {
4727
4725
  * @returns Transaction result containing Call<MessageLibSetConfigParam, Void>
4728
4726
  */
4729
4727
  setConfigMoveCall(tx: Transaction, lib: string | TransactionArgument, eid: number | TransactionArgument, configType: number | TransactionArgument, config: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4728
+ /**
4729
+ * Refresh the cached OApp information by fetching the latest data
4730
+ * @returns Promise<void> - Completes when the OApp info is refreshed
4731
+ */
4732
+ refreshOAppInfo(): Promise<void>;
4730
4733
  }
4731
4734
 
4732
4735
  /**
package/dist/index.d.ts CHANGED
@@ -4522,8 +4522,6 @@ declare class OApp {
4522
4522
  /**
4523
4523
  * Set enforced options for OApp messaging
4524
4524
  * @param tx - The transaction to add the move call to
4525
- * @param oapp - The OApp object ID or transaction argument
4526
- * @param adminCap - The admin capability object ID or transaction argument
4527
4525
  * @param eid - Endpoint ID or transaction argument
4528
4526
  * @param msgType - Message type or transaction argument
4529
4527
  * @param options - Enforced options as bytes or transaction argument
@@ -4532,8 +4530,6 @@ declare class OApp {
4532
4530
  /**
4533
4531
  * Set peer OApp on another chain
4534
4532
  * @param tx - The transaction to add the move call to
4535
- * @param oapp - The OApp object ID or transaction argument
4536
- * @param adminCap - The admin capability object ID or transaction argument
4537
4533
  * @param eid - Peer endpoint ID or transaction argument
4538
4534
  * @param peer - Peer OApp address as bytes or transaction argument
4539
4535
  */
@@ -4554,20 +4550,17 @@ declare class OApp {
4554
4550
  /**
4555
4551
  * Get OApp CallCap identifier
4556
4552
  * @param tx - The transaction to add the move call to
4557
- * @param oapp - The OApp object ID or transaction argument
4558
4553
  * @returns Transaction result containing the OApp CallCap identifier
4559
4554
  */
4560
4555
  getOAppCapIdMoveCall(tx: Transaction): Promise<TransactionResult>;
4561
4556
  /**
4562
4557
  * Get OApp CallCap identifier
4563
- * @param oapp - The OApp object ID (optional, uses configured oapp if not provided)
4564
4558
  * @returns Promise<string> - The OApp CallCap identifier
4565
4559
  */
4566
4560
  getOAppCapId(): Promise<string>;
4567
4561
  /**
4568
4562
  * Combine enforced options with extra options for message execution
4569
4563
  * @param tx - The transaction to add the move call to
4570
- * @param oapp - The OApp object ID or transaction argument
4571
4564
  * @param eid - Destination endpoint ID or transaction argument
4572
4565
  * @param msgType - Message type or transaction argument
4573
4566
  * @param extraOptions - Extra options to combine with enforced options or transaction argument
@@ -4576,7 +4569,6 @@ declare class OApp {
4576
4569
  combineOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument, extraOptions: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4577
4570
  /**
4578
4571
  * Combine enforced options with extra options for message execution
4579
- * @param oapp - The OApp object ID
4580
4572
  * @param eid - Destination endpoint ID
4581
4573
  * @param msgType - Message type
4582
4574
  * @param extraOptions - Extra options to combine with enforced options
@@ -4586,7 +4578,6 @@ declare class OApp {
4586
4578
  /**
4587
4579
  * Get enforced options for a specific destination and message type
4588
4580
  * @param tx - The transaction to add the move call to
4589
- * @param oapp - The OApp object ID or transaction argument
4590
4581
  * @param eid - Destination endpoint ID or transaction argument
4591
4582
  * @param msgType - Message type or transaction argument
4592
4583
  * @returns Transaction result containing enforced options
@@ -4594,7 +4585,6 @@ declare class OApp {
4594
4585
  getEnforcedOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument): Promise<TransactionResult>;
4595
4586
  /**
4596
4587
  * Get enforced options for a specific destination and message type
4597
- * @param oapp - The OApp object ID
4598
4588
  * @param eid - Destination endpoint ID
4599
4589
  * @param msgType - Message type
4600
4590
  * @returns Promise<Uint8Array> - Enforced options as bytes
@@ -4603,14 +4593,12 @@ declare class OApp {
4603
4593
  /**
4604
4594
  * Check if a peer is configured for a specific destination chain
4605
4595
  * @param tx - The transaction to add the move call to
4606
- * @param oapp - The OApp object ID or transaction argument
4607
4596
  * @param dstEid - Destination endpoint ID or transaction argument
4608
4597
  * @returns Transaction result containing boolean result
4609
4598
  */
4610
4599
  hasPeerMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
4611
4600
  /**
4612
4601
  * Check if a peer is configured for a specific destination chain
4613
- * @param oapp - The OApp object ID
4614
4602
  * @param dstEid - Destination endpoint ID
4615
4603
  * @returns Promise<boolean> - True if peer is configured, false otherwise
4616
4604
  */
@@ -4618,27 +4606,36 @@ declare class OApp {
4618
4606
  /**
4619
4607
  * Get the configured peer address for a specific destination chain
4620
4608
  * @param tx - The transaction to add the move call to
4621
- * @param oapp - The OApp object ID or transaction argument
4622
4609
  * @param dstEid - Destination endpoint ID or transaction argument
4623
4610
  * @returns Transaction result containing peer address
4624
4611
  */
4625
4612
  getPeerMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
4626
4613
  /**
4627
4614
  * Get the configured peer address for a specific destination chain
4628
- * @param oapp - The OApp object ID
4629
4615
  * @param dstEid - Destination endpoint ID
4630
4616
  * @returns Promise<Uint8Array> - Peer address as bytes32
4631
4617
  */
4632
4618
  getPeer(dstEid: number): Promise<Uint8Array>;
4619
+ /**
4620
+ * Get OApp information V1 structure
4621
+ * @param tx - The transaction to add the move call to
4622
+ * @returns Transaction result containing the OApp information V1
4623
+ */
4633
4624
  getOAppInfoV1MoveCall(tx: Transaction): TransactionResult;
4625
+ /**
4626
+ * Get OApp information V1 structure
4627
+ * @returns Promise<OAppInfoV1> - The OApp information V1
4628
+ */
4634
4629
  getOAppInfoV1(): Promise<OAppInfoV1>;
4630
+ getOAppInfoV1ExtraInfoMoveCall(tx: Transaction, oappInfo: TransactionArgument): TransactionResult;
4635
4631
  /**
4636
4632
  * Register OApp with the endpoint
4637
4633
  * @param tx - The transaction to add the move call to
4634
+ * @param oappObjectId - The OApp object ID
4638
4635
  * @param oappInfo - OApp information as bytes (optional)
4639
4636
  * @returns Transaction result containing the messaging channel address
4640
4637
  */
4641
- registerOAppMoveCall(tx: Transaction, oappInfo?: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4638
+ registerOAppMoveCall(tx: Transaction, oappObjectId: string, oappInfo?: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4642
4639
  /**
4643
4640
  * Set delegate for OApp
4644
4641
  * @param tx - The transaction to add the move call to
@@ -4649,8 +4646,9 @@ declare class OApp {
4649
4646
  * Set OApp information in the endpoint
4650
4647
  * @param tx - The transaction to add the move call to
4651
4648
  * @param oappInfo - OApp information as bytes
4649
+ * @param oappObjectId - Optional OApp object ID (uses configured oapp if not provided)
4652
4650
  */
4653
- setOAppInfoMoveCall(tx: Transaction, oappInfo: Uint8Array | TransactionArgument): Promise<void>;
4651
+ setOAppInfoMoveCall(tx: Transaction, oappInfo: Uint8Array | TransactionArgument, oappObjectId?: string): Promise<void>;
4654
4652
  /**
4655
4653
  * Initialize channel with remote OApp
4656
4654
  * @param tx - The transaction to add the move call to
@@ -4727,6 +4725,11 @@ declare class OApp {
4727
4725
  * @returns Transaction result containing Call<MessageLibSetConfigParam, Void>
4728
4726
  */
4729
4727
  setConfigMoveCall(tx: Transaction, lib: string | TransactionArgument, eid: number | TransactionArgument, configType: number | TransactionArgument, config: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4728
+ /**
4729
+ * Refresh the cached OApp information by fetching the latest data
4730
+ * @returns Promise<void> - Completes when the OApp info is refreshed
4731
+ */
4732
+ refreshOAppInfo(): Promise<void>;
4730
4733
  }
4731
4734
 
4732
4735
  /**