@layerzerolabs/lz-ton-sdk-v2 3.0.86 → 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 +12 -0
- package/dist/index.cjs +44 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +483 -493
- package/dist/index.d.ts +483 -493
- package/dist/index.mjs +46 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as $cjs$_ton_core from '@ton/core';
|
|
2
|
-
import { beginCell, Dictionary,
|
|
2
|
+
import { Address, beginCell, Dictionary, Cell, BitBuilder, BitReader, Slice, BitString, contractAddress, SendMode } from '@ton/core';
|
|
3
3
|
import 'crc-32';
|
|
4
|
+
import 'ethers';
|
|
4
5
|
import { toBigIntBE, toBufferBE } from 'bigint-buffer';
|
|
5
6
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
6
7
|
import '@ton/crypto';
|
|
@@ -8908,19 +8909,6 @@ var fromUtf8 = (input) => {
|
|
|
8908
8909
|
typeof Buffer !== "undefined" && Buffer.from ? function(input) {
|
|
8909
8910
|
return Buffer.from(input, "utf8");
|
|
8910
8911
|
} : fromUtf8;
|
|
8911
|
-
var PUBLIC_KEY_BYTE_LENGTH = 64;
|
|
8912
|
-
function publicKeyToHash(publicKey) {
|
|
8913
|
-
const publicKeyCell = beginCell().storeBuffer(Buffer.from(publicKey), PUBLIC_KEY_BYTE_LENGTH).endCell();
|
|
8914
|
-
const publicKeyHash = BigInt("0x" + publicKeyCell.hash().toString("hex"));
|
|
8915
|
-
return publicKeyHash;
|
|
8916
|
-
}
|
|
8917
|
-
function createVerifierDictSet(verifiers) {
|
|
8918
|
-
const verifierDict = Dictionary.empty(Dictionary.Keys.BigUint(256), Dictionary.Values.Cell());
|
|
8919
|
-
for (const verifier of verifiers) {
|
|
8920
|
-
verifierDict.set(publicKeyToHash(verifier), beginCell().endCell());
|
|
8921
|
-
}
|
|
8922
|
-
return beginCell().storeDictDirect(verifierDict, Dictionary.Keys.BigUint(256), Dictionary.Values.Cell()).endCell();
|
|
8923
|
-
}
|
|
8924
8912
|
function to32ByteBuffer(value, maxIntermediateBufferSize = 66) {
|
|
8925
8913
|
if (typeof value === "string") {
|
|
8926
8914
|
if (!isValidHex(value)) {
|
|
@@ -8977,6 +8965,19 @@ var addressToHex = (address) => {
|
|
|
8977
8965
|
var addressToBigInt = (address) => {
|
|
8978
8966
|
return BigInt(_addressToNotPaddedHex(address));
|
|
8979
8967
|
};
|
|
8968
|
+
var PUBLIC_KEY_BYTE_LENGTH = 64;
|
|
8969
|
+
function publicKeyToHash(publicKey) {
|
|
8970
|
+
const publicKeyCell = beginCell().storeBuffer(Buffer.from(publicKey), PUBLIC_KEY_BYTE_LENGTH).endCell();
|
|
8971
|
+
const publicKeyHash = BigInt("0x" + publicKeyCell.hash().toString("hex"));
|
|
8972
|
+
return publicKeyHash;
|
|
8973
|
+
}
|
|
8974
|
+
function createVerifierDictSet(verifiers) {
|
|
8975
|
+
const verifierDict = Dictionary.empty(Dictionary.Keys.BigUint(256), Dictionary.Values.Cell());
|
|
8976
|
+
for (const verifier of verifiers) {
|
|
8977
|
+
verifierDict.set(publicKeyToHash(verifier), beginCell().endCell());
|
|
8978
|
+
}
|
|
8979
|
+
return beginCell().storeDictDirect(verifierDict, Dictionary.Keys.BigUint(256), Dictionary.Values.Cell()).endCell();
|
|
8980
|
+
}
|
|
8980
8981
|
var BaseWrapper = class {
|
|
8981
8982
|
constructor(address, init) {
|
|
8982
8983
|
this.address = address;
|
|
@@ -9120,6 +9121,30 @@ var ClasslibWrapper = class _ClasslibWrapper extends BaseWrapper {
|
|
|
9120
9121
|
return result;
|
|
9121
9122
|
}
|
|
9122
9123
|
};
|
|
9124
|
+
var LzDict = class _LzDict {
|
|
9125
|
+
constructor(data) {
|
|
9126
|
+
this._cell = data;
|
|
9127
|
+
}
|
|
9128
|
+
static empty() {
|
|
9129
|
+
return new _LzDict(beginCell().endCell());
|
|
9130
|
+
}
|
|
9131
|
+
async getCell(key, wrapper) {
|
|
9132
|
+
return wrapper.getDictCellItem(this._cell, key);
|
|
9133
|
+
}
|
|
9134
|
+
async getBigInt(key, wrapper) {
|
|
9135
|
+
return wrapper.getDictUint256Item(this._cell, key);
|
|
9136
|
+
}
|
|
9137
|
+
async set(key, value, wrapper) {
|
|
9138
|
+
this._cell = await wrapper.getSetDictItem(this._cell, key, value);
|
|
9139
|
+
}
|
|
9140
|
+
asCell() {
|
|
9141
|
+
return this._cell;
|
|
9142
|
+
}
|
|
9143
|
+
};
|
|
9144
|
+
async function getLzDict(obj, fieldName, wrapper) {
|
|
9145
|
+
const dictCell = await wrapper.getClDict(obj, fieldName);
|
|
9146
|
+
return new LzDict(dictCell);
|
|
9147
|
+
}
|
|
9123
9148
|
var isLoadableDict = (value) => {
|
|
9124
9149
|
return value != null && typeof value === "object" && "getDict" in value && typeof value.getDict === "function" && "rawCell" in value && value.rawCell instanceof Cell;
|
|
9125
9150
|
};
|
|
@@ -13454,8 +13479,8 @@ var ultralightnodeUln = class {
|
|
|
13454
13479
|
const stack = await contract.getViewFunction("ulnVerify", args);
|
|
13455
13480
|
return [stack.readTuple().pop()];
|
|
13456
13481
|
}
|
|
13457
|
-
static async getUpdateWorkerFeelib(contract,
|
|
13458
|
-
const args = [{ type: "cell", cell:
|
|
13482
|
+
static async getUpdateWorkerFeelib(contract, UlnWorkerFeelibInfo) {
|
|
13483
|
+
const args = [{ type: "cell", cell: UlnWorkerFeelibInfo }];
|
|
13459
13484
|
const stack = await contract.getViewFunction("updateWorkerFeelib", args);
|
|
13460
13485
|
return [stack.readTuple().pop()];
|
|
13461
13486
|
}
|
|
@@ -13660,8 +13685,8 @@ var ultralightnodeUlnManager = class {
|
|
|
13660
13685
|
const stack = await contract.getViewFunction("registerWorkerFeelibBytecode", args);
|
|
13661
13686
|
return [stack.readTuple().pop()];
|
|
13662
13687
|
}
|
|
13663
|
-
static async getAddWorkerFeelibToUln(contract,
|
|
13664
|
-
const args = [{ type: "cell", cell:
|
|
13688
|
+
static async getAddWorkerFeelibToUln(contract, UlnWorkerFeelibInfo) {
|
|
13689
|
+
const args = [{ type: "cell", cell: UlnWorkerFeelibInfo }];
|
|
13665
13690
|
const stack = await contract.getViewFunction("addWorkerFeelibToUln", args);
|
|
13666
13691
|
return [stack.readTuple().pop()];
|
|
13667
13692
|
}
|
|
@@ -14598,30 +14623,8 @@ function getCompiledJson(name, root) {
|
|
|
14598
14623
|
const compiledJson = __require(`${root}/${name}.compiled.json`);
|
|
14599
14624
|
return compiledJson;
|
|
14600
14625
|
}
|
|
14601
|
-
|
|
14602
|
-
|
|
14603
|
-
this._cell = data;
|
|
14604
|
-
}
|
|
14605
|
-
static empty() {
|
|
14606
|
-
return new _LzDict(beginCell().endCell());
|
|
14607
|
-
}
|
|
14608
|
-
async getCell(key, wrapper) {
|
|
14609
|
-
return wrapper.getDictCellItem(this._cell, key);
|
|
14610
|
-
}
|
|
14611
|
-
async getBigInt(key, wrapper) {
|
|
14612
|
-
return wrapper.getDictUint256Item(this._cell, key);
|
|
14613
|
-
}
|
|
14614
|
-
async set(key, value, wrapper) {
|
|
14615
|
-
this._cell = await wrapper.getSetDictItem(this._cell, key, value);
|
|
14616
|
-
}
|
|
14617
|
-
asCell() {
|
|
14618
|
-
return this._cell;
|
|
14619
|
-
}
|
|
14620
|
-
};
|
|
14621
|
-
async function getLzDict(obj, fieldName, wrapper) {
|
|
14622
|
-
const dictCell = await wrapper.getClDict(obj, fieldName);
|
|
14623
|
-
return new LzDict(dictCell);
|
|
14624
|
-
}
|
|
14626
|
+
|
|
14627
|
+
// src/wrappers/allTypes.ts
|
|
14625
14628
|
var nameMap = {
|
|
14626
14629
|
baseOApp: "BaseOApp",
|
|
14627
14630
|
counter: "Counter",
|
|
@@ -18208,6 +18211,6 @@ var LzGasTracker = class _LzGasTracker {
|
|
|
18208
18211
|
*)
|
|
18209
18212
|
*/
|
|
18210
18213
|
|
|
18211
|
-
export { ERRORS, EVENTS,
|
|
18214
|
+
export { ERRORS, EVENTS, LzEventHandler, LzGasTracker, MAX_CELL_BITS2 as MAX_CELL_BITS, NAME_WIDTH2 as NAME_WIDTH, OPCODES, TonContractWrapper, TonObjectUnwrapper, _getTypeWidth2 as _getTypeWidth, addressToBigInt, addressToHex, appsAllStorages, appsCounter, asciiStringToBigint, baseBuildClass, baseDecodeClass2 as baseDecodeClass, bigintToAddress, bigintToAsciiString2 as bigintToAsciiString, buildClass, buildPathClass, calculateCellConsumption, calculateCellConsumptionFromHex, cellsToHex2 as cellsToHex, cl2 as cl, clDeclare2 as clDeclare, clGetCellRef2 as clGetCellRef, clGetUint2 as clGetUint, createVerifierDictSet, decodeClass, deconstructorMap, deepDecode, deepDiff, deserializeAddressList2 as deserializeAddressList, emptyCell2 as emptyCell, emptyMap, emptyPOOO2 as emptyPOOO, fieldTypes, generateBuildClass, generateDecodeClass2 as generateDecodeClass, getCellName2 as getCellName, getCellNameNumber2 as getCellNameNumber, getClosestByteAlignedBits2 as getClosestByteAlignedBits, getCompiledCode, getCompiledJson, getEndpointInitStorage, getName, getTotalBits2 as getTotalBits, hexToCells, initBaseOApp, initBaseStorage, initWorkerCoreStorage, isClassName2 as isClassName, isLoadableDict, jettonsZro, keyMap, nameMap, nullObject, numberTypeLikeToAbsBigInt2 as numberTypeLikeToAbsBigInt, opcodeToName, parseTonAddress, printDeepDecode, printDeepDiff, protocolChannel, protocolController, protocolEndpoint, publicKeyToHash, serializeAddressList2 as serializeAddressList, simpleMsglibSmlConnection, simpleMsglibSmlManager, srcMultisig, tonObjects, tonRealNameByCellName, tonResolvedObjects, ultralightnodeUln, ultralightnodeUlnConnection, ultralightnodeUlnManager, ultralightnodeWorkerFeeLibs, workerFeeLibsDvnFeeLib, workerFeeLibsExecutorFeeLib, workerFeeLibsMaliciousFeeLib, workersDvn };
|
|
18212
18215
|
//# sourceMappingURL=index.mjs.map
|
|
18213
18216
|
//# sourceMappingURL=index.mjs.map
|