@layerzerolabs/lz-ton-sdk-v2 3.0.59 → 3.0.60
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 +6 -0
- package/artifacts/AllStorages.compiled.json +1 -1
- package/artifacts/Channel.compiled.json +1 -1
- package/artifacts/Controller.compiled.json +1 -1
- package/artifacts/Counter.compiled.json +1 -1
- package/artifacts/Dvn.compiled.json +1 -1
- package/artifacts/Executor.compiled.json +1 -1
- package/artifacts/ExecutorFeeLib.compiled.json +1 -1
- package/artifacts/PriceFeedCache.compiled.json +1 -1
- package/artifacts/Proxy.compiled.json +1 -1
- package/artifacts/Uln.compiled.json +1 -1
- package/artifacts/UlnConnection.compiled.json +1 -1
- package/artifacts/UlnManager.compiled.json +1 -1
- package/deployments/ton-sandbox-local/AllStorages.json +1 -1
- package/deployments/ton-sandbox-local/Controller.json +1 -1
- package/deployments/ton-sandbox-local/Counter.json +1 -1
- package/deployments/ton-sandbox-local/Dvn.json +1 -1
- package/deployments/ton-sandbox-local/DvnProxy.json +1 -1
- package/deployments/ton-sandbox-local/Executor.json +1 -1
- package/deployments/ton-sandbox-local/ExecutorProxy.json +1 -1
- package/deployments/ton-sandbox-local/SmlManager.json +1 -1
- package/deployments/ton-sandbox-local/UlnManager.json +1 -1
- package/dist/index.cjs +74 -135
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +448 -644
- package/dist/index.d.ts +448 -644
- package/dist/index.mjs +74 -135
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
package/dist/index.cjs
CHANGED
|
@@ -6557,6 +6557,9 @@ var generateDecodeClass = (_tonObjects) => (_className, cell) => {
|
|
|
6557
6557
|
if (prop === "getCellName") {
|
|
6558
6558
|
return () => getCellName(cell2);
|
|
6559
6559
|
}
|
|
6560
|
+
if (prop === "rawCell") {
|
|
6561
|
+
return cell2;
|
|
6562
|
+
}
|
|
6560
6563
|
return Reflect.get(target, prop);
|
|
6561
6564
|
}
|
|
6562
6565
|
});
|
|
@@ -7165,29 +7168,6 @@ var tonObjects = {
|
|
|
7165
7168
|
fieldType: "cl::t::coins"
|
|
7166
7169
|
}
|
|
7167
7170
|
},
|
|
7168
|
-
"lz::Worker": {
|
|
7169
|
-
name: "Worker",
|
|
7170
|
-
0: {
|
|
7171
|
-
fieldName: "lz::Worker::owner",
|
|
7172
|
-
fieldType: "cl::t::address"
|
|
7173
|
-
},
|
|
7174
|
-
1: {
|
|
7175
|
-
fieldName: "lz::Worker::viewAllowlist",
|
|
7176
|
-
fieldType: "cl::t::dict256"
|
|
7177
|
-
},
|
|
7178
|
-
2: {
|
|
7179
|
-
fieldName: "lz::Worker::viewDependencies",
|
|
7180
|
-
fieldType: "cl::t::dict256"
|
|
7181
|
-
},
|
|
7182
|
-
3: {
|
|
7183
|
-
fieldName: "lz::Worker::bytecodeLibrary",
|
|
7184
|
-
fieldType: "cl::t::cellRef"
|
|
7185
|
-
},
|
|
7186
|
-
4: {
|
|
7187
|
-
fieldName: "lz::Worker::storage",
|
|
7188
|
-
fieldType: "cl::t::objRef"
|
|
7189
|
-
}
|
|
7190
|
-
},
|
|
7191
7171
|
"md::AddMsglib": {
|
|
7192
7172
|
name: "addMsgLib",
|
|
7193
7173
|
0: {
|
|
@@ -8924,6 +8904,17 @@ var tonResolvedObjects = {
|
|
|
8924
8904
|
},
|
|
8925
8905
|
name: "POOO"
|
|
8926
8906
|
},
|
|
8907
|
+
"md::InitUlnManager": {
|
|
8908
|
+
"0": {
|
|
8909
|
+
fieldName: "md::InitUlnManager::endpointCode",
|
|
8910
|
+
fieldType: "cl::t::cellRef"
|
|
8911
|
+
},
|
|
8912
|
+
"1": {
|
|
8913
|
+
fieldName: "md::InitUlnManager::channelCode",
|
|
8914
|
+
fieldType: "cl::t::cellRef"
|
|
8915
|
+
},
|
|
8916
|
+
name: "InitUlnMgr"
|
|
8917
|
+
},
|
|
8927
8918
|
UlnManager: {
|
|
8928
8919
|
"0": {
|
|
8929
8920
|
fieldName: "UlnManager::baseStorage",
|
|
@@ -8967,17 +8958,6 @@ var tonResolvedObjects = {
|
|
|
8967
8958
|
},
|
|
8968
8959
|
name: "ulnMgr"
|
|
8969
8960
|
},
|
|
8970
|
-
"md::InitUlnManager": {
|
|
8971
|
-
"0": {
|
|
8972
|
-
fieldName: "md::InitUlnManager::endpointCode",
|
|
8973
|
-
fieldType: "cl::t::cellRef"
|
|
8974
|
-
},
|
|
8975
|
-
"1": {
|
|
8976
|
-
fieldName: "md::InitUlnManager::channelCode",
|
|
8977
|
-
fieldType: "cl::t::cellRef"
|
|
8978
|
-
},
|
|
8979
|
-
name: "InitUlnMgr"
|
|
8980
|
-
},
|
|
8981
8961
|
Dvn: {
|
|
8982
8962
|
"0": {
|
|
8983
8963
|
fieldName: "Dvn::workerCoreStorage",
|
|
@@ -9185,7 +9165,7 @@ var tonResolvedObjects = {
|
|
|
9185
9165
|
},
|
|
9186
9166
|
"2": {
|
|
9187
9167
|
fieldName: "UlnWorkerFeelibInfo::workerFeelibStorage",
|
|
9188
|
-
fieldType: "
|
|
9168
|
+
fieldType: "cl::t::objRef"
|
|
9189
9169
|
},
|
|
9190
9170
|
"3": {
|
|
9191
9171
|
fieldName: "UlnWorkerFeelibInfo::friendWorkerAddress",
|
|
@@ -9345,6 +9325,17 @@ var tonResolvedObjects = {
|
|
|
9345
9325
|
},
|
|
9346
9326
|
name: "SetEpCfg"
|
|
9347
9327
|
},
|
|
9328
|
+
"md::ClaimTon": {
|
|
9329
|
+
"0": {
|
|
9330
|
+
fieldName: "md::ClaimTon::amount",
|
|
9331
|
+
fieldType: "cl::t::coins"
|
|
9332
|
+
},
|
|
9333
|
+
"1": {
|
|
9334
|
+
fieldName: "md::ClaimTon::target",
|
|
9335
|
+
fieldType: "cl::t::address"
|
|
9336
|
+
},
|
|
9337
|
+
name: "claimTon"
|
|
9338
|
+
},
|
|
9348
9339
|
"md::CounterIncrement": {
|
|
9349
9340
|
"0": {
|
|
9350
9341
|
fieldName: "md::CounterIncrement::dstEid",
|
|
@@ -9675,6 +9666,39 @@ var tonResolvedObjects = {
|
|
|
9675
9666
|
},
|
|
9676
9667
|
name: "LzRecvSts"
|
|
9677
9668
|
},
|
|
9669
|
+
"md::CoinsAmount": {
|
|
9670
|
+
"0": {
|
|
9671
|
+
fieldName: "md::CoinsAmount::amount",
|
|
9672
|
+
fieldType: "cl::t::coins"
|
|
9673
|
+
},
|
|
9674
|
+
name: "coinsAmt"
|
|
9675
|
+
},
|
|
9676
|
+
"md::NativeDrop": {
|
|
9677
|
+
"0": {
|
|
9678
|
+
fieldName: "md::NativeDrop::payees",
|
|
9679
|
+
fieldType: "cl::t::cellRef"
|
|
9680
|
+
},
|
|
9681
|
+
"1": {
|
|
9682
|
+
fieldName: "md::NativeDrop::packetId",
|
|
9683
|
+
fieldType: "md::PacketId"
|
|
9684
|
+
},
|
|
9685
|
+
"2": {
|
|
9686
|
+
fieldName: "md::NativeDrop::msglib",
|
|
9687
|
+
fieldType: "cl::t::address"
|
|
9688
|
+
},
|
|
9689
|
+
name: "NativeDrop"
|
|
9690
|
+
},
|
|
9691
|
+
"md::PacketId": {
|
|
9692
|
+
"0": {
|
|
9693
|
+
fieldName: "md::PacketId::path",
|
|
9694
|
+
fieldType: "lz::Path"
|
|
9695
|
+
},
|
|
9696
|
+
"1": {
|
|
9697
|
+
fieldName: "md::PacketId::nonce",
|
|
9698
|
+
fieldType: "cl::t::uint64"
|
|
9699
|
+
},
|
|
9700
|
+
name: "pktId"
|
|
9701
|
+
},
|
|
9678
9702
|
"lz::Config": {
|
|
9679
9703
|
"0": {
|
|
9680
9704
|
fieldName: "lz::Config::path",
|
|
@@ -9694,6 +9718,13 @@ var tonResolvedObjects = {
|
|
|
9694
9718
|
},
|
|
9695
9719
|
name: "Config"
|
|
9696
9720
|
},
|
|
9721
|
+
"md::TreasuryFeeBps": {
|
|
9722
|
+
"0": {
|
|
9723
|
+
fieldName: "md::TreasuryFeeBps::treasuryFeeBps",
|
|
9724
|
+
fieldType: "cl::t::uint16"
|
|
9725
|
+
},
|
|
9726
|
+
name: "tfeebps"
|
|
9727
|
+
},
|
|
9697
9728
|
"lz::EpConfig::NewWithConnection": {
|
|
9698
9729
|
"0": {
|
|
9699
9730
|
fieldName: "lz::EpConfig::NewWithConnection::isNull",
|
|
@@ -9762,29 +9793,6 @@ var tonResolvedObjects = {
|
|
|
9762
9793
|
},
|
|
9763
9794
|
name: "SmlJobAssg"
|
|
9764
9795
|
},
|
|
9765
|
-
"lz::Worker": {
|
|
9766
|
-
"0": {
|
|
9767
|
-
fieldName: "lz::Worker::owner",
|
|
9768
|
-
fieldType: "cl::t::address"
|
|
9769
|
-
},
|
|
9770
|
-
"1": {
|
|
9771
|
-
fieldName: "lz::Worker::viewAllowlist",
|
|
9772
|
-
fieldType: "cl::t::dict256"
|
|
9773
|
-
},
|
|
9774
|
-
"2": {
|
|
9775
|
-
fieldName: "lz::Worker::viewDependencies",
|
|
9776
|
-
fieldType: "cl::t::dict256"
|
|
9777
|
-
},
|
|
9778
|
-
"3": {
|
|
9779
|
-
fieldName: "lz::Worker::bytecodeLibrary",
|
|
9780
|
-
fieldType: "cl::t::cellRef"
|
|
9781
|
-
},
|
|
9782
|
-
"4": {
|
|
9783
|
-
fieldName: "lz::Worker::storage",
|
|
9784
|
-
fieldType: "cl::t::objRef"
|
|
9785
|
-
},
|
|
9786
|
-
name: "Worker"
|
|
9787
|
-
},
|
|
9788
9796
|
"md::Bool": {
|
|
9789
9797
|
"0": {
|
|
9790
9798
|
fieldName: "md::Bool::bool",
|
|
@@ -9792,13 +9800,6 @@ var tonResolvedObjects = {
|
|
|
9792
9800
|
},
|
|
9793
9801
|
name: "Bool"
|
|
9794
9802
|
},
|
|
9795
|
-
"md::CoinsAmount": {
|
|
9796
|
-
"0": {
|
|
9797
|
-
fieldName: "md::CoinsAmount::amount",
|
|
9798
|
-
fieldType: "cl::t::coins"
|
|
9799
|
-
},
|
|
9800
|
-
name: "coinsAmt"
|
|
9801
|
-
},
|
|
9802
9803
|
"md::Deploy": {
|
|
9803
9804
|
"0": {
|
|
9804
9805
|
fieldName: "md::Deploy::initialDeposit",
|
|
@@ -9951,17 +9952,6 @@ var tonResolvedObjects = {
|
|
|
9951
9952
|
},
|
|
9952
9953
|
name: "OptionsV2"
|
|
9953
9954
|
},
|
|
9954
|
-
"md::PacketId": {
|
|
9955
|
-
"0": {
|
|
9956
|
-
fieldName: "md::PacketId::path",
|
|
9957
|
-
fieldType: "lz::Path"
|
|
9958
|
-
},
|
|
9959
|
-
"1": {
|
|
9960
|
-
fieldName: "md::PacketId::nonce",
|
|
9961
|
-
fieldType: "cl::t::uint64"
|
|
9962
|
-
},
|
|
9963
|
-
name: "pktId"
|
|
9964
|
-
},
|
|
9965
9955
|
"md::PacketSent": {
|
|
9966
9956
|
"0": {
|
|
9967
9957
|
fieldName: "md::PacketSent::nativeFee",
|
|
@@ -10103,13 +10093,6 @@ var tonResolvedObjects = {
|
|
|
10103
10093
|
},
|
|
10104
10094
|
name: "adminwork"
|
|
10105
10095
|
},
|
|
10106
|
-
"md::TreasuryFeeBps": {
|
|
10107
|
-
"0": {
|
|
10108
|
-
fieldName: "md::TreasuryFeeBps::treasuryFeeBps",
|
|
10109
|
-
fieldType: "cl::t::uint16"
|
|
10110
|
-
},
|
|
10111
|
-
name: "tfeebps"
|
|
10112
|
-
},
|
|
10113
10096
|
UlnReceiveConfig: {
|
|
10114
10097
|
"0": {
|
|
10115
10098
|
fieldName: "UlnReceiveConfig::minCommitPacketGasNull",
|
|
@@ -10263,32 +10246,6 @@ var tonResolvedObjects = {
|
|
|
10263
10246
|
},
|
|
10264
10247
|
name: "ArbFeeExt"
|
|
10265
10248
|
},
|
|
10266
|
-
"md::ClaimTon": {
|
|
10267
|
-
"0": {
|
|
10268
|
-
fieldName: "md::ClaimTon::amount",
|
|
10269
|
-
fieldType: "cl::t::coins"
|
|
10270
|
-
},
|
|
10271
|
-
"1": {
|
|
10272
|
-
fieldName: "md::ClaimTon::target",
|
|
10273
|
-
fieldType: "cl::t::address"
|
|
10274
|
-
},
|
|
10275
|
-
name: "claimTon"
|
|
10276
|
-
},
|
|
10277
|
-
"md::NativeDrop": {
|
|
10278
|
-
"0": {
|
|
10279
|
-
fieldName: "md::NativeDrop::payees",
|
|
10280
|
-
fieldType: "cl::t::cellRef"
|
|
10281
|
-
},
|
|
10282
|
-
"1": {
|
|
10283
|
-
fieldName: "md::NativeDrop::packetId",
|
|
10284
|
-
fieldType: "cl::t::objRef"
|
|
10285
|
-
},
|
|
10286
|
-
"2": {
|
|
10287
|
-
fieldName: "md::NativeDrop::msglib",
|
|
10288
|
-
fieldType: "cl::t::address"
|
|
10289
|
-
},
|
|
10290
|
-
name: "NativeDrop"
|
|
10291
|
-
},
|
|
10292
10249
|
"md::SetDict": {
|
|
10293
10250
|
"0": {
|
|
10294
10251
|
fieldName: "md::SetDict::nonce",
|
|
@@ -11496,6 +11453,7 @@ var OPCODES = {
|
|
|
11496
11453
|
Dvn_OP_SET_PROXY_ADMINS: 1285624859n,
|
|
11497
11454
|
Executor_OP_NATIVE_DROP: 74966741n,
|
|
11498
11455
|
Executor_OP_LZ_RECEIVE_PREPARE: 333322037n,
|
|
11456
|
+
Executor_OP_COMMIT_PACKET: 1097876869n,
|
|
11499
11457
|
Executor_OP_NATIVE_DROP_AND_LZ_RECEIVE_PREPARE: 1812316278n,
|
|
11500
11458
|
Executor_OP_LZ_RECEIVE_ALERT: 3844476787n,
|
|
11501
11459
|
Executor_OP_SET_NATIVE_DROP_TOTAL_CAP: 1545183747n,
|
|
@@ -11940,7 +11898,6 @@ var nameMap = {
|
|
|
11940
11898
|
RcvEpCfg: "LzReceiveEpConfig",
|
|
11941
11899
|
SendEpCfg: "LzSendEpConfig",
|
|
11942
11900
|
SmlJobAssg: "LzSmlJobAssigned",
|
|
11943
|
-
Worker: "LzWorker",
|
|
11944
11901
|
addMsgLib: "MdAddMsglib",
|
|
11945
11902
|
Bool: "MdBool",
|
|
11946
11903
|
cNonceInfo: "MdChannelNonceInfo",
|
|
@@ -12026,7 +11983,6 @@ var keyMap = {
|
|
|
12026
11983
|
RcvEpCfg: "lz::ReceiveEpConfig",
|
|
12027
11984
|
SendEpCfg: "lz::SendEpConfig",
|
|
12028
11985
|
SmlJobAssg: "lz::SmlJobAssigned",
|
|
12029
|
-
Worker: "lz::Worker",
|
|
12030
11986
|
addMsgLib: "md::AddMsglib",
|
|
12031
11987
|
Bool: "md::Bool",
|
|
12032
11988
|
cNonceInfo: "md::ChannelNonceInfo",
|
|
@@ -12149,6 +12105,13 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
|
|
|
12149
12105
|
const body = this.beginMessage(opCode, queryId).storeCoins(balanceRefill).storeRef(data).endCell();
|
|
12150
12106
|
return this.buildSenderArguments(body, opts);
|
|
12151
12107
|
}
|
|
12108
|
+
async sendTonPayment(provider, via, opts) {
|
|
12109
|
+
if (via.address === void 0) {
|
|
12110
|
+
throw new Error("Sender address is not defined");
|
|
12111
|
+
}
|
|
12112
|
+
const request = this.buildSenderArguments($cjs$_ton_core.beginCell().endCell(), opts);
|
|
12113
|
+
return this.sendRequest(provider, via, request);
|
|
12114
|
+
}
|
|
12152
12115
|
async sendInternalMessage(provider, via, opCode, md, opts, balanceRefill = 0n, queryId) {
|
|
12153
12116
|
if (via.address === void 0) {
|
|
12154
12117
|
throw new Error("Sender address is not defined");
|
|
@@ -12326,15 +12289,6 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
|
|
|
12326
12289
|
const getResult = await provider.get("lz::SmlJobAssigned::New", [{ type: "int", value: args.fee }]);
|
|
12327
12290
|
return getResult.stack.readCell();
|
|
12328
12291
|
}
|
|
12329
|
-
async getNewLzWorker(provider, args) {
|
|
12330
|
-
const getResult = await provider.get("lz::Worker::New", [
|
|
12331
|
-
{ type: "int", value: args.owner },
|
|
12332
|
-
{ type: "int", value: args.priceFeedAddress },
|
|
12333
|
-
{ type: "cell", cell: args.bytecode },
|
|
12334
|
-
{ type: "cell", cell: args.storage }
|
|
12335
|
-
]);
|
|
12336
|
-
return getResult.stack.readCell();
|
|
12337
|
-
}
|
|
12338
12292
|
async getNewMdAddMsglib(provider, args) {
|
|
12339
12293
|
const getResult = await provider.get("md::AddMsglib::New", [
|
|
12340
12294
|
{ type: "int", value: args.msglibManagerAddress },
|
|
@@ -15832,20 +15786,6 @@ var TonObjectUnwrapper = class {
|
|
|
15832
15786
|
fee
|
|
15833
15787
|
};
|
|
15834
15788
|
}
|
|
15835
|
-
static async getLzWorkerToTS(wrapper, cell) {
|
|
15836
|
-
const owner = await wrapper.getClInt("cl::get<address>", cell, 0n);
|
|
15837
|
-
const viewAllowlist = await getLzDict(cell, 1n, wrapper);
|
|
15838
|
-
const viewDependencies = await getLzDict(cell, 2n, wrapper);
|
|
15839
|
-
const bytecodeLibrary = await wrapper.getClCell(cell, 3n);
|
|
15840
|
-
const storage = await wrapper.getClCell(cell, 4n);
|
|
15841
|
-
return {
|
|
15842
|
-
owner,
|
|
15843
|
-
viewAllowlist,
|
|
15844
|
-
viewDependencies,
|
|
15845
|
-
bytecodeLibrary,
|
|
15846
|
-
storage
|
|
15847
|
-
};
|
|
15848
|
-
}
|
|
15849
15789
|
static async getMdAddMsglibToTS(wrapper, cell) {
|
|
15850
15790
|
const msglibManagerAddress = await wrapper.getClInt("cl::get<address>", cell, 0n);
|
|
15851
15791
|
const dstEid = await wrapper.getClInt("cl::get<uint32>", cell, 1n);
|
|
@@ -16738,7 +16678,6 @@ var deconstructorMap = {
|
|
|
16738
16678
|
RcvEpCfg: TonObjectUnwrapper.getLzReceiveEpConfigToTS,
|
|
16739
16679
|
SendEpCfg: TonObjectUnwrapper.getLzSendEpConfigToTS,
|
|
16740
16680
|
SmlJobAssg: TonObjectUnwrapper.getLzSmlJobAssignedToTS,
|
|
16741
|
-
Worker: TonObjectUnwrapper.getLzWorkerToTS,
|
|
16742
16681
|
addMsgLib: TonObjectUnwrapper.getMdAddMsglibToTS,
|
|
16743
16682
|
Bool: TonObjectUnwrapper.getMdBoolToTS,
|
|
16744
16683
|
cNonceInfo: TonObjectUnwrapper.getMdChannelNonceInfoToTS,
|