@layerzerolabs/lz-sui-sdk-v2 3.0.133 → 3.0.134-sui.1
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.
- package/CHANGELOG.md +8 -0
- package/deployments/sui-sandbox-local/blocked_message_lib.json +26 -26
- package/deployments/sui-sandbox-local/blocked_msglib_ptb_builder.json +29 -29
- package/deployments/sui-sandbox-local/counter.json +79 -44
- package/deployments/sui-sandbox-local/dvn.json +15 -14
- package/deployments/sui-sandbox-local/dvn_call_type.json +28 -28
- package/deployments/sui-sandbox-local/dvn_fee_lib.json +27 -27
- package/deployments/sui-sandbox-local/dvn_layerzero.json +24 -24
- package/deployments/sui-sandbox-local/dvn_ptb_builder.json +14 -14
- package/deployments/sui-sandbox-local/endpoint_ptb_builder.json +25 -25
- package/deployments/sui-sandbox-local/endpoint_v2.json +29 -29
- package/deployments/sui-sandbox-local/executor.json +12 -11
- package/deployments/sui-sandbox-local/executor_call_type.json +21 -21
- package/deployments/sui-sandbox-local/executor_fee_lib.json +19 -19
- package/deployments/sui-sandbox-local/executor_layerzero.json +22 -22
- package/deployments/sui-sandbox-local/executor_ptb_builder.json +11 -11
- package/deployments/sui-sandbox-local/layerzero_views.json +21 -21
- package/deployments/sui-sandbox-local/message_lib_common.json +13 -13
- package/deployments/sui-sandbox-local/msglib_ptb_builder_call_types.json +20 -20
- package/deployments/sui-sandbox-local/oapp.json +23 -21
- package/deployments/sui-sandbox-local/object-BlockedMessageLib.json +5 -5
- package/deployments/sui-sandbox-local/object-BlockedMsglibPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Counter.json +5 -5
- package/deployments/sui-sandbox-local/object-CounterAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-CounterOApp.json +5 -5
- package/deployments/sui-sandbox-local/object-DVN.json +2 -2
- package/deployments/sui-sandbox-local/object-DVNCap.json +4 -4
- package/deployments/sui-sandbox-local/object-DVNFeeLib.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointPtbBuilderAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointV2.json +5 -5
- package/deployments/sui-sandbox-local/object-EndpointV2AdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-Executor.json +2 -2
- package/deployments/sui-sandbox-local/object-ExecutorCap.json +3 -3
- package/deployments/sui-sandbox-local/object-ExecutorFeeLib.json +4 -4
- package/deployments/sui-sandbox-local/object-ExecutorOwnerCap.json +2 -2
- package/deployments/sui-sandbox-local/object-PackageWhitelistValidator.json +5 -5
- package/deployments/sui-sandbox-local/object-PriceFeed.json +4 -4
- package/deployments/sui-sandbox-local/object-PriceFeedOwnerCap.json +4 -4
- package/deployments/sui-sandbox-local/object-SimpleMessageLib.json +5 -5
- package/deployments/sui-sandbox-local/object-SimpleMessageLibAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-SmlPtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Treasury.json +5 -5
- package/deployments/sui-sandbox-local/object-TreasuryAdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-ULN302.json +5 -5
- package/deployments/sui-sandbox-local/object-ULN302AdminCap.json +5 -5
- package/deployments/sui-sandbox-local/object-Uln302PtbBuilder.json +5 -5
- package/deployments/sui-sandbox-local/object-Uln302Verification.json +5 -5
- package/deployments/sui-sandbox-local/object-WorkerRegistry.json +9 -0
- package/deployments/sui-sandbox-local/package_whitelist_validator.json +50 -50
- package/deployments/sui-sandbox-local/price_feed.json +26 -26
- package/deployments/sui-sandbox-local/price_feed_call_types.json +19 -19
- package/deployments/sui-sandbox-local/ptb_move_call.json +12 -12
- package/deployments/sui-sandbox-local/sequential_multi_call.json +45 -0
- package/deployments/sui-sandbox-local/simple_message_lib.json +30 -30
- package/deployments/sui-sandbox-local/simple_msglib_ptb_builder.json +26 -26
- package/deployments/sui-sandbox-local/treasury.json +39 -39
- package/deployments/sui-sandbox-local/uln_302.json +42 -42
- package/deployments/sui-sandbox-local/uln_302_ptb_builder.json +25 -25
- package/deployments/sui-sandbox-local/worker_common.json +21 -20
- package/deployments/sui-sandbox-local/worker_registry.json +58 -0
- package/dist/index.cjs +972 -341
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +636 -343
- package/dist/index.d.ts +636 -343
- package/dist/index.mjs +961 -341
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/bcs/index.ts +2 -1
- package/src/bcs/oapp.ts +14 -0
- package/src/generated/addresses.ts +69 -51
- package/src/module-manager.ts +15 -3
- package/src/modules/call.ts +16 -6
- package/src/modules/endpoint.ts +12 -4
- package/src/modules/message-libs/simple-message-lib.ts +3 -2
- package/src/modules/message-libs/uln302.ts +23 -5
- package/src/modules/oapps/counter.ts +34 -50
- package/src/modules/oapps/oapp.ts +489 -74
- package/src/modules/ptb-builders/endpoint-ptb-builder.ts +9 -3
- package/src/modules/ptb-builders/ptb-builder.ts +19 -4
- package/src/modules/ptb-builders/uln302-ptb-builder.ts +5 -0
- package/src/modules/workers/dvn-layerzero.ts +6 -0
- package/src/modules/workers/dvn.ts +74 -0
- package/src/modules/workers/executor-fee-lib.ts +11 -3
- package/src/modules/workers/executor-layerzero.ts +6 -0
- package/src/modules/workers/executor.ts +63 -0
- package/src/modules/workers/index.ts +1 -0
- package/src/modules/workers/treasury.ts +4 -4
- package/src/modules/workers/worker-registry.ts +110 -0
- package/src/resource.ts +3 -0
- package/src/sdk.ts +7 -2
- package/src/types/endpoint.ts +2 -1
- package/src/types/modules.ts +1 -0
- package/src/types/oapp.ts +6 -0
- package/src/types/options.ts +15 -0
- 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
|
*/
|
|
@@ -644,15 +662,21 @@ declare const EndpointErrorCode: {
|
|
|
644
662
|
readonly MessagingChannel_EPayloadHashNotFound: 9;
|
|
645
663
|
readonly MessagingChannel_ESendReentrancy: 10;
|
|
646
664
|
readonly MessagingChannel_EUninitializedChannel: 11;
|
|
665
|
+
readonly MessagingComposer_EComposeExists: 1;
|
|
666
|
+
readonly MessagingComposer_EComposeMessageMismatch: 2;
|
|
667
|
+
readonly MessagingComposer_EComposeNotFound: 3;
|
|
668
|
+
readonly MessagingComposer_EComposerNotRegistered: 4;
|
|
669
|
+
readonly MessagingComposer_EComposerRegistered: 5;
|
|
670
|
+
readonly MessagingComposer_EInvalidLZComposeInfo: 6;
|
|
647
671
|
readonly OAppRegistry_EInvalidLZReceiveInfo: 1;
|
|
648
|
-
readonly
|
|
649
|
-
readonly
|
|
650
|
-
readonly OAppRegistry_EOAppRegistered: 4;
|
|
672
|
+
readonly OAppRegistry_EOAppNotRegistered: 2;
|
|
673
|
+
readonly OAppRegistry_EOAppRegistered: 3;
|
|
651
674
|
readonly Endpoint_EAlreadyInitialized: 1;
|
|
652
675
|
readonly Endpoint_EInvalidEid: 2;
|
|
653
676
|
readonly Endpoint_ENotInitialized: 3;
|
|
654
677
|
readonly Endpoint_ERefundAddressNotFound: 4;
|
|
655
|
-
readonly
|
|
678
|
+
readonly Endpoint_EUnauthorizedOApp: 5;
|
|
679
|
+
readonly Endpoint_EUnauthorizedSendLibrary: 6;
|
|
656
680
|
};
|
|
657
681
|
declare class Endpoint {
|
|
658
682
|
#private;
|
|
@@ -1590,8 +1614,9 @@ declare class BlockedMessageLib {
|
|
|
1590
1614
|
}
|
|
1591
1615
|
|
|
1592
1616
|
declare const SimpleMessageLibErrorCode: {
|
|
1593
|
-
readonly
|
|
1617
|
+
readonly SimpleMessageLib_ENotImplemented: 1;
|
|
1594
1618
|
readonly SimpleMessageLib_EZROFeeNotEnabled: 2;
|
|
1619
|
+
readonly SimpleMessageLib_EInvalidEid: 3;
|
|
1595
1620
|
};
|
|
1596
1621
|
declare class SimpleMessageLib {
|
|
1597
1622
|
#private;
|
|
@@ -1698,10 +1723,22 @@ declare const Uln302ErrorCode: {
|
|
|
1698
1723
|
readonly ReceiveUln302_EInvalidEid: 3;
|
|
1699
1724
|
readonly ReceiveUln302_EOAppUlnConfigNotFound: 4;
|
|
1700
1725
|
readonly ReceiveUln302_EVerifying: 5;
|
|
1701
|
-
readonly
|
|
1702
|
-
readonly
|
|
1703
|
-
readonly
|
|
1704
|
-
readonly
|
|
1726
|
+
readonly Uln302_EInvalidConfigType: 1;
|
|
1727
|
+
readonly Uln302_EInvalidMessagingChannel: 2;
|
|
1728
|
+
readonly Uln302_EUnsupportedEid: 3;
|
|
1729
|
+
readonly UlnConfig_EAtLeastOneDVN: 1;
|
|
1730
|
+
readonly UlnConfig_EDuplicateOptionalDVNs: 2;
|
|
1731
|
+
readonly UlnConfig_EDuplicateRequiredDVNs: 3;
|
|
1732
|
+
readonly UlnConfig_EInvalidOptionalDVNCount: 4;
|
|
1733
|
+
readonly UlnConfig_EInvalidOptionalDVNThreshold: 5;
|
|
1734
|
+
readonly UlnConfig_EInvalidRequiredDVNCount: 6;
|
|
1735
|
+
readonly UlnConfig_EInvalidUlnConfigBytes: 7;
|
|
1736
|
+
readonly OAppUlnConfig_EInvalidConfirmations: 1;
|
|
1737
|
+
readonly OAppUlnConfig_EInvalidRequiredDVNs: 2;
|
|
1738
|
+
readonly OAppUlnConfig_EInvalidOptionalDVNs: 3;
|
|
1739
|
+
readonly ExecutorConfig_EInvalidExecutorAddress: 1;
|
|
1740
|
+
readonly ExecutorConfig_EInvalidExecutorBytes: 2;
|
|
1741
|
+
readonly ExecutorConfig_EZeroMessageSize: 3;
|
|
1705
1742
|
};
|
|
1706
1743
|
declare class Uln302 {
|
|
1707
1744
|
#private;
|
|
@@ -2017,6 +2054,17 @@ declare const DVNErrorCode: {
|
|
|
2017
2054
|
readonly DVN_EEidNotSupported: 2;
|
|
2018
2055
|
readonly DVN_EHashAlreadyUsed: 3;
|
|
2019
2056
|
readonly DVN_EPtbBuilderAlreadyInitialized: 4;
|
|
2057
|
+
readonly Multisig_EDuplicatedSigner: 1;
|
|
2058
|
+
readonly Multisig_EInvalidSignatureLength: 2;
|
|
2059
|
+
readonly Multisig_EInvalidSignerLength: 3;
|
|
2060
|
+
readonly Multisig_EQuorumIsZero: 4;
|
|
2061
|
+
readonly Multisig_ESignaturesLessThanQuorum: 5;
|
|
2062
|
+
readonly Multisig_ESignerAlreadyExists: 6;
|
|
2063
|
+
readonly Multisig_ESignerNotFound: 7;
|
|
2064
|
+
readonly Multisig_ESignerNotInCommittee: 8;
|
|
2065
|
+
readonly Multisig_ESignersSizeIsLessThanQuorum: 9;
|
|
2066
|
+
readonly DVNInfoV1_EInvalidData: 1;
|
|
2067
|
+
readonly DVNInfoV1_EInvalidVersion: 2;
|
|
2020
2068
|
};
|
|
2021
2069
|
declare class DVN {
|
|
2022
2070
|
#private;
|
|
@@ -2458,6 +2506,20 @@ declare class DVN {
|
|
|
2458
2506
|
* @returns Promise<boolean> - True if the PTB builder has been initialized
|
|
2459
2507
|
*/
|
|
2460
2508
|
isPtbBuilderInitialized(): Promise<boolean>;
|
|
2509
|
+
/**
|
|
2510
|
+
* Get DVN object address from worker registry using this DVN's worker capability (as a move call)
|
|
2511
|
+
* This function chains Move calls to decode worker info and extract the DVN object address
|
|
2512
|
+
* @param tx - The transaction to add the move call to
|
|
2513
|
+
* @returns Transaction result containing the DVN object address
|
|
2514
|
+
*/
|
|
2515
|
+
getDvnObjectAddressMoveCall(tx: Transaction): TransactionResult;
|
|
2516
|
+
/**
|
|
2517
|
+
* Get DVN object address from worker registry using this DVN's worker capability
|
|
2518
|
+
* This function uses Move calls to decode worker info and extract the DVN object address
|
|
2519
|
+
* @returns Promise<string> - The DVN object address
|
|
2520
|
+
* @throws Will throw an error if worker info is not found or if decoding fails
|
|
2521
|
+
*/
|
|
2522
|
+
getDvnObjectAddress(): Promise<string>;
|
|
2461
2523
|
/**
|
|
2462
2524
|
* Create a LayerZero witness for DVN package whitelist registration
|
|
2463
2525
|
* @param tx - The transaction to add the move call to
|
|
@@ -2647,6 +2709,9 @@ declare class DVNFeeLib {
|
|
|
2647
2709
|
confirmGetFeeMoveCall(tx: Transaction, feelibCall: TransactionArgument, priceFeedCall: TransactionArgument): void;
|
|
2648
2710
|
}
|
|
2649
2711
|
|
|
2712
|
+
declare const DVNLayerzeroErrorCode: {
|
|
2713
|
+
readonly DVNLayerzero_EWorkerCapNotFromPackage: 1;
|
|
2714
|
+
};
|
|
2650
2715
|
declare class DvnLayerZero {
|
|
2651
2716
|
#private;
|
|
2652
2717
|
private readonly moduleManager;
|
|
@@ -2673,6 +2738,8 @@ declare class DvnLayerZero {
|
|
|
2673
2738
|
declare const ExecutorErrorCode: {
|
|
2674
2739
|
readonly Executor_EEidNotSupported: 1;
|
|
2675
2740
|
readonly Executor_EInvalidNativeDropAmount: 2;
|
|
2741
|
+
readonly ExecutorInfoV1_EInvalidData: 1;
|
|
2742
|
+
readonly ExecutorInfoV1_EInvalidVersion: 2;
|
|
2676
2743
|
};
|
|
2677
2744
|
declare class Executor {
|
|
2678
2745
|
#private;
|
|
@@ -3066,13 +3133,33 @@ declare class Executor {
|
|
|
3066
3133
|
* @returns Promise<string> - The admin capability ID
|
|
3067
3134
|
*/
|
|
3068
3135
|
adminCapId(admin: string): Promise<string>;
|
|
3136
|
+
/**
|
|
3137
|
+
* Get Executor object address from worker registry using this Executor's worker capability (as a move call)
|
|
3138
|
+
* This function chains Move calls to decode worker info and extract the Executor object address
|
|
3139
|
+
* @param tx - The transaction to add the move call to
|
|
3140
|
+
* @returns Transaction result containing the Executor object address
|
|
3141
|
+
*/
|
|
3142
|
+
getExecutorObjectAddressMoveCall(tx: Transaction): TransactionResult;
|
|
3143
|
+
/**
|
|
3144
|
+
* Get Executor object address from worker registry using this Executor's worker capability
|
|
3145
|
+
* This function uses Move calls to decode worker info and extract the Executor object address
|
|
3146
|
+
* @returns Promise<string> - The Executor object address
|
|
3147
|
+
* @throws Will throw an error if worker info is not found or if decoding fails
|
|
3148
|
+
*/
|
|
3149
|
+
getExecutorObjectAddress(): Promise<string>;
|
|
3069
3150
|
private parseDstConfig;
|
|
3070
3151
|
}
|
|
3071
3152
|
|
|
3072
3153
|
declare const ExecutorFeeLibErrorCode: {
|
|
3073
3154
|
readonly ExecutorFeeLib_EEidNotSupported: 1;
|
|
3074
|
-
readonly
|
|
3075
|
-
readonly
|
|
3155
|
+
readonly ExecutorOption_ENoOptions: 1;
|
|
3156
|
+
readonly ExecutorOption_EUnsupportedOptionType: 2;
|
|
3157
|
+
readonly ExecutorOption_EZeroLzReceiveGasProvided: 3;
|
|
3158
|
+
readonly ExecutorOption_EZeroLzComposeGasProvided: 4;
|
|
3159
|
+
readonly ExecutorOption_ENativeAmountExceedsCap: 5;
|
|
3160
|
+
readonly ExecutorOption_EInvalidLzReceiveOption: 6;
|
|
3161
|
+
readonly ExecutorOption_EInvalidNativeDropOption: 7;
|
|
3162
|
+
readonly ExecutorOption_EInvalidLzComposeOption: 8;
|
|
3076
3163
|
};
|
|
3077
3164
|
declare class ExecutorFeeLib {
|
|
3078
3165
|
#private;
|
|
@@ -3105,6 +3192,9 @@ declare class ExecutorFeeLib {
|
|
|
3105
3192
|
confirmGetFeeMoveCall(tx: Transaction, feelibCall: TransactionArgument, priceFeedCall: TransactionArgument): void;
|
|
3106
3193
|
}
|
|
3107
3194
|
|
|
3195
|
+
declare const ExecutorLayerzeroErrorCode: {
|
|
3196
|
+
readonly ExecutorLayerzero_EWorkerCapNotFromPackage: 1;
|
|
3197
|
+
};
|
|
3108
3198
|
declare class ExecutorLayerZero {
|
|
3109
3199
|
#private;
|
|
3110
3200
|
private readonly moduleManager;
|
|
@@ -3338,9 +3428,9 @@ declare class PriceFeed {
|
|
|
3338
3428
|
}
|
|
3339
3429
|
|
|
3340
3430
|
declare const TreasuryErrorCode: {
|
|
3341
|
-
readonly
|
|
3342
|
-
readonly
|
|
3343
|
-
readonly
|
|
3431
|
+
readonly TREASURY_EInvalidFeeRecipient: 1;
|
|
3432
|
+
readonly TREASURY_EInvalidNativeFeeBp: 2;
|
|
3433
|
+
readonly TREASURY_EZroNotEnabled: 3;
|
|
3344
3434
|
};
|
|
3345
3435
|
declare class Treasury {
|
|
3346
3436
|
#private;
|
|
@@ -3451,6 +3541,55 @@ declare class Treasury {
|
|
|
3451
3541
|
feeEnabled(): Promise<boolean>;
|
|
3452
3542
|
}
|
|
3453
3543
|
|
|
3544
|
+
declare const WorkerRegistryErrorCode: {
|
|
3545
|
+
readonly EWorkerInfoInvalid: 1;
|
|
3546
|
+
readonly EWorkerInfoNotFound: 2;
|
|
3547
|
+
};
|
|
3548
|
+
/**
|
|
3549
|
+
* WorkerRegistry provides access to the worker registry contract functionality
|
|
3550
|
+
* This module maintains mappings between worker addresses and their associated information.
|
|
3551
|
+
*/
|
|
3552
|
+
declare class WorkerRegistry {
|
|
3553
|
+
#private;
|
|
3554
|
+
private readonly moduleManager;
|
|
3555
|
+
packageId: string;
|
|
3556
|
+
readonly client: SuiClient;
|
|
3557
|
+
private readonly objects;
|
|
3558
|
+
/**
|
|
3559
|
+
* Create a new WorkerRegistry instance
|
|
3560
|
+
* @param packageId - The package ID of the worker registry contract
|
|
3561
|
+
* @param client - The Sui client instance
|
|
3562
|
+
* @param objects - Object options containing contract object IDs
|
|
3563
|
+
* @param moduleManager - Module manager for handling dependencies
|
|
3564
|
+
*/
|
|
3565
|
+
constructor(packageId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
|
|
3566
|
+
/**
|
|
3567
|
+
* Get worker info for a specific worker address (as a move call)
|
|
3568
|
+
* This creates a move call that can be used in a PTB (Programmable Transaction Block)
|
|
3569
|
+
* @param tx - The transaction to add the move call to
|
|
3570
|
+
* @param worker - The worker address or transaction argument
|
|
3571
|
+
* @returns TransactionResult - The move call result containing worker info bytes
|
|
3572
|
+
* @throws Will throw an error if worker info is not found (EWorkerInfoNotFound)
|
|
3573
|
+
*/
|
|
3574
|
+
getWorkerInfoMoveCall(tx: Transaction, worker: string | TransactionArgument): TransactionResult;
|
|
3575
|
+
/**
|
|
3576
|
+
* Get worker info for a specific worker address
|
|
3577
|
+
* Executes the get_worker_info function and returns the worker information bytes
|
|
3578
|
+
* @param worker - The worker address to get info for
|
|
3579
|
+
* @returns Promise<Uint8Array> - The worker information bytes containing encoded worker data
|
|
3580
|
+
* @throws Will throw an error if worker info is not found (EWorkerInfoNotFound)
|
|
3581
|
+
*/
|
|
3582
|
+
getWorkerInfo(worker: string): Promise<Uint8Array>;
|
|
3583
|
+
/**
|
|
3584
|
+
* Check if worker info exists for a specific worker address
|
|
3585
|
+
* This is a convenience method that catches EWorkerInfoNotFound errors
|
|
3586
|
+
* @param worker - The worker address to check
|
|
3587
|
+
* @returns Promise<boolean> - True if worker info exists, false if not found
|
|
3588
|
+
* @throws Will re-throw any errors other than EWorkerInfoNotFound
|
|
3589
|
+
*/
|
|
3590
|
+
hasWorkerInfo(worker: string): Promise<boolean>;
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3454
3593
|
declare class DvnPtbBuilder {
|
|
3455
3594
|
#private;
|
|
3456
3595
|
private readonly moduleManager;
|
|
@@ -3469,8 +3608,14 @@ declare class DvnPtbBuilder {
|
|
|
3469
3608
|
buildDvnPtbMoveCall(tx: Transaction, dvnAddress: string | TransactionArgument, feelibAddress: string | TransactionArgument, priceFeedAddress: string | TransactionArgument): TransactionResult;
|
|
3470
3609
|
}
|
|
3471
3610
|
|
|
3472
|
-
declare const
|
|
3473
|
-
readonly
|
|
3611
|
+
declare const EndpointPtbBuilderErrorCode: {
|
|
3612
|
+
readonly EndpointPtbBuilder_EBuilderNotFound: 1;
|
|
3613
|
+
readonly EndpointPtbBuilder_EBuilderRegistered: 2;
|
|
3614
|
+
readonly EndpointPtbBuilder_EBuilderUnsupported: 3;
|
|
3615
|
+
readonly EndpointPtbBuilder_EInvalidBounds: 4;
|
|
3616
|
+
readonly EndpointPtbBuilder_EInvalidBuilderAddress: 5;
|
|
3617
|
+
readonly EndpointPtbBuilder_EInvalidLibrary: 6;
|
|
3618
|
+
readonly EndpointPtbBuilder_EUnauthorized: 7;
|
|
3474
3619
|
};
|
|
3475
3620
|
declare class EndpointPtbBuilder {
|
|
3476
3621
|
#private;
|
|
@@ -3746,6 +3891,11 @@ declare class PackageWhitelistValidator {
|
|
|
3746
3891
|
validate(packageAddresses: string[]): Promise<boolean>;
|
|
3747
3892
|
}
|
|
3748
3893
|
|
|
3894
|
+
declare const PtbBuilderErrorCode: {
|
|
3895
|
+
readonly MoveCallsBuilder_EInvalidMoveCallResult: 1;
|
|
3896
|
+
readonly MoveCallsBuilder_EResultIDNotFound: 2;
|
|
3897
|
+
readonly Argument_EInvalidArgument: 1;
|
|
3898
|
+
};
|
|
3749
3899
|
declare class PtbBuilder {
|
|
3750
3900
|
#private;
|
|
3751
3901
|
packageId: string;
|
|
@@ -3814,6 +3964,9 @@ declare class SimpleMessageLibPtbBuilder {
|
|
|
3814
3964
|
getPtbBuilderInfoMoveCall(tx: Transaction): TransactionResult;
|
|
3815
3965
|
}
|
|
3816
3966
|
|
|
3967
|
+
declare const Uln302PtbBuilderErrorCode: {
|
|
3968
|
+
readonly Uln302PtbBuilder_EWorkerPtbsNotFound: 1;
|
|
3969
|
+
};
|
|
3817
3970
|
declare class Uln302PtbBuilder {
|
|
3818
3971
|
#private;
|
|
3819
3972
|
private readonly moduleManager;
|
|
@@ -3914,72 +4067,290 @@ declare class BlockedMessageLibPtbBuilder {
|
|
|
3914
4067
|
getPtbBuilderInfoMoveCall(tx: Transaction): TransactionResult;
|
|
3915
4068
|
}
|
|
3916
4069
|
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
4070
|
+
/**
|
|
4071
|
+
* Type guard to check if a value is already a TransactionArgument
|
|
4072
|
+
* TransactionArgument can be:
|
|
4073
|
+
* 1. Argument object with $kind property
|
|
4074
|
+
* 2. Synchronous function: (tx: Transaction) => Argument
|
|
4075
|
+
* 3. Asynchronous function: AsyncTransactionThunk
|
|
4076
|
+
*/
|
|
4077
|
+
declare function isTransactionArgument(value: unknown): value is TransactionArgument;
|
|
4078
|
+
/**
|
|
4079
|
+
* Convert value to TransactionArgument using a simple converter function
|
|
4080
|
+
* @param value - The value to convert (primitive type or TransactionArgument)
|
|
4081
|
+
* @param converter - Function to convert primitive type to TransactionArgument
|
|
4082
|
+
* @returns TransactionArgument
|
|
4083
|
+
*/
|
|
4084
|
+
declare function asArg<T>(value: T | TransactionArgument, converter: (val: T) => TransactionArgument): TransactionArgument;
|
|
4085
|
+
/**
|
|
4086
|
+
* Convert value to TransactionArgument using a converter that requires Transaction
|
|
4087
|
+
* @param tx - The transaction
|
|
4088
|
+
* @param value - The value to convert
|
|
4089
|
+
* @param converter - Function to convert value using transaction
|
|
4090
|
+
* @returns TransactionArgument
|
|
4091
|
+
*/
|
|
4092
|
+
declare function asArgWithTx<T>(tx: Transaction, value: T | TransactionArgument, converter: (tx: Transaction, val: T) => TransactionArgument): TransactionArgument;
|
|
4093
|
+
/**
|
|
4094
|
+
* Async version: Convert value to TransactionArgument using an async converter that requires Transaction
|
|
4095
|
+
* @param tx - The transaction
|
|
4096
|
+
* @param value - The value to convert
|
|
4097
|
+
* @param converter - Async function to convert value using transaction
|
|
4098
|
+
* @returns Promise<TransactionArgument>
|
|
4099
|
+
*/
|
|
4100
|
+
declare function asArgWithTxAsync<T>(tx: Transaction, value: T | TransactionArgument, converter: (tx: Transaction, val: T) => Promise<TransactionArgument>): Promise<TransactionArgument>;
|
|
4101
|
+
/**
|
|
4102
|
+
* Convert to object reference TransactionArgument
|
|
4103
|
+
*/
|
|
4104
|
+
declare function asObject(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
|
|
4105
|
+
/**
|
|
4106
|
+
* Convert to address TransactionArgument
|
|
4107
|
+
*/
|
|
4108
|
+
declare function asAddress(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
|
|
4109
|
+
/**
|
|
4110
|
+
* Convert to u8 TransactionArgument
|
|
4111
|
+
*/
|
|
4112
|
+
declare function asU8(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
|
|
4113
|
+
/**
|
|
4114
|
+
* Convert to u16 TransactionArgument
|
|
4115
|
+
*/
|
|
4116
|
+
declare function asU16(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
|
|
4117
|
+
/**
|
|
4118
|
+
* Convert to u32 TransactionArgument
|
|
4119
|
+
*/
|
|
4120
|
+
declare function asU32(tx: Transaction, value: number | TransactionArgument): TransactionArgument;
|
|
4121
|
+
/**
|
|
4122
|
+
* Convert to u64 TransactionArgument (supports bigint, number, or string)
|
|
4123
|
+
*/
|
|
4124
|
+
declare function asU64(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
|
|
4125
|
+
/**
|
|
4126
|
+
* Convert to u128 TransactionArgument (supports bigint, number, or string)
|
|
4127
|
+
*/
|
|
4128
|
+
declare function asU128(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
|
|
4129
|
+
/**
|
|
4130
|
+
* Convert to u256 TransactionArgument (supports bigint, number, or string)
|
|
4131
|
+
*/
|
|
4132
|
+
declare function asU256(tx: Transaction, value: bigint | number | string | TransactionArgument): TransactionArgument;
|
|
4133
|
+
/**
|
|
4134
|
+
* Convert Uint8Array to Bytes32 using moduleManager's fromBytesMoveCall
|
|
4135
|
+
* @param tx - The transaction
|
|
4136
|
+
* @param value - Uint8Array or TransactionArgument
|
|
4137
|
+
* @param utils - utils Module
|
|
4138
|
+
* @returns TransactionArgument
|
|
4139
|
+
*/
|
|
4140
|
+
declare function asBytes32(tx: Transaction, value: Uint8Array | TransactionArgument, utils: Utils): TransactionArgument;
|
|
4141
|
+
/**
|
|
4142
|
+
* Convert Uint8Array to serialized bytes vector TransactionArgument
|
|
4143
|
+
* @param tx - The transaction
|
|
4144
|
+
* @param value - Uint8Array or TransactionArgument
|
|
4145
|
+
* @returns TransactionArgument
|
|
4146
|
+
*/
|
|
4147
|
+
declare function asBytes(tx: Transaction, value: Uint8Array | TransactionArgument): TransactionArgument;
|
|
4148
|
+
/**
|
|
4149
|
+
* Convert Uint8Array Vector to serialized bytes vector TransactionArgument
|
|
4150
|
+
* @param tx - The transaction
|
|
4151
|
+
* @param value - Uint8Array or TransactionArgument
|
|
4152
|
+
* @returns TransactionArgument
|
|
4153
|
+
*/
|
|
4154
|
+
declare function asBytesVector(tx: Transaction, value: Uint8Array[] | TransactionArgument): TransactionArgument;
|
|
4155
|
+
/**
|
|
4156
|
+
* Convert string to string TransactionArgument
|
|
4157
|
+
* @param tx - The transaction
|
|
4158
|
+
* @param value - string or TransactionArgument
|
|
4159
|
+
* @returns TransactionArgument
|
|
4160
|
+
*/
|
|
4161
|
+
declare function asString(tx: Transaction, value: string | TransactionArgument): TransactionArgument;
|
|
4162
|
+
/**
|
|
4163
|
+
* Convert address array to serialized vector<address> TransactionArgument
|
|
4164
|
+
* @param tx - The transaction
|
|
4165
|
+
* @param value - string[] or TransactionArgument
|
|
4166
|
+
* @returns TransactionArgument
|
|
4167
|
+
*/
|
|
4168
|
+
declare function asAddressVector(tx: Transaction, value: string[] | TransactionArgument): TransactionArgument;
|
|
4169
|
+
/**
|
|
4170
|
+
* Convert boolean to boolean TransactionArgument
|
|
4171
|
+
* @param tx - The transaction
|
|
4172
|
+
* @param value - boolean or TransactionArgument
|
|
4173
|
+
* @returns TransactionArgument
|
|
4174
|
+
*/
|
|
4175
|
+
declare function asBool(tx: Transaction, value: boolean | TransactionArgument): TransactionArgument;
|
|
4176
|
+
|
|
4177
|
+
declare function simulateTransaction(suiClient: SuiClient, tx: Transaction, sender?: string): Promise<SimulateResult[]>;
|
|
4178
|
+
declare function simulateTransactionMultiResult(suiClient: SuiClient, tx: Transaction, resultIndex: number[], sender?: string): Promise<SimulateResult[][]>;
|
|
4179
|
+
declare function validateTransaction(client: SuiClient, signer: Keypair, tx: Transaction): Promise<SuiTransactionBlockResponse>;
|
|
4180
|
+
/**
|
|
4181
|
+
* Execute simulate using a moveCall function
|
|
4182
|
+
* @param client - The Sui client
|
|
4183
|
+
* @param moveCallFn - Function that adds moveCall to the transaction (supports both sync and async, any return type)
|
|
4184
|
+
* @param parser - Function to parse the result
|
|
4185
|
+
* @returns The parsed result
|
|
4186
|
+
*/
|
|
4187
|
+
declare function executeSimulate<T>(client: SuiClient, moveCallFn: (tx: Transaction) => unknown, parser: (result: {
|
|
4188
|
+
value: Uint8Array;
|
|
4189
|
+
}[]) => T): Promise<T>;
|
|
4190
|
+
declare function handleError(e: string): unknown;
|
|
4191
|
+
|
|
4192
|
+
/**
|
|
4193
|
+
* PackageAllowlistValidator ensures all function calls and objects belong to allowlisted packages
|
|
4194
|
+
* This validator checks that:
|
|
4195
|
+
* 1. All function calls target approved packages
|
|
4196
|
+
* 2. All object arguments come from approved packages
|
|
4197
|
+
*
|
|
4198
|
+
* If local packageWhitelist is empty, it will use the PTB whitelist contract for validation
|
|
4199
|
+
* If local packageWhitelist is provided, it will use only the local whitelist (contract is ignored)
|
|
4200
|
+
*/
|
|
4201
|
+
declare class PackageAllowlistValidator implements IPTBValidator {
|
|
4202
|
+
private packageWhitelist;
|
|
4203
|
+
private validator?;
|
|
4204
|
+
constructor(packageWhitelist?: string[], validator?: PackageWhitelistValidator);
|
|
3934
4205
|
/**
|
|
3935
|
-
*
|
|
3936
|
-
* @param
|
|
3937
|
-
* @
|
|
3938
|
-
* @param lzComposeInfo - LayerZero compose information transaction argument
|
|
4206
|
+
* Validates that all function calls and object arguments belong to whitelisted packages
|
|
4207
|
+
* @param moveCallsWithDetails - Array of move calls with object details
|
|
4208
|
+
* @throws Error if any function call or object belongs to a non-whitelisted package
|
|
3939
4209
|
*/
|
|
3940
|
-
|
|
4210
|
+
validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): Promise<void>;
|
|
3941
4211
|
/**
|
|
3942
|
-
*
|
|
3943
|
-
* @param
|
|
3944
|
-
* @
|
|
3945
|
-
* @param options - Execution options as bytes
|
|
3946
|
-
* @param payInZero - Whether to pay in ZRO tokens
|
|
3947
|
-
* @returns Promise<MessagingFee> - The calculated messaging fees
|
|
4212
|
+
* Validate multiple packages at once
|
|
4213
|
+
* @param packages - Array of package IDs to validate
|
|
4214
|
+
* @returns Object mapping package ID to validation result
|
|
3948
4215
|
*/
|
|
3949
|
-
|
|
4216
|
+
private validatePackages;
|
|
3950
4217
|
/**
|
|
3951
|
-
*
|
|
3952
|
-
*
|
|
3953
|
-
* @param
|
|
3954
|
-
* @
|
|
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
|
|
4218
|
+
* Extracts package ID from object type string
|
|
4219
|
+
* Object types are in format: "packageId::module::struct<generics>"
|
|
4220
|
+
* @param objectType - The object type string
|
|
4221
|
+
* @returns The package ID or null if extraction fails
|
|
3961
4222
|
*/
|
|
3962
|
-
|
|
4223
|
+
private extractPackageIdFromType;
|
|
3963
4224
|
/**
|
|
3964
|
-
*
|
|
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
|
|
4225
|
+
* Get available packages for error messages
|
|
3969
4226
|
*/
|
|
3970
|
-
|
|
4227
|
+
private getAvailablePackagesList;
|
|
4228
|
+
}
|
|
4229
|
+
|
|
4230
|
+
/**
|
|
4231
|
+
* NonSenderObjectValidator ensures objects are not owned by the transaction sender
|
|
4232
|
+
*
|
|
4233
|
+
* In Sui, this validator checks that objects are:
|
|
4234
|
+
* - Shared: globally accessible, mutations require consensus
|
|
4235
|
+
* - Immutable: can't change after creation
|
|
4236
|
+
* - Owned by another address (not the sender)
|
|
4237
|
+
*
|
|
4238
|
+
* This prevents the sender from using their own owned objects in the transaction
|
|
4239
|
+
*/
|
|
4240
|
+
declare class NonSenderObjectValidator implements IPTBValidator {
|
|
4241
|
+
private sender;
|
|
4242
|
+
constructor(sender: string);
|
|
3971
4243
|
/**
|
|
3972
|
-
*
|
|
3973
|
-
* @param
|
|
3974
|
-
* @
|
|
4244
|
+
* Validates that objects are not owned by the sender
|
|
4245
|
+
* @param moveCallsWithDetails - Array of move calls with object details
|
|
4246
|
+
* @throws Error if any object is owned by the sender
|
|
3975
4247
|
*/
|
|
3976
|
-
|
|
4248
|
+
validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): void;
|
|
3977
4249
|
/**
|
|
3978
|
-
*
|
|
3979
|
-
* @param
|
|
3980
|
-
* @
|
|
4250
|
+
* Checks if the ownership is valid (not owned by sender)
|
|
4251
|
+
* @param owner - The object owner to check
|
|
4252
|
+
* @returns true if ownership is valid (Shared, Immutable, or owned by another address)
|
|
3981
4253
|
*/
|
|
3982
|
-
|
|
4254
|
+
private isValidOwnership;
|
|
4255
|
+
/**
|
|
4256
|
+
* Gets a human-readable description of the ownership type
|
|
4257
|
+
* @param owner - The object owner
|
|
4258
|
+
* @returns String description of ownership type
|
|
4259
|
+
*/
|
|
4260
|
+
private getOwnershipType;
|
|
4261
|
+
}
|
|
4262
|
+
|
|
4263
|
+
/**
|
|
4264
|
+
* ShareObjectValidator ensures all object arguments are Shared or Immutable
|
|
4265
|
+
* This is the default validator for PTB operations
|
|
4266
|
+
*/
|
|
4267
|
+
declare class ShareObjectValidator implements IPTBValidator {
|
|
4268
|
+
/**
|
|
4269
|
+
* Validates move calls with pre-fetched object details
|
|
4270
|
+
* @param moveCallsWithDetails - Array of move calls with object details
|
|
4271
|
+
* @throws Error if any object is not Shared/Immutable
|
|
4272
|
+
*/
|
|
4273
|
+
validate(moveCallsWithDetails: MoveCallWithObjectDetails[]): void;
|
|
4274
|
+
/**
|
|
4275
|
+
* Checks if an object owner is Shared or Immutable
|
|
4276
|
+
* @param owner - The object owner to check
|
|
4277
|
+
* @returns true if the owner is Shared or Immutable, false otherwise
|
|
4278
|
+
*/
|
|
4279
|
+
protected isSharedOrImmutable(owner: ObjectOwner): boolean;
|
|
4280
|
+
}
|
|
4281
|
+
|
|
4282
|
+
/**
|
|
4283
|
+
* Validates move calls using multiple validators with a single object fetch
|
|
4284
|
+
* @param client - SuiClient instance
|
|
4285
|
+
* @param moveCalls - Array of move calls to validate
|
|
4286
|
+
* @param validators - Array of validators to run
|
|
4287
|
+
* @param options - Options for what object data to fetch
|
|
4288
|
+
* @param batchSize - Batch size for object fetching
|
|
4289
|
+
*/
|
|
4290
|
+
declare function validateWithDetails(client: SuiClient, moveCalls: MoveCall[], validators: IPTBValidator[], sender?: string, userOptions?: ObjectFetchOptions, batchSize?: number): Promise<void>;
|
|
4291
|
+
|
|
4292
|
+
declare const CounterErrorCode: {
|
|
4293
|
+
readonly Counter_EInvalidMsgType: 0;
|
|
4294
|
+
readonly Counter_EInvalidValue: 1;
|
|
4295
|
+
readonly Counter_EInvalidNonce: 2;
|
|
4296
|
+
readonly Counter_EOnlyEndpoint: 3;
|
|
4297
|
+
readonly Counter_ESelfComposeOnly: 4;
|
|
4298
|
+
readonly Counter_EInvalidOApp: 5;
|
|
4299
|
+
readonly OptionsBuilder_EInvalidSize: 1;
|
|
4300
|
+
};
|
|
4301
|
+
declare class Counter {
|
|
4302
|
+
#private;
|
|
4303
|
+
private readonly moduleManager;
|
|
4304
|
+
packageId: string;
|
|
4305
|
+
readonly client: SuiClient;
|
|
4306
|
+
private readonly objects;
|
|
4307
|
+
constructor(packageId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
|
|
4308
|
+
/**
|
|
4309
|
+
* Initialize counter with LayerZero receive and compose information
|
|
4310
|
+
* @param tx - The transaction to add the move call to
|
|
4311
|
+
* @param lzReceiveInfo - LayerZero receive information transaction argument
|
|
4312
|
+
* @param lzComposeInfo - LayerZero compose information transaction argument
|
|
4313
|
+
*/
|
|
4314
|
+
initCounterMoveCall(tx: Transaction, lzReceiveInfo: TransactionArgument, lzComposeInfo: TransactionArgument): void;
|
|
4315
|
+
/**
|
|
4316
|
+
* Quote messaging fees for sending counter increment
|
|
4317
|
+
* @param dstEid - Destination endpoint ID
|
|
4318
|
+
* @param msgType - Message type (SEND or SEND_AND_CALL)
|
|
4319
|
+
* @param options - Execution options as bytes
|
|
4320
|
+
* @param payInZero - Whether to pay in ZRO tokens
|
|
4321
|
+
* @returns Promise<MessagingFee> - The calculated messaging fees
|
|
4322
|
+
*/
|
|
4323
|
+
quote(dstEid: EndpointId | TransactionArgument, msgType: number | TransactionArgument, options: Uint8Array | TransactionArgument, payInZero: boolean | TransactionArgument, validators?: IPTBValidator[]): Promise<MessagingFee>;
|
|
4324
|
+
/**
|
|
4325
|
+
* Increment counter on destination chain
|
|
4326
|
+
* @param tx - The transaction to add the move call to
|
|
4327
|
+
* @param sender - Sender address for ZRO token operations
|
|
4328
|
+
* @param dstEid - Destination endpoint ID
|
|
4329
|
+
* @param msgType - Message type (SEND or SEND_AND_CALL)
|
|
4330
|
+
* @param options - Execution options as bytes
|
|
4331
|
+
* @param sendValue - Value to send with the message
|
|
4332
|
+
* @param nativeFee - Native token fee amount
|
|
4333
|
+
* @param zroFee - ZRO token fee amount
|
|
4334
|
+
* @param refundAddress - Address for fee refunds
|
|
4335
|
+
*/
|
|
4336
|
+
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>;
|
|
4337
|
+
/**
|
|
4338
|
+
* Set LayerZero compose information for counter
|
|
4339
|
+
* @param tx - The transaction to add the move call to
|
|
4340
|
+
* @param lzComposeInfo - LayerZero compose information as bytes
|
|
4341
|
+
*/
|
|
4342
|
+
setLzComposeInfoMoveCall(tx: Transaction, lzComposeInfo: Uint8Array | TransactionArgument): void;
|
|
4343
|
+
/**
|
|
4344
|
+
* Get counter EID
|
|
4345
|
+
* @param tx - The transaction to add the move call to
|
|
4346
|
+
* @returns Transaction result containing the counter EID
|
|
4347
|
+
*/
|
|
4348
|
+
getEidMoveCall(tx: Transaction): TransactionResult;
|
|
4349
|
+
/**
|
|
4350
|
+
* Get counter EID
|
|
4351
|
+
* @returns Promise<number> - The counter EID
|
|
4352
|
+
*/
|
|
4353
|
+
getEid(): Promise<number>;
|
|
3983
4354
|
/**
|
|
3984
4355
|
* Get call capability address for counter
|
|
3985
4356
|
* @param tx - The transaction to add the move call to
|
|
@@ -4060,25 +4431,38 @@ declare class Counter {
|
|
|
4060
4431
|
lzComposeInfoMoveCall(tx: Transaction): TransactionResult;
|
|
4061
4432
|
}
|
|
4062
4433
|
|
|
4434
|
+
interface OAppInfoV1 {
|
|
4435
|
+
oapp_object: string;
|
|
4436
|
+
next_nonce_info: number[];
|
|
4437
|
+
lz_receive_info: number[];
|
|
4438
|
+
extra_info: number[];
|
|
4439
|
+
}
|
|
4440
|
+
|
|
4063
4441
|
declare const OAppErrorCode: {
|
|
4064
|
-
readonly
|
|
4065
|
-
readonly
|
|
4066
|
-
readonly
|
|
4067
|
-
readonly
|
|
4068
|
-
readonly
|
|
4069
|
-
readonly
|
|
4070
|
-
readonly
|
|
4071
|
-
readonly
|
|
4072
|
-
readonly
|
|
4073
|
-
readonly
|
|
4442
|
+
readonly OApp_EInvalidAdminCap: 1;
|
|
4443
|
+
readonly OApp_EInvalidOAppCap: 2;
|
|
4444
|
+
readonly OApp_EInvalidRefundAddress: 3;
|
|
4445
|
+
readonly OApp_EInvalidSendingCall: 4;
|
|
4446
|
+
readonly OApp_EOnlyEndpoint: 5;
|
|
4447
|
+
readonly OApp_EOnlyPeer: 6;
|
|
4448
|
+
readonly OApp_ESendingInProgress: 7;
|
|
4449
|
+
readonly OAppPeer_EPeerNotFound: 0;
|
|
4450
|
+
readonly OAppPeer_EInvalidPeer: 1;
|
|
4451
|
+
readonly EnforcedOptions_EEnforcedOptionsNotFound: 1;
|
|
4452
|
+
readonly EnforcedOptions_EInvalidOptionsLength: 2;
|
|
4453
|
+
readonly EnforcedOptions_EInvalidOptionsType: 3;
|
|
4454
|
+
readonly OAppInfoV1_EInvalidData: 1;
|
|
4455
|
+
readonly OAppInfoV1_EInvalidVersion: 2;
|
|
4074
4456
|
};
|
|
4075
4457
|
declare class OApp {
|
|
4076
4458
|
#private;
|
|
4077
4459
|
private readonly moduleManager;
|
|
4078
4460
|
packageId: string;
|
|
4461
|
+
oappCallCapId: string;
|
|
4079
4462
|
readonly client: SuiClient;
|
|
4463
|
+
oappInfo: OAppInfoV1 | null;
|
|
4080
4464
|
private readonly objects;
|
|
4081
|
-
constructor(packageId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
|
|
4465
|
+
constructor(packageId: string, oappCallCapId: string, client: SuiClient, objects: ObjectOptions, moduleManager: ModuleManager);
|
|
4082
4466
|
/**
|
|
4083
4467
|
* Set enforced options for OApp messaging
|
|
4084
4468
|
* @param tx - The transaction to add the move call to
|
|
@@ -4088,7 +4472,7 @@ declare class OApp {
|
|
|
4088
4472
|
* @param msgType - Message type or transaction argument
|
|
4089
4473
|
* @param options - Enforced options as bytes or transaction argument
|
|
4090
4474
|
*/
|
|
4091
|
-
setEnforcedOptionsMoveCall(tx: Transaction,
|
|
4475
|
+
setEnforcedOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument, options: Uint8Array | TransactionArgument): Promise<void>;
|
|
4092
4476
|
/**
|
|
4093
4477
|
* Set peer OApp on another chain
|
|
4094
4478
|
* @param tx - The transaction to add the move call to
|
|
@@ -4097,33 +4481,33 @@ declare class OApp {
|
|
|
4097
4481
|
* @param eid - Peer endpoint ID or transaction argument
|
|
4098
4482
|
* @param peer - Peer OApp address as bytes or transaction argument
|
|
4099
4483
|
*/
|
|
4100
|
-
setPeerMoveCall(tx: Transaction,
|
|
4484
|
+
setPeerMoveCall(tx: Transaction, eid: number | TransactionArgument, peer: Uint8Array | TransactionArgument): Promise<void>;
|
|
4101
4485
|
/**
|
|
4102
|
-
* Get admin address for OApp
|
|
4486
|
+
* Get admin capability address for OApp
|
|
4103
4487
|
* @param tx - The transaction to add the move call to
|
|
4104
4488
|
* @param oapp - The OApp object ID or transaction argument
|
|
4105
|
-
* @returns Transaction result containing the admin address
|
|
4489
|
+
* @returns Transaction result containing the admin capability address
|
|
4106
4490
|
*/
|
|
4107
|
-
|
|
4491
|
+
getAdminCapMoveCall(tx: Transaction, oapp: string | TransactionArgument): TransactionResult;
|
|
4108
4492
|
/**
|
|
4109
|
-
* Get admin address for OApp
|
|
4493
|
+
* Get admin capability address for OApp
|
|
4110
4494
|
* @param oapp - The OApp object ID
|
|
4111
|
-
* @returns Promise<string> - The admin address
|
|
4495
|
+
* @returns Promise<string> - The admin capability address
|
|
4112
4496
|
*/
|
|
4113
|
-
|
|
4497
|
+
getAdminCap(oapp: string): Promise<string>;
|
|
4114
4498
|
/**
|
|
4115
|
-
* Get OApp
|
|
4499
|
+
* Get OApp CallCap identifier
|
|
4116
4500
|
* @param tx - The transaction to add the move call to
|
|
4117
4501
|
* @param oapp - The OApp object ID or transaction argument
|
|
4118
|
-
* @returns Transaction result containing the OApp
|
|
4502
|
+
* @returns Transaction result containing the OApp CallCap identifier
|
|
4119
4503
|
*/
|
|
4120
|
-
|
|
4504
|
+
getOAppCapIdMoveCall(tx: Transaction): Promise<TransactionResult>;
|
|
4121
4505
|
/**
|
|
4122
|
-
* Get OApp
|
|
4123
|
-
* @param oapp - The OApp object ID
|
|
4124
|
-
* @returns Promise<string> - The OApp
|
|
4506
|
+
* Get OApp CallCap identifier
|
|
4507
|
+
* @param oapp - The OApp object ID (optional, uses configured oapp if not provided)
|
|
4508
|
+
* @returns Promise<string> - The OApp CallCap identifier
|
|
4125
4509
|
*/
|
|
4126
|
-
|
|
4510
|
+
getOAppCapId(): Promise<string>;
|
|
4127
4511
|
/**
|
|
4128
4512
|
* Combine enforced options with extra options for message execution
|
|
4129
4513
|
* @param tx - The transaction to add the move call to
|
|
@@ -4133,7 +4517,7 @@ declare class OApp {
|
|
|
4133
4517
|
* @param extraOptions - Extra options to combine with enforced options or transaction argument
|
|
4134
4518
|
* @returns Transaction result containing combined options
|
|
4135
4519
|
*/
|
|
4136
|
-
combineOptionsMoveCall(tx: Transaction,
|
|
4520
|
+
combineOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument, extraOptions: Uint8Array | TransactionArgument): Promise<TransactionResult>;
|
|
4137
4521
|
/**
|
|
4138
4522
|
* Combine enforced options with extra options for message execution
|
|
4139
4523
|
* @param oapp - The OApp object ID
|
|
@@ -4142,7 +4526,7 @@ declare class OApp {
|
|
|
4142
4526
|
* @param extraOptions - Extra options to combine with enforced options
|
|
4143
4527
|
* @returns Promise<Uint8Array> - Combined options as bytes
|
|
4144
4528
|
*/
|
|
4145
|
-
combineOptions(
|
|
4529
|
+
combineOptions(eid: number, msgType: number, extraOptions: Uint8Array): Promise<Uint8Array>;
|
|
4146
4530
|
/**
|
|
4147
4531
|
* Get enforced options for a specific destination and message type
|
|
4148
4532
|
* @param tx - The transaction to add the move call to
|
|
@@ -4151,7 +4535,7 @@ declare class OApp {
|
|
|
4151
4535
|
* @param msgType - Message type or transaction argument
|
|
4152
4536
|
* @returns Transaction result containing enforced options
|
|
4153
4537
|
*/
|
|
4154
|
-
getEnforcedOptionsMoveCall(tx: Transaction,
|
|
4538
|
+
getEnforcedOptionsMoveCall(tx: Transaction, eid: number | TransactionArgument, msgType: number | TransactionArgument): Promise<TransactionResult>;
|
|
4155
4539
|
/**
|
|
4156
4540
|
* Get enforced options for a specific destination and message type
|
|
4157
4541
|
* @param oapp - The OApp object ID
|
|
@@ -4159,7 +4543,7 @@ declare class OApp {
|
|
|
4159
4543
|
* @param msgType - Message type
|
|
4160
4544
|
* @returns Promise<Uint8Array> - Enforced options as bytes
|
|
4161
4545
|
*/
|
|
4162
|
-
getEnforcedOptions(
|
|
4546
|
+
getEnforcedOptions(eid: number, msgType: number): Promise<Uint8Array>;
|
|
4163
4547
|
/**
|
|
4164
4548
|
* Check if a peer is configured for a specific destination chain
|
|
4165
4549
|
* @param tx - The transaction to add the move call to
|
|
@@ -4167,14 +4551,14 @@ declare class OApp {
|
|
|
4167
4551
|
* @param dstEid - Destination endpoint ID or transaction argument
|
|
4168
4552
|
* @returns Transaction result containing boolean result
|
|
4169
4553
|
*/
|
|
4170
|
-
hasPeerMoveCall(tx: Transaction,
|
|
4554
|
+
hasPeerMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
|
|
4171
4555
|
/**
|
|
4172
4556
|
* Check if a peer is configured for a specific destination chain
|
|
4173
4557
|
* @param oapp - The OApp object ID
|
|
4174
4558
|
* @param dstEid - Destination endpoint ID
|
|
4175
4559
|
* @returns Promise<boolean> - True if peer is configured, false otherwise
|
|
4176
4560
|
*/
|
|
4177
|
-
hasPeer(
|
|
4561
|
+
hasPeer(dstEid: number): Promise<boolean>;
|
|
4178
4562
|
/**
|
|
4179
4563
|
* Get the configured peer address for a specific destination chain
|
|
4180
4564
|
* @param tx - The transaction to add the move call to
|
|
@@ -4182,14 +4566,111 @@ declare class OApp {
|
|
|
4182
4566
|
* @param dstEid - Destination endpoint ID or transaction argument
|
|
4183
4567
|
* @returns Transaction result containing peer address
|
|
4184
4568
|
*/
|
|
4185
|
-
getPeerMoveCall(tx: Transaction,
|
|
4569
|
+
getPeerMoveCall(tx: Transaction, dstEid: number | TransactionArgument): Promise<TransactionResult>;
|
|
4186
4570
|
/**
|
|
4187
4571
|
* Get the configured peer address for a specific destination chain
|
|
4188
4572
|
* @param oapp - The OApp object ID
|
|
4189
4573
|
* @param dstEid - Destination endpoint ID
|
|
4190
4574
|
* @returns Promise<Uint8Array> - Peer address as bytes32
|
|
4191
4575
|
*/
|
|
4192
|
-
getPeer(
|
|
4576
|
+
getPeer(dstEid: number): Promise<Uint8Array>;
|
|
4577
|
+
getOAppInfoV1MoveCall(tx: Transaction): TransactionResult;
|
|
4578
|
+
getOAppInfoV1(): Promise<OAppInfoV1>;
|
|
4579
|
+
/**
|
|
4580
|
+
* Register OApp with the endpoint
|
|
4581
|
+
* @param tx - The transaction to add the move call to
|
|
4582
|
+
* @param oappInfo - OApp information as bytes (optional)
|
|
4583
|
+
* @returns Transaction result containing the messaging channel address
|
|
4584
|
+
*/
|
|
4585
|
+
registerOAppMoveCall(tx: Transaction, oappInfo?: Uint8Array | TransactionArgument): Promise<TransactionResult>;
|
|
4586
|
+
/**
|
|
4587
|
+
* Set delegate for OApp
|
|
4588
|
+
* @param tx - The transaction to add the move call to
|
|
4589
|
+
* @param newDelegate - New delegate address
|
|
4590
|
+
*/
|
|
4591
|
+
setDelegateMoveCall(tx: Transaction, newDelegate: string | TransactionArgument): Promise<void>;
|
|
4592
|
+
/**
|
|
4593
|
+
* Set OApp information in the endpoint
|
|
4594
|
+
* @param tx - The transaction to add the move call to
|
|
4595
|
+
* @param oappInfo - OApp information as bytes
|
|
4596
|
+
*/
|
|
4597
|
+
setOAppInfoMoveCall(tx: Transaction, oappInfo: Uint8Array | TransactionArgument): Promise<void>;
|
|
4598
|
+
/**
|
|
4599
|
+
* Initialize channel with remote OApp
|
|
4600
|
+
* @param tx - The transaction to add the move call to
|
|
4601
|
+
* @param remoteEid - Remote endpoint ID
|
|
4602
|
+
* @param remoteOApp - Remote OApp address as bytes32
|
|
4603
|
+
*/
|
|
4604
|
+
initChannelMoveCall(tx: Transaction, remoteEid: number | TransactionArgument, remoteOApp: Uint8Array | TransactionArgument): Promise<void>;
|
|
4605
|
+
/**
|
|
4606
|
+
* Clear a message from the messaging channel
|
|
4607
|
+
* @param tx - The transaction to add the move call to
|
|
4608
|
+
* @param srcEid - Source endpoint ID
|
|
4609
|
+
* @param sender - Sender address as bytes32
|
|
4610
|
+
* @param nonce - Message nonce
|
|
4611
|
+
* @param guid - Message GUID as bytes32
|
|
4612
|
+
* @param message - Message payload
|
|
4613
|
+
*/
|
|
4614
|
+
clearMoveCall(tx: Transaction, srcEid: number | TransactionArgument, sender: Uint8Array | TransactionArgument, nonce: number | bigint | TransactionArgument, guid: Uint8Array | TransactionArgument, message: Uint8Array | TransactionArgument): Promise<void>;
|
|
4615
|
+
/**
|
|
4616
|
+
* Skip a message in the messaging channel
|
|
4617
|
+
* @param tx - The transaction to add the move call to
|
|
4618
|
+
* @param srcEid - Source endpoint ID
|
|
4619
|
+
* @param sender - Sender address as bytes32
|
|
4620
|
+
* @param nonce - Message nonce
|
|
4621
|
+
*/
|
|
4622
|
+
skipMoveCall(tx: Transaction, srcEid: number | TransactionArgument, sender: Uint8Array | TransactionArgument, nonce: number | bigint | TransactionArgument): Promise<void>;
|
|
4623
|
+
/**
|
|
4624
|
+
* Nilify a message in the messaging channel
|
|
4625
|
+
* @param tx - The transaction to add the move call to
|
|
4626
|
+
* @param srcEid - Source endpoint ID
|
|
4627
|
+
* @param sender - Sender address as bytes32
|
|
4628
|
+
* @param nonce - Message nonce
|
|
4629
|
+
* @param payloadHash - Payload hash as bytes32
|
|
4630
|
+
*/
|
|
4631
|
+
nilifyMoveCall(tx: Transaction, srcEid: number | TransactionArgument, sender: Uint8Array | TransactionArgument, nonce: number | bigint | TransactionArgument, payloadHash: Uint8Array | TransactionArgument): Promise<void>;
|
|
4632
|
+
/**
|
|
4633
|
+
* Burn a message in the messaging channel
|
|
4634
|
+
* @param tx - The transaction to add the move call to
|
|
4635
|
+
* @param srcEid - Source endpoint ID
|
|
4636
|
+
* @param sender - Sender address as bytes32
|
|
4637
|
+
* @param nonce - Message nonce
|
|
4638
|
+
* @param payloadHash - Payload hash as bytes32
|
|
4639
|
+
*/
|
|
4640
|
+
burnMoveCall(tx: Transaction, srcEid: number | TransactionArgument, sender: Uint8Array | TransactionArgument, nonce: number | bigint | TransactionArgument, payloadHash: Uint8Array | TransactionArgument): Promise<void>;
|
|
4641
|
+
/**
|
|
4642
|
+
* Set send library for a destination chain
|
|
4643
|
+
* @param tx - The transaction to add the move call to
|
|
4644
|
+
* @param dstEid - Destination endpoint ID
|
|
4645
|
+
* @param sendLibrary - Send library address
|
|
4646
|
+
*/
|
|
4647
|
+
setSendLibraryMoveCall(tx: Transaction, dstEid: number | TransactionArgument, sendLibrary: string | TransactionArgument): Promise<void>;
|
|
4648
|
+
/**
|
|
4649
|
+
* Set receive library for a source chain
|
|
4650
|
+
* @param tx - The transaction to add the move call to
|
|
4651
|
+
* @param srcEid - Source endpoint ID
|
|
4652
|
+
* @param receiveLibrary - Receive library address
|
|
4653
|
+
* @param gracePeriod - Grace period in seconds
|
|
4654
|
+
*/
|
|
4655
|
+
setReceiveLibraryMoveCall(tx: Transaction, srcEid: number | TransactionArgument, receiveLibrary: string | TransactionArgument, gracePeriod: number | bigint | TransactionArgument): Promise<void>;
|
|
4656
|
+
/**
|
|
4657
|
+
* Set receive library timeout for a source chain
|
|
4658
|
+
* @param tx - The transaction to add the move call to
|
|
4659
|
+
* @param srcEid - Source endpoint ID
|
|
4660
|
+
* @param receiveLibrary - Receive library address
|
|
4661
|
+
* @param expiry - Expiry timestamp in seconds
|
|
4662
|
+
*/
|
|
4663
|
+
setReceiveLibraryTimeoutMoveCall(tx: Transaction, srcEid: number | TransactionArgument, receiveLibrary: string | TransactionArgument, expiry: number | bigint | TransactionArgument): Promise<void>;
|
|
4664
|
+
/**
|
|
4665
|
+
* Set configuration for a message library
|
|
4666
|
+
* @param tx - The transaction to add the move call to
|
|
4667
|
+
* @param lib - Library address
|
|
4668
|
+
* @param eid - Endpoint ID
|
|
4669
|
+
* @param configType - Configuration type
|
|
4670
|
+
* @param config - Configuration data as bytes
|
|
4671
|
+
* @returns Transaction result containing Call<MessageLibSetConfigParam, Void>
|
|
4672
|
+
*/
|
|
4673
|
+
setConfigMoveCall(tx: Transaction, lib: string | TransactionArgument, eid: number | TransactionArgument, configType: number | TransactionArgument, config: Uint8Array | TransactionArgument): Promise<TransactionResult>;
|
|
4193
4674
|
}
|
|
4194
4675
|
|
|
4195
4676
|
/**
|
|
@@ -4248,13 +4729,19 @@ declare class LayerZeroViews {
|
|
|
4248
4729
|
}
|
|
4249
4730
|
|
|
4250
4731
|
declare const CallErrorCode: {
|
|
4251
|
-
readonly
|
|
4732
|
+
readonly Call_ECallNotActive: 1;
|
|
4252
4733
|
readonly Call_ECallNotCompleted: 2;
|
|
4253
|
-
readonly
|
|
4734
|
+
readonly Call_ECallNotCreating: 3;
|
|
4254
4735
|
readonly Call_ECallNotRoot: 4;
|
|
4255
|
-
readonly
|
|
4256
|
-
readonly
|
|
4257
|
-
readonly
|
|
4736
|
+
readonly Call_ECallNotWaiting: 5;
|
|
4737
|
+
readonly Call_EInvalidChild: 6;
|
|
4738
|
+
readonly Call_EInvalidNonce: 7;
|
|
4739
|
+
readonly Call_EInvalidParent: 8;
|
|
4740
|
+
readonly Call_EParameterNotMutable: 9;
|
|
4741
|
+
readonly Call_EUnauthorized: 10;
|
|
4742
|
+
readonly CallCap_EBadWitness: 1;
|
|
4743
|
+
readonly MultiCall_ECalleeNotFound: 1;
|
|
4744
|
+
readonly MultiCall_EUnauthorized: 2;
|
|
4258
4745
|
};
|
|
4259
4746
|
declare class Call {
|
|
4260
4747
|
#private;
|
|
@@ -4781,228 +5268,6 @@ declare class Zro {
|
|
|
4781
5268
|
noneOptionMoveCall(tx: Transaction): TransactionResult;
|
|
4782
5269
|
}
|
|
4783
5270
|
|
|
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
5271
|
declare const PACKAGE_UTILS_ADDRESS: {
|
|
5007
5272
|
[stage in Stage]?: string;
|
|
5008
5273
|
};
|
|
@@ -5081,6 +5346,12 @@ declare const PACKAGE_BLOCKED_MESSAGE_LIB_ADDRESS: {
|
|
|
5081
5346
|
declare const PACKAGE_BLOCKED_MESSAGE_LIB_PTB_BUILDER_ADDRESS: {
|
|
5082
5347
|
[stage in Stage]?: string;
|
|
5083
5348
|
};
|
|
5349
|
+
declare const PACKAGE_WORKER_REGISTRY_ADDRESS: {
|
|
5350
|
+
[stage in Stage]?: string;
|
|
5351
|
+
};
|
|
5352
|
+
declare const PACKAGE_WORKER_COMMON_ADDRESS: {
|
|
5353
|
+
[stage in Stage]?: string;
|
|
5354
|
+
};
|
|
5084
5355
|
declare const OBJECT_ENDPOINT_V2_ADDRESS: {
|
|
5085
5356
|
[stage in Stage]?: string;
|
|
5086
5357
|
};
|
|
@@ -5174,6 +5445,9 @@ declare const OBJECT_PRICE_FEED_OWNER_CAP_ADDRESS: {
|
|
|
5174
5445
|
declare const OBJECT_PACKAGE_WHITELIST_VALIDATOR_ADDRESS: {
|
|
5175
5446
|
[stage in Stage]?: string;
|
|
5176
5447
|
};
|
|
5448
|
+
declare const OBJECT_WORKER_REGISTRY_ADDRESS: {
|
|
5449
|
+
[stage in Stage]?: string;
|
|
5450
|
+
};
|
|
5177
5451
|
|
|
5178
5452
|
/**
|
|
5179
5453
|
* The SDK class provides methods to interact with LayerZero on Sui.
|
|
@@ -5200,7 +5474,7 @@ declare class SDK {
|
|
|
5200
5474
|
getPtbBuilder(): PtbBuilder;
|
|
5201
5475
|
getTreasury(): Treasury;
|
|
5202
5476
|
getLayerZeroViews(): LayerZeroViews;
|
|
5203
|
-
getOApp(): OApp;
|
|
5477
|
+
getOApp(callCapId: string, options?: ModuleOptions): OApp;
|
|
5204
5478
|
getCounter(options?: ModuleOptions): Counter;
|
|
5205
5479
|
getExecutor(options?: ModuleOptions): Executor;
|
|
5206
5480
|
getDvn(options?: ModuleOptions): DVN;
|
|
@@ -5216,6 +5490,7 @@ declare class SDK {
|
|
|
5216
5490
|
getEndpointPtbBuilder(options?: ModuleOptions): EndpointPtbBuilder;
|
|
5217
5491
|
getSimpleMessageLibPtbBuilder(options?: ModuleOptions): SimpleMessageLibPtbBuilder;
|
|
5218
5492
|
getBlockedMessageLibPtbBuilder(options?: ModuleOptions): BlockedMessageLibPtbBuilder;
|
|
5493
|
+
getWorkerRegistry(options?: ModuleOptions): WorkerRegistry;
|
|
5219
5494
|
getOrCreateModule<T>(moduleName: string, options: ModuleOptions | undefined, factory: () => T): T;
|
|
5220
5495
|
}
|
|
5221
5496
|
|
|
@@ -5229,6 +5504,14 @@ declare const DvnDstConfigBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
|
|
|
5229
5504
|
floor_margin_usd: string | number | bigint;
|
|
5230
5505
|
}>;
|
|
5231
5506
|
|
|
5507
|
+
declare const TimeoutBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
|
|
5508
|
+
expiry: string;
|
|
5509
|
+
fallback_lib: string;
|
|
5510
|
+
}, {
|
|
5511
|
+
expiry: string | number | bigint;
|
|
5512
|
+
fallback_lib: any;
|
|
5513
|
+
}>;
|
|
5514
|
+
|
|
5232
5515
|
declare const Bytes32Bcs: _mysten_sui_dist_cjs_bcs.BcsType<{
|
|
5233
5516
|
bytes: number[];
|
|
5234
5517
|
}, {
|
|
@@ -5403,6 +5686,24 @@ declare const VectorMoveCallBCS: _mysten_sui_dist_cjs_bcs.BcsType<{
|
|
|
5403
5686
|
length: number;
|
|
5404
5687
|
}>;
|
|
5405
5688
|
|
|
5689
|
+
declare const OAppInfoV1Bcs: _mysten_sui_dist_cjs_bcs.BcsType<{
|
|
5690
|
+
oapp_object: string;
|
|
5691
|
+
next_nonce_info: number[];
|
|
5692
|
+
lz_receive_info: number[];
|
|
5693
|
+
extra_info: number[];
|
|
5694
|
+
}, {
|
|
5695
|
+
oapp_object: any;
|
|
5696
|
+
next_nonce_info: Iterable<number> & {
|
|
5697
|
+
length: number;
|
|
5698
|
+
};
|
|
5699
|
+
lz_receive_info: Iterable<number> & {
|
|
5700
|
+
length: number;
|
|
5701
|
+
};
|
|
5702
|
+
extra_info: Iterable<number> & {
|
|
5703
|
+
length: number;
|
|
5704
|
+
};
|
|
5705
|
+
}>;
|
|
5706
|
+
|
|
5406
5707
|
declare const PriceBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
|
|
5407
5708
|
price_ratio: string;
|
|
5408
5709
|
gas_price_in_unit: string;
|
|
@@ -5470,12 +5771,4 @@ declare const OAppUlnConfigBcs: _mysten_sui_dist_cjs_bcs.BcsType<{
|
|
|
5470
5771
|
};
|
|
5471
5772
|
}>;
|
|
5472
5773
|
|
|
5473
|
-
|
|
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 };
|
|
5774
|
+
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, DVNLayerzeroErrorCode, type DstConfig, DstConfigBcs, type DvnDstConfig, DvnDstConfigBcs, DvnLayerZero, DvnPtbBuilder, Endpoint, EndpointErrorCode, EndpointExecutionState, type EndpointExecutionStateType, EndpointPtbBuilder, EndpointPtbBuilderErrorCode, type ExecutableParams, Executor, type ExecutorConfig, ExecutorConfigBcs, ExecutorErrorCode, ExecutorFeeLib, ExecutorFeeLibErrorCode, ExecutorLayerZero, ExecutorLayerzeroErrorCode, ExecutorOptionType, ExecutorPtbBuilder, type Function, FunctionBCS, type IPTBValidator, type InitializableParams, LayerZeroViews, 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, PtbBuilderErrorCode, SDK, type SdkOptions, type SetDstConfigEvent, ShareObjectValidator, SimpleMessageLib, SimpleMessageLibErrorCode, SimpleMessageLibPtbBuilder, type SimulateResult, type Timeout, TimeoutBcs, Treasury, TreasuryErrorCode, Uln302, Uln302ErrorCode, Uln302PtbBuilder, Uln302PtbBuilderErrorCode, 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 };
|