@airgap/astar
Version:
The @airgap/astar is an Astar implementation of the ICoinProtocol interface from @airgap/coinlib-core.
79 lines • 2.99 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AstarProtocol = void 0;
var ProtocolSymbols_1 = require("@airgap/coinlib-core/utils/ProtocolSymbols");
var SubstrateDelegateProtocol_1 = require("@airgap/substrate/v0/protocol/SubstrateDelegateProtocol");
var AstarProtocolOptions_1 = require("./AstarProtocolOptions");
var AstarProtocol = /** @class */ (function (_super) {
__extends(AstarProtocol, _super);
function AstarProtocol(options) {
if (options === void 0) { options = new AstarProtocolOptions_1.AstarProtocolOptions(); }
var _this = _super.call(this, options) || this;
_this.options = options;
_this.symbol = 'ASTR';
_this.name = 'Astar';
_this.marketSymbol = 'ASTR';
_this.feeSymbol = 'ASTR';
_this.decimals = 18;
_this.feeDecimals = 18;
_this.identifier = ProtocolSymbols_1.MainProtocolSymbols.ASTAR;
_this.feeDefaults = {
low: '0.001',
medium: '0.001',
high: '0.001'
};
_this.units = [
{
unitSymbol: 'ASTR',
factor: '1'
},
{
unitSymbol: 'mASTR',
factor: '0.001'
},
{
unitSymbol: 'uASTR',
factor: '0.000001'
},
{
unitSymbol: 'nASTR',
factor: '0.000000001'
},
{
unitSymbol: 'pASTR',
factor: '0.000000000001'
},
{
unitSymbol: 'fASTR',
factor: '0.000000000000001'
},
{
unitSymbol: 'aASTR',
factor: '0.000000000000000001'
}
];
_this.standardDerivationPath = "m/44'/810'/0'/0/0";
_this.addressIsCaseSensitive = true;
_this.addressValidationPattern = '^[a-km-zA-HJ-NP-Z1-9]+$';
_this.addressPlaceholder = "ABC...";
return _this;
}
return AstarProtocol;
}(SubstrateDelegateProtocol_1.SubstrateDelegateProtocol));
exports.AstarProtocol = AstarProtocol;
//# sourceMappingURL=AstarProtocol.js.map