@airgap/aeternity
Version:
The @airgap/aeternity is an Aeternity implementation of the ICoinProtocol interface from @airgap/coinlib-core.
23 lines • 931 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AeternityAddress = void 0;
var module_kit_1 = require("@airgap/module-kit");
var key_1 = require("../utils/key");
var AeternityAddress = /** @class */ (function () {
function AeternityAddress(value) {
this.value = value;
}
AeternityAddress.from = function (publicKey) {
var _publicKey = typeof publicKey === 'string' ? (0, key_1.aePublicKey)(publicKey) : publicKey;
return new AeternityAddress((0, key_1.convertPublicKey)(_publicKey, 'encoded').value);
};
AeternityAddress.prototype.asString = function () {
return this.value;
};
AeternityAddress.prototype.toPublicKey = function () {
return (0, module_kit_1.newPublicKey)(this.value, 'encoded');
};
return AeternityAddress;
}());
exports.AeternityAddress = AeternityAddress;
//# sourceMappingURL=AeternityAddress.js.map