@1claw/openapi-spec 0.31.0 → 0.32.1

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/README.md CHANGED
@@ -40,7 +40,11 @@ openapi-generator generate \
40
40
  import spec from "@1claw/openapi-spec/openapi.json";
41
41
  ```
42
42
 
43
- ## What's in the spec (v0.31.0 — API `info.version` 2.17.0)
43
+ ## What's in the spec (v0.32.0 — API `info.version` 2.18.0)
44
+
45
+ ### Bankr dynamic key vending (2.18)
46
+ - **Bankr keys** — `POST /v1/agents/{id}/bankr-keys/lease`, `GET /v1/agents/{id}/bankr-keys`, `DELETE /v1/agents/{id}/bankr-keys/{lease_id}`. Partner key vending for scoped, TTL-bound `bk_usr_` wallet API keys.
47
+
44
48
 
45
49
  ### CDP parity & embedded wallet (2.16+)
46
50
  - **Deposit destinations** — `POST/GET/PATCH /v1/deposit-destinations`, `GET /v1/deposit-destinations/{id}`
package/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "1Claw API",
5
- "version": "2.17.0",
5
+ "version": "2.18.0",
6
6
  "description": "Secure secret management for AI agents. Provides vaults, secrets,\npolicy-based access control, agent identity, Intents API,\nsharing, billing, and audit logging.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
7
7
  "contact": {
8
8
  "email": "ops@1claw.xyz"
@@ -3687,6 +3687,109 @@
3687
3687
  }
3688
3688
  }
3689
3689
  },
3690
+ "/v1/agents/{agent_id}/bankr-keys/lease": {
3691
+ "post": {
3692
+ "tags": [
3693
+ "Bankr Keys"
3694
+ ],
3695
+ "summary": "Lease a short-lived Bankr wallet API key",
3696
+ "description": "Provision a scoped, time-limited Bankr wallet API key for an agent.\n**Privileged, deny-by-default:** agent callers need an explicit access policy\non `agents/{agent_id}/bankr/*` in the `__agent-keys` vault (JWT scope\n`agents/{agent_id}/bankr/lease`). Agents may only lease for their own ID.\nThe `bk_usr_` key is **omitted** from the JSON response for agent JWTs —\nstored server-side for Shroud resolution. Human callers receive `api_key` once.\nRequires `BANKR_PARTNER_KEY` on Vault. Agent default TTL 15 min when omitted;\nhuman/org default 1 hour (`BANKR_DEFAULT_LEASE_TTL_SECS`). Recommend 5–15 min\nfor autonomous agents. Max TTL 24 hours. Max 5 concurrent leases per agent.\n",
3697
+ "operationId": "leaseBankrKey",
3698
+ "parameters": [
3699
+ {
3700
+ "$ref": "#/components/parameters/AgentId"
3701
+ }
3702
+ ],
3703
+ "requestBody": {
3704
+ "required": false,
3705
+ "content": {
3706
+ "application/json": {
3707
+ "schema": {
3708
+ "$ref": "#/components/schemas/LeaseBankrKeyRequest"
3709
+ }
3710
+ }
3711
+ }
3712
+ },
3713
+ "responses": {
3714
+ "201": {
3715
+ "description": "Bankr key leased",
3716
+ "content": {
3717
+ "application/json": {
3718
+ "schema": {
3719
+ "$ref": "#/components/schemas/LeaseBankrKeyResponse"
3720
+ }
3721
+ }
3722
+ }
3723
+ },
3724
+ "400": {
3725
+ "$ref": "#/components/responses/BadRequest"
3726
+ },
3727
+ "403": {
3728
+ "$ref": "#/components/responses/Forbidden"
3729
+ }
3730
+ }
3731
+ }
3732
+ },
3733
+ "/v1/agents/{agent_id}/bankr-keys": {
3734
+ "get": {
3735
+ "tags": [
3736
+ "Bankr Keys"
3737
+ ],
3738
+ "summary": "List active Bankr key leases for an agent",
3739
+ "operationId": "listBankrKeys",
3740
+ "parameters": [
3741
+ {
3742
+ "$ref": "#/components/parameters/AgentId"
3743
+ }
3744
+ ],
3745
+ "responses": {
3746
+ "200": {
3747
+ "description": "Active leases (no secret values)",
3748
+ "content": {
3749
+ "application/json": {
3750
+ "schema": {
3751
+ "$ref": "#/components/schemas/BankrKeyLeaseListResponse"
3752
+ }
3753
+ }
3754
+ }
3755
+ },
3756
+ "404": {
3757
+ "$ref": "#/components/responses/NotFound"
3758
+ }
3759
+ }
3760
+ }
3761
+ },
3762
+ "/v1/agents/{agent_id}/bankr-keys/{lease_id}": {
3763
+ "delete": {
3764
+ "tags": [
3765
+ "Bankr Keys"
3766
+ ],
3767
+ "summary": "Revoke an active Bankr key lease",
3768
+ "operationId": "revokeBankrKey",
3769
+ "parameters": [
3770
+ {
3771
+ "$ref": "#/components/parameters/AgentId"
3772
+ },
3773
+ {
3774
+ "name": "lease_id",
3775
+ "in": "path",
3776
+ "required": true,
3777
+ "schema": {
3778
+ "type": "string",
3779
+ "format": "uuid"
3780
+ }
3781
+ }
3782
+ ],
3783
+ "responses": {
3784
+ "204": {
3785
+ "description": "Lease revoked"
3786
+ },
3787
+ "404": {
3788
+ "$ref": "#/components/responses/NotFound"
3789
+ }
3790
+ }
3791
+ }
3792
+ },
3690
3793
  "/v1/agents/{agent_id}/sign": {
3691
3794
  "post": {
3692
3795
  "tags": [
@@ -8094,15 +8197,38 @@
8094
8197
  "Authentication"
8095
8198
  ],
8096
8199
  "summary": "Begin passkey transaction authorization",
8200
+ "description": "Requires `tx_digest` — SHA-256 hex of canonical `chain|to|value_wei|data`\nfor the treasury send being authorized. The server recomputes this digest\non send and rejects passkey tokens that do not match.\n",
8097
8201
  "operationId": "passkeyTxAssertBegin",
8098
8202
  "security": [
8099
8203
  {
8100
8204
  "BearerAuth": []
8101
8205
  }
8102
8206
  ],
8207
+ "requestBody": {
8208
+ "required": true,
8209
+ "content": {
8210
+ "application/json": {
8211
+ "schema": {
8212
+ "type": "object",
8213
+ "required": [
8214
+ "tx_digest"
8215
+ ],
8216
+ "properties": {
8217
+ "tx_digest": {
8218
+ "type": "string",
8219
+ "description": "64-char hex SHA-256 of canonical send params"
8220
+ }
8221
+ }
8222
+ }
8223
+ }
8224
+ }
8225
+ },
8103
8226
  "responses": {
8104
8227
  "200": {
8105
8228
  "description": "WebAuthn challenge"
8229
+ },
8230
+ "400": {
8231
+ "description": "Missing or invalid tx_digest"
8106
8232
  }
8107
8233
  }
8108
8234
  }
@@ -10764,6 +10890,98 @@
10764
10890
  }
10765
10891
  }
10766
10892
  },
10893
+ "LeaseBankrKeyRequest": {
10894
+ "type": "object",
10895
+ "properties": {
10896
+ "wallet_id": {
10897
+ "type": "string",
10898
+ "description": "Bankr wallet ID (wlt_...). Uses org default if omitted."
10899
+ },
10900
+ "ttl_seconds": {
10901
+ "type": "integer",
10902
+ "description": "Lease TTL in seconds (default 3600, max 86400).",
10903
+ "minimum": 60,
10904
+ "maximum": 86400
10905
+ },
10906
+ "permissions": {
10907
+ "$ref": "#/components/schemas/LeaseBankrPermissions"
10908
+ }
10909
+ }
10910
+ },
10911
+ "LeaseBankrPermissions": {
10912
+ "type": "object",
10913
+ "properties": {
10914
+ "llm_gateway_enabled": {
10915
+ "type": "boolean",
10916
+ "default": true
10917
+ },
10918
+ "agent_api_enabled": {
10919
+ "type": "boolean",
10920
+ "default": false
10921
+ },
10922
+ "read_only": {
10923
+ "type": "boolean",
10924
+ "default": true
10925
+ }
10926
+ }
10927
+ },
10928
+ "LeaseBankrKeyResponse": {
10929
+ "type": "object",
10930
+ "properties": {
10931
+ "lease_id": {
10932
+ "type": "string",
10933
+ "format": "uuid"
10934
+ },
10935
+ "api_key": {
10936
+ "type": "string",
10937
+ "description": "Ephemeral bk_usr_ key. Present for human callers only; omitted for agent JWTs."
10938
+ },
10939
+ "wallet_id": {
10940
+ "type": "string"
10941
+ },
10942
+ "expires_at": {
10943
+ "type": "string",
10944
+ "format": "date-time"
10945
+ }
10946
+ }
10947
+ },
10948
+ "BankrKeyLeaseResponse": {
10949
+ "type": "object",
10950
+ "properties": {
10951
+ "id": {
10952
+ "type": "string",
10953
+ "format": "uuid"
10954
+ },
10955
+ "wallet_id": {
10956
+ "type": "string"
10957
+ },
10958
+ "bankr_key_id": {
10959
+ "type": "string"
10960
+ },
10961
+ "permissions": {
10962
+ "type": "object"
10963
+ },
10964
+ "expires_at": {
10965
+ "type": "string",
10966
+ "format": "date-time"
10967
+ },
10968
+ "created_at": {
10969
+ "type": "string",
10970
+ "format": "date-time"
10971
+ }
10972
+ }
10973
+ },
10974
+ "BankrKeyLeaseListResponse": {
10975
+ "type": "object",
10976
+ "properties": {
10977
+ "leases": {
10978
+ "type": "array",
10979
+ "items": {
10980
+ "$ref": "#/components/schemas/BankrKeyLeaseResponse"
10981
+ }
10982
+ }
10983
+ }
10984
+ },
10767
10985
  "SignIntentRequest": {
10768
10986
  "type": "object",
10769
10987
  "required": [
package/openapi.yaml CHANGED
@@ -2,7 +2,7 @@ openapi: 3.1.0
2
2
 
3
3
  info:
4
4
  title: 1Claw API
5
- version: 2.17.0
5
+ version: 2.18.0
6
6
  description: |
7
7
  Secure secret management for AI agents. Provides vaults, secrets,
8
8
  policy-based access control, agent identity, Intents API,
@@ -2413,6 +2413,81 @@ paths:
2413
2413
  "404":
2414
2414
  $ref: "#/components/responses/NotFound"
2415
2415
 
2416
+ # ---------------------------------------------------------------------------
2417
+ # Bankr Dynamic Key Vending
2418
+ # ---------------------------------------------------------------------------
2419
+
2420
+ /v1/agents/{agent_id}/bankr-keys/lease:
2421
+ post:
2422
+ tags: [Bankr Keys]
2423
+ summary: Lease a short-lived Bankr wallet API key
2424
+ description: |
2425
+ Provision a scoped, time-limited Bankr wallet API key for an agent.
2426
+ **Privileged, deny-by-default:** agent callers need an explicit access policy
2427
+ on `agents/{agent_id}/bankr/*` in the `__agent-keys` vault (JWT scope
2428
+ `agents/{agent_id}/bankr/lease`). Agents may only lease for their own ID.
2429
+ The `bk_usr_` key is **omitted** from the JSON response for agent JWTs —
2430
+ stored server-side for Shroud resolution. Human callers receive `api_key` once.
2431
+ Requires `BANKR_PARTNER_KEY` on Vault. Agent default TTL 15 min when omitted;
2432
+ human/org default 1 hour (`BANKR_DEFAULT_LEASE_TTL_SECS`). Recommend 5–15 min
2433
+ for autonomous agents. Max TTL 24 hours. Max 5 concurrent leases per agent.
2434
+ operationId: leaseBankrKey
2435
+ parameters:
2436
+ - $ref: "#/components/parameters/AgentId"
2437
+ requestBody:
2438
+ required: false
2439
+ content:
2440
+ application/json:
2441
+ schema:
2442
+ $ref: "#/components/schemas/LeaseBankrKeyRequest"
2443
+ responses:
2444
+ "201":
2445
+ description: Bankr key leased
2446
+ content:
2447
+ application/json:
2448
+ schema:
2449
+ $ref: "#/components/schemas/LeaseBankrKeyResponse"
2450
+ "400":
2451
+ $ref: "#/components/responses/BadRequest"
2452
+ "403":
2453
+ $ref: "#/components/responses/Forbidden"
2454
+
2455
+ /v1/agents/{agent_id}/bankr-keys:
2456
+ get:
2457
+ tags: [Bankr Keys]
2458
+ summary: List active Bankr key leases for an agent
2459
+ operationId: listBankrKeys
2460
+ parameters:
2461
+ - $ref: "#/components/parameters/AgentId"
2462
+ responses:
2463
+ "200":
2464
+ description: Active leases (no secret values)
2465
+ content:
2466
+ application/json:
2467
+ schema:
2468
+ $ref: "#/components/schemas/BankrKeyLeaseListResponse"
2469
+ "404":
2470
+ $ref: "#/components/responses/NotFound"
2471
+
2472
+ /v1/agents/{agent_id}/bankr-keys/{lease_id}:
2473
+ delete:
2474
+ tags: [Bankr Keys]
2475
+ summary: Revoke an active Bankr key lease
2476
+ operationId: revokeBankrKey
2477
+ parameters:
2478
+ - $ref: "#/components/parameters/AgentId"
2479
+ - name: lease_id
2480
+ in: path
2481
+ required: true
2482
+ schema:
2483
+ type: string
2484
+ format: uuid
2485
+ responses:
2486
+ "204":
2487
+ description: Lease revoked
2488
+ "404":
2489
+ $ref: "#/components/responses/NotFound"
2490
+
2416
2491
  # ---------------------------------------------------------------------------
2417
2492
  # Unified Signing Intent
2418
2493
  # ---------------------------------------------------------------------------
@@ -5173,12 +5248,29 @@ paths:
5173
5248
  post:
5174
5249
  tags: [Authentication]
5175
5250
  summary: Begin passkey transaction authorization
5251
+ description: |
5252
+ Requires `tx_digest` — SHA-256 hex of canonical `chain|to|value_wei|data`
5253
+ for the treasury send being authorized. The server recomputes this digest
5254
+ on send and rejects passkey tokens that do not match.
5176
5255
  operationId: passkeyTxAssertBegin
5177
5256
  security:
5178
5257
  - BearerAuth: []
5258
+ requestBody:
5259
+ required: true
5260
+ content:
5261
+ application/json:
5262
+ schema:
5263
+ type: object
5264
+ required: [tx_digest]
5265
+ properties:
5266
+ tx_digest:
5267
+ type: string
5268
+ description: 64-char hex SHA-256 of canonical send params
5179
5269
  responses:
5180
5270
  "200":
5181
5271
  description: WebAuthn challenge
5272
+ "400":
5273
+ description: Missing or invalid tx_digest
5182
5274
 
5183
5275
  /v1/auth/passkeys/tx-assert/complete:
5184
5276
  post:
@@ -7041,6 +7133,76 @@ components:
7041
7133
  items:
7042
7134
  $ref: "#/components/schemas/SigningKeyResponse"
7043
7135
 
7136
+ # Bankr Dynamic Key Vending
7137
+ LeaseBankrKeyRequest:
7138
+ type: object
7139
+ properties:
7140
+ wallet_id:
7141
+ type: string
7142
+ description: Bankr wallet ID (wlt_...). Uses org default if omitted.
7143
+ ttl_seconds:
7144
+ type: integer
7145
+ description: Lease TTL in seconds (default 3600, max 86400).
7146
+ minimum: 60
7147
+ maximum: 86400
7148
+ permissions:
7149
+ $ref: "#/components/schemas/LeaseBankrPermissions"
7150
+
7151
+ LeaseBankrPermissions:
7152
+ type: object
7153
+ properties:
7154
+ llm_gateway_enabled:
7155
+ type: boolean
7156
+ default: true
7157
+ agent_api_enabled:
7158
+ type: boolean
7159
+ default: false
7160
+ read_only:
7161
+ type: boolean
7162
+ default: true
7163
+
7164
+ LeaseBankrKeyResponse:
7165
+ type: object
7166
+ properties:
7167
+ lease_id:
7168
+ type: string
7169
+ format: uuid
7170
+ api_key:
7171
+ type: string
7172
+ description: Ephemeral bk_usr_ key. Present for human callers only; omitted for agent JWTs.
7173
+ wallet_id:
7174
+ type: string
7175
+ expires_at:
7176
+ type: string
7177
+ format: date-time
7178
+
7179
+ BankrKeyLeaseResponse:
7180
+ type: object
7181
+ properties:
7182
+ id:
7183
+ type: string
7184
+ format: uuid
7185
+ wallet_id:
7186
+ type: string
7187
+ bankr_key_id:
7188
+ type: string
7189
+ permissions:
7190
+ type: object
7191
+ expires_at:
7192
+ type: string
7193
+ format: date-time
7194
+ created_at:
7195
+ type: string
7196
+ format: date-time
7197
+
7198
+ BankrKeyLeaseListResponse:
7199
+ type: object
7200
+ properties:
7201
+ leases:
7202
+ type: array
7203
+ items:
7204
+ $ref: "#/components/schemas/BankrKeyLeaseResponse"
7205
+
7044
7206
  # Unified Signing Intent
7045
7207
  SignIntentRequest:
7046
7208
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1claw/openapi-spec",
3
- "version": "0.31.0",
3
+ "version": "0.32.1",
4
4
  "description": "OpenAPI 3.1.0 specification for the 1Claw Vault API — generate clients in any language",
5
5
  "license": "MIT",
6
6
  "repository": {