@calimero-network/mero-js 23.7.0 → 23.8.2
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/cloud/cloud-client.d.ts +15 -0
- package/dist/cloud/cloud-client.js +6 -0
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +2 -2
- package/dist/namespace-op/namespace-op.d.ts +6 -1
- package/dist/namespace-op/namespace-op.js +6 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5925,6 +5925,10 @@ function teeRoleOf(row) {
|
|
|
5925
5925
|
function pickExecutingRelay(relays) {
|
|
5926
5926
|
return relays.find((r) => r.canExecute && r.relayUrl !== null && r.executorAccount !== null) ?? null;
|
|
5927
5927
|
}
|
|
5928
|
+
var ACCOUNT_HEX = /^[0-9a-f]{64}$/;
|
|
5929
|
+
function accountHexOrNull(value) {
|
|
5930
|
+
return typeof value === "string" && ACCOUNT_HEX.test(value) ? value : null;
|
|
5931
|
+
}
|
|
5928
5932
|
var AccountHaRefusedError = class extends HTTPError {
|
|
5929
5933
|
constructor(code, status, statusText, url, headers, bodyText) {
|
|
5930
5934
|
super(status, statusText, url, headers, bodyText);
|
|
@@ -6315,7 +6319,9 @@ var CloudClient = class {
|
|
|
6315
6319
|
return (body.relays ?? []).map((row) => ({
|
|
6316
6320
|
peerId: String(row.peer_id ?? ""),
|
|
6317
6321
|
relayUrl: row.relay_url ?? null,
|
|
6318
|
-
fresh: row.fresh === true
|
|
6322
|
+
fresh: row.fresh === true,
|
|
6323
|
+
executorAccount: accountHexOrNull(row.executor_account),
|
|
6324
|
+
assigned: row.assigned === true
|
|
6319
6325
|
}));
|
|
6320
6326
|
}
|
|
6321
6327
|
/**
|
|
@@ -10783,7 +10789,7 @@ function bytes32(value, label2) {
|
|
|
10783
10789
|
}
|
|
10784
10790
|
|
|
10785
10791
|
// src/namespace-op/namespace-op.ts
|
|
10786
|
-
var SIGNED_NAMESPACE_OP_SCHEMA_VERSION =
|
|
10792
|
+
var SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 22;
|
|
10787
10793
|
var NAMESPACE_SIGN_DOMAIN = new TextEncoder().encode("calimero.namespace.v1");
|
|
10788
10794
|
var NAMESPACE_OP_ROOT = 0;
|
|
10789
10795
|
var ROOT_OP2 = {
|