UNPKG

@node-lightning/wire

Version:
17 lines 666 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.deserializeTor3 = void 0; const AddressTor3_1 = require("../../domain/AddressTor3"); const torStringFromBuffer_1 = require("./torStringFromBuffer"); /** * Deserializes a TOR v3 address from a reader and * returns an instance of a AddressTor2. */ function deserializeTor3(reader) { const hostBytes = reader.readBytes(35); const port = reader.readUInt16BE(); const host = torStringFromBuffer_1.torStringFromBuffer(hostBytes); return new AddressTor3_1.AddressTor3(host, port); } exports.deserializeTor3 = deserializeTor3; //# sourceMappingURL=deserializeTor3.js.map