@layerzerolabs/lz-movevm-sdk-v2 3.0.84-aptos-301.0 → 3.0.84
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 +36 -0
- package/dist/index.cjs +0 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +0 -21
- package/dist/index.d.ts +0 -21
- package/dist/index.mjs +0 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -638,13 +638,6 @@ declare class DvnWorker<AccountType> {
|
|
|
638
638
|
* @returns {Promise<boolean>} True if the DVN contract is initialized, false otherwise.
|
|
639
639
|
*/
|
|
640
640
|
isInitialize(): Promise<boolean>;
|
|
641
|
-
createUln301ForDVNPayload(uln301Address: string): Promise<InputEntryFunctionData>;
|
|
642
|
-
/**
|
|
643
|
-
* Gets the opt in/out status of a worker
|
|
644
|
-
* @param uln301Address - The ULN 301 address
|
|
645
|
-
* @returns {Promise<boolean>} The opt in/out status of the worker
|
|
646
|
-
*/
|
|
647
|
-
getWorkerConfigForFeeLibRoutingOptIn(uln301Address: string): Promise<boolean>;
|
|
648
641
|
/**
|
|
649
642
|
* Gets the destination configuration for the specified endpoint.
|
|
650
643
|
*
|
|
@@ -652,13 +645,6 @@ declare class DvnWorker<AccountType> {
|
|
|
652
645
|
* @returns {Promise<DVNDstConfig>} The destination configuration.
|
|
653
646
|
*/
|
|
654
647
|
getDstConfig(dstEid: EndpointId): Promise<DVNDstConfig>;
|
|
655
|
-
/**
|
|
656
|
-
* Creates a payload for setting the supported message libraries.
|
|
657
|
-
*
|
|
658
|
-
* @param {string[]} msglibs - The supported message libraries.
|
|
659
|
-
* @returns {InputEntryFunctionData} The input entry function data.
|
|
660
|
-
*/
|
|
661
|
-
createSetSupportedMsglibsPayload(msglibs: string[], expiration: number, signatures: string): InputEntryFunctionData;
|
|
662
648
|
/**
|
|
663
649
|
* Creates a payload for setting the destination configuration.
|
|
664
650
|
*
|
|
@@ -1130,13 +1116,6 @@ declare class Executor<AccountType> {
|
|
|
1130
1116
|
* @returns {Promise<TransactionResponse>} The transaction response.
|
|
1131
1117
|
*/
|
|
1132
1118
|
initialize(signer: AccountType | PrivateKey | MnemonicAndPath, roleAdmin: string, admins: string[], msgLibs: string[], feeLib: string, depositAddress?: string, gasOptions?: GasOptions): Promise<TransactionResponse>;
|
|
1133
|
-
createUln301ForExecutorPayload(uln301Address: string): Promise<InputEntryFunctionData>;
|
|
1134
|
-
/**
|
|
1135
|
-
* Gets the opt in/out status of a worker
|
|
1136
|
-
* @param uln301Address - The ULN 301 address
|
|
1137
|
-
* @returns {Promise<boolean>} The opt in/out status of the worker
|
|
1138
|
-
*/
|
|
1139
|
-
getWorkerConfigForFeeLibRoutingOptIn(uln301Address: string): Promise<boolean>;
|
|
1140
1119
|
/**
|
|
1141
1120
|
* Gets the destination configuration for the specified endpoint.
|
|
1142
1121
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -638,13 +638,6 @@ declare class DvnWorker<AccountType> {
|
|
|
638
638
|
* @returns {Promise<boolean>} True if the DVN contract is initialized, false otherwise.
|
|
639
639
|
*/
|
|
640
640
|
isInitialize(): Promise<boolean>;
|
|
641
|
-
createUln301ForDVNPayload(uln301Address: string): Promise<InputEntryFunctionData>;
|
|
642
|
-
/**
|
|
643
|
-
* Gets the opt in/out status of a worker
|
|
644
|
-
* @param uln301Address - The ULN 301 address
|
|
645
|
-
* @returns {Promise<boolean>} The opt in/out status of the worker
|
|
646
|
-
*/
|
|
647
|
-
getWorkerConfigForFeeLibRoutingOptIn(uln301Address: string): Promise<boolean>;
|
|
648
641
|
/**
|
|
649
642
|
* Gets the destination configuration for the specified endpoint.
|
|
650
643
|
*
|
|
@@ -652,13 +645,6 @@ declare class DvnWorker<AccountType> {
|
|
|
652
645
|
* @returns {Promise<DVNDstConfig>} The destination configuration.
|
|
653
646
|
*/
|
|
654
647
|
getDstConfig(dstEid: EndpointId): Promise<DVNDstConfig>;
|
|
655
|
-
/**
|
|
656
|
-
* Creates a payload for setting the supported message libraries.
|
|
657
|
-
*
|
|
658
|
-
* @param {string[]} msglibs - The supported message libraries.
|
|
659
|
-
* @returns {InputEntryFunctionData} The input entry function data.
|
|
660
|
-
*/
|
|
661
|
-
createSetSupportedMsglibsPayload(msglibs: string[], expiration: number, signatures: string): InputEntryFunctionData;
|
|
662
648
|
/**
|
|
663
649
|
* Creates a payload for setting the destination configuration.
|
|
664
650
|
*
|
|
@@ -1130,13 +1116,6 @@ declare class Executor<AccountType> {
|
|
|
1130
1116
|
* @returns {Promise<TransactionResponse>} The transaction response.
|
|
1131
1117
|
*/
|
|
1132
1118
|
initialize(signer: AccountType | PrivateKey | MnemonicAndPath, roleAdmin: string, admins: string[], msgLibs: string[], feeLib: string, depositAddress?: string, gasOptions?: GasOptions): Promise<TransactionResponse>;
|
|
1133
|
-
createUln301ForExecutorPayload(uln301Address: string): Promise<InputEntryFunctionData>;
|
|
1134
|
-
/**
|
|
1135
|
-
* Gets the opt in/out status of a worker
|
|
1136
|
-
* @param uln301Address - The ULN 301 address
|
|
1137
|
-
* @returns {Promise<boolean>} The opt in/out status of the worker
|
|
1138
|
-
*/
|
|
1139
|
-
getWorkerConfigForFeeLibRoutingOptIn(uln301Address: string): Promise<boolean>;
|
|
1140
1119
|
/**
|
|
1141
1120
|
* Gets the destination configuration for the specified endpoint.
|
|
1142
1121
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -432,35 +432,6 @@ var DvnWorker = class {
|
|
|
432
432
|
throw e;
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
async createUln301ForDVNPayload(uln301Address) {
|
|
436
|
-
if (await this.sdk.isObjectAddress(this.module[0])) {
|
|
437
|
-
const functionIdOrBytecode = uln301DvnScriptHex(
|
|
438
|
-
this.sdk.accounts.deploy_to_object,
|
|
439
|
-
uln301Address
|
|
440
|
-
);
|
|
441
|
-
const functionArguments = [this.module[0]];
|
|
442
|
-
const functionArgumentTypes = ["address"];
|
|
443
|
-
return {
|
|
444
|
-
function: functionIdOrBytecode,
|
|
445
|
-
functionArguments,
|
|
446
|
-
functionArgumentTypes
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
throw new Error("Only supported object deployment");
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Gets the opt in/out status of a worker
|
|
453
|
-
* @param uln301Address - The ULN 301 address
|
|
454
|
-
* @returns {Promise<boolean>} The opt in/out status of the worker
|
|
455
|
-
*/
|
|
456
|
-
async getWorkerConfigForFeeLibRoutingOptIn(uln301Address) {
|
|
457
|
-
const view = await this.sdk.viewFunction({
|
|
458
|
-
functionName: `${uln301Address}::msglib::worker_config_for_fee_lib_routing_opt_in`,
|
|
459
|
-
functionArgs: [this.module[0]],
|
|
460
|
-
functionArgTypes: ["address"]
|
|
461
|
-
});
|
|
462
|
-
return view[0];
|
|
463
|
-
}
|
|
464
435
|
/**
|
|
465
436
|
* Gets the destination configuration for the specified endpoint.
|
|
466
437
|
*
|
|
@@ -491,19 +462,6 @@ var DvnWorker = class {
|
|
|
491
462
|
throw e;
|
|
492
463
|
}
|
|
493
464
|
}
|
|
494
|
-
/**
|
|
495
|
-
* Creates a payload for setting the supported message libraries.
|
|
496
|
-
*
|
|
497
|
-
* @param {string[]} msglibs - The supported message libraries.
|
|
498
|
-
* @returns {InputEntryFunctionData} The input entry function data.
|
|
499
|
-
*/
|
|
500
|
-
createSetSupportedMsglibsPayload(msglibs, expiration, signatures) {
|
|
501
|
-
return {
|
|
502
|
-
function: `${this.module[0]}::${this.module[1]}::set_supported_msglibs`,
|
|
503
|
-
functionArguments: [msglibs, expiration, arrayify(signatures)],
|
|
504
|
-
functionArgumentTypes: ["vector<address>", "u64", "vector<u8>"]
|
|
505
|
-
};
|
|
506
|
-
}
|
|
507
465
|
/**
|
|
508
466
|
* Creates a payload for setting the destination configuration.
|
|
509
467
|
*
|
|
@@ -642,11 +600,6 @@ var initializeDvnScriptHex = (deployerAddressHex, dvnAddressHex, uln302AddressHe
|
|
|
642
600
|
uln302AddressHex = trim0x$1(padify(uln302AddressHex));
|
|
643
601
|
return `a11ceb0b060000000701000a030a1a042402052657077d9201088f028001068f031d000000010102020303040405030400010606070101000708090002080a020003090b0200010508060c05050a020a02030a0205170c0101010303030a020a05060c0a020a0a020303030303030303030a020a050002060c05010c010203060a09000303010a0900010a02010507060c050a050a0a02030a050502060c010866726f6d5f62637306766563746f720364766e066d73676c6962166f626a6563745f636f64655f6465706c6f796d656e74166765745f636f64655f6f626a6563745f7369676e657205736c6963650a746f5f616464726573730a696e697469616c697a652c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f70745f696e${stdAddressHex}${dvnAddressHex}${uln302AddressHex}${deployerAddressHex}03082000000000000000030840000000000000000a0501000a0a020100000001b0010b000b0111000c080e080c110e0341050c170a1707001906000000000000000021041005140b11010601000000000000002707020c100600000000000000000c14090c090b1707001a0c0c0a0904250b14060100000000000000160c140527080c090a140a0c23043b0a140700180c1a0e030a1a0b1a07001638000c0f0d100b0f11024409051e0e0641050c180a1807001906000000000000000021044505490b11010601000000000000002707020c1e0600000000000000000c15090c0a0b1807001a0c0e0a0a045a0b15060100000000000000160c15055c080c0a0a150a0e2304700a150700180c1c0e060a1c0b1c07001638000c1d0d1e0b1d1102440905530e0441050c190a1907011906000000000000000021047a057e0b11010601000000000000002707030c130600000000000000000c16090c0b0b1907011a0c0d0a0b048f010b16060100000000000000160c16059101080c0b0a160a0d2304a4010a160701180c1b0e040a1b0b1b07011638000c120d130b1244080588010a110b020b100b130b050b1e0b0711030b1108110402`;
|
|
644
602
|
};
|
|
645
|
-
var uln301DvnScriptHex = (deployerAddressHex, uln301AddressHex) => {
|
|
646
|
-
deployerAddressHex = trim0x$1(padify(deployerAddressHex));
|
|
647
|
-
uln301AddressHex = trim0x$1(padify(uln301AddressHex));
|
|
648
|
-
return `a11ceb0b060000000501000403040a050e0b071962087b40000001010102000100000303020002060c05010c0002060c01066d73676c6962166f626a6563745f636f64655f6465706c6f796d656e74166765745f636f64655f6f626a6563745f7369676e65722c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f70745f696e${uln301AddressHex}${deployerAddressHex}000001080b000b0111000c020e0208110102`;
|
|
649
|
-
};
|
|
650
603
|
var Endpoint = class {
|
|
651
604
|
/**
|
|
652
605
|
* Creates an instance of Endpoint.
|
|
@@ -1435,35 +1388,6 @@ var Executor = class {
|
|
|
1435
1388
|
gasOptions
|
|
1436
1389
|
);
|
|
1437
1390
|
}
|
|
1438
|
-
async createUln301ForExecutorPayload(uln301Address) {
|
|
1439
|
-
if (await this.sdk.isObjectAddress(this.module[0])) {
|
|
1440
|
-
const functionIdOrBytecode = uln301ExecutorScriptHex(
|
|
1441
|
-
this.sdk.accounts.deploy_to_object,
|
|
1442
|
-
uln301Address
|
|
1443
|
-
);
|
|
1444
|
-
const functionArguments = [this.module[0]];
|
|
1445
|
-
const functionArgumentTypes = ["address"];
|
|
1446
|
-
return {
|
|
1447
|
-
function: functionIdOrBytecode,
|
|
1448
|
-
functionArguments,
|
|
1449
|
-
functionArgumentTypes
|
|
1450
|
-
};
|
|
1451
|
-
}
|
|
1452
|
-
throw new Error("Only supported object deployment");
|
|
1453
|
-
}
|
|
1454
|
-
/**
|
|
1455
|
-
* Gets the opt in/out status of a worker
|
|
1456
|
-
* @param uln301Address - The ULN 301 address
|
|
1457
|
-
* @returns {Promise<boolean>} The opt in/out status of the worker
|
|
1458
|
-
*/
|
|
1459
|
-
async getWorkerConfigForFeeLibRoutingOptIn(uln301Address) {
|
|
1460
|
-
const view = await this.sdk.viewFunction({
|
|
1461
|
-
functionName: `${uln301Address}::msglib::worker_config_for_fee_lib_routing_opt_in`,
|
|
1462
|
-
functionArgs: [this.module[0]],
|
|
1463
|
-
functionArgTypes: ["address"]
|
|
1464
|
-
});
|
|
1465
|
-
return view[0];
|
|
1466
|
-
}
|
|
1467
1391
|
/**
|
|
1468
1392
|
* Gets the destination configuration for the specified endpoint.
|
|
1469
1393
|
*
|
|
@@ -1907,11 +1831,6 @@ var initializeExecutorScriptHex = (deployerAddressHex, executorAddressHex, uln30
|
|
|
1907
1831
|
uln302AddressHex = trim0x$1(padify(uln302AddressHex));
|
|
1908
1832
|
return `a11ceb0b060000000701000a030a1a042402052648076e970108850280010685030e000000010102020303040405030400010606070101000708090002080a020003090b0200010507060c0505050a020a0205100c010103030a020a05060c0303030303030a020a050002060c05010c010203060a09000303010a0900010a02010506060c05050a050a050502060c010866726f6d5f62637306766563746f72086578656375746f72066d73676c6962166f626a6563745f636f64655f6465706c6f796d656e74166765745f636f64655f6f626a6563745f7369676e657205736c6963650a746f5f616464726573730a696e697469616c697a652c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f70745f696e${stdAddressHex}${executorAddressHex}${uln302AddressHex}${deployerAddressHex}030820000000000000000a0501000000017b0b000b0111000c070e070c0e0e0441050c110a1107001906000000000000000021041005140b0e010601000000000000002707010c0d0600000000000000000c0f090c080b1107001a0c0a0a0804250b0f060100000000000000160c0f0527080c080a0f0a0a23043b0a0f0700180c130e040a130b1307001638000c0c0d0d0b0c11024409051e0e0541050c120a1207001906000000000000000021044505490b0e010601000000000000002707010c160600000000000000000c10090c090b1207001a0c0b0a09045a0b10060100000000000000160c10055c080c090a100a0b2304700a100700180c140e050a140b1407001638000c150d160b151102440905530a0e0b020b030b0d0b160b0611030b0e08110402`;
|
|
1909
1833
|
};
|
|
1910
|
-
var uln301ExecutorScriptHex = (deployerAddressHex, uln301AddressHex) => {
|
|
1911
|
-
deployerAddressHex = trim0x$1(padify(deployerAddressHex));
|
|
1912
|
-
uln301AddressHex = trim0x$1(padify(uln301AddressHex));
|
|
1913
|
-
return `a11ceb0b060000000501000403040a050e0b071962087b40000001010102000100000303020002060c05010c0002060c01066d73676c6962166f626a6563745f636f64655f6465706c6f796d656e74166765745f636f64655f6f626a6563745f7369676e65722c7365745f776f726b65725f636f6e6669675f666f725f6665655f6c69625f726f7574696e675f6f70745f696e${uln301AddressHex}${deployerAddressHex}000001080b000b0111000c020e0208110102`;
|
|
1914
|
-
};
|
|
1915
1834
|
function asciiToHex(str) {
|
|
1916
1835
|
let hex = "";
|
|
1917
1836
|
for (let i = 0; i < str.length; i++) {
|