@layerzerolabs/lz-ton-sdk-v2 3.0.90 → 3.0.91
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/dist/index.cjs +13 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +12 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cell, Address, DictionaryValue, Dictionary, ContractProvider, Transaction, Tuple } from '@ton/core';
|
|
2
2
|
import { LzDict, ClasslibWrapper, ExtendedContract } from '@layerzerolabs/ton-sdk-tools';
|
|
3
|
-
export { ExtendedContract, SendRequestOptions, addressToBigInt, addressToHex, bigintToAddress, createVerifierDictSet, parseTonAddress, publicKeyToHash } from '@layerzerolabs/ton-sdk-tools';
|
|
3
|
+
export { ExtendedContract, SendRequestOptions, addressToBigInt, addressToHex, bigintToAddress, bigintToSizedBuffer, bufferToBigInt, createVerifierDictSet, parseTonAddress, publicKeyToHash } from '@layerzerolabs/ton-sdk-tools';
|
|
4
4
|
import { BlockchainTransaction, EventMessageSent, SendMessageResult } from '@ton/sandbox';
|
|
5
5
|
|
|
6
6
|
declare const hexToCells: (hex: string) => Cell;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cell, Address, DictionaryValue, Dictionary, ContractProvider, Transaction, Tuple } from '@ton/core';
|
|
2
2
|
import { LzDict, ClasslibWrapper, ExtendedContract } from '@layerzerolabs/ton-sdk-tools';
|
|
3
|
-
export { ExtendedContract, SendRequestOptions, addressToBigInt, addressToHex, bigintToAddress, createVerifierDictSet, parseTonAddress, publicKeyToHash } from '@layerzerolabs/ton-sdk-tools';
|
|
3
|
+
export { ExtendedContract, SendRequestOptions, addressToBigInt, addressToHex, bigintToAddress, bigintToSizedBuffer, bufferToBigInt, createVerifierDictSet, parseTonAddress, publicKeyToHash } from '@layerzerolabs/ton-sdk-tools';
|
|
4
4
|
import { BlockchainTransaction, EventMessageSent, SendMessageResult } from '@ton/sandbox';
|
|
5
5
|
|
|
6
6
|
declare const hexToCells: (hex: string) => Cell;
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import * as $cjs$_ton_core from '@ton/core';
|
|
|
2
2
|
import { Address, beginCell, Dictionary, Cell, BitBuilder, BitReader, Slice, BitString, contractAddress, SendMode } from '@ton/core';
|
|
3
3
|
import 'crc-32';
|
|
4
4
|
import 'ethers';
|
|
5
|
-
import { toBigIntBE, toBufferBE } from 'bigint-buffer';
|
|
6
5
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
7
6
|
import '@ton/crypto';
|
|
8
7
|
import '@ton/ton';
|
|
@@ -8909,6 +8908,14 @@ var fromUtf8 = (input) => {
|
|
|
8909
8908
|
typeof Buffer !== "undefined" && Buffer.from ? function(input) {
|
|
8910
8909
|
return Buffer.from(input, "utf8");
|
|
8911
8910
|
} : fromUtf8;
|
|
8911
|
+
function bufferToBigInt(value) {
|
|
8912
|
+
return BigInt(`0x${value.toString("hex")}`);
|
|
8913
|
+
}
|
|
8914
|
+
function bigintToSizedBuffer(num, width) {
|
|
8915
|
+
const hex2 = num.toString(16);
|
|
8916
|
+
const padded = hex2.padStart(width * 2, "0").slice(0, width * 2);
|
|
8917
|
+
return Buffer.from(padded, "hex");
|
|
8918
|
+
}
|
|
8912
8919
|
function to32ByteBuffer(value, maxIntermediateBufferSize = 66) {
|
|
8913
8920
|
if (typeof value === "string") {
|
|
8914
8921
|
if (!isValidHex(value)) {
|
|
@@ -8918,12 +8925,12 @@ function to32ByteBuffer(value, maxIntermediateBufferSize = 66) {
|
|
|
8918
8925
|
if (hex2.length % 2 !== 0) {
|
|
8919
8926
|
hex2 = "0" + hex2;
|
|
8920
8927
|
}
|
|
8921
|
-
value =
|
|
8928
|
+
value = bufferToBigInt(Buffer.from(hex2, "hex"));
|
|
8922
8929
|
}
|
|
8923
8930
|
if (value instanceof Uint8Array) {
|
|
8924
|
-
value =
|
|
8931
|
+
value = bufferToBigInt(Buffer.from(value));
|
|
8925
8932
|
}
|
|
8926
|
-
const bf =
|
|
8933
|
+
const bf = bigintToSizedBuffer(BigInt(value), maxIntermediateBufferSize);
|
|
8927
8934
|
return bf.subarray(-32);
|
|
8928
8935
|
}
|
|
8929
8936
|
function trim0x(str2) {
|
|
@@ -18211,6 +18218,6 @@ var LzGasTracker = class _LzGasTracker {
|
|
|
18211
18218
|
*)
|
|
18212
18219
|
*/
|
|
18213
18220
|
|
|
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 };
|
|
18221
|
+
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, bigintToSizedBuffer, bufferToBigInt, 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 };
|
|
18215
18222
|
//# sourceMappingURL=index.mjs.map
|
|
18216
18223
|
//# sourceMappingURL=index.mjs.map
|