airgap-coin-lib
Version:
The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.
68 lines • 2.58 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ProtocolSymbols_1 = require("../../../utils/ProtocolSymbols");
var SubstrateProtocol_1 = require("../SubstrateProtocol");
var KusamaProtocolOptions_1 = require("./KusamaProtocolOptions");
var KusamaProtocol = /** @class */ (function (_super) {
__extends(KusamaProtocol, _super);
function KusamaProtocol(options) {
if (options === void 0) { options = new KusamaProtocolOptions_1.KusamaProtocolOptions(); }
var _this = _super.call(this, options) || this;
_this.options = options;
_this.symbol = 'KSM';
_this.name = 'Kusama';
_this.marketSymbol = 'KSM';
_this.feeSymbol = 'KSM';
_this.decimals = 12;
_this.feeDecimals = 12;
_this.identifier = ProtocolSymbols_1.MainProtocolSymbols.KUSAMA;
_this.feeDefaults = {
low: '0.001',
medium: '0.001',
high: '0.001'
};
_this.units = [
{
unitSymbol: 'KSM',
factor: '1'
},
{
unitSymbol: 'mKSM',
factor: '0.001'
},
{
unitSymbol: 'uKSM',
factor: '0.000001'
},
{
unitSymbol: 'Point',
factor: '0.000000001'
},
{
unitSymbol: 'Planck',
factor: '0.000000000001'
}
];
_this.standardDerivationPath = "m/44'/434'/0'/0/0";
_this.addressValidationPattern = '^[C-HJ][a-km-zA-HJ-NP-Z1-9]+$';
_this.addressPlaceholder = "C/D/E/F/G/H/J..."; // TODO: set better placeholder?
_this.defaultValidator = 'GcqKn3HHodwcFc3Pg3Evcbc43m7qJNMiMv744e5WMSS7TGn';
return _this;
}
return KusamaProtocol;
}(SubstrateProtocol_1.SubstrateProtocol));
exports.KusamaProtocol = KusamaProtocol;
//# sourceMappingURL=KusamaProtocol.js.map