@calimero-network/mero-js 26.9.0 → 26.10.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 +9 -1
- package/dist/admin-api/admin-client.js +14 -0
- package/dist/admin-api/admin-types.d.ts +45 -0
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +23 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +23 -1
- 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
|
@@ -1823,6 +1823,28 @@ var AdminApiClient = class {
|
|
|
1823
1823
|
await this.httpClient.post("/admin-api/namespaces", request)
|
|
1824
1824
|
);
|
|
1825
1825
|
}
|
|
1826
|
+
/** What `namespaceId` approves for outbound requests, one entry per publisher. */
|
|
1827
|
+
async listOutboundApprovals(namespaceId) {
|
|
1828
|
+
return unwrap(
|
|
1829
|
+
await this.httpClient.get(
|
|
1830
|
+
`/admin-api/namespaces/${pathSegment(namespaceId)}/outbound-approvals`
|
|
1831
|
+
)
|
|
1832
|
+
);
|
|
1833
|
+
}
|
|
1834
|
+
/**
|
|
1835
|
+
* Set what `namespaceId` approves for the publisher of `request.applicationId`
|
|
1836
|
+
* to exactly `request.approve`: `'manifest'` or a list of URL prefixes, and
|
|
1837
|
+
* `[]` revokes everything. Takes effect at the app's next run.
|
|
1838
|
+
*/
|
|
1839
|
+
async setOutboundApproval(namespaceId, request) {
|
|
1840
|
+
return unwrap(
|
|
1841
|
+
await this.httpClient.put(
|
|
1842
|
+
`/admin-api/namespaces/${pathSegment(namespaceId)}/outbound-approvals`,
|
|
1843
|
+
// Core declares this body `deny_unknown_fields`, so send exactly these.
|
|
1844
|
+
{ applicationId: request.applicationId, approve: request.approve }
|
|
1845
|
+
)
|
|
1846
|
+
);
|
|
1847
|
+
}
|
|
1826
1848
|
async deleteNamespace(namespaceId) {
|
|
1827
1849
|
return unwrap(
|
|
1828
1850
|
await this.httpClient.request(`/admin-api/namespaces/${pathSegment(namespaceId)}`, {
|
|
@@ -10326,7 +10348,7 @@ function bytes32(value, label2) {
|
|
|
10326
10348
|
}
|
|
10327
10349
|
|
|
10328
10350
|
// src/namespace-op/namespace-op.ts
|
|
10329
|
-
var SIGNED_NAMESPACE_OP_SCHEMA_VERSION =
|
|
10351
|
+
var SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 27;
|
|
10330
10352
|
var NAMESPACE_SIGN_DOMAIN = new TextEncoder().encode("calimero.namespace.v1");
|
|
10331
10353
|
var NAMESPACE_OP_ROOT = 0;
|
|
10332
10354
|
var ROOT_OP2 = {
|