@node-lightning/wire
Version:
Lightning Network Wire Protocol
30 lines • 699 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Address = void 0;
const NetworkType_1 = require("./NetworkType");
class Address {
/**
* Base class representing a network address
*/
constructor(host, port) {
this.host = host;
this.port = port;
}
/**
* Type of connection
*/
get type() {
throw new Error("Not implemented");
}
toString() {
return `${this.host}:${this.port}`;
}
toJSON() {
return {
network: NetworkType_1.NetworkType.TCP,
address: this.toString(),
};
}
}
exports.Address = Address;
//# sourceMappingURL=Address.js.map