@layerzerolabs/lz-ton-sdk-v2 3.0.87 → 3.0.88

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @layerzerolabs/lz-ton-sdk-v2
2
2
 
3
+ ## 3.0.88
4
+
5
+ ### Patch Changes
6
+
7
+ - d0cda5e: ton sdk-tools refactored, added rawDispatch action to funC++
8
+
3
9
  ## 3.0.87
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  var $cjs$_ton_core = require('@ton/core');
4
4
  require('crc-32');
5
+ require('ethers');
5
6
  var bigintBuffer = require('bigint-buffer');
6
7
  var buffer = require('buffer');
7
8
  require('@ton/crypto');
@@ -8929,19 +8930,6 @@ var fromUtf8 = (input) => {
8929
8930
  typeof Buffer !== "undefined" && Buffer.from ? function(input) {
8930
8931
  return Buffer.from(input, "utf8");
8931
8932
  } : fromUtf8;
8932
- var PUBLIC_KEY_BYTE_LENGTH = 64;
8933
- function publicKeyToHash(publicKey) {
8934
- const publicKeyCell = $cjs$_ton_core.beginCell().storeBuffer(Buffer.from(publicKey), PUBLIC_KEY_BYTE_LENGTH).endCell();
8935
- const publicKeyHash = BigInt("0x" + publicKeyCell.hash().toString("hex"));
8936
- return publicKeyHash;
8937
- }
8938
- function createVerifierDictSet(verifiers) {
8939
- const verifierDict = $cjs$_ton_core.Dictionary.empty($cjs$_ton_core.Dictionary.Keys.BigUint(256), $cjs$_ton_core.Dictionary.Values.Cell());
8940
- for (const verifier of verifiers) {
8941
- verifierDict.set(publicKeyToHash(verifier), $cjs$_ton_core.beginCell().endCell());
8942
- }
8943
- return $cjs$_ton_core.beginCell().storeDictDirect(verifierDict, $cjs$_ton_core.Dictionary.Keys.BigUint(256), $cjs$_ton_core.Dictionary.Values.Cell()).endCell();
8944
- }
8945
8933
  function to32ByteBuffer(value, maxIntermediateBufferSize = 66) {
8946
8934
  if (typeof value === "string") {
8947
8935
  if (!isValidHex(value)) {
@@ -8998,6 +8986,19 @@ var addressToHex = (address) => {
8998
8986
  var addressToBigInt = (address) => {
8999
8987
  return BigInt(_addressToNotPaddedHex(address));
9000
8988
  };
8989
+ var PUBLIC_KEY_BYTE_LENGTH = 64;
8990
+ function publicKeyToHash(publicKey) {
8991
+ const publicKeyCell = $cjs$_ton_core.beginCell().storeBuffer(Buffer.from(publicKey), PUBLIC_KEY_BYTE_LENGTH).endCell();
8992
+ const publicKeyHash = BigInt("0x" + publicKeyCell.hash().toString("hex"));
8993
+ return publicKeyHash;
8994
+ }
8995
+ function createVerifierDictSet(verifiers) {
8996
+ const verifierDict = $cjs$_ton_core.Dictionary.empty($cjs$_ton_core.Dictionary.Keys.BigUint(256), $cjs$_ton_core.Dictionary.Values.Cell());
8997
+ for (const verifier of verifiers) {
8998
+ verifierDict.set(publicKeyToHash(verifier), $cjs$_ton_core.beginCell().endCell());
8999
+ }
9000
+ return $cjs$_ton_core.beginCell().storeDictDirect(verifierDict, $cjs$_ton_core.Dictionary.Keys.BigUint(256), $cjs$_ton_core.Dictionary.Values.Cell()).endCell();
9001
+ }
9001
9002
  var BaseWrapper = class {
9002
9003
  constructor(address, init) {
9003
9004
  this.address = address;
@@ -9141,6 +9142,30 @@ var ClasslibWrapper = class _ClasslibWrapper extends BaseWrapper {
9141
9142
  return result;
9142
9143
  }
9143
9144
  };
9145
+ var LzDict = class _LzDict {
9146
+ constructor(data) {
9147
+ this._cell = data;
9148
+ }
9149
+ static empty() {
9150
+ return new _LzDict($cjs$_ton_core.beginCell().endCell());
9151
+ }
9152
+ async getCell(key, wrapper) {
9153
+ return wrapper.getDictCellItem(this._cell, key);
9154
+ }
9155
+ async getBigInt(key, wrapper) {
9156
+ return wrapper.getDictUint256Item(this._cell, key);
9157
+ }
9158
+ async set(key, value, wrapper) {
9159
+ this._cell = await wrapper.getSetDictItem(this._cell, key, value);
9160
+ }
9161
+ asCell() {
9162
+ return this._cell;
9163
+ }
9164
+ };
9165
+ async function getLzDict(obj, fieldName, wrapper) {
9166
+ const dictCell = await wrapper.getClDict(obj, fieldName);
9167
+ return new LzDict(dictCell);
9168
+ }
9144
9169
  var isLoadableDict = (value) => {
9145
9170
  return value != null && typeof value === "object" && "getDict" in value && typeof value.getDict === "function" && "rawCell" in value && value.rawCell instanceof $cjs$_ton_core.Cell;
9146
9171
  };
@@ -13475,8 +13500,8 @@ var ultralightnodeUln = class {
13475
13500
  const stack = await contract.getViewFunction("ulnVerify", args);
13476
13501
  return [stack.readTuple().pop()];
13477
13502
  }
13478
- static async getUpdateWorkerFeelib(contract, UlnWorkerFeelibInfo2) {
13479
- const args = [{ type: "cell", cell: UlnWorkerFeelibInfo2 }];
13503
+ static async getUpdateWorkerFeelib(contract, UlnWorkerFeelibInfo) {
13504
+ const args = [{ type: "cell", cell: UlnWorkerFeelibInfo }];
13480
13505
  const stack = await contract.getViewFunction("updateWorkerFeelib", args);
13481
13506
  return [stack.readTuple().pop()];
13482
13507
  }
@@ -13681,8 +13706,8 @@ var ultralightnodeUlnManager = class {
13681
13706
  const stack = await contract.getViewFunction("registerWorkerFeelibBytecode", args);
13682
13707
  return [stack.readTuple().pop()];
13683
13708
  }
13684
- static async getAddWorkerFeelibToUln(contract, UlnWorkerFeelibInfo2) {
13685
- const args = [{ type: "cell", cell: UlnWorkerFeelibInfo2 }];
13709
+ static async getAddWorkerFeelibToUln(contract, UlnWorkerFeelibInfo) {
13710
+ const args = [{ type: "cell", cell: UlnWorkerFeelibInfo }];
13686
13711
  const stack = await contract.getViewFunction("addWorkerFeelibToUln", args);
13687
13712
  return [stack.readTuple().pop()];
13688
13713
  }
@@ -14619,30 +14644,8 @@ function getCompiledJson(name, root) {
14619
14644
  const compiledJson = __require(`${root}/${name}.compiled.json`);
14620
14645
  return compiledJson;
14621
14646
  }
14622
- var LzDict = class _LzDict {
14623
- constructor(data) {
14624
- this._cell = data;
14625
- }
14626
- static empty() {
14627
- return new _LzDict($cjs$_ton_core.beginCell().endCell());
14628
- }
14629
- async getCell(key, wrapper) {
14630
- return wrapper.getDictCellItem(this._cell, key);
14631
- }
14632
- async getBigInt(key, wrapper) {
14633
- return wrapper.getDictUint256Item(this._cell, key);
14634
- }
14635
- async set(key, value, wrapper) {
14636
- this._cell = await wrapper.getSetDictItem(this._cell, key, value);
14637
- }
14638
- asCell() {
14639
- return this._cell;
14640
- }
14641
- };
14642
- async function getLzDict(obj, fieldName, wrapper) {
14643
- const dictCell = await wrapper.getClDict(obj, fieldName);
14644
- return new LzDict(dictCell);
14645
- }
14647
+
14648
+ // src/wrappers/allTypes.ts
14646
14649
  var nameMap = {
14647
14650
  baseOApp: "BaseOApp",
14648
14651
  counter: "Counter",
@@ -18231,7 +18234,6 @@ var LzGasTracker = class _LzGasTracker {
18231
18234
 
18232
18235
  exports.ERRORS = ERRORS;
18233
18236
  exports.EVENTS = EVENTS;
18234
- exports.LzDict = LzDict;
18235
18237
  exports.LzEventHandler = LzEventHandler;
18236
18238
  exports.LzGasTracker = LzGasTracker;
18237
18239
  exports.MAX_CELL_BITS = MAX_CELL_BITS2;
@@ -18276,7 +18278,6 @@ exports.getClosestByteAlignedBits = getClosestByteAlignedBits2;
18276
18278
  exports.getCompiledCode = getCompiledCode;
18277
18279
  exports.getCompiledJson = getCompiledJson;
18278
18280
  exports.getEndpointInitStorage = getEndpointInitStorage;
18279
- exports.getLzDict = getLzDict;
18280
18281
  exports.getName = getName;
18281
18282
  exports.getTotalBits = getTotalBits2;
18282
18283
  exports.hexToCells = hexToCells;