@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.cjs
CHANGED
|
@@ -846,34 +846,15 @@ var AdminApiClient = class {
|
|
|
846
846
|
return this.httpClient.get("/admin-api/is-authed");
|
|
847
847
|
}
|
|
848
848
|
// ---- Application Management ----
|
|
849
|
-
async installApplication(request) {
|
|
850
|
-
return unwrap(await this.httpClient.post("/admin-api/install-application", request));
|
|
851
|
-
}
|
|
852
849
|
/**
|
|
853
|
-
*
|
|
854
|
-
*
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
* subsequent `upgradeGroup`.
|
|
850
|
+
* Install a published application by its `package@version` coordinates. The
|
|
851
|
+
* node resolves and fetches them from its own configured `[registry]`, so no
|
|
852
|
+
* URL is passed and none is accepted. A 502 means the node's source has
|
|
853
|
+
* nothing published at those coordinates. This is the discrete "download"
|
|
854
|
+
* step an Updates flow pairs with a subsequent `upgradeGroup`.
|
|
859
855
|
*/
|
|
860
|
-
async
|
|
861
|
-
|
|
862
|
-
const manifestUrl = new URL(
|
|
863
|
-
`/api/v2/bundles/${encodeURIComponent(packageName)}/${encodeURIComponent(version)}`,
|
|
864
|
-
base
|
|
865
|
-
).toString();
|
|
866
|
-
const resp = await fetchRegistry(manifestUrl, "manifest", `${packageName}@${version}`);
|
|
867
|
-
const bundle = await resp.json();
|
|
868
|
-
const pkg = encodeURIComponent(bundle.package);
|
|
869
|
-
const ver = encodeURIComponent(bundle.appVersion);
|
|
870
|
-
const artifactUrl = `${base}/artifacts/${pkg}/${ver}/${pkg}-${ver}.mpk`;
|
|
871
|
-
return this.installApplication({
|
|
872
|
-
url: artifactUrl,
|
|
873
|
-
package: bundle.package,
|
|
874
|
-
version: bundle.appVersion,
|
|
875
|
-
metadata: []
|
|
876
|
-
});
|
|
856
|
+
async installApplication(request) {
|
|
857
|
+
return unwrap(await this.httpClient.post("/admin-api/install-application", request));
|
|
877
858
|
}
|
|
878
859
|
/**
|
|
879
860
|
* List a package's published versions from the registry, newest-first by
|
|
@@ -2844,7 +2825,7 @@ async function accountForRoot(rootSecret) {
|
|
|
2844
2825
|
}
|
|
2845
2826
|
|
|
2846
2827
|
// src/namespace-op/namespace-op.ts
|
|
2847
|
-
var SIGNED_NAMESPACE_OP_SCHEMA_VERSION =
|
|
2828
|
+
var SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 8;
|
|
2848
2829
|
var NAMESPACE_SIGN_DOMAIN = new TextEncoder().encode("calimero.namespace.v1");
|
|
2849
2830
|
var NAMESPACE_OP_ROOT = 0;
|
|
2850
2831
|
var ROOT_OP = {
|
|
@@ -2948,7 +2929,8 @@ async function signMemberJoinOp(input) {
|
|
|
2948
2929
|
const signature = new Uint8Array(
|
|
2949
2930
|
await crypto.subtle.sign("Ed25519", key, concat(NAMESPACE_SIGN_DOMAIN, signable))
|
|
2950
2931
|
);
|
|
2951
|
-
|
|
2932
|
+
const unendorsed = new Uint8Array([0]);
|
|
2933
|
+
return hex(concat(signable, signature, unendorsed));
|
|
2952
2934
|
}
|
|
2953
2935
|
|
|
2954
2936
|
// src/capabilities.ts
|