@ton3/liteclient
Version:
TON Blockchain LiteClient
33 lines • 1.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.runMethodResult = void 0;
const utils_1 = require("../../utils");
const tonNode_1 = require("../tonNode");
exports.runMethodResult = {
tag: (0, utils_1.crc32)('liteServer.runMethodResult mode:# id:tonNode.blockIdExt shardblk:tonNode.blockIdExt shard_proof:mode.0?bytes proof:mode.0?bytes state_proof:mode.1?bytes init_c7:mode.3?bytes lib_extras:mode.4?bytes exit_code:int result:mode.2?bytes = liteServer.RunMethodResult'),
read: (bufferReader) => {
const mode = bufferReader.readUint32LE();
const id = tonNode_1.blockIdExt.read(bufferReader);
const shardblk = tonNode_1.blockIdExt.read(bufferReader);
const shard_proof = (mode & (1 << 0)) ? bufferReader.readBytes() : null;
const proof = (mode & (1 << 0)) ? bufferReader.readBytes() : null;
const state_proof = (mode & (1 << 1)) ? bufferReader.readBytes() : null;
const init_c7 = (mode & (1 << 3)) ? bufferReader.readBytes() : null;
const lib_extras = (mode & (1 << 4)) ? bufferReader.readBytes() : null;
const exit_code = bufferReader.readInt32LE();
const result = (mode & (1 << 2)) ? bufferReader.readBytes() : null;
return {
mode,
id,
shardblk,
shard_proof,
proof,
state_proof,
init_c7,
lib_extras,
exit_code,
result,
};
},
};
//# sourceMappingURL=runMethodResult.js.map