@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.mjs
CHANGED
|
@@ -6536,6 +6536,9 @@ var generateDecodeClass = (_tonObjects) => (_className, cell) => {
|
|
|
6536
6536
|
if (prop === "getCellName") {
|
|
6537
6537
|
return () => getCellName(cell2);
|
|
6538
6538
|
}
|
|
6539
|
+
if (prop === "rawCell") {
|
|
6540
|
+
return cell2;
|
|
6541
|
+
}
|
|
6539
6542
|
return Reflect.get(target, prop);
|
|
6540
6543
|
}
|
|
6541
6544
|
});
|
|
@@ -7144,29 +7147,6 @@ var tonObjects = {
|
|
|
7144
7147
|
fieldType: "cl::t::coins"
|
|
7145
7148
|
}
|
|
7146
7149
|
},
|
|
7147
|
-
"lz::Worker": {
|
|
7148
|
-
name: "Worker",
|
|
7149
|
-
0: {
|
|
7150
|
-
fieldName: "lz::Worker::owner",
|
|
7151
|
-
fieldType: "cl::t::address"
|
|
7152
|
-
},
|
|
7153
|
-
1: {
|
|
7154
|
-
fieldName: "lz::Worker::viewAllowlist",
|
|
7155
|
-
fieldType: "cl::t::dict256"
|
|
7156
|
-
},
|
|
7157
|
-
2: {
|
|
7158
|
-
fieldName: "lz::Worker::viewDependencies",
|
|
7159
|
-
fieldType: "cl::t::dict256"
|
|
7160
|
-
},
|
|
7161
|
-
3: {
|
|
7162
|
-
fieldName: "lz::Worker::bytecodeLibrary",
|
|
7163
|
-
fieldType: "cl::t::cellRef"
|
|
7164
|
-
},
|
|
7165
|
-
4: {
|
|
7166
|
-
fieldName: "lz::Worker::storage",
|
|
7167
|
-
fieldType: "cl::t::objRef"
|
|
7168
|
-
}
|
|
7169
|
-
},
|
|
7170
7150
|
"md::AddMsglib": {
|
|
7171
7151
|
name: "addMsgLib",
|
|
7172
7152
|
0: {
|
|
@@ -8903,6 +8883,17 @@ var tonResolvedObjects = {
|
|
|
8903
8883
|
},
|
|
8904
8884
|
name: "POOO"
|
|
8905
8885
|
},
|
|
8886
|
+
"md::InitUlnManager": {
|
|
8887
|
+
"0": {
|
|
8888
|
+
fieldName: "md::InitUlnManager::endpointCode",
|
|
8889
|
+
fieldType: "cl::t::cellRef"
|
|
8890
|
+
},
|
|
8891
|
+
"1": {
|
|
8892
|
+
fieldName: "md::InitUlnManager::channelCode",
|
|
8893
|
+
fieldType: "cl::t::cellRef"
|
|
8894
|
+
},
|
|
8895
|
+
name: "InitUlnMgr"
|
|
8896
|
+
},
|
|
8906
8897
|
UlnManager: {
|
|
8907
8898
|
"0": {
|
|
8908
8899
|
fieldName: "UlnManager::baseStorage",
|
|
@@ -8946,17 +8937,6 @@ var tonResolvedObjects = {
|
|
|
8946
8937
|
},
|
|
8947
8938
|
name: "ulnMgr"
|
|
8948
8939
|
},
|
|
8949
|
-
"md::InitUlnManager": {
|
|
8950
|
-
"0": {
|
|
8951
|
-
fieldName: "md::InitUlnManager::endpointCode",
|
|
8952
|
-
fieldType: "cl::t::cellRef"
|
|
8953
|
-
},
|
|
8954
|
-
"1": {
|
|
8955
|
-
fieldName: "md::InitUlnManager::channelCode",
|
|
8956
|
-
fieldType: "cl::t::cellRef"
|
|
8957
|
-
},
|
|
8958
|
-
name: "InitUlnMgr"
|
|
8959
|
-
},
|
|
8960
8940
|
Dvn: {
|
|
8961
8941
|
"0": {
|
|
8962
8942
|
fieldName: "Dvn::workerCoreStorage",
|
|
@@ -9164,7 +9144,7 @@ var tonResolvedObjects = {
|
|
|
9164
9144
|
},
|
|
9165
9145
|
"2": {
|
|
9166
9146
|
fieldName: "UlnWorkerFeelibInfo::workerFeelibStorage",
|
|
9167
|
-
fieldType: "
|
|
9147
|
+
fieldType: "cl::t::objRef"
|
|
9168
9148
|
},
|
|
9169
9149
|
"3": {
|
|
9170
9150
|
fieldName: "UlnWorkerFeelibInfo::friendWorkerAddress",
|
|
@@ -9324,6 +9304,17 @@ var tonResolvedObjects = {
|
|
|
9324
9304
|
},
|
|
9325
9305
|
name: "SetEpCfg"
|
|
9326
9306
|
},
|
|
9307
|
+
"md::ClaimTon": {
|
|
9308
|
+
"0": {
|
|
9309
|
+
fieldName: "md::ClaimTon::amount",
|
|
9310
|
+
fieldType: "cl::t::coins"
|
|
9311
|
+
},
|
|
9312
|
+
"1": {
|
|
9313
|
+
fieldName: "md::ClaimTon::target",
|
|
9314
|
+
fieldType: "cl::t::address"
|
|
9315
|
+
},
|
|
9316
|
+
name: "claimTon"
|
|
9317
|
+
},
|
|
9327
9318
|
"md::CounterIncrement": {
|
|
9328
9319
|
"0": {
|
|
9329
9320
|
fieldName: "md::CounterIncrement::dstEid",
|
|
@@ -9654,6 +9645,39 @@ var tonResolvedObjects = {
|
|
|
9654
9645
|
},
|
|
9655
9646
|
name: "LzRecvSts"
|
|
9656
9647
|
},
|
|
9648
|
+
"md::CoinsAmount": {
|
|
9649
|
+
"0": {
|
|
9650
|
+
fieldName: "md::CoinsAmount::amount",
|
|
9651
|
+
fieldType: "cl::t::coins"
|
|
9652
|
+
},
|
|
9653
|
+
name: "coinsAmt"
|
|
9654
|
+
},
|
|
9655
|
+
"md::NativeDrop": {
|
|
9656
|
+
"0": {
|
|
9657
|
+
fieldName: "md::NativeDrop::payees",
|
|
9658
|
+
fieldType: "cl::t::cellRef"
|
|
9659
|
+
},
|
|
9660
|
+
"1": {
|
|
9661
|
+
fieldName: "md::NativeDrop::packetId",
|
|
9662
|
+
fieldType: "md::PacketId"
|
|
9663
|
+
},
|
|
9664
|
+
"2": {
|
|
9665
|
+
fieldName: "md::NativeDrop::msglib",
|
|
9666
|
+
fieldType: "cl::t::address"
|
|
9667
|
+
},
|
|
9668
|
+
name: "NativeDrop"
|
|
9669
|
+
},
|
|
9670
|
+
"md::PacketId": {
|
|
9671
|
+
"0": {
|
|
9672
|
+
fieldName: "md::PacketId::path",
|
|
9673
|
+
fieldType: "lz::Path"
|
|
9674
|
+
},
|
|
9675
|
+
"1": {
|
|
9676
|
+
fieldName: "md::PacketId::nonce",
|
|
9677
|
+
fieldType: "cl::t::uint64"
|
|
9678
|
+
},
|
|
9679
|
+
name: "pktId"
|
|
9680
|
+
},
|
|
9657
9681
|
"lz::Config": {
|
|
9658
9682
|
"0": {
|
|
9659
9683
|
fieldName: "lz::Config::path",
|
|
@@ -9673,6 +9697,13 @@ var tonResolvedObjects = {
|
|
|
9673
9697
|
},
|
|
9674
9698
|
name: "Config"
|
|
9675
9699
|
},
|
|
9700
|
+
"md::TreasuryFeeBps": {
|
|
9701
|
+
"0": {
|
|
9702
|
+
fieldName: "md::TreasuryFeeBps::treasuryFeeBps",
|
|
9703
|
+
fieldType: "cl::t::uint16"
|
|
9704
|
+
},
|
|
9705
|
+
name: "tfeebps"
|
|
9706
|
+
},
|
|
9676
9707
|
"lz::EpConfig::NewWithConnection": {
|
|
9677
9708
|
"0": {
|
|
9678
9709
|
fieldName: "lz::EpConfig::NewWithConnection::isNull",
|
|
@@ -9741,29 +9772,6 @@ var tonResolvedObjects = {
|
|
|
9741
9772
|
},
|
|
9742
9773
|
name: "SmlJobAssg"
|
|
9743
9774
|
},
|
|
9744
|
-
"lz::Worker": {
|
|
9745
|
-
"0": {
|
|
9746
|
-
fieldName: "lz::Worker::owner",
|
|
9747
|
-
fieldType: "cl::t::address"
|
|
9748
|
-
},
|
|
9749
|
-
"1": {
|
|
9750
|
-
fieldName: "lz::Worker::viewAllowlist",
|
|
9751
|
-
fieldType: "cl::t::dict256"
|
|
9752
|
-
},
|
|
9753
|
-
"2": {
|
|
9754
|
-
fieldName: "lz::Worker::viewDependencies",
|
|
9755
|
-
fieldType: "cl::t::dict256"
|
|
9756
|
-
},
|
|
9757
|
-
"3": {
|
|
9758
|
-
fieldName: "lz::Worker::bytecodeLibrary",
|
|
9759
|
-
fieldType: "cl::t::cellRef"
|
|
9760
|
-
},
|
|
9761
|
-
"4": {
|
|
9762
|
-
fieldName: "lz::Worker::storage",
|
|
9763
|
-
fieldType: "cl::t::objRef"
|
|
9764
|
-
},
|
|
9765
|
-
name: "Worker"
|
|
9766
|
-
},
|
|
9767
9775
|
"md::Bool": {
|
|
9768
9776
|
"0": {
|
|
9769
9777
|
fieldName: "md::Bool::bool",
|
|
@@ -9771,13 +9779,6 @@ var tonResolvedObjects = {
|
|
|
9771
9779
|
},
|
|
9772
9780
|
name: "Bool"
|
|
9773
9781
|
},
|
|
9774
|
-
"md::CoinsAmount": {
|
|
9775
|
-
"0": {
|
|
9776
|
-
fieldName: "md::CoinsAmount::amount",
|
|
9777
|
-
fieldType: "cl::t::coins"
|
|
9778
|
-
},
|
|
9779
|
-
name: "coinsAmt"
|
|
9780
|
-
},
|
|
9781
9782
|
"md::Deploy": {
|
|
9782
9783
|
"0": {
|
|
9783
9784
|
fieldName: "md::Deploy::initialDeposit",
|
|
@@ -9930,17 +9931,6 @@ var tonResolvedObjects = {
|
|
|
9930
9931
|
},
|
|
9931
9932
|
name: "OptionsV2"
|
|
9932
9933
|
},
|
|
9933
|
-
"md::PacketId": {
|
|
9934
|
-
"0": {
|
|
9935
|
-
fieldName: "md::PacketId::path",
|
|
9936
|
-
fieldType: "lz::Path"
|
|
9937
|
-
},
|
|
9938
|
-
"1": {
|
|
9939
|
-
fieldName: "md::PacketId::nonce",
|
|
9940
|
-
fieldType: "cl::t::uint64"
|
|
9941
|
-
},
|
|
9942
|
-
name: "pktId"
|
|
9943
|
-
},
|
|
9944
9934
|
"md::PacketSent": {
|
|
9945
9935
|
"0": {
|
|
9946
9936
|
fieldName: "md::PacketSent::nativeFee",
|
|
@@ -10082,13 +10072,6 @@ var tonResolvedObjects = {
|
|
|
10082
10072
|
},
|
|
10083
10073
|
name: "adminwork"
|
|
10084
10074
|
},
|
|
10085
|
-
"md::TreasuryFeeBps": {
|
|
10086
|
-
"0": {
|
|
10087
|
-
fieldName: "md::TreasuryFeeBps::treasuryFeeBps",
|
|
10088
|
-
fieldType: "cl::t::uint16"
|
|
10089
|
-
},
|
|
10090
|
-
name: "tfeebps"
|
|
10091
|
-
},
|
|
10092
10075
|
UlnReceiveConfig: {
|
|
10093
10076
|
"0": {
|
|
10094
10077
|
fieldName: "UlnReceiveConfig::minCommitPacketGasNull",
|
|
@@ -10242,32 +10225,6 @@ var tonResolvedObjects = {
|
|
|
10242
10225
|
},
|
|
10243
10226
|
name: "ArbFeeExt"
|
|
10244
10227
|
},
|
|
10245
|
-
"md::ClaimTon": {
|
|
10246
|
-
"0": {
|
|
10247
|
-
fieldName: "md::ClaimTon::amount",
|
|
10248
|
-
fieldType: "cl::t::coins"
|
|
10249
|
-
},
|
|
10250
|
-
"1": {
|
|
10251
|
-
fieldName: "md::ClaimTon::target",
|
|
10252
|
-
fieldType: "cl::t::address"
|
|
10253
|
-
},
|
|
10254
|
-
name: "claimTon"
|
|
10255
|
-
},
|
|
10256
|
-
"md::NativeDrop": {
|
|
10257
|
-
"0": {
|
|
10258
|
-
fieldName: "md::NativeDrop::payees",
|
|
10259
|
-
fieldType: "cl::t::cellRef"
|
|
10260
|
-
},
|
|
10261
|
-
"1": {
|
|
10262
|
-
fieldName: "md::NativeDrop::packetId",
|
|
10263
|
-
fieldType: "cl::t::objRef"
|
|
10264
|
-
},
|
|
10265
|
-
"2": {
|
|
10266
|
-
fieldName: "md::NativeDrop::msglib",
|
|
10267
|
-
fieldType: "cl::t::address"
|
|
10268
|
-
},
|
|
10269
|
-
name: "NativeDrop"
|
|
10270
|
-
},
|
|
10271
10228
|
"md::SetDict": {
|
|
10272
10229
|
"0": {
|
|
10273
10230
|
fieldName: "md::SetDict::nonce",
|
|
@@ -11475,6 +11432,7 @@ var OPCODES = {
|
|
|
11475
11432
|
Dvn_OP_SET_PROXY_ADMINS: 1285624859n,
|
|
11476
11433
|
Executor_OP_NATIVE_DROP: 74966741n,
|
|
11477
11434
|
Executor_OP_LZ_RECEIVE_PREPARE: 333322037n,
|
|
11435
|
+
Executor_OP_COMMIT_PACKET: 1097876869n,
|
|
11478
11436
|
Executor_OP_NATIVE_DROP_AND_LZ_RECEIVE_PREPARE: 1812316278n,
|
|
11479
11437
|
Executor_OP_LZ_RECEIVE_ALERT: 3844476787n,
|
|
11480
11438
|
Executor_OP_SET_NATIVE_DROP_TOTAL_CAP: 1545183747n,
|
|
@@ -11919,7 +11877,6 @@ var nameMap = {
|
|
|
11919
11877
|
RcvEpCfg: "LzReceiveEpConfig",
|
|
11920
11878
|
SendEpCfg: "LzSendEpConfig",
|
|
11921
11879
|
SmlJobAssg: "LzSmlJobAssigned",
|
|
11922
|
-
Worker: "LzWorker",
|
|
11923
11880
|
addMsgLib: "MdAddMsglib",
|
|
11924
11881
|
Bool: "MdBool",
|
|
11925
11882
|
cNonceInfo: "MdChannelNonceInfo",
|
|
@@ -12005,7 +11962,6 @@ var keyMap = {
|
|
|
12005
11962
|
RcvEpCfg: "lz::ReceiveEpConfig",
|
|
12006
11963
|
SendEpCfg: "lz::SendEpConfig",
|
|
12007
11964
|
SmlJobAssg: "lz::SmlJobAssigned",
|
|
12008
|
-
Worker: "lz::Worker",
|
|
12009
11965
|
addMsgLib: "md::AddMsglib",
|
|
12010
11966
|
Bool: "md::Bool",
|
|
12011
11967
|
cNonceInfo: "md::ChannelNonceInfo",
|
|
@@ -12128,6 +12084,13 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
|
|
|
12128
12084
|
const body = this.beginMessage(opCode, queryId).storeCoins(balanceRefill).storeRef(data).endCell();
|
|
12129
12085
|
return this.buildSenderArguments(body, opts);
|
|
12130
12086
|
}
|
|
12087
|
+
async sendTonPayment(provider, via, opts) {
|
|
12088
|
+
if (via.address === void 0) {
|
|
12089
|
+
throw new Error("Sender address is not defined");
|
|
12090
|
+
}
|
|
12091
|
+
const request = this.buildSenderArguments(beginCell().endCell(), opts);
|
|
12092
|
+
return this.sendRequest(provider, via, request);
|
|
12093
|
+
}
|
|
12131
12094
|
async sendInternalMessage(provider, via, opCode, md, opts, balanceRefill = 0n, queryId) {
|
|
12132
12095
|
if (via.address === void 0) {
|
|
12133
12096
|
throw new Error("Sender address is not defined");
|
|
@@ -12305,15 +12268,6 @@ var TonContractWrapper = class _TonContractWrapper extends BaseWrapper {
|
|
|
12305
12268
|
const getResult = await provider.get("lz::SmlJobAssigned::New", [{ type: "int", value: args.fee }]);
|
|
12306
12269
|
return getResult.stack.readCell();
|
|
12307
12270
|
}
|
|
12308
|
-
async getNewLzWorker(provider, args) {
|
|
12309
|
-
const getResult = await provider.get("lz::Worker::New", [
|
|
12310
|
-
{ type: "int", value: args.owner },
|
|
12311
|
-
{ type: "int", value: args.priceFeedAddress },
|
|
12312
|
-
{ type: "cell", cell: args.bytecode },
|
|
12313
|
-
{ type: "cell", cell: args.storage }
|
|
12314
|
-
]);
|
|
12315
|
-
return getResult.stack.readCell();
|
|
12316
|
-
}
|
|
12317
12271
|
async getNewMdAddMsglib(provider, args) {
|
|
12318
12272
|
const getResult = await provider.get("md::AddMsglib::New", [
|
|
12319
12273
|
{ type: "int", value: args.msglibManagerAddress },
|
|
@@ -15811,20 +15765,6 @@ var TonObjectUnwrapper = class {
|
|
|
15811
15765
|
fee
|
|
15812
15766
|
};
|
|
15813
15767
|
}
|
|
15814
|
-
static async getLzWorkerToTS(wrapper, cell) {
|
|
15815
|
-
const owner = await wrapper.getClInt("cl::get<address>", cell, 0n);
|
|
15816
|
-
const viewAllowlist = await getLzDict(cell, 1n, wrapper);
|
|
15817
|
-
const viewDependencies = await getLzDict(cell, 2n, wrapper);
|
|
15818
|
-
const bytecodeLibrary = await wrapper.getClCell(cell, 3n);
|
|
15819
|
-
const storage = await wrapper.getClCell(cell, 4n);
|
|
15820
|
-
return {
|
|
15821
|
-
owner,
|
|
15822
|
-
viewAllowlist,
|
|
15823
|
-
viewDependencies,
|
|
15824
|
-
bytecodeLibrary,
|
|
15825
|
-
storage
|
|
15826
|
-
};
|
|
15827
|
-
}
|
|
15828
15768
|
static async getMdAddMsglibToTS(wrapper, cell) {
|
|
15829
15769
|
const msglibManagerAddress = await wrapper.getClInt("cl::get<address>", cell, 0n);
|
|
15830
15770
|
const dstEid = await wrapper.getClInt("cl::get<uint32>", cell, 1n);
|
|
@@ -16717,7 +16657,6 @@ var deconstructorMap = {
|
|
|
16717
16657
|
RcvEpCfg: TonObjectUnwrapper.getLzReceiveEpConfigToTS,
|
|
16718
16658
|
SendEpCfg: TonObjectUnwrapper.getLzSendEpConfigToTS,
|
|
16719
16659
|
SmlJobAssg: TonObjectUnwrapper.getLzSmlJobAssignedToTS,
|
|
16720
|
-
Worker: TonObjectUnwrapper.getLzWorkerToTS,
|
|
16721
16660
|
addMsgLib: TonObjectUnwrapper.getMdAddMsglibToTS,
|
|
16722
16661
|
Bool: TonObjectUnwrapper.getMdBoolToTS,
|
|
16723
16662
|
cNonceInfo: TonObjectUnwrapper.getMdChannelNonceInfoToTS,
|