@calimero-network/mero-js 16.1.0 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin-api/admin-client.d.ts +6 -8
- package/dist/admin-api/admin-client.js +7 -26
- package/dist/admin-api/admin-types.d.ts +9 -11
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +10 -28
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +10 -28
- package/dist/index.mjs.map +2 -2
- package/dist/namespace-op/namespace-op.d.ts +1 -1
- package/dist/namespace-op/namespace-op.js +16 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -769,34 +769,15 @@ var AdminApiClient = class {
|
|
|
769
769
|
return this.httpClient.get("/admin-api/is-authed");
|
|
770
770
|
}
|
|
771
771
|
// ---- Application Management ----
|
|
772
|
-
async installApplication(request) {
|
|
773
|
-
return unwrap(await this.httpClient.post("/admin-api/install-application", request));
|
|
774
|
-
}
|
|
775
772
|
/**
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
*
|
|
781
|
-
* subsequent `upgradeGroup`.
|
|
773
|
+
* Install a published application by its `package@version` coordinates. The
|
|
774
|
+
* node resolves and fetches them from its own configured `[registry]`, so no
|
|
775
|
+
* URL is passed and none is accepted. A 502 means the node's source has
|
|
776
|
+
* nothing published at those coordinates. This is the discrete "download"
|
|
777
|
+
* step an Updates flow pairs with a subsequent `upgradeGroup`.
|
|
782
778
|
*/
|
|
783
|
-
async
|
|
784
|
-
|
|
785
|
-
const manifestUrl = new URL(
|
|
786
|
-
`/api/v2/bundles/${encodeURIComponent(packageName)}/${encodeURIComponent(version)}`,
|
|
787
|
-
base
|
|
788
|
-
).toString();
|
|
789
|
-
const resp = await fetchRegistry(manifestUrl, "manifest", `${packageName}@${version}`);
|
|
790
|
-
const bundle = await resp.json();
|
|
791
|
-
const pkg = encodeURIComponent(bundle.package);
|
|
792
|
-
const ver = encodeURIComponent(bundle.appVersion);
|
|
793
|
-
const artifactUrl = `${base}/artifacts/${pkg}/${ver}/${pkg}-${ver}.mpk`;
|
|
794
|
-
return this.installApplication({
|
|
795
|
-
url: artifactUrl,
|
|
796
|
-
package: bundle.package,
|
|
797
|
-
version: bundle.appVersion,
|
|
798
|
-
metadata: []
|
|
799
|
-
});
|
|
779
|
+
async installApplication(request) {
|
|
780
|
+
return unwrap(await this.httpClient.post("/admin-api/install-application", request));
|
|
800
781
|
}
|
|
801
782
|
/**
|
|
802
783
|
* List a package's published versions from the registry, newest-first by
|
|
@@ -2767,7 +2748,7 @@ async function accountForRoot(rootSecret) {
|
|
|
2767
2748
|
}
|
|
2768
2749
|
|
|
2769
2750
|
// src/namespace-op/namespace-op.ts
|
|
2770
|
-
var SIGNED_NAMESPACE_OP_SCHEMA_VERSION =
|
|
2751
|
+
var SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 8;
|
|
2771
2752
|
var NAMESPACE_SIGN_DOMAIN = new TextEncoder().encode("calimero.namespace.v1");
|
|
2772
2753
|
var NAMESPACE_OP_ROOT = 0;
|
|
2773
2754
|
var ROOT_OP = {
|
|
@@ -2871,7 +2852,8 @@ async function signMemberJoinOp(input) {
|
|
|
2871
2852
|
const signature = new Uint8Array(
|
|
2872
2853
|
await crypto.subtle.sign("Ed25519", key, concat(NAMESPACE_SIGN_DOMAIN, signable))
|
|
2873
2854
|
);
|
|
2874
|
-
|
|
2855
|
+
const unendorsed = new Uint8Array([0]);
|
|
2856
|
+
return hex(concat(signable, signature, unendorsed));
|
|
2875
2857
|
}
|
|
2876
2858
|
|
|
2877
2859
|
// src/capabilities.ts
|