UNPKG

airgap-coin-lib

Version:

The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.

77 lines 3.83 kB
"use strict"; // tslint:disable:max-classes-per-file 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 ProtocolNetwork_1 = require("../../../utils/ProtocolNetwork"); var SubstrateNetwork_1 = require("../SubstrateNetwork"); var SubstrateProtocolOptions_1 = require("../SubstrateProtocolOptions"); var MAINNET_NAME = 'Mainnet'; var NODE_URL = 'https://polkadot-kusama-node.prod.gke.papers.tech'; var BLOCK_EXPLORER_URL = 'https://polkascan.io/kusama'; var BLOCK_EXPLORER_API = 'https://kusama.subscan.io/api/scan'; var KusamaProtocolNetworkExtras = /** @class */ (function () { function KusamaProtocolNetworkExtras(apiUrl, network) { if (apiUrl === void 0) { apiUrl = BLOCK_EXPLORER_API; } if (network === void 0) { network = SubstrateNetwork_1.SubstrateNetwork.KUSAMA; } this.apiUrl = apiUrl; this.network = network; } return KusamaProtocolNetworkExtras; }()); exports.KusamaProtocolNetworkExtras = KusamaProtocolNetworkExtras; var KusamaPolkascanBlockExplorer = /** @class */ (function (_super) { __extends(KusamaPolkascanBlockExplorer, _super); function KusamaPolkascanBlockExplorer(blockExplorer) { if (blockExplorer === void 0) { blockExplorer = BLOCK_EXPLORER_URL; } return _super.call(this, blockExplorer) || this; } return KusamaPolkascanBlockExplorer; }(SubstrateProtocolOptions_1.PolkascanBlockExplorer)); exports.KusamaPolkascanBlockExplorer = KusamaPolkascanBlockExplorer; var KusamaProtocolConfig = /** @class */ (function (_super) { __extends(KusamaProtocolConfig, _super); function KusamaProtocolConfig() { return _super.call(this) || this; } return KusamaProtocolConfig; }(SubstrateProtocolOptions_1.SubstrateProtocolConfig)); exports.KusamaProtocolConfig = KusamaProtocolConfig; var KusamaProtocolNetwork = /** @class */ (function (_super) { __extends(KusamaProtocolNetwork, _super); function KusamaProtocolNetwork(name, type, rpcUrl, blockExplorer, extras) { if (name === void 0) { name = MAINNET_NAME; } if (type === void 0) { type = ProtocolNetwork_1.NetworkType.MAINNET; } if (rpcUrl === void 0) { rpcUrl = NODE_URL; } if (blockExplorer === void 0) { blockExplorer = new KusamaPolkascanBlockExplorer(); } if (extras === void 0) { extras = new KusamaProtocolNetworkExtras(); } return _super.call(this, name, type, rpcUrl, blockExplorer, extras) || this; } return KusamaProtocolNetwork; }(ProtocolNetwork_1.ProtocolNetwork)); exports.KusamaProtocolNetwork = KusamaProtocolNetwork; var KusamaProtocolOptions = /** @class */ (function (_super) { __extends(KusamaProtocolOptions, _super); function KusamaProtocolOptions(network, config) { if (network === void 0) { network = new KusamaProtocolNetwork(); } if (config === void 0) { config = new KusamaProtocolConfig(); } var _this = _super.call(this, network, config) || this; _this.network = network; _this.config = config; return _this; } return KusamaProtocolOptions; }(SubstrateProtocolOptions_1.SubstrateProtocolOptions)); exports.KusamaProtocolOptions = KusamaProtocolOptions; //# sourceMappingURL=KusamaProtocolOptions.js.map