From ac822fb9390cfc863a959dc09269479d73a71b80 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 24 Jun 2023 13:35:26 -0400 Subject: [PATCH] fix: switch to using @lumeweb/community-portals --- npm-shrinkwrap.json | 37 +++++++++++++++++++++++++++++++++++++ package.json | 1 + src/portal.ts | 5 ++--- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 4ce29bb..3bb43f5 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -8,6 +8,7 @@ "name": "@lumeweb/libweb", "version": "0.2.0-develop.12", "dependencies": { + "@lumeweb/community-portals": "^0.1.0-develop.2", "@lumeweb/libportal": "0.2.0-develop.8", "@noble/curves": "^1.1.0", "@noble/hashes": "^1.3.1" @@ -1788,6 +1789,14 @@ "dev": true, "peer": true }, + "node_modules/@lumeweb/community-portals": { + "version": "0.1.0-develop.2", + "resolved": "https://registry.npmjs.org/@lumeweb/community-portals/-/community-portals-0.1.0-develop.2.tgz", + "integrity": "sha512-VbbNh0Jidm5ShYBA2AD9bjl9n1Yvs0ExPlx/+bX+xpv/+WpRLV4QfCBF8pzk4+s+pOEN+0s50biJnBITNBC8JA==", + "peerDependencies": { + "@lumeweb/libweb": "^0.2.0" + } + }, "node_modules/@lumeweb/libportal": { "version": "0.2.0-develop.8", "resolved": "https://registry.npmjs.org/@lumeweb/libportal/-/libportal-0.2.0-develop.8.tgz", @@ -1804,6 +1813,34 @@ "web-streams-polyfill": "^3.2.1" } }, + "node_modules/@lumeweb/libweb": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@lumeweb/libweb/-/libweb-0.2.0.tgz", + "integrity": "sha512-G2G3vu7k18UA67/UiloIWPn8EytOz94CBsY9WYyhuHlt64y9nCqxIx0+Ze6bQ1mdRcgwKP0x7Tvqvq6WPLn3Ow==", + "peer": true, + "dependencies": { + "@lumeweb/libportal": "^0.1.0", + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.1" + } + }, + "node_modules/@lumeweb/libweb/node_modules/@lumeweb/libportal": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@lumeweb/libportal/-/libportal-0.1.2.tgz", + "integrity": "sha512-3lA9yU1VArg4vJrewHD3X+2PKm9h+A8PwKDTRI5ob+xuAKJcDITGa1+JfEiqy4OVu39xGdShPKGk4uDWbxrTNA==", + "peer": true, + "dependencies": { + "@noble/curves": "^1.1.0", + "@noble/hashes": "^1.3.1", + "detect-node": "^2.1.0", + "multiformats": "^11.0.2", + "node-fetch": "^3.3.1", + "p-defer": "^4.0.0", + "stream-to-blob": "^2.0.1", + "tus-js-client": "^3.1.0", + "web-streams-polyfill": "^3.2.1" + } + }, "node_modules/@noble/curves": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", diff --git a/package.json b/package.json index 372e2ac..9f03c70 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "semantic-release": "semantic-release" }, "dependencies": { + "@lumeweb/community-portals": "^0.1.0-develop.2", "@lumeweb/libportal": "0.2.0-develop.8", "@noble/curves": "^1.1.0", "@noble/hashes": "^1.3.1" diff --git a/src/portal.ts b/src/portal.ts index aa411c9..7ecd198 100644 --- a/src/portal.ts +++ b/src/portal.ts @@ -3,12 +3,11 @@ import { Client } from "@lumeweb/libportal"; import { deriveChildKey } from "#keys.js"; import { ed25519 } from "@noble/curves/ed25519"; import { bytesToHex } from "@noble/hashes/utils"; +import COMMUNITY_PORTAL_LIST from "@lumeweb/community-portals"; let activePortalMasterKey; -export const DEFAULT_PORTAL_LIST: Portal[] = [ - { id: "lumeweb", url: "https://web3portal.com", name: "web3portal.com" }, -]; +export const DEFAULT_PORTAL_LIST = COMMUNITY_PORTAL_LIST; let ACTIVE_PORTALS = new Set();