@calimero-network/mero-js 29.1.0 → 29.2.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/index.mjs CHANGED
@@ -2223,6 +2223,12 @@ var CalimeroClient = class _CalimeroClient {
2223
2223
  * Create an API key for an agent or server, approved with the account's
2224
2224
  * `passkey` (`412 CONFIRM_REQUIRED`); needs a passkey session (an API key
2225
2225
  * is refused `403`). The key is returned once.
2226
+ *
2227
+ * `upgrades: { app, package? }` makes an upgrade key, for CI: it upgrades
2228
+ * that one app to signed releases of its package (default: the one the app
2229
+ * runs, by that package's pinned signer) with {@link upgradeApp} and no
2230
+ * passkey, and every other request with it is refused
2231
+ * `403 UPGRADE_KEY_ONLY`. It takes no other scope field.
2226
2232
  */
2227
2233
  createApiKey(options, passkey) {
2228
2234
  return this.postConfirmed("auth/apikeys", { ...options }, passkey);
@@ -2362,6 +2368,8 @@ var CalimeroClient = class _CalimeroClient {
2362
2368
  * `passkey` gives. Refused (`403`) to a session opened on an app's
2363
2369
  * frontend: an app asks its user with {@link requestConsent} instead. Past
2364
2370
  * a release deadline its approver has not met: {@link ReleaseDeadlineError}.
2371
+ * With an upgrade key ({@link createApiKey} `upgrades`) pass no passkey and
2372
+ * a `version` of the key's package: the key's own proof stands in for it.
2365
2373
  */
2366
2374
  upgradeApp(app, target, passkey) {
2367
2375
  const path = `apps/${seg(app)}/upgrade`;