@1claw/openapi-spec 0.28.0 → 0.29.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,7 @@ openapi-generator generate \
40
40
  import spec from "@1claw/openapi-spec/openapi.json";
41
41
  ```
42
42
 
43
- ## What's in the spec (v0.25.0 — API `info.version` 2.14.0)
43
+ ## What's in the spec (v0.28.0 — API `info.version` 2.15.0)
44
44
 
45
45
  - **OIDC Federation (1claw as IdP)** — `GET /.well-known/openid-configuration` (public discovery: issuer, jwks_uri, supported algs `["EdDSA","RS256"]`, supported grant types incl. token-exchange), `GET /.well-known/jwks.json` (public JWKS — every active EdDSA + RS256 key version, keyed by deterministic `kid`), `POST /v1/auth/federated-token` (RFC 8693 token exchange — accepts JSON or `application/x-www-form-urlencoded`; subject token is an agent JWT or `ocv_` API key; returns RS256 JWT scoped to `audience`). Agent fields: `federation_enabled`, `federation_audiences[]`, `federated_token_ttl_seconds`. Designed for Anthropic Workload Identity Federation, GCP STS, AWS STS, etc.
46
46
  - **Auth — agent JWT** — `POST /v1/auth/agent-token` documents optional JWT claim **`shroud_config`** when the agent has Shroud enabled (mirrors DB; consumed by Shroud PolicyEngine on LLM requests). Re-exchange after changing agent Shroud settings. Federation tokens use a separate KMS RSA-2048 key and are signed RS256.
@@ -52,6 +52,8 @@ import spec from "@1claw/openapi-spec/openapi.json";
52
52
  - **Billing — LLM token billing** — `GET /v1/billing/llm-token-billing` (`LlmTokenBillingStatus`: `enabled`, `subscription_status`, optional `credit_balance`, optional `billing_cycle_usage` with `metered_lines[]`), `POST .../subscribe`, `POST .../disable` (Stripe AI Gateway add-on; optional org feature)
53
53
  - **Treasury** — Safe multisig treasuries: `POST/GET /v1/treasury`, `GET/PATCH/DELETE /v1/treasury/{id}`, signers, agent access requests (`requests[]` on list)
54
54
  - **Treasury Wallets** — Multi-chain wallet generation for human users (replaces CDP embedded wallets): `POST /v1/treasury/wallets/generate`, `GET /v1/treasury/wallets`, `GET /v1/treasury/wallets/{chain}`, `POST .../export`, `POST .../rotate`, `DELETE /v1/treasury/wallets/{chain}`. Supported chains: ethereum, bitcoin, solana, xrp, cardano, tron. Private keys stored in per-org `__treasury-keys` vault with tier-appropriate MPC custody.
55
+ - **Treasury Proposals** — Full propose/confirm/execute pipeline for Safe multisig transactions: `POST /v1/treasury/{id}/proposals`, `GET .../proposals`, `GET .../proposals/{pid}`, `POST .../proposals/{pid}/sign`, `POST .../proposals/{pid}/execute`, `DELETE .../proposals/{pid}`. Auto-execute when threshold met.
56
+ - **Smart Accounts** — Per-agent multi-chain Safe accounts: `POST /v1/agents/{id}/smart-accounts`, `GET /v1/agents/{id}` returns `smart_accounts[]`. One EOA signer per agent, Intents API resolves Safe by `chain_id`.
55
57
  - **Vaults** — CRUD, CMEK enable/disable, key rotation with job tracking, MPC enable/disable (`POST /v1/vaults/{id}/mpc`, `DELETE /v1/vaults/{id}/mpc`)
56
58
  - **Secrets** — CRUD, versioning, CMEK-encrypted flag, `client_share` in responses (MPC vaults)
57
59
  - **Agents** — CRUD with `auth_method` (api_key, mtls, oidc_client_credentials), auto-generated SSH keypairs, `token_ttl_seconds`, `vault_ids`, Intents API, transaction guardrails (`tx_to_allowlist`, `tx_max_value_eth`, `tx_daily_limit_eth`, `tx_allowed_chains`), **OIDC federation knobs** (`federation_enabled`, `federation_audiences`, `federated_token_ttl_seconds`); **`GET /v1/agents/{id}`** includes **`tx_spent_today_eth`** (rolling UTC-day spend from recorded txs) for clients such as **Shroud** that enforce the daily cap alongside per-tx limits
package/openapi.json CHANGED
@@ -103,6 +103,14 @@
103
103
  "name": "Approvals",
104
104
  "description": "Human-in-the-loop approval workflow for agent actions"
105
105
  },
106
+ {
107
+ "name": "Signing Keys",
108
+ "description": "Per-agent multi-chain signing key management"
109
+ },
110
+ {
111
+ "name": "Webhooks",
112
+ "description": "Event webhook registration and management"
113
+ },
106
114
  {
107
115
  "name": "Platform",
108
116
  "description": "Platform API for developers building on 1Claw (plt_ keys, user provisioning, bootstrap templates)"
@@ -3630,6 +3638,55 @@
3630
3638
  }
3631
3639
  }
3632
3640
  },
3641
+ "/v1/agents/{agent_id}/signing-keys/{chain}/balance": {
3642
+ "get": {
3643
+ "tags": [
3644
+ "Signing Keys"
3645
+ ],
3646
+ "summary": "Get signing key balance",
3647
+ "description": "Returns the native token balance for the agent's signing key address\non the specified chain.\n",
3648
+ "operationId": "getSigningKeyBalance",
3649
+ "security": [
3650
+ {
3651
+ "BearerAuth": []
3652
+ }
3653
+ ],
3654
+ "parameters": [
3655
+ {
3656
+ "$ref": "#/components/parameters/AgentId"
3657
+ },
3658
+ {
3659
+ "name": "chain",
3660
+ "in": "path",
3661
+ "required": true,
3662
+ "schema": {
3663
+ "type": "string"
3664
+ }
3665
+ }
3666
+ ],
3667
+ "responses": {
3668
+ "200": {
3669
+ "description": "Signing key balance",
3670
+ "content": {
3671
+ "application/json": {
3672
+ "schema": {
3673
+ "$ref": "#/components/schemas/SigningKeyBalanceResponse"
3674
+ }
3675
+ }
3676
+ }
3677
+ },
3678
+ "401": {
3679
+ "$ref": "#/components/responses/Unauthorized"
3680
+ },
3681
+ "403": {
3682
+ "$ref": "#/components/responses/Forbidden"
3683
+ },
3684
+ "404": {
3685
+ "$ref": "#/components/responses/NotFound"
3686
+ }
3687
+ }
3688
+ }
3689
+ },
3633
3690
  "/v1/agents/{agent_id}/sign": {
3634
3691
  "post": {
3635
3692
  "tags": [
@@ -5750,6 +5807,402 @@
5750
5807
  }
5751
5808
  }
5752
5809
  },
5810
+ "/v1/treasury/wallets/{chain}/balance": {
5811
+ "get": {
5812
+ "tags": [
5813
+ "Treasury Wallets"
5814
+ ],
5815
+ "summary": "Get wallet balance",
5816
+ "description": "Returns the native and token balances for the user's active wallet\non the specified chain.\n",
5817
+ "operationId": "getTreasuryWalletBalance",
5818
+ "security": [
5819
+ {
5820
+ "BearerAuth": []
5821
+ }
5822
+ ],
5823
+ "parameters": [
5824
+ {
5825
+ "name": "chain",
5826
+ "in": "path",
5827
+ "required": true,
5828
+ "schema": {
5829
+ "type": "string"
5830
+ }
5831
+ },
5832
+ {
5833
+ "name": "tokens",
5834
+ "in": "query",
5835
+ "required": false,
5836
+ "description": "Optional list of ERC-20 contract addresses to query balances for",
5837
+ "schema": {
5838
+ "type": "array",
5839
+ "items": {
5840
+ "type": "string"
5841
+ }
5842
+ }
5843
+ }
5844
+ ],
5845
+ "responses": {
5846
+ "200": {
5847
+ "description": "Wallet balance",
5848
+ "content": {
5849
+ "application/json": {
5850
+ "schema": {
5851
+ "$ref": "#/components/schemas/TreasuryWalletBalanceResponse"
5852
+ }
5853
+ }
5854
+ }
5855
+ },
5856
+ "401": {
5857
+ "$ref": "#/components/responses/Unauthorized"
5858
+ },
5859
+ "403": {
5860
+ "$ref": "#/components/responses/Forbidden"
5861
+ },
5862
+ "404": {
5863
+ "$ref": "#/components/responses/NotFound"
5864
+ }
5865
+ }
5866
+ }
5867
+ },
5868
+ "/v1/treasury/wallets/{chain}/send": {
5869
+ "post": {
5870
+ "tags": [
5871
+ "Treasury Wallets"
5872
+ ],
5873
+ "summary": "Send from treasury wallet",
5874
+ "description": "Signs and broadcasts a transaction from the user's active wallet on\nthe specified chain. Requires re-authentication via `X-Auth-Confirm`\nheader (account password). Human users only.\n",
5875
+ "operationId": "sendFromTreasuryWallet",
5876
+ "security": [
5877
+ {
5878
+ "BearerAuth": []
5879
+ }
5880
+ ],
5881
+ "parameters": [
5882
+ {
5883
+ "name": "chain",
5884
+ "in": "path",
5885
+ "required": true,
5886
+ "schema": {
5887
+ "type": "string"
5888
+ }
5889
+ },
5890
+ {
5891
+ "name": "X-Auth-Confirm",
5892
+ "in": "header",
5893
+ "required": true,
5894
+ "description": "Account password for re-authentication",
5895
+ "schema": {
5896
+ "type": "string",
5897
+ "format": "password"
5898
+ }
5899
+ }
5900
+ ],
5901
+ "requestBody": {
5902
+ "required": true,
5903
+ "content": {
5904
+ "application/json": {
5905
+ "schema": {
5906
+ "$ref": "#/components/schemas/TreasuryWalletSendRequest"
5907
+ }
5908
+ }
5909
+ }
5910
+ },
5911
+ "responses": {
5912
+ "200": {
5913
+ "description": "Transaction sent",
5914
+ "content": {
5915
+ "application/json": {
5916
+ "schema": {
5917
+ "$ref": "#/components/schemas/TreasuryWalletSendResponse"
5918
+ }
5919
+ }
5920
+ }
5921
+ },
5922
+ "400": {
5923
+ "$ref": "#/components/responses/BadRequest"
5924
+ },
5925
+ "401": {
5926
+ "$ref": "#/components/responses/Unauthorized"
5927
+ },
5928
+ "403": {
5929
+ "$ref": "#/components/responses/Forbidden"
5930
+ },
5931
+ "404": {
5932
+ "$ref": "#/components/responses/NotFound"
5933
+ }
5934
+ }
5935
+ }
5936
+ },
5937
+ "/v1/treasury/wallets/{chain}/swap": {
5938
+ "post": {
5939
+ "tags": [
5940
+ "Treasury Wallets"
5941
+ ],
5942
+ "summary": "Swap tokens via DEX aggregator",
5943
+ "description": "Executes a token swap through a DEX aggregator from the user's active\nwallet on the specified chain. Requires re-authentication via\n`X-Auth-Confirm` header (account password). Human users only.\n",
5944
+ "operationId": "swapFromTreasuryWallet",
5945
+ "security": [
5946
+ {
5947
+ "BearerAuth": []
5948
+ }
5949
+ ],
5950
+ "parameters": [
5951
+ {
5952
+ "name": "chain",
5953
+ "in": "path",
5954
+ "required": true,
5955
+ "schema": {
5956
+ "type": "string"
5957
+ }
5958
+ },
5959
+ {
5960
+ "name": "X-Auth-Confirm",
5961
+ "in": "header",
5962
+ "required": true,
5963
+ "description": "Account password for re-authentication",
5964
+ "schema": {
5965
+ "type": "string",
5966
+ "format": "password"
5967
+ }
5968
+ }
5969
+ ],
5970
+ "requestBody": {
5971
+ "required": true,
5972
+ "content": {
5973
+ "application/json": {
5974
+ "schema": {
5975
+ "$ref": "#/components/schemas/TreasuryWalletSwapRequest"
5976
+ }
5977
+ }
5978
+ }
5979
+ },
5980
+ "responses": {
5981
+ "200": {
5982
+ "description": "Swap executed",
5983
+ "content": {
5984
+ "application/json": {
5985
+ "schema": {
5986
+ "$ref": "#/components/schemas/TreasuryWalletSwapResponse"
5987
+ }
5988
+ }
5989
+ }
5990
+ },
5991
+ "400": {
5992
+ "$ref": "#/components/responses/BadRequest"
5993
+ },
5994
+ "401": {
5995
+ "$ref": "#/components/responses/Unauthorized"
5996
+ },
5997
+ "403": {
5998
+ "$ref": "#/components/responses/Forbidden"
5999
+ },
6000
+ "404": {
6001
+ "$ref": "#/components/responses/NotFound"
6002
+ }
6003
+ }
6004
+ }
6005
+ },
6006
+ "/v1/webhooks": {
6007
+ "post": {
6008
+ "tags": [
6009
+ "Webhooks"
6010
+ ],
6011
+ "summary": "Register a webhook",
6012
+ "operationId": "createWebhook",
6013
+ "security": [
6014
+ {
6015
+ "BearerAuth": []
6016
+ }
6017
+ ],
6018
+ "requestBody": {
6019
+ "required": true,
6020
+ "content": {
6021
+ "application/json": {
6022
+ "schema": {
6023
+ "$ref": "#/components/schemas/CreateWebhookRequest"
6024
+ }
6025
+ }
6026
+ }
6027
+ },
6028
+ "responses": {
6029
+ "201": {
6030
+ "description": "Webhook registered",
6031
+ "content": {
6032
+ "application/json": {
6033
+ "schema": {
6034
+ "$ref": "#/components/schemas/WebhookCreatedResponse"
6035
+ }
6036
+ }
6037
+ }
6038
+ },
6039
+ "400": {
6040
+ "$ref": "#/components/responses/BadRequest"
6041
+ },
6042
+ "401": {
6043
+ "$ref": "#/components/responses/Unauthorized"
6044
+ }
6045
+ }
6046
+ },
6047
+ "get": {
6048
+ "tags": [
6049
+ "Webhooks"
6050
+ ],
6051
+ "summary": "List webhooks",
6052
+ "operationId": "listWebhooks",
6053
+ "security": [
6054
+ {
6055
+ "BearerAuth": []
6056
+ }
6057
+ ],
6058
+ "responses": {
6059
+ "200": {
6060
+ "description": "Webhook list",
6061
+ "content": {
6062
+ "application/json": {
6063
+ "schema": {
6064
+ "$ref": "#/components/schemas/WebhookListResponse"
6065
+ }
6066
+ }
6067
+ }
6068
+ },
6069
+ "401": {
6070
+ "$ref": "#/components/responses/Unauthorized"
6071
+ }
6072
+ }
6073
+ }
6074
+ },
6075
+ "/v1/webhooks/{id}": {
6076
+ "get": {
6077
+ "tags": [
6078
+ "Webhooks"
6079
+ ],
6080
+ "summary": "Get webhook",
6081
+ "operationId": "getWebhook",
6082
+ "security": [
6083
+ {
6084
+ "BearerAuth": []
6085
+ }
6086
+ ],
6087
+ "parameters": [
6088
+ {
6089
+ "name": "id",
6090
+ "in": "path",
6091
+ "required": true,
6092
+ "schema": {
6093
+ "type": "string",
6094
+ "format": "uuid"
6095
+ }
6096
+ }
6097
+ ],
6098
+ "responses": {
6099
+ "200": {
6100
+ "description": "Webhook details",
6101
+ "content": {
6102
+ "application/json": {
6103
+ "schema": {
6104
+ "$ref": "#/components/schemas/WebhookResponse"
6105
+ }
6106
+ }
6107
+ }
6108
+ },
6109
+ "401": {
6110
+ "$ref": "#/components/responses/Unauthorized"
6111
+ },
6112
+ "404": {
6113
+ "$ref": "#/components/responses/NotFound"
6114
+ }
6115
+ }
6116
+ },
6117
+ "patch": {
6118
+ "tags": [
6119
+ "Webhooks"
6120
+ ],
6121
+ "summary": "Update webhook",
6122
+ "operationId": "updateWebhook",
6123
+ "security": [
6124
+ {
6125
+ "BearerAuth": []
6126
+ }
6127
+ ],
6128
+ "parameters": [
6129
+ {
6130
+ "name": "id",
6131
+ "in": "path",
6132
+ "required": true,
6133
+ "schema": {
6134
+ "type": "string",
6135
+ "format": "uuid"
6136
+ }
6137
+ }
6138
+ ],
6139
+ "requestBody": {
6140
+ "required": true,
6141
+ "content": {
6142
+ "application/json": {
6143
+ "schema": {
6144
+ "$ref": "#/components/schemas/UpdateWebhookRequest"
6145
+ }
6146
+ }
6147
+ }
6148
+ },
6149
+ "responses": {
6150
+ "200": {
6151
+ "description": "Webhook updated",
6152
+ "content": {
6153
+ "application/json": {
6154
+ "schema": {
6155
+ "$ref": "#/components/schemas/WebhookResponse"
6156
+ }
6157
+ }
6158
+ }
6159
+ },
6160
+ "400": {
6161
+ "$ref": "#/components/responses/BadRequest"
6162
+ },
6163
+ "401": {
6164
+ "$ref": "#/components/responses/Unauthorized"
6165
+ },
6166
+ "404": {
6167
+ "$ref": "#/components/responses/NotFound"
6168
+ }
6169
+ }
6170
+ },
6171
+ "delete": {
6172
+ "tags": [
6173
+ "Webhooks"
6174
+ ],
6175
+ "summary": "Delete webhook",
6176
+ "operationId": "deleteWebhook",
6177
+ "security": [
6178
+ {
6179
+ "BearerAuth": []
6180
+ }
6181
+ ],
6182
+ "parameters": [
6183
+ {
6184
+ "name": "id",
6185
+ "in": "path",
6186
+ "required": true,
6187
+ "schema": {
6188
+ "type": "string",
6189
+ "format": "uuid"
6190
+ }
6191
+ }
6192
+ ],
6193
+ "responses": {
6194
+ "204": {
6195
+ "description": "Webhook deleted"
6196
+ },
6197
+ "401": {
6198
+ "$ref": "#/components/responses/Unauthorized"
6199
+ },
6200
+ "404": {
6201
+ "$ref": "#/components/responses/NotFound"
6202
+ }
6203
+ }
6204
+ }
6205
+ },
5753
6206
  "/v1/admin/settings": {
5754
6207
  "get": {
5755
6208
  "tags": [
@@ -9640,6 +10093,11 @@
9640
10093
  "smart_account"
9641
10094
  ],
9642
10095
  "default": "eoa"
10096
+ },
10097
+ "gasless": {
10098
+ "type": "boolean",
10099
+ "description": "Whether to submit as a gasless (sponsored) transaction",
10100
+ "default": false
9643
10101
  }
9644
10102
  }
9645
10103
  },
@@ -11633,6 +12091,333 @@
11633
12091
  }
11634
12092
  }
11635
12093
  },
12094
+ "TreasuryWalletBalanceResponse": {
12095
+ "type": "object",
12096
+ "required": [
12097
+ "chain",
12098
+ "address",
12099
+ "native"
12100
+ ],
12101
+ "properties": {
12102
+ "chain": {
12103
+ "type": "string"
12104
+ },
12105
+ "address": {
12106
+ "type": "string"
12107
+ },
12108
+ "native": {
12109
+ "type": "object",
12110
+ "required": [
12111
+ "symbol",
12112
+ "balance_wei",
12113
+ "balance_display"
12114
+ ],
12115
+ "properties": {
12116
+ "symbol": {
12117
+ "type": "string"
12118
+ },
12119
+ "balance_wei": {
12120
+ "type": "string"
12121
+ },
12122
+ "balance_display": {
12123
+ "type": "string"
12124
+ }
12125
+ }
12126
+ },
12127
+ "tokens": {
12128
+ "type": "array",
12129
+ "items": {
12130
+ "type": "object",
12131
+ "required": [
12132
+ "contract_address",
12133
+ "balance_raw"
12134
+ ],
12135
+ "properties": {
12136
+ "contract_address": {
12137
+ "type": "string"
12138
+ },
12139
+ "balance_raw": {
12140
+ "type": "string"
12141
+ }
12142
+ }
12143
+ }
12144
+ }
12145
+ }
12146
+ },
12147
+ "TreasuryWalletSendRequest": {
12148
+ "type": "object",
12149
+ "required": [
12150
+ "to",
12151
+ "value_wei"
12152
+ ],
12153
+ "properties": {
12154
+ "to": {
12155
+ "type": "string",
12156
+ "description": "Destination address (0x-prefixed)"
12157
+ },
12158
+ "value_wei": {
12159
+ "type": "string",
12160
+ "description": "Value in wei"
12161
+ },
12162
+ "data": {
12163
+ "type": "string",
12164
+ "description": "Hex-encoded calldata (optional)"
12165
+ },
12166
+ "gas_limit": {
12167
+ "type": "integer",
12168
+ "description": "Gas limit override"
12169
+ },
12170
+ "gasless": {
12171
+ "type": "boolean",
12172
+ "description": "When true, submits as a gasless (ERC-4337) transaction via Pimlico paymaster. The paymaster sponsors the gas cost.",
12173
+ "default": false
12174
+ }
12175
+ }
12176
+ },
12177
+ "TreasuryWalletSendResponse": {
12178
+ "type": "object",
12179
+ "required": [
12180
+ "tx_hash",
12181
+ "from",
12182
+ "to",
12183
+ "value_wei",
12184
+ "chain",
12185
+ "status"
12186
+ ],
12187
+ "properties": {
12188
+ "tx_hash": {
12189
+ "type": "string"
12190
+ },
12191
+ "from": {
12192
+ "type": "string"
12193
+ },
12194
+ "to": {
12195
+ "type": "string"
12196
+ },
12197
+ "value_wei": {
12198
+ "type": "string"
12199
+ },
12200
+ "chain": {
12201
+ "type": "string"
12202
+ },
12203
+ "status": {
12204
+ "type": "string"
12205
+ },
12206
+ "user_op_hash": {
12207
+ "type": "string",
12208
+ "description": "UserOperation hash (only present for gasless sends via paymaster)"
12209
+ }
12210
+ }
12211
+ },
12212
+ "TreasuryWalletSwapRequest": {
12213
+ "type": "object",
12214
+ "required": [
12215
+ "sell_token",
12216
+ "buy_token",
12217
+ "sell_amount"
12218
+ ],
12219
+ "properties": {
12220
+ "sell_token": {
12221
+ "type": "string",
12222
+ "description": "Address of the token to sell (or \"native\" for ETH)"
12223
+ },
12224
+ "buy_token": {
12225
+ "type": "string",
12226
+ "description": "Address of the token to buy (or \"native\" for ETH)"
12227
+ },
12228
+ "sell_amount": {
12229
+ "type": "string",
12230
+ "description": "Amount to sell in token's smallest unit"
12231
+ }
12232
+ }
12233
+ },
12234
+ "TreasuryWalletSwapResponse": {
12235
+ "type": "object",
12236
+ "required": [
12237
+ "tx_hash",
12238
+ "sell_token",
12239
+ "buy_token",
12240
+ "sell_amount",
12241
+ "buy_amount",
12242
+ "chain",
12243
+ "status"
12244
+ ],
12245
+ "properties": {
12246
+ "tx_hash": {
12247
+ "type": "string"
12248
+ },
12249
+ "sell_token": {
12250
+ "type": "string"
12251
+ },
12252
+ "buy_token": {
12253
+ "type": "string"
12254
+ },
12255
+ "sell_amount": {
12256
+ "type": "string"
12257
+ },
12258
+ "buy_amount": {
12259
+ "type": "string"
12260
+ },
12261
+ "chain": {
12262
+ "type": "string"
12263
+ },
12264
+ "status": {
12265
+ "type": "string"
12266
+ }
12267
+ }
12268
+ },
12269
+ "CreateWebhookRequest": {
12270
+ "type": "object",
12271
+ "required": [
12272
+ "url",
12273
+ "events"
12274
+ ],
12275
+ "properties": {
12276
+ "url": {
12277
+ "type": "string",
12278
+ "format": "uri",
12279
+ "description": "HTTPS URL to deliver webhook events to"
12280
+ },
12281
+ "events": {
12282
+ "type": "array",
12283
+ "items": {
12284
+ "type": "string"
12285
+ },
12286
+ "description": "Event types to subscribe to"
12287
+ },
12288
+ "description": {
12289
+ "type": "string"
12290
+ }
12291
+ }
12292
+ },
12293
+ "UpdateWebhookRequest": {
12294
+ "type": "object",
12295
+ "properties": {
12296
+ "url": {
12297
+ "type": "string",
12298
+ "format": "uri"
12299
+ },
12300
+ "events": {
12301
+ "type": "array",
12302
+ "items": {
12303
+ "type": "string"
12304
+ }
12305
+ },
12306
+ "is_active": {
12307
+ "type": "boolean"
12308
+ },
12309
+ "description": {
12310
+ "type": "string"
12311
+ }
12312
+ }
12313
+ },
12314
+ "WebhookCreatedResponse": {
12315
+ "type": "object",
12316
+ "required": [
12317
+ "id",
12318
+ "url",
12319
+ "events",
12320
+ "secret",
12321
+ "created_at"
12322
+ ],
12323
+ "properties": {
12324
+ "id": {
12325
+ "type": "string",
12326
+ "format": "uuid"
12327
+ },
12328
+ "url": {
12329
+ "type": "string",
12330
+ "format": "uri"
12331
+ },
12332
+ "events": {
12333
+ "type": "array",
12334
+ "items": {
12335
+ "type": "string"
12336
+ }
12337
+ },
12338
+ "secret": {
12339
+ "type": "string",
12340
+ "description": "HMAC signing secret for verifying payloads (shown only once)"
12341
+ },
12342
+ "created_at": {
12343
+ "type": "string",
12344
+ "format": "date-time"
12345
+ }
12346
+ }
12347
+ },
12348
+ "WebhookResponse": {
12349
+ "type": "object",
12350
+ "required": [
12351
+ "id",
12352
+ "url",
12353
+ "events",
12354
+ "is_active",
12355
+ "created_at"
12356
+ ],
12357
+ "properties": {
12358
+ "id": {
12359
+ "type": "string",
12360
+ "format": "uuid"
12361
+ },
12362
+ "url": {
12363
+ "type": "string",
12364
+ "format": "uri"
12365
+ },
12366
+ "events": {
12367
+ "type": "array",
12368
+ "items": {
12369
+ "type": "string"
12370
+ }
12371
+ },
12372
+ "is_active": {
12373
+ "type": "boolean"
12374
+ },
12375
+ "description": {
12376
+ "type": "string"
12377
+ },
12378
+ "created_at": {
12379
+ "type": "string",
12380
+ "format": "date-time"
12381
+ }
12382
+ }
12383
+ },
12384
+ "WebhookListResponse": {
12385
+ "type": "object",
12386
+ "required": [
12387
+ "webhooks"
12388
+ ],
12389
+ "properties": {
12390
+ "webhooks": {
12391
+ "type": "array",
12392
+ "items": {
12393
+ "$ref": "#/components/schemas/WebhookResponse"
12394
+ }
12395
+ }
12396
+ }
12397
+ },
12398
+ "SigningKeyBalanceResponse": {
12399
+ "type": "object",
12400
+ "required": [
12401
+ "chain",
12402
+ "address",
12403
+ "balance_wei",
12404
+ "balance_display"
12405
+ ],
12406
+ "properties": {
12407
+ "chain": {
12408
+ "type": "string"
12409
+ },
12410
+ "address": {
12411
+ "type": "string"
12412
+ },
12413
+ "balance_wei": {
12414
+ "type": "string"
12415
+ },
12416
+ "balance_display": {
12417
+ "type": "string"
12418
+ }
12419
+ }
12420
+ },
11636
12421
  "PaymentRequirement": {
11637
12422
  "type": "object",
11638
12423
  "properties": {
package/openapi.yaml CHANGED
@@ -64,6 +64,10 @@ tags:
64
64
  description: Service health checks
65
65
  - name: Approvals
66
66
  description: Human-in-the-loop approval workflow for agent actions
67
+ - name: Signing Keys
68
+ description: Per-agent multi-chain signing key management
69
+ - name: Webhooks
70
+ description: Event webhook registration and management
67
71
  - name: Platform
68
72
  description: Platform API for developers building on 1Claw (plt_ keys, user provisioning, bootstrap templates)
69
73
 
@@ -2378,6 +2382,37 @@ paths:
2378
2382
  "404":
2379
2383
  $ref: "#/components/responses/NotFound"
2380
2384
 
2385
+ /v1/agents/{agent_id}/signing-keys/{chain}/balance:
2386
+ get:
2387
+ tags: [Signing Keys]
2388
+ summary: Get signing key balance
2389
+ description: |
2390
+ Returns the native token balance for the agent's signing key address
2391
+ on the specified chain.
2392
+ operationId: getSigningKeyBalance
2393
+ security:
2394
+ - BearerAuth: []
2395
+ parameters:
2396
+ - $ref: "#/components/parameters/AgentId"
2397
+ - name: chain
2398
+ in: path
2399
+ required: true
2400
+ schema:
2401
+ type: string
2402
+ responses:
2403
+ "200":
2404
+ description: Signing key balance
2405
+ content:
2406
+ application/json:
2407
+ schema:
2408
+ $ref: "#/components/schemas/SigningKeyBalanceResponse"
2409
+ "401":
2410
+ $ref: "#/components/responses/Unauthorized"
2411
+ "403":
2412
+ $ref: "#/components/responses/Forbidden"
2413
+ "404":
2414
+ $ref: "#/components/responses/NotFound"
2415
+
2381
2416
  # ---------------------------------------------------------------------------
2382
2417
  # Unified Signing Intent
2383
2418
  # ---------------------------------------------------------------------------
@@ -3744,6 +3779,258 @@ paths:
3744
3779
  "404":
3745
3780
  $ref: "#/components/responses/NotFound"
3746
3781
 
3782
+ /v1/treasury/wallets/{chain}/balance:
3783
+ get:
3784
+ tags: [Treasury Wallets]
3785
+ summary: Get wallet balance
3786
+ description: |
3787
+ Returns the native and token balances for the user's active wallet
3788
+ on the specified chain.
3789
+ operationId: getTreasuryWalletBalance
3790
+ security:
3791
+ - BearerAuth: []
3792
+ parameters:
3793
+ - name: chain
3794
+ in: path
3795
+ required: true
3796
+ schema:
3797
+ type: string
3798
+ - name: tokens
3799
+ in: query
3800
+ required: false
3801
+ description: Optional list of ERC-20 contract addresses to query balances for
3802
+ schema:
3803
+ type: array
3804
+ items:
3805
+ type: string
3806
+ responses:
3807
+ "200":
3808
+ description: Wallet balance
3809
+ content:
3810
+ application/json:
3811
+ schema:
3812
+ $ref: "#/components/schemas/TreasuryWalletBalanceResponse"
3813
+ "401":
3814
+ $ref: "#/components/responses/Unauthorized"
3815
+ "403":
3816
+ $ref: "#/components/responses/Forbidden"
3817
+ "404":
3818
+ $ref: "#/components/responses/NotFound"
3819
+
3820
+ /v1/treasury/wallets/{chain}/send:
3821
+ post:
3822
+ tags: [Treasury Wallets]
3823
+ summary: Send from treasury wallet
3824
+ description: |
3825
+ Signs and broadcasts a transaction from the user's active wallet on
3826
+ the specified chain. Requires re-authentication via `X-Auth-Confirm`
3827
+ header (account password). Human users only.
3828
+ operationId: sendFromTreasuryWallet
3829
+ security:
3830
+ - BearerAuth: []
3831
+ parameters:
3832
+ - name: chain
3833
+ in: path
3834
+ required: true
3835
+ schema:
3836
+ type: string
3837
+ - name: X-Auth-Confirm
3838
+ in: header
3839
+ required: true
3840
+ description: Account password for re-authentication
3841
+ schema:
3842
+ type: string
3843
+ format: password
3844
+ requestBody:
3845
+ required: true
3846
+ content:
3847
+ application/json:
3848
+ schema:
3849
+ $ref: "#/components/schemas/TreasuryWalletSendRequest"
3850
+ responses:
3851
+ "200":
3852
+ description: Transaction sent
3853
+ content:
3854
+ application/json:
3855
+ schema:
3856
+ $ref: "#/components/schemas/TreasuryWalletSendResponse"
3857
+ "400":
3858
+ $ref: "#/components/responses/BadRequest"
3859
+ "401":
3860
+ $ref: "#/components/responses/Unauthorized"
3861
+ "403":
3862
+ $ref: "#/components/responses/Forbidden"
3863
+ "404":
3864
+ $ref: "#/components/responses/NotFound"
3865
+
3866
+ /v1/treasury/wallets/{chain}/swap:
3867
+ post:
3868
+ tags: [Treasury Wallets]
3869
+ summary: Swap tokens via DEX aggregator
3870
+ description: |
3871
+ Executes a token swap through a DEX aggregator from the user's active
3872
+ wallet on the specified chain. Requires re-authentication via
3873
+ `X-Auth-Confirm` header (account password). Human users only.
3874
+ operationId: swapFromTreasuryWallet
3875
+ security:
3876
+ - BearerAuth: []
3877
+ parameters:
3878
+ - name: chain
3879
+ in: path
3880
+ required: true
3881
+ schema:
3882
+ type: string
3883
+ - name: X-Auth-Confirm
3884
+ in: header
3885
+ required: true
3886
+ description: Account password for re-authentication
3887
+ schema:
3888
+ type: string
3889
+ format: password
3890
+ requestBody:
3891
+ required: true
3892
+ content:
3893
+ application/json:
3894
+ schema:
3895
+ $ref: "#/components/schemas/TreasuryWalletSwapRequest"
3896
+ responses:
3897
+ "200":
3898
+ description: Swap executed
3899
+ content:
3900
+ application/json:
3901
+ schema:
3902
+ $ref: "#/components/schemas/TreasuryWalletSwapResponse"
3903
+ "400":
3904
+ $ref: "#/components/responses/BadRequest"
3905
+ "401":
3906
+ $ref: "#/components/responses/Unauthorized"
3907
+ "403":
3908
+ $ref: "#/components/responses/Forbidden"
3909
+ "404":
3910
+ $ref: "#/components/responses/NotFound"
3911
+
3912
+ # ---------------------------------------------------------------------------
3913
+ # Webhooks
3914
+ # ---------------------------------------------------------------------------
3915
+
3916
+ /v1/webhooks:
3917
+ post:
3918
+ tags: [Webhooks]
3919
+ summary: Register a webhook
3920
+ operationId: createWebhook
3921
+ security:
3922
+ - BearerAuth: []
3923
+ requestBody:
3924
+ required: true
3925
+ content:
3926
+ application/json:
3927
+ schema:
3928
+ $ref: "#/components/schemas/CreateWebhookRequest"
3929
+ responses:
3930
+ "201":
3931
+ description: Webhook registered
3932
+ content:
3933
+ application/json:
3934
+ schema:
3935
+ $ref: "#/components/schemas/WebhookCreatedResponse"
3936
+ "400":
3937
+ $ref: "#/components/responses/BadRequest"
3938
+ "401":
3939
+ $ref: "#/components/responses/Unauthorized"
3940
+ get:
3941
+ tags: [Webhooks]
3942
+ summary: List webhooks
3943
+ operationId: listWebhooks
3944
+ security:
3945
+ - BearerAuth: []
3946
+ responses:
3947
+ "200":
3948
+ description: Webhook list
3949
+ content:
3950
+ application/json:
3951
+ schema:
3952
+ $ref: "#/components/schemas/WebhookListResponse"
3953
+ "401":
3954
+ $ref: "#/components/responses/Unauthorized"
3955
+
3956
+ /v1/webhooks/{id}:
3957
+ get:
3958
+ tags: [Webhooks]
3959
+ summary: Get webhook
3960
+ operationId: getWebhook
3961
+ security:
3962
+ - BearerAuth: []
3963
+ parameters:
3964
+ - name: id
3965
+ in: path
3966
+ required: true
3967
+ schema:
3968
+ type: string
3969
+ format: uuid
3970
+ responses:
3971
+ "200":
3972
+ description: Webhook details
3973
+ content:
3974
+ application/json:
3975
+ schema:
3976
+ $ref: "#/components/schemas/WebhookResponse"
3977
+ "401":
3978
+ $ref: "#/components/responses/Unauthorized"
3979
+ "404":
3980
+ $ref: "#/components/responses/NotFound"
3981
+ patch:
3982
+ tags: [Webhooks]
3983
+ summary: Update webhook
3984
+ operationId: updateWebhook
3985
+ security:
3986
+ - BearerAuth: []
3987
+ parameters:
3988
+ - name: id
3989
+ in: path
3990
+ required: true
3991
+ schema:
3992
+ type: string
3993
+ format: uuid
3994
+ requestBody:
3995
+ required: true
3996
+ content:
3997
+ application/json:
3998
+ schema:
3999
+ $ref: "#/components/schemas/UpdateWebhookRequest"
4000
+ responses:
4001
+ "200":
4002
+ description: Webhook updated
4003
+ content:
4004
+ application/json:
4005
+ schema:
4006
+ $ref: "#/components/schemas/WebhookResponse"
4007
+ "400":
4008
+ $ref: "#/components/responses/BadRequest"
4009
+ "401":
4010
+ $ref: "#/components/responses/Unauthorized"
4011
+ "404":
4012
+ $ref: "#/components/responses/NotFound"
4013
+ delete:
4014
+ tags: [Webhooks]
4015
+ summary: Delete webhook
4016
+ operationId: deleteWebhook
4017
+ security:
4018
+ - BearerAuth: []
4019
+ parameters:
4020
+ - name: id
4021
+ in: path
4022
+ required: true
4023
+ schema:
4024
+ type: string
4025
+ format: uuid
4026
+ responses:
4027
+ "204":
4028
+ description: Webhook deleted
4029
+ "401":
4030
+ $ref: "#/components/responses/Unauthorized"
4031
+ "404":
4032
+ $ref: "#/components/responses/NotFound"
4033
+
3747
4034
  # ---------------------------------------------------------------------------
3748
4035
  # Admin
3749
4036
  # ---------------------------------------------------------------------------
@@ -6374,6 +6661,10 @@ components:
6374
6661
  description: Transaction mode
6375
6662
  enum: [eoa, smart_account]
6376
6663
  default: eoa
6664
+ gasless:
6665
+ type: boolean
6666
+ description: Whether to submit as a gasless (sponsored) transaction
6667
+ default: false
6377
6668
 
6378
6669
  SignTransactionRequest:
6379
6670
  type: object
@@ -7742,6 +8033,209 @@ components:
7742
8033
  type: string
7743
8034
  description: Raw private key in hex encoding. Handle with extreme care.
7744
8035
 
8036
+ TreasuryWalletBalanceResponse:
8037
+ type: object
8038
+ required: [chain, address, native]
8039
+ properties:
8040
+ chain:
8041
+ type: string
8042
+ address:
8043
+ type: string
8044
+ native:
8045
+ type: object
8046
+ required: [symbol, balance_wei, balance_display]
8047
+ properties:
8048
+ symbol:
8049
+ type: string
8050
+ balance_wei:
8051
+ type: string
8052
+ balance_display:
8053
+ type: string
8054
+ tokens:
8055
+ type: array
8056
+ items:
8057
+ type: object
8058
+ required: [contract_address, balance_raw]
8059
+ properties:
8060
+ contract_address:
8061
+ type: string
8062
+ balance_raw:
8063
+ type: string
8064
+
8065
+ TreasuryWalletSendRequest:
8066
+ type: object
8067
+ required: [to, value_wei]
8068
+ properties:
8069
+ to:
8070
+ type: string
8071
+ description: Destination address (0x-prefixed)
8072
+ value_wei:
8073
+ type: string
8074
+ description: Value in wei
8075
+ data:
8076
+ type: string
8077
+ description: Hex-encoded calldata (optional)
8078
+ gas_limit:
8079
+ type: integer
8080
+ description: Gas limit override
8081
+ gasless:
8082
+ type: boolean
8083
+ description: When true, submits as a gasless (ERC-4337) transaction via Pimlico paymaster. The paymaster sponsors the gas cost.
8084
+ default: false
8085
+
8086
+ TreasuryWalletSendResponse:
8087
+ type: object
8088
+ required: [tx_hash, from, to, value_wei, chain, status]
8089
+ properties:
8090
+ tx_hash:
8091
+ type: string
8092
+ from:
8093
+ type: string
8094
+ to:
8095
+ type: string
8096
+ value_wei:
8097
+ type: string
8098
+ chain:
8099
+ type: string
8100
+ status:
8101
+ type: string
8102
+ user_op_hash:
8103
+ type: string
8104
+ description: UserOperation hash (only present for gasless sends via paymaster)
8105
+
8106
+ TreasuryWalletSwapRequest:
8107
+ type: object
8108
+ required: [sell_token, buy_token, sell_amount]
8109
+ properties:
8110
+ sell_token:
8111
+ type: string
8112
+ description: Address of the token to sell (or "native" for ETH)
8113
+ buy_token:
8114
+ type: string
8115
+ description: Address of the token to buy (or "native" for ETH)
8116
+ sell_amount:
8117
+ type: string
8118
+ description: Amount to sell in token's smallest unit
8119
+
8120
+ TreasuryWalletSwapResponse:
8121
+ type: object
8122
+ required: [tx_hash, sell_token, buy_token, sell_amount, buy_amount, chain, status]
8123
+ properties:
8124
+ tx_hash:
8125
+ type: string
8126
+ sell_token:
8127
+ type: string
8128
+ buy_token:
8129
+ type: string
8130
+ sell_amount:
8131
+ type: string
8132
+ buy_amount:
8133
+ type: string
8134
+ chain:
8135
+ type: string
8136
+ status:
8137
+ type: string
8138
+
8139
+ # --- Webhooks ---
8140
+
8141
+ CreateWebhookRequest:
8142
+ type: object
8143
+ required: [url, events]
8144
+ properties:
8145
+ url:
8146
+ type: string
8147
+ format: uri
8148
+ description: HTTPS URL to deliver webhook events to
8149
+ events:
8150
+ type: array
8151
+ items:
8152
+ type: string
8153
+ description: Event types to subscribe to
8154
+ description:
8155
+ type: string
8156
+
8157
+ UpdateWebhookRequest:
8158
+ type: object
8159
+ properties:
8160
+ url:
8161
+ type: string
8162
+ format: uri
8163
+ events:
8164
+ type: array
8165
+ items:
8166
+ type: string
8167
+ is_active:
8168
+ type: boolean
8169
+ description:
8170
+ type: string
8171
+
8172
+ WebhookCreatedResponse:
8173
+ type: object
8174
+ required: [id, url, events, secret, created_at]
8175
+ properties:
8176
+ id:
8177
+ type: string
8178
+ format: uuid
8179
+ url:
8180
+ type: string
8181
+ format: uri
8182
+ events:
8183
+ type: array
8184
+ items:
8185
+ type: string
8186
+ secret:
8187
+ type: string
8188
+ description: HMAC signing secret for verifying payloads (shown only once)
8189
+ created_at:
8190
+ type: string
8191
+ format: date-time
8192
+
8193
+ WebhookResponse:
8194
+ type: object
8195
+ required: [id, url, events, is_active, created_at]
8196
+ properties:
8197
+ id:
8198
+ type: string
8199
+ format: uuid
8200
+ url:
8201
+ type: string
8202
+ format: uri
8203
+ events:
8204
+ type: array
8205
+ items:
8206
+ type: string
8207
+ is_active:
8208
+ type: boolean
8209
+ description:
8210
+ type: string
8211
+ created_at:
8212
+ type: string
8213
+ format: date-time
8214
+
8215
+ WebhookListResponse:
8216
+ type: object
8217
+ required: [webhooks]
8218
+ properties:
8219
+ webhooks:
8220
+ type: array
8221
+ items:
8222
+ $ref: "#/components/schemas/WebhookResponse"
8223
+
8224
+ # --- Signing Key Balance ---
8225
+
8226
+ SigningKeyBalanceResponse:
8227
+ type: object
8228
+ required: [chain, address, balance_wei, balance_display]
8229
+ properties:
8230
+ chain:
8231
+ type: string
8232
+ address:
8233
+ type: string
8234
+ balance_wei:
8235
+ type: string
8236
+ balance_display:
8237
+ type: string
8238
+
7745
8239
  # --- x402 ---
7746
8240
 
7747
8241
  PaymentRequirement:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@1claw/openapi-spec",
3
- "version": "0.28.0",
4
- "description": "OpenAPI 3.1.0 specification for the 1Claw Vault API \u2014 generate clients in any language",
3
+ "version": "0.29.1",
4
+ "description": "OpenAPI 3.1.0 specification for the 1Claw Vault API generate clients in any language",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",