airgap-coin-lib
Version:
The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.
68 lines • 2.56 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 PolkadotProtocolOptions_1 = require("./PolkadotProtocolOptions");
var PolkadotProtocol = /** @class */ (function (_super) {
__extends(PolkadotProtocol, _super);
function PolkadotProtocol(options) {
if (options === void 0) { options = new PolkadotProtocolOptions_1.PolkadotProtocolOptions(); }
var _this = _super.call(this, options) || this;
_this.options = options;
_this.symbol = 'DOT';
_this.name = 'Polkadot';
_this.marketSymbol = 'DOT';
_this.feeSymbol = 'DOT';
_this.decimals = 10;
_this.feeDecimals = 10;
_this.identifier = ProtocolSymbols_1.MainProtocolSymbols.POLKADOT;
_this.feeDefaults = {
low: '0.01',
medium: '0.01',
high: '0.01'
};
_this.units = [
{
unitSymbol: 'DOT',
factor: '1'
},
{
unitSymbol: 'mDOT',
factor: '0.001'
},
{
unitSymbol: 'uDOT',
factor: '0.000001'
},
{
unitSymbol: 'Point',
factor: '0.000000001'
},
{
unitSymbol: 'Planck',
factor: '0.0000000001'
}
];
_this.standardDerivationPath = "m/44'/354'/0'/0/0";
_this.addressValidationPattern = '^1[a-km-zA-HJ-NP-Z1-9]+$';
_this.addressPlaceholder = "1ABC...";
_this.defaultValidator = '12C9U6zSSoZ6pgwR2ksFyBLgQH6v7dkqqPCRyHceoP8MJRo2';
return _this;
}
return PolkadotProtocol;
}(SubstrateProtocol_1.SubstrateProtocol));
exports.PolkadotProtocol = PolkadotProtocol;
//# sourceMappingURL=PolkadotProtocol.js.map