@1claw/openapi-spec 0.31.0 → 0.32.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/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.\nRequires `BANKR_PARTNER_KEY` configured on the Vault service.\nDefault TTL 1 hour, max 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 (one-time display)."
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,75 @@ 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
+ Requires `BANKR_PARTNER_KEY` configured on the Vault service.
2427
+ Default TTL 1 hour, max 24 hours. Max 5 concurrent leases per agent.
2428
+ operationId: leaseBankrKey
2429
+ parameters:
2430
+ - $ref: "#/components/parameters/AgentId"
2431
+ requestBody:
2432
+ required: false
2433
+ content:
2434
+ application/json:
2435
+ schema:
2436
+ $ref: "#/components/schemas/LeaseBankrKeyRequest"
2437
+ responses:
2438
+ "201":
2439
+ description: Bankr key leased
2440
+ content:
2441
+ application/json:
2442
+ schema:
2443
+ $ref: "#/components/schemas/LeaseBankrKeyResponse"
2444
+ "400":
2445
+ $ref: "#/components/responses/BadRequest"
2446
+ "403":
2447
+ $ref: "#/components/responses/Forbidden"
2448
+
2449
+ /v1/agents/{agent_id}/bankr-keys:
2450
+ get:
2451
+ tags: [Bankr Keys]
2452
+ summary: List active Bankr key leases for an agent
2453
+ operationId: listBankrKeys
2454
+ parameters:
2455
+ - $ref: "#/components/parameters/AgentId"
2456
+ responses:
2457
+ "200":
2458
+ description: Active leases (no secret values)
2459
+ content:
2460
+ application/json:
2461
+ schema:
2462
+ $ref: "#/components/schemas/BankrKeyLeaseListResponse"
2463
+ "404":
2464
+ $ref: "#/components/responses/NotFound"
2465
+
2466
+ /v1/agents/{agent_id}/bankr-keys/{lease_id}:
2467
+ delete:
2468
+ tags: [Bankr Keys]
2469
+ summary: Revoke an active Bankr key lease
2470
+ operationId: revokeBankrKey
2471
+ parameters:
2472
+ - $ref: "#/components/parameters/AgentId"
2473
+ - name: lease_id
2474
+ in: path
2475
+ required: true
2476
+ schema:
2477
+ type: string
2478
+ format: uuid
2479
+ responses:
2480
+ "204":
2481
+ description: Lease revoked
2482
+ "404":
2483
+ $ref: "#/components/responses/NotFound"
2484
+
2416
2485
  # ---------------------------------------------------------------------------
2417
2486
  # Unified Signing Intent
2418
2487
  # ---------------------------------------------------------------------------
@@ -5173,12 +5242,29 @@ paths:
5173
5242
  post:
5174
5243
  tags: [Authentication]
5175
5244
  summary: Begin passkey transaction authorization
5245
+ description: |
5246
+ Requires `tx_digest` — SHA-256 hex of canonical `chain|to|value_wei|data`
5247
+ for the treasury send being authorized. The server recomputes this digest
5248
+ on send and rejects passkey tokens that do not match.
5176
5249
  operationId: passkeyTxAssertBegin
5177
5250
  security:
5178
5251
  - BearerAuth: []
5252
+ requestBody:
5253
+ required: true
5254
+ content:
5255
+ application/json:
5256
+ schema:
5257
+ type: object
5258
+ required: [tx_digest]
5259
+ properties:
5260
+ tx_digest:
5261
+ type: string
5262
+ description: 64-char hex SHA-256 of canonical send params
5179
5263
  responses:
5180
5264
  "200":
5181
5265
  description: WebAuthn challenge
5266
+ "400":
5267
+ description: Missing or invalid tx_digest
5182
5268
 
5183
5269
  /v1/auth/passkeys/tx-assert/complete:
5184
5270
  post:
@@ -7041,6 +7127,76 @@ components:
7041
7127
  items:
7042
7128
  $ref: "#/components/schemas/SigningKeyResponse"
7043
7129
 
7130
+ # Bankr Dynamic Key Vending
7131
+ LeaseBankrKeyRequest:
7132
+ type: object
7133
+ properties:
7134
+ wallet_id:
7135
+ type: string
7136
+ description: Bankr wallet ID (wlt_...). Uses org default if omitted.
7137
+ ttl_seconds:
7138
+ type: integer
7139
+ description: Lease TTL in seconds (default 3600, max 86400).
7140
+ minimum: 60
7141
+ maximum: 86400
7142
+ permissions:
7143
+ $ref: "#/components/schemas/LeaseBankrPermissions"
7144
+
7145
+ LeaseBankrPermissions:
7146
+ type: object
7147
+ properties:
7148
+ llm_gateway_enabled:
7149
+ type: boolean
7150
+ default: true
7151
+ agent_api_enabled:
7152
+ type: boolean
7153
+ default: false
7154
+ read_only:
7155
+ type: boolean
7156
+ default: true
7157
+
7158
+ LeaseBankrKeyResponse:
7159
+ type: object
7160
+ properties:
7161
+ lease_id:
7162
+ type: string
7163
+ format: uuid
7164
+ api_key:
7165
+ type: string
7166
+ description: Ephemeral bk_usr_ key (one-time display).
7167
+ wallet_id:
7168
+ type: string
7169
+ expires_at:
7170
+ type: string
7171
+ format: date-time
7172
+
7173
+ BankrKeyLeaseResponse:
7174
+ type: object
7175
+ properties:
7176
+ id:
7177
+ type: string
7178
+ format: uuid
7179
+ wallet_id:
7180
+ type: string
7181
+ bankr_key_id:
7182
+ type: string
7183
+ permissions:
7184
+ type: object
7185
+ expires_at:
7186
+ type: string
7187
+ format: date-time
7188
+ created_at:
7189
+ type: string
7190
+ format: date-time
7191
+
7192
+ BankrKeyLeaseListResponse:
7193
+ type: object
7194
+ properties:
7195
+ leases:
7196
+ type: array
7197
+ items:
7198
+ $ref: "#/components/schemas/BankrKeyLeaseResponse"
7199
+
7044
7200
  # Unified Signing Intent
7045
7201
  SignIntentRequest:
7046
7202
  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.0",
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": {