@layerzerolabs/lz-sui-sdk-v2 3.0.132 → 3.0.134-sui.0

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 (93) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/deployments/sui-sandbox-local/blocked_message_lib.json +26 -26
  3. package/deployments/sui-sandbox-local/blocked_msglib_ptb_builder.json +26 -26
  4. package/deployments/sui-sandbox-local/call.json +20 -20
  5. package/deployments/sui-sandbox-local/counter.json +81 -46
  6. package/deployments/sui-sandbox-local/dvn.json +23 -22
  7. package/deployments/sui-sandbox-local/dvn_call_type.json +21 -21
  8. package/deployments/sui-sandbox-local/dvn_fee_lib.json +31 -31
  9. package/deployments/sui-sandbox-local/dvn_layerzero.json +25 -25
  10. package/deployments/sui-sandbox-local/dvn_ptb_builder.json +14 -14
  11. package/deployments/sui-sandbox-local/endpoint_ptb_builder.json +31 -31
  12. package/deployments/sui-sandbox-local/endpoint_v2.json +26 -26
  13. package/deployments/sui-sandbox-local/executor.json +21 -20
  14. package/deployments/sui-sandbox-local/executor_call_type.json +14 -14
  15. package/deployments/sui-sandbox-local/executor_fee_lib.json +27 -27
  16. package/deployments/sui-sandbox-local/executor_layerzero.json +22 -22
  17. package/deployments/sui-sandbox-local/executor_ptb_builder.json +14 -14
  18. package/deployments/sui-sandbox-local/layerzero_views.json +14 -14
  19. package/deployments/sui-sandbox-local/message_lib_common.json +22 -22
  20. package/deployments/sui-sandbox-local/msglib_ptb_builder_call_types.json +14 -14
  21. package/deployments/sui-sandbox-local/oapp.json +16 -14
  22. package/deployments/sui-sandbox-local/object-BlockedMessageLib.json +5 -5
  23. package/deployments/sui-sandbox-local/object-BlockedMsglibPtbBuilder.json +5 -5
  24. package/deployments/sui-sandbox-local/object-Counter.json +5 -5
  25. package/deployments/sui-sandbox-local/object-CounterAdminCap.json +5 -5
  26. package/deployments/sui-sandbox-local/object-CounterOApp.json +5 -5
  27. package/deployments/sui-sandbox-local/object-DVN.json +2 -2
  28. package/deployments/sui-sandbox-local/object-DVNCap.json +5 -5
  29. package/deployments/sui-sandbox-local/object-DVNFeeLib.json +5 -5
  30. package/deployments/sui-sandbox-local/object-EndpointPtbBuilder.json +5 -5
  31. package/deployments/sui-sandbox-local/object-EndpointPtbBuilderAdminCap.json +5 -5
  32. package/deployments/sui-sandbox-local/object-EndpointV2.json +4 -4
  33. package/deployments/sui-sandbox-local/object-EndpointV2AdminCap.json +4 -4
  34. package/deployments/sui-sandbox-local/object-Executor.json +2 -2
  35. package/deployments/sui-sandbox-local/object-ExecutorCap.json +4 -4
  36. package/deployments/sui-sandbox-local/object-ExecutorFeeLib.json +5 -5
  37. package/deployments/sui-sandbox-local/object-ExecutorOwnerCap.json +2 -2
  38. package/deployments/sui-sandbox-local/object-PackageWhitelistValidator.json +5 -5
  39. package/deployments/sui-sandbox-local/object-PriceFeed.json +5 -5
  40. package/deployments/sui-sandbox-local/object-PriceFeedOwnerCap.json +5 -5
  41. package/deployments/sui-sandbox-local/object-SimpleMessageLib.json +5 -5
  42. package/deployments/sui-sandbox-local/object-SimpleMessageLibAdminCap.json +5 -5
  43. package/deployments/sui-sandbox-local/object-SmlPtbBuilder.json +5 -5
  44. package/deployments/sui-sandbox-local/object-Treasury.json +5 -5
  45. package/deployments/sui-sandbox-local/object-TreasuryAdminCap.json +5 -5
  46. package/deployments/sui-sandbox-local/object-ULN302.json +5 -5
  47. package/deployments/sui-sandbox-local/object-ULN302AdminCap.json +5 -5
  48. package/deployments/sui-sandbox-local/object-Uln302PtbBuilder.json +5 -5
  49. package/deployments/sui-sandbox-local/object-Uln302Verification.json +5 -5
  50. package/deployments/sui-sandbox-local/object-WorkerRegistry.json +9 -0
  51. package/deployments/sui-sandbox-local/object-ZroCoinMetadata.json +4 -4
  52. package/deployments/sui-sandbox-local/object-ZroTreasuryCap.json +4 -4
  53. package/deployments/sui-sandbox-local/package_whitelist_validator.json +51 -51
  54. package/deployments/sui-sandbox-local/price_feed.json +42 -42
  55. package/deployments/sui-sandbox-local/price_feed_call_types.json +13 -13
  56. package/deployments/sui-sandbox-local/ptb_move_call.json +14 -14
  57. package/deployments/sui-sandbox-local/simple_message_lib.json +34 -34
  58. package/deployments/sui-sandbox-local/simple_msglib_ptb_builder.json +27 -27
  59. package/deployments/sui-sandbox-local/treasury.json +38 -38
  60. package/deployments/sui-sandbox-local/uln_302.json +29 -29
  61. package/deployments/sui-sandbox-local/uln_302_ptb_builder.json +26 -26
  62. package/deployments/sui-sandbox-local/utils.json +14 -14
  63. package/deployments/sui-sandbox-local/worker_common.json +16 -15
  64. package/deployments/sui-sandbox-local/worker_registry.json +58 -0
  65. package/deployments/sui-sandbox-local/zro.json +23 -23
  66. package/dist/index.cjs +840 -300
  67. package/dist/index.cjs.map +1 -1
  68. package/dist/index.d.mts +541 -316
  69. package/dist/index.d.ts +541 -316
  70. package/dist/index.mjs +834 -301
  71. package/dist/index.mjs.map +1 -1
  72. package/package.json +7 -7
  73. package/src/bcs/index.ts +2 -1
  74. package/src/bcs/oapp.ts +14 -0
  75. package/src/generated/addresses.ts +72 -54
  76. package/src/module-manager.ts +15 -3
  77. package/src/modules/endpoint.ts +2 -3
  78. package/src/modules/oapps/counter.ts +30 -47
  79. package/src/modules/oapps/oapp.ts +468 -62
  80. package/src/modules/ptb-builders/ptb-builder.ts +10 -4
  81. package/src/modules/workers/dvn-layerzero.ts +1 -0
  82. package/src/modules/workers/dvn.ts +59 -0
  83. package/src/modules/workers/executor-layerzero.ts +1 -0
  84. package/src/modules/workers/executor.ts +59 -0
  85. package/src/modules/workers/index.ts +1 -0
  86. package/src/modules/workers/worker-registry.ts +109 -0
  87. package/src/resource.ts +3 -0
  88. package/src/sdk.ts +7 -2
  89. package/src/types/endpoint.ts +2 -1
  90. package/src/types/modules.ts +1 -0
  91. package/src/types/oapp.ts +6 -0
  92. package/src/types/options.ts +15 -0
  93. package/src/utils/transaction.ts +3 -3
package/dist/index.d.ts CHANGED
@@ -113,6 +113,14 @@ interface PackageOptions {
113
113
  * The blocked message library PTB builder object address.
114
114
  */
115
115
  blockedMessageLibPtbBuilder: string;
116
+ /**
117
+ * The worker registry address.
118
+ */
119
+ workerRegistry: string;
120
+ /**
121
+ * The worker common address.
122
+ */
123
+ workerCommon: string;
116
124
  /**
117
125
  * Allow additional properties beyond the explicitly defined ones
118
126
  */
@@ -234,6 +242,10 @@ interface ObjectOptions {
234
242
  * The default package whitelist validator object address.
235
243
  */
236
244
  packageWhitelistValidator: string;
245
+ /**
246
+ * The worker registry object address.
247
+ */
248
+ workerRegistry: string;
237
249
  /**
238
250
  * Allow additional properties beyond the explicitly defined ones
239
251
  */
@@ -294,7 +306,8 @@ declare enum Modules {
294
306
  PriceFeed = "priceFeed",
295
307
  Counter = "counter",
296
308
  DvnPtbBuilder = "dvnPtbBuilder",
297
- ExecutorPtbBuilder = "executorPtbBuilder"
309
+ ExecutorPtbBuilder = "executorPtbBuilder",
310
+ WorkerRegistry = "workerRegistry"
298
311
  }
299
312
 
300
313
  /**
@@ -509,6 +522,10 @@ interface Timeout {
509
522
  /**
510
523
  * LayerZero protocol version constants
511
524
  */
525
+ declare const OAppInfoVersion: {
526
+ readonly VERSION_1: 1;
527
+ readonly VERSION_2: 2;
528
+ };
512
529
  declare const LzReceiveVersion: {
513
530
  readonly VERSION_1: 1;
514
531
  };
@@ -578,7 +595,7 @@ declare class ModuleManager {
578
595
  getTreasury(): Treasury;
579
596
  getLayerZeroViews(): LayerZeroViews;
580
597
  getPtbBuilder(): PtbBuilder;
581
- getOApp(): OApp;
598
+ getOApp(client: SuiClient, callCapId: string, options?: ModuleOptions): OApp;
582
599
  getCounter(client: SuiClient, options?: ModuleOptions): Counter;
583
600
  getExecutor(client: SuiClient, options?: ModuleOptions): Executor;
584
601
  getDvn(client: SuiClient, options?: ModuleOptions): DVN;
@@ -594,6 +611,7 @@ declare class ModuleManager {
594
611
  getEndpointPtbBuilder(client: SuiClient, options?: ModuleOptions): EndpointPtbBuilder;
595
612
  getSimpleMessageLibPtbBuilder(client: SuiClient, options?: ModuleOptions): SimpleMessageLibPtbBuilder;
596
613
  getBlockedMessageLibPtbBuilder(client: SuiClient, options?: ModuleOptions): BlockedMessageLibPtbBuilder;
614
+ getWorkerRegistry(client: SuiClient, options?: ModuleOptions): WorkerRegistry;
597
615
  /**
598
616
  * Merge objects configuration with options, avoiding unnecessary object spreading
599
617
  */
@@ -645,9 +663,8 @@ declare const EndpointErrorCode: {
645
663
  readonly MessagingChannel_ESendReentrancy: 10;
646
664
  readonly MessagingChannel_EUninitializedChannel: 11;
647
665
  readonly OAppRegistry_EInvalidLZReceiveInfo: 1;
648
- readonly OAppRegistry_EInvalidOriginalPackage: 2;
649
- readonly OAppRegistry_EOAppNotRegistered: 3;
650
- readonly OAppRegistry_EOAppRegistered: 4;
666
+ readonly OAppRegistry_EOAppNotRegistered: 2;
667
+ readonly OAppRegistry_EOAppRegistered: 3;
651
668
  readonly Endpoint_EAlreadyInitialized: 1;
652
669
  readonly Endpoint_EInvalidEid: 2;
653
670
  readonly Endpoint_ENotInitialized: 3;
@@ -2458,6 +2475,20 @@ declare class DVN {
2458
2475
  * @returns Promise<boolean> - True if the PTB builder has been initialized
2459
2476
  */
2460
2477
  isPtbBuilderInitialized(): Promise<boolean>;
2478
+ /**
2479
+ * Get DVN object address from worker registry using this DVN's worker capability (as a move call)
2480
+ * This function chains Move calls to decode worker info and extract the DVN object address
2481
+ * @param tx - The transaction to add the move call to
2482
+ * @returns Transaction result containing the DVN object address
2483
+ */
2484
+ getDvnObjectAddressMoveCall(tx: Transaction): TransactionResult;
2485
+ /**
2486
+ * Get DVN object address from worker registry using this DVN's worker capability
2487
+ * This function uses Move calls to decode worker info and extract the DVN object address
2488
+ * @returns Promise<string> - The DVN object address
2489
+ * @throws Will throw an error if worker info is not found or if decoding fails
2490
+ */
2491
+ getDvnObjectAddress(): Promise<string>;
2461
2492
  /**
2462
2493
  * Create a LayerZero witness for DVN package whitelist registration
2463
2494
  * @param tx - The transaction to add the move call to
@@ -3066,6 +3097,20 @@ declare class Executor {
3066
3097
  * @returns Promise<string> - The admin capability ID
3067
3098
  */
3068
3099
  adminCapId(admin: string): Promise<string>;
3100
+ /**
3101
+ * Get Executor object address from worker registry using this Executor's worker capability (as a move call)
3102
+ * This function chains Move calls to decode worker info and extract the Executor object address
3103
+ * @param tx - The transaction to add the move call to
3104
+ * @returns Transaction result containing the Executor object address
3105
+ */
3106
+ getExecutorObjectAddressMoveCall(tx: Transaction): TransactionResult;
3107
+ /**
3108
+ * Get Executor object address from worker registry using this Executor's worker capability
3109
+ * This function uses Move calls to decode worker info and extract the Executor object address
3110
+ * @returns Promise<string> - The Executor object address
3111
+ * @throws Will throw an error if worker info is not found or if decoding fails
3112
+ */
3113
+ getExecutorObjectAddress(): Promise<string>;
3069
3114
  private parseDstConfig;
3070
3115
  }
3071
3116
 
@@ -3451,6 +3496,55 @@ declare class Treasury {
3451
3496
  feeEnabled(): Promise<boolean>;
3452
3497
  }
3453
3498
 
3499
+ declare const WorkerRegistryErrorCode: {
3500
+ readonly EWorkerInfoInvalid: 1;
3501
+ readonly EWorkerInfoNotFound: 2;
3502
+ };
3503
+ /**
3504
+ * WorkerRegistry provides access to the worker registry contract functionality
3505
+ * This module maintains mappings between worker addresses and their associated information.
3506
+ */
3507
+ declare class WorkerRegistry {
3508
+ #private;
3509
+ private readonly moduleManager;
3510
+ packageId: string;
3511
+ readonly client: SuiClient;
3512
+ private readonly objects;
3513
+ /**
3514
+ * Create a new WorkerRegistry instance
3515
+ * @param packageId - The package ID of the worker registry contract
3516
+ * @param client - The Sui client instance
3517
+ * @param objects - Object options containing contract object IDs
3518
+ * @param moduleManager - Module manager for handling dependencies
3519
+ */
3520
+ constructor(packageId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
3521
+ /**
3522
+ * Get worker info for a specific worker address (as a move call)
3523
+ * This creates a move call that can be used in a PTB (Programmable Transaction Block)
3524
+ * @param tx - The transaction to add the move call to
3525
+ * @param worker - The worker address or transaction argument
3526
+ * @returns TransactionResult - The move call result containing worker info bytes
3527
+ * @throws Will throw an error if worker info is not found (EWorkerInfoNotFound)
3528
+ */
3529
+ getWorkerInfoMoveCall(tx: Transaction, worker: string | TransactionArgument): TransactionResult;
3530
+ /**
3531
+ * Get worker info for a specific worker address
3532
+ * Executes the get_worker_info function and returns the worker information bytes
3533
+ * @param worker - The worker address to get info for
3534
+ * @returns Promise<Uint8Array> - The worker information bytes containing encoded worker data
3535
+ * @throws Will throw an error if worker info is not found (EWorkerInfoNotFound)
3536
+ */
3537
+ getWorkerInfo(worker: string): Promise<Uint8Array>;
3538
+ /**
3539
+ * Check if worker info exists for a specific worker address
3540
+ * This is a convenience method that catches EWorkerInfoNotFound errors
3541
+ * @param worker - The worker address to check
3542
+ * @returns Promise<boolean> - True if worker info exists, false if not found
3543
+ * @throws Will re-throw any errors other than EWorkerInfoNotFound
3544
+ */
3545
+ hasWorkerInfo(worker: string): Promise<boolean>;
3546
+ }
3547
+
3454
3548
  declare class DvnPtbBuilder {
3455
3549
  #private;
3456
3550
  private readonly moduleManager;
@@ -3914,74 +4008,293 @@ declare class BlockedMessageLibPtbBuilder {
3914
4008
  getPtbBuilderInfoMoveCall(tx: Transaction): TransactionResult;
3915
4009
  }
3916
4010
 
3917
- declare const CounterErrorCode: {
3918
- readonly Counter_EInvalidMsgType: 0;
3919
- readonly Counter_EInvalidValue: 1;
3920
- readonly Counter_EInvalidNonce: 2;
3921
- readonly Counter_EOnlyEndpoint: 3;
3922
- readonly Counter_ESelfComposeOnly: 4;
3923
- readonly Counter_EInvalidOApp: 5;
3924
- readonly Counter_EInvalidAdminCap: 6;
3925
- readonly Counter_EAlreadyInitialized: 7;
3926
- };
3927
- declare class Counter {
3928
- #private;
3929
- private readonly moduleManager;
3930
- packageId: string;
3931
- readonly client: SuiClient;
3932
- private readonly objects;
3933
- constructor(packageId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
4011
+ /**
4012
+ * Type guard to check if a value is already a TransactionArgument
4013
+ * TransactionArgument can be:
4014
+ * 1. Argument object with $kind property
4015
+ * 2. Synchronous function: (tx: Transaction) => Argument
4016
+ * 3. Asynchronous function: AsyncTransactionThunk
4017
+ */
4018
+ declare function isTransactionArgument(value: unknown): value is TransactionArgument;
4019
+ /**
4020
+ * Convert value to TransactionArgument using a simple converter function
4021
+ * @param value - The value to convert (primitive type or TransactionArgument)
4022
+ * @param converter - Function to convert primitive type to TransactionArgument
4023
+ * @returns TransactionArgument
4024
+ */
4025
+ declare function asArg<T>(value: T | TransactionArgument, converter: (val: T) => TransactionArgument): TransactionArgument;
4026
+ /**
4027
+ * Convert value to TransactionArgument using a converter that requires Transaction
4028
+ * @param tx - The transaction
4029
+ * @param value - The value to convert
4030
+ * @param converter - Function to convert value using transaction
4031
+ * @returns TransactionArgument
4032
+ */
4033
+ declare function asArgWithTx<T>(tx: Transaction, value: T | TransactionArgument, converter: (tx: Transaction, val: T) => TransactionArgument): TransactionArgument;
4034
+ /**
4035
+ * Async version: Convert value to TransactionArgument using an async converter that requires Transaction
4036
+ * @param tx - The transaction
4037
+ * @param value - The value to convert
4038
+ * @param converter - Async function to convert value using transaction
4039
+ * @returns Promise<TransactionArgument>
4040
+ */
4041
+ declare function asArgWithTxAsync<T>(tx: Transaction, value: T | TransactionArgument, converter: (tx: Transaction, val: T) => Promise<TransactionArgument>): Promise<TransactionArgument>;
4042
+ /**
4043
+ * Convert to object reference TransactionArgument
4044
+ */
4045
+ declare function asObject(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
4046
+ /**
4047
+ * Convert to address TransactionArgument
4048
+ */
4049
+ declare function asAddress(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
4050
+ /**
4051
+ * Convert to u8 TransactionArgument
4052
+ */
4053
+ declare function asU8(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
4054
+ /**
4055
+ * Convert to u16 TransactionArgument
4056
+ */
4057
+ declare function asU16(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
4058
+ /**
4059
+ * Convert to u32 TransactionArgument
4060
+ */
4061
+ declare function asU32(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
4062
+ /**
4063
+ * Convert to u64 TransactionArgument (supports bigint, number, or string)
4064
+ */
4065
+ declare function asU64(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
4066
+ /**
4067
+ * Convert to u128 TransactionArgument (supports bigint, number, or string)
4068
+ */
4069
+ declare function asU128(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
4070
+ /**
4071
+ * Convert to u256 TransactionArgument (supports bigint, number, or string)
4072
+ */
4073
+ declare function asU256(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
4074
+ /**
4075
+ * Convert Uint8Array to Bytes32 using moduleManager's fromBytesMoveCall
4076
+ * @param tx - The transaction
4077
+ * @param value - Uint8Array or TransactionArgument
4078
+ * @param utils - utils Module
4079
+ * @returns TransactionArgument
4080
+ */
4081
+ declare function asBytes32(tx: Transaction, value: Uint8Array | TransactionArgument, utils: Utils): TransactionArgument;
4082
+ /**
4083
+ * Convert Uint8Array to serialized bytes vector TransactionArgument
4084
+ * @param tx - The transaction
4085
+ * @param value - Uint8Array or TransactionArgument
4086
+ * @returns TransactionArgument
4087
+ */
4088
+ declare function asBytes(tx: Transaction, value: Uint8Array | TransactionArgument): TransactionArgument;
4089
+ /**
4090
+ * Convert Uint8Array Vector to serialized bytes vector TransactionArgument
4091
+ * @param tx - The transaction
4092
+ * @param value - Uint8Array or TransactionArgument
4093
+ * @returns TransactionArgument
4094
+ */
4095
+ declare function asBytesVector(tx: Transaction, value: Uint8Array[] | TransactionArgument): TransactionArgument;
4096
+ /**
4097
+ * Convert string to string TransactionArgument
4098
+ * @param tx - The transaction
4099
+ * @param value - string or TransactionArgument
4100
+ * @returns TransactionArgument
4101
+ */
4102
+ declare function asString(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
4103
+ /**
4104
+ * Convert address array to serialized vector<address> TransactionArgument
4105
+ * @param tx - The transaction
4106
+ * @param value - string[] or TransactionArgument
4107
+ * @returns TransactionArgument
4108
+ */
4109
+ declare function asAddressVector(tx: Transaction, value: string[] | TransactionArgument): TransactionArgument;
4110
+ /**
4111
+ * Convert boolean to boolean TransactionArgument
4112
+ * @param tx - The transaction
4113
+ * @param value - boolean or TransactionArgument
4114
+ * @returns TransactionArgument
4115
+ */
4116
+ declare function asBool(tx: Transaction, value: boolean | TransactionArgument): TransactionArgument;
4117
+
4118
+ declare function simulateTransaction(suiClient: SuiClient, tx: Transaction, sender?: string): Promise<SimulateResult[]>;
4119
+ declare function simulateTransactionMultiResult(suiClient: SuiClient, tx: Transaction, resultIndex: number[], sender?: string): Promise<SimulateResult[][]>;
4120
+ declare function validateTransaction(client: SuiClient, signer: Keypair, tx: Transaction): Promise<SuiTransactionBlockResponse>;
4121
+ /**
4122
+ * Execute simulate using a moveCall function
4123
+ * @param client - The Sui client
4124
+ * @param moveCallFn - Function that adds moveCall to the transaction (supports both sync and async, any return type)
4125
+ * @param parser - Function to parse the result
4126
+ * @returns The parsed result
4127
+ */
4128
+ declare function executeSimulate<T>(client: SuiClient, moveCallFn: (tx: Transaction) => unknown, parser: (result: {
4129
+ value: Uint8Array;
4130
+ }[]) => T): Promise<T>;
4131
+ declare function handleError(e: string): unknown;
4132
+
4133
+ /**
4134
+ * PackageAllowlistValidator ensures all function calls and objects belong to allowlisted packages
4135
+ * This validator checks that:
4136
+ * 1. All function calls target approved packages
4137
+ * 2. All object arguments come from approved packages
4138
+ *
4139
+ * If local packageWhitelist is empty, it will use the PTB whitelist contract for validation
4140
+ * If local packageWhitelist is provided, it will use only the local whitelist (contract is ignored)
4141
+ */
4142
+ declare class PackageAllowlistValidator implements IPTBValidator {
4143
+ private packageWhitelist;
4144
+ private validator?;
4145
+ constructor(packageWhitelist?: string[], validator?: PackageWhitelistValidator);
3934
4146
  /**
3935
- * Initialize counter with LayerZero receive and compose information
3936
- * @param tx - The transaction to add the move call to
3937
- * @param lzReceiveInfo - LayerZero receive information transaction argument
3938
- * @param lzComposeInfo - LayerZero compose information transaction argument
4147
+ * Validates that all function calls and object arguments belong to whitelisted packages
4148
+ * @param moveCallsWithDetails - Array of move calls with object details
4149
+ * @throws Error if any function call or object belongs to a non-whitelisted package
3939
4150
  */
3940
- initCounterMoveCall(tx: Transaction, lzReceiveInfo: TransactionArgument, lzComposeInfo: TransactionArgument): void;
4151
+ validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): Promise<void>;
3941
4152
  /**
3942
- * Quote messaging fees for sending counter increment
3943
- * @param dstEid - Destination endpoint ID
3944
- * @param msgType - Message type (SEND or SEND_AND_CALL)
3945
- * @param options - Execution options as bytes
3946
- * @param payInZero - Whether to pay in ZRO tokens
3947
- * @returns Promise<MessagingFee> - The calculated messaging fees
4153
+ * Validate multiple packages at once
4154
+ * @param packages - Array of package IDs to validate
4155
+ * @returns Object mapping package ID to validation result
3948
4156
  */
3949
- quote(dstEid: EndpointId | TransactionArgument, msgType: number | TransactionArgument, options: Uint8Array | TransactionArgument, payInZero: boolean | TransactionArgument): Promise<MessagingFee>;
4157
+ private validatePackages;
3950
4158
  /**
3951
- * Increment counter on destination chain
3952
- * @param tx - The transaction to add the move call to
3953
- * @param sender - Sender address for ZRO token operations
3954
- * @param dstEid - Destination endpoint ID
3955
- * @param msgType - Message type (SEND or SEND_AND_CALL)
3956
- * @param options - Execution options as bytes
3957
- * @param sendValue - Value to send with the message
3958
- * @param nativeFee - Native token fee amount
3959
- * @param zroFee - ZRO token fee amount
3960
- * @param refundAddress - Address for fee refunds
4159
+ * Extracts package ID from object type string
4160
+ * Object types are in format: "packageId::module::struct<generics>"
4161
+ * @param objectType - The object type string
4162
+ * @returns The package ID or null if extraction fails
3961
4163
  */
3962
- incrementMoveCall(tx: Transaction, sender: string, dstEid: EndpointId | TransactionArgument, msgType: number | TransactionArgument, options: Uint8Array | TransactionArgument, sendValue: bigint | TransactionArgument, nativeFee: bigint | TransactionArgument, zroFee: bigint | TransactionArgument, refundAddress: string | TransactionArgument): Promise<void>;
4164
+ private extractPackageIdFromType;
3963
4165
  /**
3964
- * Set peer counter on another chain
3965
- * @param tx - The transaction to add the move call to
3966
- * @param messagingChannel - The messaging channel object ID or transaction argument
3967
- * @param eid - The peer endpoint ID or transaction argument
3968
- * @param peer - The peer counter address as bytes or transaction argument
4166
+ * Get available packages for error messages
3969
4167
  */
3970
- setPeerMoveCall(tx: Transaction, messagingChannel: string | TransactionArgument, eid: number | TransactionArgument, peer: Uint8Array | TransactionArgument): void;
4168
+ private getAvailablePackagesList;
4169
+ }
4170
+
4171
+ /**
4172
+ * NonSenderObjectValidator ensures objects are not owned by the transaction sender
4173
+ *
4174
+ * In Sui, this validator checks that objects are:
4175
+ * - Shared: globally accessible, mutations require consensus
4176
+ * - Immutable: can't change after creation
4177
+ * - Owned by another address (not the sender)
4178
+ *
4179
+ * This prevents the sender from using their own owned objects in the transaction
4180
+ */
4181
+ declare class NonSenderObjectValidator implements IPTBValidator {
4182
+ private sender;
4183
+ constructor(sender: string);
3971
4184
  /**
3972
- * Set delegate for the counter
3973
- * @param tx - The transaction to add the move call to
3974
- * @param newDelegate - The new delegate address or transaction argument
4185
+ * Validates that objects are not owned by the sender
4186
+ * @param moveCallsWithDetails - Array of move calls with object details
4187
+ * @throws Error if any object is owned by the sender
3975
4188
  */
3976
- setDelegateMoveCall(tx: Transaction, newDelegate: string | TransactionArgument): void;
4189
+ validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): void;
3977
4190
  /**
3978
- * Set LayerZero compose information for counter
3979
- * @param tx - The transaction to add the move call to
3980
- * @param lzComposeInfo - LayerZero compose information as bytes
4191
+ * Checks if the ownership is valid (not owned by sender)
4192
+ * @param owner - The object owner to check
4193
+ * @returns true if ownership is valid (Shared, Immutable, or owned by another address)
3981
4194
  */
3982
- setLzComposeInfoMoveCall(tx: Transaction, lzComposeInfo: Uint8Array | TransactionArgument): void;
4195
+ private isValidOwnership;
3983
4196
  /**
3984
- * Get call capability address for counter
4197
+ * Gets a human-readable description of the ownership type
4198
+ * @param owner - The object owner
4199
+ * @returns String description of ownership type
4200
+ */
4201
+ private getOwnershipType;
4202
+ }
4203
+
4204
+ /**
4205
+ * ShareObjectValidator ensures all object arguments are Shared or Immutable
4206
+ * This is the default validator for PTB operations
4207
+ */
4208
+ declare class ShareObjectValidator implements IPTBValidator {
4209
+ /**
4210
+ * Validates move calls with pre-fetched object details
4211
+ * @param moveCallsWithDetails - Array of move calls with object details
4212
+ * @throws Error if any object is not Shared/Immutable
4213
+ */
4214
+ validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): void;
4215
+ /**
4216
+ * Checks if an object owner is Shared or Immutable
4217
+ * @param owner - The object owner to check
4218
+ * @returns true if the owner is Shared or Immutable, false otherwise
4219
+ */
4220
+ protected isSharedOrImmutable(owner: ObjectOwner): boolean;
4221
+ }
4222
+
4223
+ /**
4224
+ * Validates move calls using multiple validators with a single object fetch
4225
+ * @param client - SuiClient instance
4226
+ * @param moveCalls - Array of move calls to validate
4227
+ * @param validators - Array of validators to run
4228
+ * @param options - Options for what object data to fetch
4229
+ * @param batchSize - Batch size for object fetching
4230
+ */
4231
+ declare function validateWithDetails(client: SuiClient, moveCalls: MoveCall[], validators: IPTBValidator[], sender?: string, userOptions?: ObjectFetchOptions, batchSize?: number): Promise<void>;
4232
+
4233
+ declare const CounterErrorCode: {
4234
+ readonly Counter_EInvalidMsgType: 0;
4235
+ readonly Counter_EInvalidValue: 1;
4236
+ readonly Counter_EInvalidNonce: 2;
4237
+ readonly Counter_EOnlyEndpoint: 3;
4238
+ readonly Counter_ESelfComposeOnly: 4;
4239
+ readonly Counter_EInvalidOApp: 5;
4240
+ readonly Counter_EInvalidAdminCap: 6;
4241
+ readonly Counter_EAlreadyInitialized: 7;
4242
+ };
4243
+ declare class Counter {
4244
+ #private;
4245
+ private readonly moduleManager;
4246
+ packageId: string;
4247
+ readonly client: SuiClient;
4248
+ private readonly objects;
4249
+ constructor(packageId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
4250
+ /**
4251
+ * Initialize counter with LayerZero receive and compose information
4252
+ * @param tx - The transaction to add the move call to
4253
+ * @param lzReceiveInfo - LayerZero receive information transaction argument
4254
+ * @param lzComposeInfo - LayerZero compose information transaction argument
4255
+ */
4256
+ initCounterMoveCall(tx: Transaction, lzReceiveInfo: TransactionArgument, lzComposeInfo: TransactionArgument): void;
4257
+ /**
4258
+ * Quote messaging fees for sending counter increment
4259
+ * @param dstEid - Destination endpoint ID
4260
+ * @param msgType - Message type (SEND or SEND_AND_CALL)
4261
+ * @param options - Execution options as bytes
4262
+ * @param payInZero - Whether to pay in ZRO tokens
4263
+ * @returns Promise<MessagingFee> - The calculated messaging fees
4264
+ */
4265
+ quote(dstEid: EndpointId | TransactionArgument, msgType: number | TransactionArgument, options: Uint8Array | TransactionArgument, payInZero: boolean | TransactionArgument, validators?: IPTBValidator[]): Promise<MessagingFee>;
4266
+ /**
4267
+ * Increment counter on destination chain
4268
+ * @param tx - The transaction to add the move call to
4269
+ * @param sender - Sender address for ZRO token operations
4270
+ * @param dstEid - Destination endpoint ID
4271
+ * @param msgType - Message type (SEND or SEND_AND_CALL)
4272
+ * @param options - Execution options as bytes
4273
+ * @param sendValue - Value to send with the message
4274
+ * @param nativeFee - Native token fee amount
4275
+ * @param zroFee - ZRO token fee amount
4276
+ * @param refundAddress - Address for fee refunds
4277
+ */
4278
+ incrementMoveCall(tx: Transaction, sender: string, dstEid: EndpointId | TransactionArgument, msgType: number | TransactionArgument, options: Uint8Array | TransactionArgument, sendValue: bigint | TransactionArgument, nativeFee: bigint | TransactionArgument, zroFee: bigint | TransactionArgument, refundAddress: string | TransactionArgument, validators?: IPTBValidator[]): Promise<void>;
4279
+ /**
4280
+ * Set LayerZero compose information for counter
4281
+ * @param tx - The transaction to add the move call to
4282
+ * @param lzComposeInfo - LayerZero compose information as bytes
4283
+ */
4284
+ setLzComposeInfoMoveCall(tx: Transaction, lzComposeInfo: Uint8Array | TransactionArgument): void;
4285
+ /**
4286
+ * Get counter EID
4287
+ * @param tx - The transaction to add the move call to
4288
+ * @returns Transaction result containing the counter EID
4289
+ */
4290
+ getEidMoveCall(tx: Transaction): TransactionResult;
4291
+ /**
4292
+ * Get counter EID
4293
+ * @returns Promise<number> - The counter EID
4294
+ */
4295
+ getEid(): Promise<number>;
4296
+ /**
4297
+ * Get call capability address for counter
3985
4298
  * @param tx - The transaction to add the move call to
3986
4299
  * @returns Transaction result containing the call capability address
3987
4300
  */
@@ -4060,6 +4373,13 @@ declare class Counter {
4060
4373
  lzComposeInfoMoveCall(tx: Transaction): TransactionResult;
4061
4374
  }
4062
4375
 
4376
+ interface OAppInfoV1 {
4377
+ oapp_object: string;
4378
+ next_nonce_info: number[];
4379
+ lz_receive_info: number[];
4380
+ extra_info: number[];
4381
+ }
4382
+
4063
4383
  declare const OAppErrorCode: {
4064
4384
  readonly OApp_EAlreadyInited: 1;
4065
4385
  readonly OApp_EChannelNotInited: 2;
@@ -4076,9 +4396,11 @@ declare class OApp {
4076
4396
  #private;
4077
4397
  private readonly moduleManager;
4078
4398
  packageId: string;
4399
+ oappCallCapId: string;
4079
4400
  readonly client: SuiClient;
4401
+ oappInfo: OAppInfoV1 | null;
4080
4402
  private readonly objects;
4081
- constructor(packageId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
4403
+ constructor(packageId: string, oappCallCapId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
4082
4404
  /**
4083
4405
  * Set enforced options for OApp messaging
4084
4406
  * @param tx - The transaction to add the move call to
@@ -4088,7 +4410,7 @@ declare class OApp {
4088
4410
  * @param msgType - Message type or transaction argument
4089
4411
  * @param options - Enforced options as bytes or transaction argument
4090
4412
  */
4091
- setEnforcedOptionsMoveCall(tx: Transaction, oapp: string | TransactionArgument, adminCap: string | TransactionArgument, eid: number | TransactionArgument, msgType: number | TransactionArgument, options: Uint8Array | TransactionArgument): void;
4413
+ setEnforcedOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument, options: Uint8Array | TransactionArgument): Promise<void>;
4092
4414
  /**
4093
4415
  * Set peer OApp on another chain
4094
4416
  * @param tx - The transaction to add the move call to
@@ -4097,33 +4419,33 @@ declare class OApp {
4097
4419
  * @param eid - Peer endpoint ID or transaction argument
4098
4420
  * @param peer - Peer OApp address as bytes or transaction argument
4099
4421
  */
4100
- setPeerMoveCall(tx: Transaction, oapp: string | TransactionArgument, adminCap: string | TransactionArgument, eid: number | TransactionArgument, peer: Uint8Array | TransactionArgument): void;
4422
+ setPeerMoveCall(tx: Transaction, eid: number | TransactionArgument, peer: Uint8Array | TransactionArgument): Promise<void>;
4101
4423
  /**
4102
- * Get admin address for OApp
4424
+ * Get admin capability address for OApp
4103
4425
  * @param tx - The transaction to add the move call to
4104
4426
  * @param oapp - The OApp object ID or transaction argument
4105
- * @returns Transaction result containing the admin address
4427
+ * @returns Transaction result containing the admin capability address
4106
4428
  */
4107
- getAdminMoveCall(tx: Transaction, oapp: string | TransactionArgument): TransactionResult;
4429
+ getAdminCapMoveCall(tx: Transaction, oapp: string | TransactionArgument): TransactionResult;
4108
4430
  /**
4109
- * Get admin address for OApp
4431
+ * Get admin capability address for OApp
4110
4432
  * @param oapp - The OApp object ID
4111
- * @returns Promise<string> - The admin address
4433
+ * @returns Promise<string> - The admin capability address
4112
4434
  */
4113
- getAdmin(oapp: string): Promise<string>;
4435
+ getAdminCap(oapp: string): Promise<string>;
4114
4436
  /**
4115
- * Get OApp address (call capability ID)
4437
+ * Get OApp CallCap identifier
4116
4438
  * @param tx - The transaction to add the move call to
4117
4439
  * @param oapp - The OApp object ID or transaction argument
4118
- * @returns Transaction result containing the OApp address
4440
+ * @returns Transaction result containing the OApp CallCap identifier
4119
4441
  */
4120
- getOAppAddressMoveCall(tx: Transaction, oapp: string | TransactionArgument): TransactionResult;
4442
+ getOAppCapIdMoveCall(tx: Transaction): Promise<TransactionResult>;
4121
4443
  /**
4122
- * Get OApp address (call capability ID)
4123
- * @param oapp - The OApp object ID
4124
- * @returns Promise<string> - The OApp address
4444
+ * Get OApp CallCap identifier
4445
+ * @param oapp - The OApp object ID (optional, uses configured oapp if not provided)
4446
+ * @returns Promise<string> - The OApp CallCap identifier
4125
4447
  */
4126
- getOAppAddress(oapp: string): Promise<string>;
4448
+ getOAppCapId(): Promise<string>;
4127
4449
  /**
4128
4450
  * Combine enforced options with extra options for message execution
4129
4451
  * @param tx - The transaction to add the move call to
@@ -4133,7 +4455,7 @@ declare class OApp {
4133
4455
  * @param extraOptions - Extra options to combine with enforced options or transaction argument
4134
4456
  * @returns Transaction result containing combined options
4135
4457
  */
4136
- combineOptionsMoveCall(tx: Transaction, oapp: string | TransactionArgument, eid: number | TransactionArgument, msgType: number | TransactionArgument, extraOptions: Uint8Array | TransactionArgument): TransactionResult;
4458
+ combineOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument, extraOptions: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4137
4459
  /**
4138
4460
  * Combine enforced options with extra options for message execution
4139
4461
  * @param oapp - The OApp object ID
@@ -4142,7 +4464,7 @@ declare class OApp {
4142
4464
  * @param extraOptions - Extra options to combine with enforced options
4143
4465
  * @returns Promise<Uint8Array> - Combined options as bytes
4144
4466
  */
4145
- combineOptions(oapp: string, eid: number, msgType: number, extraOptions: Uint8Array): Promise<Uint8Array>;
4467
+ combineOptions(eid: number, msgType: number, extraOptions: Uint8Array): Promise<Uint8Array>;
4146
4468
  /**
4147
4469
  * Get enforced options for a specific destination and message type
4148
4470
  * @param tx - The transaction to add the move call to
@@ -4151,7 +4473,7 @@ declare class OApp {
4151
4473
  * @param msgType - Message type or transaction argument
4152
4474
  * @returns Transaction result containing enforced options
4153
4475
  */
4154
- getEnforcedOptionsMoveCall(tx: Transaction, oapp: string | TransactionArgument, eid: number | TransactionArgument, msgType: number | TransactionArgument): TransactionResult;
4476
+ getEnforcedOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument): Promise<TransactionResult>;
4155
4477
  /**
4156
4478
  * Get enforced options for a specific destination and message type
4157
4479
  * @param oapp - The OApp object ID
@@ -4159,7 +4481,7 @@ declare class OApp {
4159
4481
  * @param msgType - Message type
4160
4482
  * @returns Promise<Uint8Array> - Enforced options as bytes
4161
4483
  */
4162
- getEnforcedOptions(oapp: string, eid: number, msgType: number): Promise<Uint8Array>;
4484
+ getEnforcedOptions(eid: number, msgType: number): Promise<Uint8Array>;
4163
4485
  /**
4164
4486
  * Check if a peer is configured for a specific destination chain
4165
4487
  * @param tx - The transaction to add the move call to
@@ -4167,14 +4489,14 @@ declare class OApp {
4167
4489
  * @param dstEid - Destination endpoint ID or transaction argument
4168
4490
  * @returns Transaction result containing boolean result
4169
4491
  */
4170
- hasPeerMoveCall(tx: Transaction, oapp: string | TransactionArgument, dstEid: number | TransactionArgument): TransactionResult;
4492
+ hasPeerMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
4171
4493
  /**
4172
4494
  * Check if a peer is configured for a specific destination chain
4173
4495
  * @param oapp - The OApp object ID
4174
4496
  * @param dstEid - Destination endpoint ID
4175
4497
  * @returns Promise<boolean> - True if peer is configured, false otherwise
4176
4498
  */
4177
- hasPeer(oapp: string, dstEid: number): Promise<boolean>;
4499
+ hasPeer(dstEid: number): Promise<boolean>;
4178
4500
  /**
4179
4501
  * Get the configured peer address for a specific destination chain
4180
4502
  * @param tx - The transaction to add the move call to
@@ -4182,14 +4504,111 @@ declare class OApp {
4182
4504
  * @param dstEid - Destination endpoint ID or transaction argument
4183
4505
  * @returns Transaction result containing peer address
4184
4506
  */
4185
- getPeerMoveCall(tx: Transaction, oapp: string | TransactionArgument, dstEid: number | TransactionArgument): TransactionResult;
4507
+ getPeerMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
4186
4508
  /**
4187
4509
  * Get the configured peer address for a specific destination chain
4188
4510
  * @param oapp - The OApp object ID
4189
4511
  * @param dstEid - Destination endpoint ID
4190
4512
  * @returns Promise<Uint8Array> - Peer address as bytes32
4191
4513
  */
4192
- getPeer(oapp: string, dstEid: number): Promise<Uint8Array>;
4514
+ getPeer(dstEid: number): Promise<Uint8Array>;
4515
+ getOAppInfoV1MoveCall(tx: Transaction): TransactionResult;
4516
+ getOAppInfoV1(): Promise<OAppInfoV1>;
4517
+ /**
4518
+ * Register OApp with the endpoint
4519
+ * @param tx - The transaction to add the move call to
4520
+ * @param oappInfo - OApp information as bytes (optional)
4521
+ * @returns Transaction result containing the messaging channel address
4522
+ */
4523
+ registerOAppMoveCall(tx: Transaction, oappInfo?: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4524
+ /**
4525
+ * Set delegate for OApp
4526
+ * @param tx - The transaction to add the move call to
4527
+ * @param newDelegate - New delegate address
4528
+ */
4529
+ setDelegateMoveCall(tx: Transaction, newDelegate: string | TransactionArgument): Promise<void>;
4530
+ /**
4531
+ * Set OApp information in the endpoint
4532
+ * @param tx - The transaction to add the move call to
4533
+ * @param oappInfo - OApp information as bytes
4534
+ */
4535
+ setOAppInfoMoveCall(tx: Transaction, oappInfo: Uint8Array | TransactionArgument): Promise<void>;
4536
+ /**
4537
+ * Initialize channel with remote OApp
4538
+ * @param tx - The transaction to add the move call to
4539
+ * @param remoteEid - Remote endpoint ID
4540
+ * @param remoteOApp - Remote OApp address as bytes32
4541
+ */
4542
+ initChannelMoveCall(tx: Transaction, remoteEid: number | TransactionArgument, remoteOApp: Uint8Array | TransactionArgument): Promise<void>;
4543
+ /**
4544
+ * Clear a message from the messaging channel
4545
+ * @param tx - The transaction to add the move call to
4546
+ * @param srcEid - Source endpoint ID
4547
+ * @param sender - Sender address as bytes32
4548
+ * @param nonce - Message nonce
4549
+ * @param guid - Message GUID as bytes32
4550
+ * @param message - Message payload
4551
+ */
4552
+ clearMoveCall(tx: Transaction, srcEid: number | TransactionArgument, sender: Uint8Array | TransactionArgument, nonce: number | bigint | TransactionArgument, guid: Uint8Array | TransactionArgument, message: Uint8Array | TransactionArgument): Promise<void>;
4553
+ /**
4554
+ * Skip a message in the messaging channel
4555
+ * @param tx - The transaction to add the move call to
4556
+ * @param srcEid - Source endpoint ID
4557
+ * @param sender - Sender address as bytes32
4558
+ * @param nonce - Message nonce
4559
+ */
4560
+ skipMoveCall(tx: Transaction, srcEid: number | TransactionArgument, sender: Uint8Array | TransactionArgument, nonce: number | bigint | TransactionArgument): Promise<void>;
4561
+ /**
4562
+ * Nilify a message in the messaging channel
4563
+ * @param tx - The transaction to add the move call to
4564
+ * @param srcEid - Source endpoint ID
4565
+ * @param sender - Sender address as bytes32
4566
+ * @param nonce - Message nonce
4567
+ * @param payloadHash - Payload hash as bytes32
4568
+ */
4569
+ nilifyMoveCall(tx: Transaction, srcEid: number | TransactionArgument, sender: Uint8Array | TransactionArgument, nonce: number | bigint | TransactionArgument, payloadHash: Uint8Array | TransactionArgument): Promise<void>;
4570
+ /**
4571
+ * Burn a message in the messaging channel
4572
+ * @param tx - The transaction to add the move call to
4573
+ * @param srcEid - Source endpoint ID
4574
+ * @param sender - Sender address as bytes32
4575
+ * @param nonce - Message nonce
4576
+ * @param payloadHash - Payload hash as bytes32
4577
+ */
4578
+ burnMoveCall(tx: Transaction, srcEid: number | TransactionArgument, sender: Uint8Array | TransactionArgument, nonce: number | bigint | TransactionArgument, payloadHash: Uint8Array | TransactionArgument): Promise<void>;
4579
+ /**
4580
+ * Set send library for a destination chain
4581
+ * @param tx - The transaction to add the move call to
4582
+ * @param dstEid - Destination endpoint ID
4583
+ * @param sendLibrary - Send library address
4584
+ */
4585
+ setSendLibraryMoveCall(tx: Transaction, dstEid: number | TransactionArgument, sendLibrary: string | TransactionArgument): Promise<void>;
4586
+ /**
4587
+ * Set receive library for a source chain
4588
+ * @param tx - The transaction to add the move call to
4589
+ * @param srcEid - Source endpoint ID
4590
+ * @param receiveLibrary - Receive library address
4591
+ * @param gracePeriod - Grace period in seconds
4592
+ */
4593
+ setReceiveLibraryMoveCall(tx: Transaction, srcEid: number | TransactionArgument, receiveLibrary: string | TransactionArgument, gracePeriod: number | bigint | TransactionArgument): Promise<void>;
4594
+ /**
4595
+ * Set receive library timeout for a source chain
4596
+ * @param tx - The transaction to add the move call to
4597
+ * @param srcEid - Source endpoint ID
4598
+ * @param receiveLibrary - Receive library address
4599
+ * @param expiry - Expiry timestamp in seconds
4600
+ */
4601
+ setReceiveLibraryTimeoutMoveCall(tx: Transaction, srcEid: number | TransactionArgument, receiveLibrary: string | TransactionArgument, expiry: number | bigint | TransactionArgument): Promise<void>;
4602
+ /**
4603
+ * Set configuration for a message library
4604
+ * @param tx - The transaction to add the move call to
4605
+ * @param lib - Library address
4606
+ * @param eid - Endpoint ID
4607
+ * @param configType - Configuration type
4608
+ * @param config - Configuration data as bytes
4609
+ * @returns Transaction result containing Call<MessageLibSetConfigParam, Void>
4610
+ */
4611
+ setConfigMoveCall(tx: Transaction, lib: string | TransactionArgument, eid: number | TransactionArgument, configType: number | TransactionArgument, config: Uint8Array | TransactionArgument): Promise<TransactionResult>;
4193
4612
  }
4194
4613
 
4195
4614
  /**
@@ -4781,228 +5200,6 @@ declare class Zro {
4781
5200
  noneOptionMoveCall(tx: Transaction): TransactionResult;
4782
5201
  }
4783
5202
 
4784
- /**
4785
- * Type guard to check if a value is already a TransactionArgument
4786
- * TransactionArgument can be:
4787
- * 1. Argument object with $kind property
4788
- * 2. Synchronous function: (tx: Transaction) => Argument
4789
- * 3. Asynchronous function: AsyncTransactionThunk
4790
- */
4791
- declare function isTransactionArgument(value: unknown): value is TransactionArgument;
4792
- /**
4793
- * Convert value to TransactionArgument using a simple converter function
4794
- * @param value - The value to convert (primitive type or TransactionArgument)
4795
- * @param converter - Function to convert primitive type to TransactionArgument
4796
- * @returns TransactionArgument
4797
- */
4798
- declare function asArg<T>(value: T | TransactionArgument, converter: (val: T) => TransactionArgument): TransactionArgument;
4799
- /**
4800
- * Convert value to TransactionArgument using a converter that requires Transaction
4801
- * @param tx - The transaction
4802
- * @param value - The value to convert
4803
- * @param converter - Function to convert value using transaction
4804
- * @returns TransactionArgument
4805
- */
4806
- declare function asArgWithTx<T>(tx: Transaction, value: T | TransactionArgument, converter: (tx: Transaction, val: T) => TransactionArgument): TransactionArgument;
4807
- /**
4808
- * Async version: Convert value to TransactionArgument using an async converter that requires Transaction
4809
- * @param tx - The transaction
4810
- * @param value - The value to convert
4811
- * @param converter - Async function to convert value using transaction
4812
- * @returns Promise<TransactionArgument>
4813
- */
4814
- declare function asArgWithTxAsync<T>(tx: Transaction, value: T | TransactionArgument, converter: (tx: Transaction, val: T) => Promise<TransactionArgument>): Promise<TransactionArgument>;
4815
- /**
4816
- * Convert to object reference TransactionArgument
4817
- */
4818
- declare function asObject(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
4819
- /**
4820
- * Convert to address TransactionArgument
4821
- */
4822
- declare function asAddress(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
4823
- /**
4824
- * Convert to u8 TransactionArgument
4825
- */
4826
- declare function asU8(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
4827
- /**
4828
- * Convert to u16 TransactionArgument
4829
- */
4830
- declare function asU16(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
4831
- /**
4832
- * Convert to u32 TransactionArgument
4833
- */
4834
- declare function asU32(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
4835
- /**
4836
- * Convert to u64 TransactionArgument (supports bigint, number, or string)
4837
- */
4838
- declare function asU64(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
4839
- /**
4840
- * Convert to u128 TransactionArgument (supports bigint, number, or string)
4841
- */
4842
- declare function asU128(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
4843
- /**
4844
- * Convert to u256 TransactionArgument (supports bigint, number, or string)
4845
- */
4846
- declare function asU256(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
4847
- /**
4848
- * Convert Uint8Array to Bytes32 using moduleManager's fromBytesMoveCall
4849
- * @param tx - The transaction
4850
- * @param value - Uint8Array or TransactionArgument
4851
- * @param utils - utils Module
4852
- * @returns TransactionArgument
4853
- */
4854
- declare function asBytes32(tx: Transaction, value: Uint8Array | TransactionArgument, utils: Utils): TransactionArgument;
4855
- /**
4856
- * Convert Uint8Array to serialized bytes vector TransactionArgument
4857
- * @param tx - The transaction
4858
- * @param value - Uint8Array or TransactionArgument
4859
- * @returns TransactionArgument
4860
- */
4861
- declare function asBytes(tx: Transaction, value: Uint8Array | TransactionArgument): TransactionArgument;
4862
- /**
4863
- * Convert Uint8Array Vector to serialized bytes vector TransactionArgument
4864
- * @param tx - The transaction
4865
- * @param value - Uint8Array or TransactionArgument
4866
- * @returns TransactionArgument
4867
- */
4868
- declare function asBytesVector(tx: Transaction, value: Uint8Array[] | TransactionArgument): TransactionArgument;
4869
- /**
4870
- * Convert string to string TransactionArgument
4871
- * @param tx - The transaction
4872
- * @param value - string or TransactionArgument
4873
- * @returns TransactionArgument
4874
- */
4875
- declare function asString(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
4876
- /**
4877
- * Convert address array to serialized vector<address> TransactionArgument
4878
- * @param tx - The transaction
4879
- * @param value - string[] or TransactionArgument
4880
- * @returns TransactionArgument
4881
- */
4882
- declare function asAddressVector(tx: Transaction, value: string[] | TransactionArgument): TransactionArgument;
4883
- /**
4884
- * Convert boolean to boolean TransactionArgument
4885
- * @param tx - The transaction
4886
- * @param value - boolean or TransactionArgument
4887
- * @returns TransactionArgument
4888
- */
4889
- declare function asBool(tx: Transaction, value: boolean | TransactionArgument): TransactionArgument;
4890
-
4891
- declare function simulateTransaction(suiClient: SuiClient, tx: Transaction, sender?: string): Promise<SimulateResult[]>;
4892
- declare function simulateTransactionMultiResult(suiClient: SuiClient, tx: Transaction, resultIndex: number[], sender?: string): Promise<SimulateResult[][]>;
4893
- declare function validateTransaction(client: SuiClient, signer: Keypair, tx: Transaction): Promise<SuiTransactionBlockResponse>;
4894
- /**
4895
- * Execute simulate using a moveCall function
4896
- * @param client - The Sui client
4897
- * @param moveCallFn - Function that adds moveCall to the transaction
4898
- * @param parser - Function to parse the result
4899
- * @returns The parsed result
4900
- */
4901
- declare function executeSimulate<T>(client: SuiClient, moveCallFn: (tx: Transaction) => void, parser: (result: {
4902
- value: Uint8Array;
4903
- }[]) => T): Promise<T>;
4904
- declare function handleError(e: string): unknown;
4905
-
4906
- /**
4907
- * PackageAllowlistValidator ensures all function calls and objects belong to allowlisted packages
4908
- * This validator checks that:
4909
- * 1. All function calls target approved packages
4910
- * 2. All object arguments come from approved packages
4911
- *
4912
- * If local packageWhitelist is empty, it will use the PTB whitelist contract for validation
4913
- * If local packageWhitelist is provided, it will use only the local whitelist (contract is ignored)
4914
- */
4915
- declare class PackageAllowlistValidator implements IPTBValidator {
4916
- private packageWhitelist;
4917
- private validator?;
4918
- constructor(packageWhitelist?: string[], validator?: PackageWhitelistValidator);
4919
- /**
4920
- * Validates that all function calls and object arguments belong to whitelisted packages
4921
- * @param moveCallsWithDetails - Array of move calls with object details
4922
- * @throws Error if any function call or object belongs to a non-whitelisted package
4923
- */
4924
- validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): Promise<void>;
4925
- /**
4926
- * Validate multiple packages at once
4927
- * @param packages - Array of package IDs to validate
4928
- * @returns Object mapping package ID to validation result
4929
- */
4930
- private validatePackages;
4931
- /**
4932
- * Extracts package ID from object type string
4933
- * Object types are in format: "packageId::module::struct<generics>"
4934
- * @param objectType - The object type string
4935
- * @returns The package ID or null if extraction fails
4936
- */
4937
- private extractPackageIdFromType;
4938
- /**
4939
- * Get available packages for error messages
4940
- */
4941
- private getAvailablePackagesList;
4942
- }
4943
-
4944
- /**
4945
- * NonSenderObjectValidator ensures objects are not owned by the transaction sender
4946
- *
4947
- * In Sui, this validator checks that objects are:
4948
- * - Shared: globally accessible, mutations require consensus
4949
- * - Immutable: can't change after creation
4950
- * - Owned by another address (not the sender)
4951
- *
4952
- * This prevents the sender from using their own owned objects in the transaction
4953
- */
4954
- declare class NonSenderObjectValidator implements IPTBValidator {
4955
- private sender;
4956
- constructor(sender: string);
4957
- /**
4958
- * Validates that objects are not owned by the sender
4959
- * @param moveCallsWithDetails - Array of move calls with object details
4960
- * @throws Error if any object is owned by the sender
4961
- */
4962
- validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): void;
4963
- /**
4964
- * Checks if the ownership is valid (not owned by sender)
4965
- * @param owner - The object owner to check
4966
- * @returns true if ownership is valid (Shared, Immutable, or owned by another address)
4967
- */
4968
- private isValidOwnership;
4969
- /**
4970
- * Gets a human-readable description of the ownership type
4971
- * @param owner - The object owner
4972
- * @returns String description of ownership type
4973
- */
4974
- private getOwnershipType;
4975
- }
4976
-
4977
- /**
4978
- * ShareObjectValidator ensures all object arguments are Shared or Immutable
4979
- * This is the default validator for PTB operations
4980
- */
4981
- declare class ShareObjectValidator implements IPTBValidator {
4982
- /**
4983
- * Validates move calls with pre-fetched object details
4984
- * @param moveCallsWithDetails - Array of move calls with object details
4985
- * @throws Error if any object is not Shared/Immutable
4986
- */
4987
- validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): void;
4988
- /**
4989
- * Checks if an object owner is Shared or Immutable
4990
- * @param owner - The object owner to check
4991
- * @returns true if the owner is Shared or Immutable, false otherwise
4992
- */
4993
- protected isSharedOrImmutable(owner: ObjectOwner): boolean;
4994
- }
4995
-
4996
- /**
4997
- * Validates move calls using multiple validators with a single object fetch
4998
- * @param client - SuiClient instance
4999
- * @param moveCalls - Array of move calls to validate
5000
- * @param validators - Array of validators to run
5001
- * @param options - Options for what object data to fetch
5002
- * @param batchSize - Batch size for object fetching
5003
- */
5004
- declare function validateWithDetails(client: SuiClient, moveCalls: MoveCall[], validators: IPTBValidator[], sender?: string, userOptions?: ObjectFetchOptions, batchSize?: number): Promise<void>;
5005
-
5006
5203
  declare const PACKAGE_UTILS_ADDRESS: {
5007
5204
  [stage in Stage]?: string;
5008
5205
  };
@@ -5081,6 +5278,12 @@ declare const PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS: {
5081
5278
  declare const PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS: {
5082
5279
  [stage in Stage]?: string;
5083
5280
  };
5281
+ declare const PACKAGE_WORKER_REGISTRY_ADDRESS: {
5282
+ [stage in Stage]?: string;
5283
+ };
5284
+ declare const PACKAGE_WORKER_COMMON_ADDRESS: {
5285
+ [stage in Stage]?: string;
5286
+ };
5084
5287
  declare const OBJECT_ENDPOINT_V2_ADDRESS: {
5085
5288
  [stage in Stage]?: string;
5086
5289
  };
@@ -5174,6 +5377,9 @@ declare const OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS: {
5174
5377
  declare const OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS: {
5175
5378
  [stage in Stage]?: string;
5176
5379
  };
5380
+ declare const OBJECT_WORKER_REGISTRY_ADDRESS: {
5381
+ [stage in Stage]?: string;
5382
+ };
5177
5383
 
5178
5384
  /**
5179
5385
  * The SDK class provides methods to interact with LayerZero on Sui.
@@ -5200,7 +5406,7 @@ declare class SDK {
5200
5406
  getPtbBuilder(): PtbBuilder;
5201
5407
  getTreasury(): Treasury;
5202
5408
  getLayerZeroViews(): LayerZeroViews;
5203
- getOApp(): OApp;
5409
+ getOApp(callCapId: string, options?: ModuleOptions): OApp;
5204
5410
  getCounter(options?: ModuleOptions): Counter;
5205
5411
  getExecutor(options?: ModuleOptions): Executor;
5206
5412
  getDvn(options?: ModuleOptions): DVN;
@@ -5216,6 +5422,7 @@ declare class SDK {
5216
5422
  getEndpointPtbBuilder(options?: ModuleOptions): EndpointPtbBuilder;
5217
5423
  getSimpleMessageLibPtbBuilder(options?: ModuleOptions): SimpleMessageLibPtbBuilder;
5218
5424
  getBlockedMessageLibPtbBuilder(options?: ModuleOptions): BlockedMessageLibPtbBuilder;
5425
+ getWorkerRegistry(options?: ModuleOptions): WorkerRegistry;
5219
5426
  getOrCreateModule<T>(moduleName: string, options: ModuleOptions | undefined, factory: () => T): T;
5220
5427
  }
5221
5428
 
@@ -5229,6 +5436,14 @@ declare const DvnDstConfigBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
5229
5436
  floor_margin_usd: string | number | bigint;
5230
5437
  }>;
5231
5438
 
5439
+ declare const TimeoutBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
5440
+ expiry: string;
5441
+ fallback_lib: string;
5442
+ }, {
5443
+ expiry: string | number | bigint;
5444
+ fallback_lib: any;
5445
+ }>;
5446
+
5232
5447
  declare const Bytes32Bcs: _mysten_sui_dist_cjs_bcs.BcsType<{
5233
5448
  bytes: number[];
5234
5449
  }, {
@@ -5403,6 +5618,24 @@ declare const VectorMoveCallBCS: _mysten_sui_dist_cjs_bcs.BcsType<{
5403
5618
  length: number;
5404
5619
  }>;
5405
5620
 
5621
+ declare const OAppInfoV1Bcs: _mysten_sui_dist_cjs_bcs.BcsType<{
5622
+ oapp_object: string;
5623
+ next_nonce_info: number[];
5624
+ lz_receive_info: number[];
5625
+ extra_info: number[];
5626
+ }, {
5627
+ oapp_object: any;
5628
+ next_nonce_info: Iterable<number> & {
5629
+ length: number;
5630
+ };
5631
+ lz_receive_info: Iterable<number> & {
5632
+ length: number;
5633
+ };
5634
+ extra_info: Iterable<number> & {
5635
+ length: number;
5636
+ };
5637
+ }>;
5638
+
5406
5639
  declare const PriceBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
5407
5640
  price_ratio: string;
5408
5641
  gas_price_in_unit: string;
@@ -5470,12 +5703,4 @@ declare const OAppUlnConfigBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
5470
5703
  };
5471
5704
  }>;
5472
5705
 
5473
- declare const TimeoutBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
5474
- expiry: string;
5475
- fallback_lib: string;
5476
- }, {
5477
- expiry: string | number | bigint;
5478
- fallback_lib: any;
5479
- }>;
5480
-
5481
- export { ALL_EXECUTOR_OPTION_TYPES, type ArbitrumPriceExt, ArbitrumPriceExtBcs, type Argument, ArgumentBCS, BlockedMessageLib, BlockedMessageLibErrorCode, BlockedMessageLibPtbBuilder, type BuilderPlaceholderInfo, Bytes32Bcs, CONFIG_TYPE, Call, CallErrorCode, CallTypeName, Counter, CounterErrorCode, DEFAULT_SIMULATION_TIMES, DVN, DVNErrorCode, DVNFeeLib, DVNFeeLibErrorCode, type DstConfig, DstConfigBcs, type DvnDstConfig, DvnDstConfigBcs, DvnLayerZero, DvnPtbBuilder, Endpoint, EndpointErrorCode, EndpointExecutionState, type EndpointExecutionStateType, EndpointPtbBuilder, type ExecutableParams, Executor, type ExecutorConfig, ExecutorConfigBcs, ExecutorErrorCode, ExecutorFeeLib, ExecutorFeeLibErrorCode, ExecutorLayerZero, ExecutorOptionType, ExecutorPtbBuilder, type Function, FunctionBCS, type IPTBValidator, type InitializableParams, LayerZeroViews, LibBuilderManagerErrorCode, LzComposeVersion, LzReceiveVersion, LzTypeName, MAX_BATCH_SIZE, MessageLibType, type MessagingFee, MessagingFeeBcs, ModelType, ModelTypeBcs, type ModuleOptions, Modules, MoveAbortError, type MoveCall, MoveCallBCS, type NativeDropParams, NativeDropParamsBcs, NonSenderObjectValidator, OApp, OAppErrorCode, type OAppUlnConfig, OAppUlnConfigBcs, OBJECT_BLOCKED_MESSAGE_LIB_ADDRESS, OBJECT_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS, OBJECT_COUNTER_ADDRESS, OBJECT_COUNTER_ADMIN_CAP_ADDRESS, OBJECT_COUNTER_OAPP_ADDRESS, OBJECT_DISCOVERY_ADDRESS, OBJECT_DVN_ADDRESS, OBJECT_DVN_CAP_ADDRESS, OBJECT_DVN_FEE_LIB_ADDRESS, OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_PTB_BUILDER_ADDRESS, OBJECT_ENDPOINT_PTB_BUILDER_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_V2_ADDRESS, OBJECT_EXECUTOR_ADDRESS, OBJECT_EXECUTOR_CAP_ADDRESS, OBJECT_EXECUTOR_FEE_LIB_ADDRESS, OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS, OBJECT_EXECUTOR_OWNER_CAP_ADDRESS, OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS, OBJECT_PRICE_FEED_ADDRESS, OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_ADMIN_CAP_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS, OBJECT_TREASURY_ADDRESS, OBJECT_TREASURY_ADMIN_CAP_ADDRESS, OBJECT_ULN_302_ADDRESS, OBJECT_ULN_302_ADMIN_CAP_ADDRESS, OBJECT_ULN_302_PTB_BUILDER_ADDRESS, OBJECT_ULN_302_VERIFICATION_ADDRESS, type ObjectFetchOptions, type ObjectOptions, PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS, PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS, PACKAGE_CALL_ADDRESS, PACKAGE_COUNTER_V2_ADDRESS, PACKAGE_DVN_ADDRESS, PACKAGE_DVN_FEE_LIB_ADDRESS, PACKAGE_DVN_LAYERZERO_ADDRESS, PACKAGE_DVN_PTB_BUILDER_ADDRESS, PACKAGE_ENDPOINT_PTB_BUILDER_ADDRESS, PACKAGE_ENDPOINT_V2_ADDRESS, PACKAGE_EXECUTOR_ADDRESS, PACKAGE_EXECUTOR_FEE_LIB_ADDRESS, PACKAGE_EXECUTOR_LAYERZERO_ADDRESS, PACKAGE_EXECUTOR_PTB_BUILDER_ADDRESS, PACKAGE_LAYERZERO_VIEWS_ADDRESS, PACKAGE_OAPP_ADDRESS, PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS, PACKAGE_PRICE_FEED_ADDRESS, PACKAGE_PTB_MOVE_CALL_ADDRESS, PACKAGE_SIMPLE_MESSAGE_LIB_ADDRESS, PACKAGE_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS, PACKAGE_TREASURY_ADDRESS, PACKAGE_ULN_302_ADDRESS, PACKAGE_ULN_302_PTB_BUILDER_ADDRESS, PACKAGE_UTILS_ADDRESS, PACKAGE_ZRO_ADDRESS, PackageAllowlistValidator, type PackageOptions, PackageWhitelistValidator, type Price, PriceBcs, PriceFeed, PriceFeedErrorCode, PtbBuilder, SDK, type SdkOptions, type SetDstConfigEvent, ShareObjectValidator, SimpleMessageLib, SimpleMessageLibErrorCode, SimpleMessageLibPtbBuilder, type SimulateResult, type Timeout, TimeoutBcs, Treasury, TreasuryErrorCode, Uln302, Uln302ErrorCode, Uln302PtbBuilder, type UlnConfig, UlnConfigBcs, type UlnVerifiableParams, UlnVerificationState, type UlnVerificationStateType, UnclassifiedError, Utils, UtilsErrorCode, ValidatorErrorCode, VectorMoveCallBCS, type VerifiableParams, type VerifierFeePaid, type VersionInfo, Zro, asAddress, asAddressVector, asArg, asArgWithTx, asArgWithTxAsync, asBool, asBytes, asBytes32, asBytesVector, asObject, asString, asU128, asU16, asU256, asU32, asU64, asU8, executeSimulate, handleError, isTransactionArgument, simulateTransaction, simulateTransactionMultiResult, validateTransaction, validateWithDetails };
5706
+ export { ALL_EXECUTOR_OPTION_TYPES, type ArbitrumPriceExt, ArbitrumPriceExtBcs, type Argument, ArgumentBCS, BlockedMessageLib, BlockedMessageLibErrorCode, BlockedMessageLibPtbBuilder, type BuilderPlaceholderInfo, Bytes32Bcs, CONFIG_TYPE, Call, CallErrorCode, CallTypeName, Counter, CounterErrorCode, DEFAULT_SIMULATION_TIMES, DVN, DVNErrorCode, DVNFeeLib, DVNFeeLibErrorCode, type DstConfig, DstConfigBcs, type DvnDstConfig, DvnDstConfigBcs, DvnLayerZero, DvnPtbBuilder, Endpoint, EndpointErrorCode, EndpointExecutionState, type EndpointExecutionStateType, EndpointPtbBuilder, type ExecutableParams, Executor, type ExecutorConfig, ExecutorConfigBcs, ExecutorErrorCode, ExecutorFeeLib, ExecutorFeeLibErrorCode, ExecutorLayerZero, ExecutorOptionType, ExecutorPtbBuilder, type Function, FunctionBCS, type IPTBValidator, type InitializableParams, LayerZeroViews, LibBuilderManagerErrorCode, LzComposeVersion, LzReceiveVersion, LzTypeName, MAX_BATCH_SIZE, MessageLibType, type MessagingFee, MessagingFeeBcs, ModelType, ModelTypeBcs, type ModuleOptions, Modules, MoveAbortError, type MoveCall, MoveCallBCS, type NativeDropParams, NativeDropParamsBcs, NonSenderObjectValidator, OApp, OAppErrorCode, OAppInfoV1Bcs, OAppInfoVersion, type OAppUlnConfig, OAppUlnConfigBcs, OBJECT_BLOCKED_MESSAGE_LIB_ADDRESS, OBJECT_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS, OBJECT_COUNTER_ADDRESS, OBJECT_COUNTER_ADMIN_CAP_ADDRESS, OBJECT_COUNTER_OAPP_ADDRESS, OBJECT_DISCOVERY_ADDRESS, OBJECT_DVN_ADDRESS, OBJECT_DVN_CAP_ADDRESS, OBJECT_DVN_FEE_LIB_ADDRESS, OBJECT_DVN_FEE_LIB_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_PTB_BUILDER_ADDRESS, OBJECT_ENDPOINT_PTB_BUILDER_ADMIN_CAP_ADDRESS, OBJECT_ENDPOINT_V2_ADDRESS, OBJECT_EXECUTOR_ADDRESS, OBJECT_EXECUTOR_CAP_ADDRESS, OBJECT_EXECUTOR_FEE_LIB_ADDRESS, OBJECT_EXECUTOR_FEE_LIB_ADMIN_CAP_ADDRESS, OBJECT_EXECUTOR_OWNER_CAP_ADDRESS, OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS, OBJECT_PRICE_FEED_ADDRESS, OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_ADMIN_CAP_ADDRESS, OBJECT_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS, OBJECT_TREASURY_ADDRESS, OBJECT_TREASURY_ADMIN_CAP_ADDRESS, OBJECT_ULN_302_ADDRESS, OBJECT_ULN_302_ADMIN_CAP_ADDRESS, OBJECT_ULN_302_PTB_BUILDER_ADDRESS, OBJECT_ULN_302_VERIFICATION_ADDRESS, OBJECT_WORKER_REGISTRY_ADDRESS, type ObjectFetchOptions, type ObjectOptions, PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS, PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS, PACKAGE_CALL_ADDRESS, PACKAGE_COUNTER_V2_ADDRESS, PACKAGE_DVN_ADDRESS, PACKAGE_DVN_FEE_LIB_ADDRESS, PACKAGE_DVN_LAYERZERO_ADDRESS, PACKAGE_DVN_PTB_BUILDER_ADDRESS, PACKAGE_ENDPOINT_PTB_BUILDER_ADDRESS, PACKAGE_ENDPOINT_V2_ADDRESS, PACKAGE_EXECUTOR_ADDRESS, PACKAGE_EXECUTOR_FEE_LIB_ADDRESS, PACKAGE_EXECUTOR_LAYERZERO_ADDRESS, PACKAGE_EXECUTOR_PTB_BUILDER_ADDRESS, PACKAGE_LAYERZERO_VIEWS_ADDRESS, PACKAGE_OAPP_ADDRESS, PACKAGE_PACKAGE_WHITELIST_VALIDATOR_ADDRESS, PACKAGE_PRICE_FEED_ADDRESS, PACKAGE_PTB_MOVE_CALL_ADDRESS, PACKAGE_SIMPLE_MESSAGE_LIB_ADDRESS, PACKAGE_SIMPLE_MESSAGE_LIB_PTB_BUILDER_ADDRESS, PACKAGE_TREASURY_ADDRESS, PACKAGE_ULN_302_ADDRESS, PACKAGE_ULN_302_PTB_BUILDER_ADDRESS, PACKAGE_UTILS_ADDRESS, PACKAGE_WORKER_COMMON_ADDRESS, PACKAGE_WORKER_REGISTRY_ADDRESS, PACKAGE_ZRO_ADDRESS, PackageAllowlistValidator, type PackageOptions, PackageWhitelistValidator, type Price, PriceBcs, PriceFeed, PriceFeedErrorCode, PtbBuilder, SDK, type SdkOptions, type SetDstConfigEvent, ShareObjectValidator, SimpleMessageLib, SimpleMessageLibErrorCode, SimpleMessageLibPtbBuilder, type SimulateResult, type Timeout, TimeoutBcs, Treasury, TreasuryErrorCode, Uln302, Uln302ErrorCode, Uln302PtbBuilder, type UlnConfig, UlnConfigBcs, type UlnVerifiableParams, UlnVerificationState, type UlnVerificationStateType, UnclassifiedError, Utils, UtilsErrorCode, ValidatorErrorCode, VectorMoveCallBCS, type VerifiableParams, type VerifierFeePaid, type VersionInfo, WorkerRegistry, WorkerRegistryErrorCode, Zro, asAddress, asAddressVector, asArg, asArgWithTx, asArgWithTxAsync, asBool, asBytes, asBytes32, asBytesVector, asObject, asString, asU128, asU16, asU256, asU32, asU64, asU8, executeSimulate, handleError, isTransactionArgument, simulateTransaction, simulateTransactionMultiResult, validateTransaction, validateWithDetails };