samo-bas-ran
Version:
Rango Exchange Types
20 lines • 687 B
JavaScript
var DefaultSignerFactory = /** @class */ (function () {
function DefaultSignerFactory() {
this.signers = {};
this.signers = {};
}
DefaultSignerFactory.prototype.registerSigner = function (txType, signer) {
this.signers[txType] = signer;
};
DefaultSignerFactory.prototype.getSigner = function (txType) {
if (this.signers && txType in this.signers) {
var signer = this.signers[txType];
if (!!signer)
return signer;
}
throw new Error('Signer not found for ' + txType);
};
return DefaultSignerFactory;
}());
export { DefaultSignerFactory };
//# sourceMappingURL=signer.js.map