Compare commits
6 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 9ae777f739 | |
Derrick Hammer | 5880c46643 | |
Derrick Hammer | 2ca758f28c | |
Derrick Hammer | 6b83e4c5b4 | |
Derrick Hammer | 6b0d43fe9b | |
Derrick Hammer | e6318cdc38 |
|
@ -1,3 +1,11 @@
|
|||
# [0.1.0-develop.9](https://git.lumeweb.com/LumeWeb/kernel/compare/v0.1.0-develop.8...v0.1.0-develop.9) (2023-09-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* finalModule needs to be moduleDomain ([6b0d43f](https://git.lumeweb.com/LumeWeb/kernel/commit/6b0d43fe9b41150a768025d8d6b2edc7033e1607))
|
||||
* have resolveModuleRegistryEntry decode the cid and pass the pubkey ([e6318cd](https://git.lumeweb.com/LumeWeb/kernel/commit/e6318cdc38b839de8c95d36c1f5276596b57bd83))
|
||||
|
||||
# [0.1.0-develop.8](https://git.lumeweb.com/LumeWeb/kernel/compare/v0.1.0-develop.7...v0.1.0-develop.8) (2023-09-02)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/kernel",
|
||||
"version": "0.1.0-develop.8",
|
||||
"version": "0.1.0-develop.9",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/kernel",
|
||||
"version": "0.1.0-develop.8",
|
||||
"version": "0.1.0-develop.9",
|
||||
"dependencies": {
|
||||
"@lumeweb/libkernel": "0.1.0-develop.38"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/kernel",
|
||||
"version": "0.1.0-develop.8",
|
||||
"version": "0.1.0-develop.9",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
import { internalModuleCall, modules } from "./queries.js";
|
||||
import { SignedRegistryEntry } from "@lumeweb/libs5";
|
||||
import { base58btc } from "multiformats/bases/base58";
|
||||
import { decodeCid } from "@lumeweb/libweb";
|
||||
|
||||
const CORE_MODULES = {
|
||||
swarm: "z3o47ar8NBrnaEneBVzZD7QuMRMXjDtQDCpt4xP6mhsdw1cjnJ8mQKfNKGv3",
|
||||
swarm: "zdiLmwHCC15afFNLYzzT2DVV7m27SrBde7oXHdSzAe95GpFZXzdpatUN6b",
|
||||
peerDiscoveryRegistry:
|
||||
"z3o47aaLSspwrXzmu5mjuHPwaq3gRbyYQ3jL9RM1ammuHGB7uxSFBK2dRjqR",
|
||||
"zdiLW9MtAAMssP5vLBgd1FitouiVXzNUYZszFYG44uVKqCPDqUQox9aq1y",
|
||||
ircPeerDiscovery:
|
||||
"z3o47admQjBj2QUrwHhvTB3nV1cBwQ5ZaKF7P5WELXeRyzzvBZr33QMJWTLs",
|
||||
s5: "z3o47hB2zLuvBMFaWa55SmbFQe3u97dWUG4fssXXTEcT4ZvnPkPaRF14b1EF",
|
||||
"zdiLZaKjWwXkMU88GNEWf6d5NREHe1Yk4M7eQm1owSC4ezeqFGGuGpfYXR",
|
||||
s5: "zdiT6quMF8gh8BhQdXE7CZYhp8S1BxSgsucSS48WuTGdars1noejvak6Qo",
|
||||
};
|
||||
|
||||
export async function networkReady() {
|
||||
|
@ -30,7 +31,11 @@ function moduleLoaded(module: string) {
|
|||
return module in modules;
|
||||
}
|
||||
|
||||
export async function resolveModuleRegistryEntry(pubkey: string) {
|
||||
export async function resolveModuleRegistryEntry(module: string) {
|
||||
const [cid] = decodeCid(module);
|
||||
|
||||
const pubkey = cid.hash;
|
||||
|
||||
const signedEntry = (await internalModuleCall(
|
||||
CORE_MODULES.s5,
|
||||
"getRegistryEntry",
|
||||
|
|
|
@ -427,7 +427,7 @@ async function handleModuleCall(
|
|||
let resolvedModule;
|
||||
|
||||
try {
|
||||
resolvedModule = await resolveModuleRegistryEntry(finalModule);
|
||||
resolvedModule = await resolveModuleRegistryEntry(moduleDomain);
|
||||
} catch (e) {
|
||||
registryFail();
|
||||
return;
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
const DEFAULT_MODULE_REGISTRY = new Map<string, string>(
|
||||
Object.entries({
|
||||
// swarm
|
||||
z3o47ar8NBrnaEneBVzZD7QuMRMXjDtQDCpt4xP6mhsdw1cjnJ8mQKfNKGv3:
|
||||
"zduTR1y921Erd52dYq1DKLpA9J6sw8g8KPfUdbkqmwdXDGKCjQKL4SHvDd",
|
||||
zdiLmwHCC15afFNLYzzT2DVV7m27SrBde7oXHdSzAe95GpFZXzdpatUN6b:
|
||||
"zduMnWZNBBk7yjTX46sP3Frbnx8btaVjn7ozKb3jgdWpJqH14Kn8Qk31LK",
|
||||
// peerDiscoveryRegistry
|
||||
z3o47aaLSspwrXzmu5mjuHPwaq3gRbyYQ3jL9RM1ammuHGB7uxSFBK2dRjqR:
|
||||
zdiLW9MtAAMssP5vLBgd1FitouiVXzNUYZszFYG44uVKqCPDqUQox9aq1y:
|
||||
"zduJceGhVmwR6wf2xUhJp9juU6rabynbi8mFwmBcKEaP8nc1mXyrDyRMmy",
|
||||
// ircPeerDiscovery
|
||||
z3o47admQjBj2QUrwHhvTB3nV1cBwQ5ZaKF7P5WELXeRyzzvBZr33QMJWTLs:
|
||||
zdiLZaKjWwXkMU88GNEWf6d5NREHe1Yk4M7eQm1owSC4ezeqFGGuGpfYXR:
|
||||
"zduLx8mxrSWBPpTby1n9GtvxmCu6DwK9bsu26AgxesJmeEcWrVAF4NX7QK",
|
||||
// s5
|
||||
z3o47hB2zLuvBMFaWa55SmbFQe3u97dWUG4fssXXTEcT4ZvnPkPaRF14b1EF:
|
||||
"zduTZ7NBNtGxQxbAaDNcp7d1xta7y2MXKnjvVA3m29ohwBeeLHL1GieTPd",
|
||||
zdiT6quMF8gh8BhQdXE7CZYhp8S1BxSgsucSS48WuTGdars1noejvak6Qo:
|
||||
"zduHdVUg8SUJQ5dwx1LnesjMTxDFxireNrppRng7z14QDZnqZCCiiWtcT9",
|
||||
}),
|
||||
);
|
||||
const REGISTRY_ITEM_ID = "registry";
|
||||
|
|
Loading…
Reference in New Issue