{"size": 2194, "ext": "js", "max_stars_repo_path": "packages/core/dist/plugins/PluginRepository.js", "max_stars_repo_name": "gxchain/scatter-js", "max_stars_repo_stars_event_min_datetime": "2018-11-29T12:17:57.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-12T03:22:32.000Z", "max_issues_repo_path": "packages/core/dist/plugins/PluginRepository.js", "max_issues_repo_name": "gxchain/scatter-js", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/core/dist/plugins/PluginRepository.js", "max_forks_repo_name": "gxchain/scatter-js", "max_forks_repo_forks_event_min_datetime": "2020-10-10T02:53:27.000Z", "max_forks_repo_forks_event_max_datetime": "2021-06-13T23:53:29.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 2194.0, "max_line_length": 2194, "alphanum_fraction": 0.7935278031}
"use strict";var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard"),_interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")),_createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass")),PluginTypes=_interopRequireWildcard(require("./PluginTypes")),PluginRepositorySingleton=/*#__PURE__*/function(){function a(){(0,_classCallCheck2.default)(this,a),this.plugins=[]}return(0,_createClass2.default)(a,[{key:"loadPlugin",value:function loadPlugin(a){this.plugin(a.name)||this.plugins.push(a)}},{key:"signatureProviders",value:function signatureProviders(){return this.plugins.filter(function(a){return a.type===PluginTypes.BLOCKCHAIN_SUPPORT})}},{key:"supportedBlockchains",value:function supportedBlockchains(){return this.signatureProviders().map(function(){return name})}},{key:"plugin",value:function plugin(a){return this.plugins.find(function(b){return b.name===a})}},{key:"endorsedNetworks",value:function(){var a=(0,_asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function a(){return _regenerator.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,Promise.all(this.signatureProviders().map(/*#__PURE__*/function(){var a=(0,_asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function a(b){return _regenerator.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,b.getEndorsedNetwork();case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop();}},a,this)}));return function(){return a.apply(this,arguments)}}()));case 2:return a.abrupt("return",a.sent);case 3:case"end":return a.stop();}},a,this)}));return function endorsedNetworks(){return a.apply(this,arguments)}}()}]),a}(),PluginRepository=new PluginRepositorySingleton,_default=PluginRepository;Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default=_default;