@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.cjs CHANGED
@@ -2341,6 +2341,12 @@ var CalimeroClient = class _CalimeroClient {
2341
2341
  * Create an API key for an agent or server, approved with the account's
2342
2342
  * `passkey` (`412 CONFIRM_REQUIRED`); needs a passkey session (an API key
2343
2343
  * is refused `403`). The key is returned once.
2344
+ *
2345
+ * `upgrades: { app, package? }` makes an upgrade key, for CI: it upgrades
2346
+ * that one app to signed releases of its package (default: the one the app
2347
+ * runs, by that package's pinned signer) with {@link upgradeApp} and no
2348
+ * passkey, and every other request with it is refused
2349
+ * `403 UPGRADE_KEY_ONLY`. It takes no other scope field.
2344
2350
  */
2345
2351
  createApiKey(options, passkey) {
2346
2352
  return this.postConfirmed("auth/apikeys", { ...options }, passkey);
@@ -2480,6 +2486,8 @@ var CalimeroClient = class _CalimeroClient {
2480
2486
  * `passkey` gives. Refused (`403`) to a session opened on an app's
2481
2487
  * frontend: an app asks its user with {@link requestConsent} instead. Past
2482
2488
  * a release deadline its approver has not met: {@link ReleaseDeadlineError}.
2489
+ * With an upgrade key ({@link createApiKey} `upgrades`) pass no passkey and
2490
+ * a `version` of the key's package: the key's own proof stands in for it.
2483
2491
  */
2484
2492
  upgradeApp(app, target, passkey) {
2485
2493
  const path = `apps/${seg(app)}/upgrade`;