js-waku/static/js/main.dea5c94f.js

3 lines
2.1 MiB
JavaScript
Raw Normal View History

/*! For license information please see main.dea5c94f.js.LICENSE.txt */
(()=>{var __webpack_modules__={5345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.proto=t.StoreCodec=t.WakuStore=t.PageDirection=t.waku_store=t.RelayCodecs=t.WakuRelay=t.waku_relay=t.PushResponse=t.LightPushCodec=t.WakuLightPush=t.waku_light_push=t.getPublicKey=t.generateSymmetricKey=t.generatePrivateKey=t.WakuMessage=t.waku_message=t.DefaultPubSubTopic=t.Waku=t.waku=t.utils=t.enr=t.discovery=t.getNodesFromHostedJson=void 0;var s=r(15117);Object.defineProperty(t,"getNodesFromHostedJson",{enumerable:!0,get:function(){return s.getNodesFromHostedJson}}),t.discovery=o(r(15117)),t.enr=o(r(38509)),t.utils=o(r(23677)),t.waku=o(r(84109));var a=r(84109);Object.defineProperty(t,"Waku",{enumerable:!0,get:function(){return a.Waku}}),Object.defineProperty(t,"DefaultPubSubTopic",{enumerable:!0,get:function(){return a.DefaultPubSubTopic}}),t.waku_message=o(r(41995));var u=r(41995);Object.defineProperty(t,"WakuMessage",{enumerable:!0,get:function(){return u.WakuMessage}});var c=r(2469);Object.defineProperty(t,"generatePrivateKey",{enumerable:!0,get:function(){return c.generatePrivateKey}}),Object.defineProperty(t,"generateSymmetricKey",{enumerable:!0,get:function(){return c.generateSymmetricKey}}),Object.defineProperty(t,"getPublicKey",{enumerable:!0,get:function(){return c.getPublicKey}}),t.waku_light_push=o(r(37167));var h=r(37167);Object.defineProperty(t,"WakuLightPush",{enumerable:!0,get:function(){return h.WakuLightPush}}),Object.defineProperty(t,"LightPushCodec",{enumerable:!0,get:function(){return h.LightPushCodec}}),Object.defineProperty(t,"PushResponse",{enumerable:!0,get:function(){return h.PushResponse}}),t.waku_relay=o(r(84507));var l=r(84507);Object.defineProperty(t,"WakuRelay",{enumerable:!0,get:function(){return l.WakuRelay}}),Object.defineProperty(t,"RelayCodecs",{enumerable:!0,get:function(){return l.RelayCodecs}}),t.waku_store=o(r(28026));var f=r(28026);Object.defineProperty(t,"PageDirection",{enumerable:!0,get:function(){return f.PageDirection}}),Object.defineProperty(t,"WakuStore",{enumerable:!0,get:function(){return f.WakuStore}}),Object.defineProperty(t,"StoreCodec",{enumerable:!0,get:function(){return f.StoreCodec}}),t.proto=o(r(12187))},36559:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Bootstrap=void 0;const i=n(r(39287)),o=r(57604),s=r(80470),a=r(15117),u=i.default("waku:discovery:bootstrap");class c{constructor(e){var t;const r=null!==(t=e.maxPeers)&&void 0!==t?t:c.DefaultMaxPeers;if(e.default)u("Use hosted list of peers."),this.getBootstrapPeers=a.getNodesFromHostedJson.bind({},void 0,void 0,r);else if(void 0!==e.peers&&e.peers.length>0){u("Use provided list of peers.");const t=e.peers.map((e=>new o.Multiaddr(e))),n=a.getPseudoRandomSubset(t,r);this.getBootstrapPeers=()=>Promise.resolve(n)}else if("function"===typeof e.getPeers){u("Bootstrap: Use provided getPeers function.");const t=e.getPeers;this.getBootstrapPeers=async()=>{const e=await t();return a.getPseudoRandomSubset(e,r).map((e=>new o.Multiaddr(e)))}}else if(e.enrUrl){const t=e.enrUrl;u("Use provided EIP-1459 ENR Tree URL.");const n=s.DnsNodeDiscovery.dnsOverHttp();this.getBootstrapPeers=async()=>{const e=await n.getPeers(r,[t]);return u("Found ".concat(e.length," peers")),e.map((e=>e.getFullMultiaddrs())).flat()}}else u("No bootstrap method specified, no peer will be returned"),this.getBootstrapPeers=void 0}}t.Bootstrap=c,c.DefaultMaxPeers=1},80470:function(e,t,r){"us
//# sourceMappingURL=main.dea5c94f.js.map