@1claw/openapi-spec 0.15.0 → 0.15.2
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 +3 -1
- package/openapi.json +299 -19
- package/openapi.yaml +193 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,8 +40,9 @@ openapi-generator generate \
|
|
|
40
40
|
import spec from "@1claw/openapi-spec/openapi.json";
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
## What's in the spec (v0.
|
|
43
|
+
## What's in the spec (v0.15.x)
|
|
44
44
|
|
|
45
|
+
- **Treasury** — Safe multisig treasuries: `POST/GET /v1/treasury`, `GET/PATCH/DELETE /v1/treasury/{id}`, signers, agent access requests (`requests[]` on list)
|
|
45
46
|
- **Vaults** — CRUD, CMEK enable/disable, key rotation with job tracking
|
|
46
47
|
- **Secrets** — CRUD, versioning, CMEK-encrypted flag
|
|
47
48
|
- **Agents** — CRUD with `auth_method` (api_key, mtls, oidc_client_credentials), auto-generated SSH keypairs, `token_ttl_seconds`, `vault_ids`, Intents API, transaction guardrails
|
|
@@ -51,6 +52,7 @@ import spec from "@1claw/openapi-spec/openapi.json";
|
|
|
51
52
|
- **Audit** — Hash-chained event log
|
|
52
53
|
- **Chains** — Supported blockchain registry
|
|
53
54
|
- **Auth** — JWT, API keys, agent tokens, MFA, device flow, Google OAuth
|
|
55
|
+
- **Org** — List members, invite, update/remove member; `GET /v1/org/agent-keys-vault` (users only, returns __agent-keys vault id or 404)
|
|
54
56
|
|
|
55
57
|
## Included files
|
|
56
58
|
|
package/openapi.json
CHANGED
|
@@ -1698,6 +1698,52 @@
|
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
1700
|
},
|
|
1701
|
+
"/v1/agents/{agent_id}/smart-accounts": {
|
|
1702
|
+
"post": {
|
|
1703
|
+
"tags": [
|
|
1704
|
+
"Agents"
|
|
1705
|
+
],
|
|
1706
|
+
"summary": "Add a smart account (Safe) for this agent on a chain",
|
|
1707
|
+
"description": "Use after deploying a Safe on a new chain. Multi-chain; one Safe per chain.\nReplaces any existing entry for the same chain_id.\n",
|
|
1708
|
+
"operationId": "addAgentSmartAccount",
|
|
1709
|
+
"parameters": [
|
|
1710
|
+
{
|
|
1711
|
+
"$ref": "#/components/parameters/AgentId"
|
|
1712
|
+
}
|
|
1713
|
+
],
|
|
1714
|
+
"requestBody": {
|
|
1715
|
+
"required": true,
|
|
1716
|
+
"content": {
|
|
1717
|
+
"application/json": {
|
|
1718
|
+
"schema": {
|
|
1719
|
+
"$ref": "#/components/schemas/AddSmartAccountRequest"
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
"responses": {
|
|
1725
|
+
"200": {
|
|
1726
|
+
"description": "Agent with updated smart_accounts list",
|
|
1727
|
+
"content": {
|
|
1728
|
+
"application/json": {
|
|
1729
|
+
"schema": {
|
|
1730
|
+
"$ref": "#/components/schemas/AgentResponse"
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
},
|
|
1735
|
+
"400": {
|
|
1736
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1737
|
+
},
|
|
1738
|
+
"403": {
|
|
1739
|
+
"$ref": "#/components/responses/Forbidden"
|
|
1740
|
+
},
|
|
1741
|
+
"404": {
|
|
1742
|
+
"$ref": "#/components/responses/NotFound"
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1701
1747
|
"/v1/agents/{agent_id}/transactions": {
|
|
1702
1748
|
"post": {
|
|
1703
1749
|
"tags": [
|
|
@@ -2380,6 +2426,31 @@
|
|
|
2380
2426
|
}
|
|
2381
2427
|
}
|
|
2382
2428
|
},
|
|
2429
|
+
"/v1/org/agent-keys-vault": {
|
|
2430
|
+
"get": {
|
|
2431
|
+
"tags": [
|
|
2432
|
+
"Organization"
|
|
2433
|
+
],
|
|
2434
|
+
"summary": "Get the org's __agent-keys vault id",
|
|
2435
|
+
"description": "Returns the vault id for the caller's org agent-keys vault (used for revealing agent identity keys). Users only; 404 if the vault does not exist.",
|
|
2436
|
+
"operationId": "getAgentKeysVault",
|
|
2437
|
+
"responses": {
|
|
2438
|
+
"200": {
|
|
2439
|
+
"description": "Agent-keys vault id",
|
|
2440
|
+
"content": {
|
|
2441
|
+
"application/json": {
|
|
2442
|
+
"schema": {
|
|
2443
|
+
"$ref": "#/components/schemas/AgentKeysVaultResponse"
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
},
|
|
2448
|
+
"404": {
|
|
2449
|
+
"description": "Agent-keys vault not found"
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
},
|
|
2383
2454
|
"/v1/org/invite": {
|
|
2384
2455
|
"post": {
|
|
2385
2456
|
"tags": [
|
|
@@ -3017,6 +3088,88 @@
|
|
|
3017
3088
|
"$ref": "#/components/responses/NotFound"
|
|
3018
3089
|
}
|
|
3019
3090
|
}
|
|
3091
|
+
},
|
|
3092
|
+
"patch": {
|
|
3093
|
+
"tags": [
|
|
3094
|
+
"Treasury"
|
|
3095
|
+
],
|
|
3096
|
+
"summary": "Update treasury name and/or threshold",
|
|
3097
|
+
"operationId": "updateTreasury",
|
|
3098
|
+
"security": [
|
|
3099
|
+
{
|
|
3100
|
+
"BearerAuth": []
|
|
3101
|
+
}
|
|
3102
|
+
],
|
|
3103
|
+
"parameters": [
|
|
3104
|
+
{
|
|
3105
|
+
"name": "treasury_id",
|
|
3106
|
+
"in": "path",
|
|
3107
|
+
"required": true,
|
|
3108
|
+
"schema": {
|
|
3109
|
+
"type": "string",
|
|
3110
|
+
"format": "uuid"
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
],
|
|
3114
|
+
"requestBody": {
|
|
3115
|
+
"required": true,
|
|
3116
|
+
"content": {
|
|
3117
|
+
"application/json": {
|
|
3118
|
+
"schema": {
|
|
3119
|
+
"$ref": "#/components/schemas/UpdateTreasuryRequest"
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
},
|
|
3124
|
+
"responses": {
|
|
3125
|
+
"200": {
|
|
3126
|
+
"description": "Treasury updated",
|
|
3127
|
+
"content": {
|
|
3128
|
+
"application/json": {
|
|
3129
|
+
"schema": {
|
|
3130
|
+
"$ref": "#/components/schemas/TreasuryResponse"
|
|
3131
|
+
}
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
},
|
|
3135
|
+
"400": {
|
|
3136
|
+
"$ref": "#/components/responses/BadRequest"
|
|
3137
|
+
},
|
|
3138
|
+
"404": {
|
|
3139
|
+
"$ref": "#/components/responses/NotFound"
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
},
|
|
3143
|
+
"delete": {
|
|
3144
|
+
"tags": [
|
|
3145
|
+
"Treasury"
|
|
3146
|
+
],
|
|
3147
|
+
"summary": "Delete a treasury and its signers",
|
|
3148
|
+
"operationId": "deleteTreasury",
|
|
3149
|
+
"security": [
|
|
3150
|
+
{
|
|
3151
|
+
"BearerAuth": []
|
|
3152
|
+
}
|
|
3153
|
+
],
|
|
3154
|
+
"parameters": [
|
|
3155
|
+
{
|
|
3156
|
+
"name": "treasury_id",
|
|
3157
|
+
"in": "path",
|
|
3158
|
+
"required": true,
|
|
3159
|
+
"schema": {
|
|
3160
|
+
"type": "string",
|
|
3161
|
+
"format": "uuid"
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
],
|
|
3165
|
+
"responses": {
|
|
3166
|
+
"204": {
|
|
3167
|
+
"description": "Treasury deleted"
|
|
3168
|
+
},
|
|
3169
|
+
"404": {
|
|
3170
|
+
"$ref": "#/components/responses/NotFound"
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3020
3173
|
}
|
|
3021
3174
|
},
|
|
3022
3175
|
"/v1/treasury/{treasury_id}/signers": {
|
|
@@ -3173,7 +3326,7 @@
|
|
|
3173
3326
|
"schema": {
|
|
3174
3327
|
"type": "object",
|
|
3175
3328
|
"properties": {
|
|
3176
|
-
"
|
|
3329
|
+
"requests": {
|
|
3177
3330
|
"type": "array",
|
|
3178
3331
|
"items": {
|
|
3179
3332
|
"$ref": "#/components/schemas/AccessRequestResponse"
|
|
@@ -4867,6 +5020,67 @@
|
|
|
4867
5020
|
"last_active_at": {
|
|
4868
5021
|
"type": "string",
|
|
4869
5022
|
"format": "date-time"
|
|
5023
|
+
},
|
|
5024
|
+
"smart_accounts": {
|
|
5025
|
+
"type": "array",
|
|
5026
|
+
"description": "Multi-chain; one Safe per chain",
|
|
5027
|
+
"items": {
|
|
5028
|
+
"$ref": "#/components/schemas/AgentSmartAccountResponse"
|
|
5029
|
+
}
|
|
5030
|
+
}
|
|
5031
|
+
}
|
|
5032
|
+
},
|
|
5033
|
+
"AgentSmartAccountResponse": {
|
|
5034
|
+
"type": "object",
|
|
5035
|
+
"description": "One Safe smart account per chain for an agent",
|
|
5036
|
+
"properties": {
|
|
5037
|
+
"id": {
|
|
5038
|
+
"type": "string",
|
|
5039
|
+
"format": "uuid"
|
|
5040
|
+
},
|
|
5041
|
+
"chain": {
|
|
5042
|
+
"type": "string"
|
|
5043
|
+
},
|
|
5044
|
+
"chain_id": {
|
|
5045
|
+
"type": "integer"
|
|
5046
|
+
},
|
|
5047
|
+
"safe_address": {
|
|
5048
|
+
"type": "string"
|
|
5049
|
+
},
|
|
5050
|
+
"nonce": {
|
|
5051
|
+
"type": "string"
|
|
5052
|
+
},
|
|
5053
|
+
"init_data": {
|
|
5054
|
+
"type": "object"
|
|
5055
|
+
},
|
|
5056
|
+
"created_at": {
|
|
5057
|
+
"type": "string",
|
|
5058
|
+
"format": "date-time"
|
|
5059
|
+
}
|
|
5060
|
+
}
|
|
5061
|
+
},
|
|
5062
|
+
"AddSmartAccountRequest": {
|
|
5063
|
+
"type": "object",
|
|
5064
|
+
"required": [
|
|
5065
|
+
"chain",
|
|
5066
|
+
"chain_id",
|
|
5067
|
+
"safe_address"
|
|
5068
|
+
],
|
|
5069
|
+
"properties": {
|
|
5070
|
+
"chain": {
|
|
5071
|
+
"type": "string"
|
|
5072
|
+
},
|
|
5073
|
+
"chain_id": {
|
|
5074
|
+
"type": "integer"
|
|
5075
|
+
},
|
|
5076
|
+
"safe_address": {
|
|
5077
|
+
"type": "string"
|
|
5078
|
+
},
|
|
5079
|
+
"nonce": {
|
|
5080
|
+
"type": "string"
|
|
5081
|
+
},
|
|
5082
|
+
"init_data": {
|
|
5083
|
+
"type": "object"
|
|
4870
5084
|
}
|
|
4871
5085
|
}
|
|
4872
5086
|
},
|
|
@@ -5880,6 +6094,15 @@
|
|
|
5880
6094
|
}
|
|
5881
6095
|
}
|
|
5882
6096
|
},
|
|
6097
|
+
"AgentKeysVaultResponse": {
|
|
6098
|
+
"type": "object",
|
|
6099
|
+
"properties": {
|
|
6100
|
+
"vault_id": {
|
|
6101
|
+
"type": "string",
|
|
6102
|
+
"format": "uuid"
|
|
6103
|
+
}
|
|
6104
|
+
}
|
|
6105
|
+
},
|
|
5883
6106
|
"UsageSummaryResponse": {
|
|
5884
6107
|
"type": "object",
|
|
5885
6108
|
"properties": {
|
|
@@ -6446,38 +6669,79 @@
|
|
|
6446
6669
|
"type": "object",
|
|
6447
6670
|
"required": [
|
|
6448
6671
|
"name",
|
|
6449
|
-
"
|
|
6450
|
-
"chain_id",
|
|
6451
|
-
"threshold"
|
|
6672
|
+
"safe_address"
|
|
6452
6673
|
],
|
|
6453
6674
|
"properties": {
|
|
6454
6675
|
"name": {
|
|
6455
|
-
"type": "string"
|
|
6676
|
+
"type": "string",
|
|
6677
|
+
"description": "Display name (1–128 characters)"
|
|
6678
|
+
},
|
|
6679
|
+
"safe_address": {
|
|
6680
|
+
"type": "string",
|
|
6681
|
+
"description": "Deployed Safe contract address (0x-prefixed, 42 characters)"
|
|
6456
6682
|
},
|
|
6457
6683
|
"chain": {
|
|
6458
|
-
"type": "string"
|
|
6684
|
+
"type": "string",
|
|
6685
|
+
"description": "Chain name (default base)"
|
|
6459
6686
|
},
|
|
6460
6687
|
"chain_id": {
|
|
6461
|
-
"type": "integer"
|
|
6688
|
+
"type": "integer",
|
|
6689
|
+
"description": "EVM chain ID (default 8453 for Base)"
|
|
6462
6690
|
},
|
|
6463
6691
|
"threshold": {
|
|
6464
6692
|
"type": "integer",
|
|
6465
|
-
"minimum": 1
|
|
6693
|
+
"minimum": 1,
|
|
6694
|
+
"description": "Safe threshold (default 1)"
|
|
6466
6695
|
},
|
|
6467
|
-
"
|
|
6468
|
-
"type": "
|
|
6469
|
-
"
|
|
6696
|
+
"signers": {
|
|
6697
|
+
"type": "array",
|
|
6698
|
+
"items": {
|
|
6699
|
+
"$ref": "#/components/schemas/CreateTreasurySignerEntry"
|
|
6700
|
+
}
|
|
6470
6701
|
}
|
|
6471
6702
|
}
|
|
6472
6703
|
},
|
|
6473
|
-
"
|
|
6704
|
+
"CreateTreasurySignerEntry": {
|
|
6474
6705
|
"type": "object",
|
|
6706
|
+
"required": [
|
|
6707
|
+
"signer_type",
|
|
6708
|
+
"signer_id",
|
|
6709
|
+
"signer_address"
|
|
6710
|
+
],
|
|
6475
6711
|
"properties": {
|
|
6476
|
-
"
|
|
6712
|
+
"signer_type": {
|
|
6713
|
+
"type": "string",
|
|
6714
|
+
"enum": [
|
|
6715
|
+
"user",
|
|
6716
|
+
"agent"
|
|
6717
|
+
]
|
|
6718
|
+
},
|
|
6719
|
+
"signer_id": {
|
|
6477
6720
|
"type": "string",
|
|
6478
6721
|
"format": "uuid"
|
|
6479
6722
|
},
|
|
6480
|
-
"
|
|
6723
|
+
"signer_address": {
|
|
6724
|
+
"type": "string",
|
|
6725
|
+
"description": "EVM address (0x-prefixed)"
|
|
6726
|
+
}
|
|
6727
|
+
}
|
|
6728
|
+
},
|
|
6729
|
+
"UpdateTreasuryRequest": {
|
|
6730
|
+
"type": "object",
|
|
6731
|
+
"properties": {
|
|
6732
|
+
"name": {
|
|
6733
|
+
"type": "string"
|
|
6734
|
+
},
|
|
6735
|
+
"threshold": {
|
|
6736
|
+
"type": "integer",
|
|
6737
|
+
"minimum": 1
|
|
6738
|
+
}
|
|
6739
|
+
}
|
|
6740
|
+
},
|
|
6741
|
+
"TreasuryResponse": {
|
|
6742
|
+
"type": "object",
|
|
6743
|
+
"properties": {
|
|
6744
|
+
"id": {
|
|
6481
6745
|
"type": "string",
|
|
6482
6746
|
"format": "uuid"
|
|
6483
6747
|
},
|
|
@@ -6496,6 +6760,10 @@
|
|
|
6496
6760
|
"threshold": {
|
|
6497
6761
|
"type": "integer"
|
|
6498
6762
|
},
|
|
6763
|
+
"created_by": {
|
|
6764
|
+
"type": "string",
|
|
6765
|
+
"format": "uuid"
|
|
6766
|
+
},
|
|
6499
6767
|
"signers": {
|
|
6500
6768
|
"type": "array",
|
|
6501
6769
|
"items": {
|
|
@@ -6526,10 +6794,10 @@
|
|
|
6526
6794
|
"type": "string",
|
|
6527
6795
|
"format": "uuid"
|
|
6528
6796
|
},
|
|
6529
|
-
"
|
|
6797
|
+
"signer_address": {
|
|
6530
6798
|
"type": "string"
|
|
6531
6799
|
},
|
|
6532
|
-
"
|
|
6800
|
+
"added_at": {
|
|
6533
6801
|
"type": "string",
|
|
6534
6802
|
"format": "date-time"
|
|
6535
6803
|
}
|
|
@@ -6539,7 +6807,8 @@
|
|
|
6539
6807
|
"type": "object",
|
|
6540
6808
|
"required": [
|
|
6541
6809
|
"signer_type",
|
|
6542
|
-
"signer_id"
|
|
6810
|
+
"signer_id",
|
|
6811
|
+
"signer_address"
|
|
6543
6812
|
],
|
|
6544
6813
|
"properties": {
|
|
6545
6814
|
"signer_type": {
|
|
@@ -6552,6 +6821,9 @@
|
|
|
6552
6821
|
"signer_id": {
|
|
6553
6822
|
"type": "string",
|
|
6554
6823
|
"format": "uuid"
|
|
6824
|
+
},
|
|
6825
|
+
"signer_address": {
|
|
6826
|
+
"type": "string"
|
|
6555
6827
|
}
|
|
6556
6828
|
}
|
|
6557
6829
|
},
|
|
@@ -6578,10 +6850,18 @@
|
|
|
6578
6850
|
"denied"
|
|
6579
6851
|
]
|
|
6580
6852
|
},
|
|
6581
|
-
"
|
|
6853
|
+
"reason": {
|
|
6582
6854
|
"type": "string"
|
|
6583
6855
|
},
|
|
6584
|
-
"
|
|
6856
|
+
"requested_at": {
|
|
6857
|
+
"type": "string",
|
|
6858
|
+
"format": "date-time"
|
|
6859
|
+
},
|
|
6860
|
+
"resolved_by": {
|
|
6861
|
+
"type": "string",
|
|
6862
|
+
"format": "uuid"
|
|
6863
|
+
},
|
|
6864
|
+
"resolved_at": {
|
|
6585
6865
|
"type": "string",
|
|
6586
6866
|
"format": "date-time"
|
|
6587
6867
|
}
|
package/openapi.yaml
CHANGED
|
@@ -1083,6 +1083,36 @@ paths:
|
|
|
1083
1083
|
"404":
|
|
1084
1084
|
$ref: "#/components/responses/NotFound"
|
|
1085
1085
|
|
|
1086
|
+
/v1/agents/{agent_id}/smart-accounts:
|
|
1087
|
+
post:
|
|
1088
|
+
tags: [Agents]
|
|
1089
|
+
summary: Add a smart account (Safe) for this agent on a chain
|
|
1090
|
+
description: |
|
|
1091
|
+
Use after deploying a Safe on a new chain. Multi-chain; one Safe per chain.
|
|
1092
|
+
Replaces any existing entry for the same chain_id.
|
|
1093
|
+
operationId: addAgentSmartAccount
|
|
1094
|
+
parameters:
|
|
1095
|
+
- $ref: "#/components/parameters/AgentId"
|
|
1096
|
+
requestBody:
|
|
1097
|
+
required: true
|
|
1098
|
+
content:
|
|
1099
|
+
application/json:
|
|
1100
|
+
schema:
|
|
1101
|
+
$ref: "#/components/schemas/AddSmartAccountRequest"
|
|
1102
|
+
responses:
|
|
1103
|
+
"200":
|
|
1104
|
+
description: Agent with updated smart_accounts list
|
|
1105
|
+
content:
|
|
1106
|
+
application/json:
|
|
1107
|
+
schema:
|
|
1108
|
+
$ref: "#/components/schemas/AgentResponse"
|
|
1109
|
+
"400":
|
|
1110
|
+
$ref: "#/components/responses/BadRequest"
|
|
1111
|
+
"403":
|
|
1112
|
+
$ref: "#/components/responses/Forbidden"
|
|
1113
|
+
"404":
|
|
1114
|
+
$ref: "#/components/responses/NotFound"
|
|
1115
|
+
|
|
1086
1116
|
# ---------------------------------------------------------------------------
|
|
1087
1117
|
# Transactions (Intents API)
|
|
1088
1118
|
# ---------------------------------------------------------------------------
|
|
@@ -1518,6 +1548,22 @@ paths:
|
|
|
1518
1548
|
schema:
|
|
1519
1549
|
$ref: "#/components/schemas/OrgMemberListResponse"
|
|
1520
1550
|
|
|
1551
|
+
/v1/org/agent-keys-vault:
|
|
1552
|
+
get:
|
|
1553
|
+
tags: [Organization]
|
|
1554
|
+
summary: Get the org's __agent-keys vault id
|
|
1555
|
+
description: Returns the vault id for the caller's org agent-keys vault (used for revealing agent identity keys). Users only; 404 if the vault does not exist.
|
|
1556
|
+
operationId: getAgentKeysVault
|
|
1557
|
+
responses:
|
|
1558
|
+
"200":
|
|
1559
|
+
description: Agent-keys vault id
|
|
1560
|
+
content:
|
|
1561
|
+
application/json:
|
|
1562
|
+
schema:
|
|
1563
|
+
$ref: "#/components/schemas/AgentKeysVaultResponse"
|
|
1564
|
+
"404":
|
|
1565
|
+
description: Agent-keys vault not found
|
|
1566
|
+
|
|
1521
1567
|
/v1/org/invite:
|
|
1522
1568
|
post:
|
|
1523
1569
|
tags: [Organization]
|
|
@@ -1923,6 +1969,54 @@ paths:
|
|
|
1923
1969
|
$ref: "#/components/schemas/TreasuryResponse"
|
|
1924
1970
|
"404":
|
|
1925
1971
|
$ref: "#/components/responses/NotFound"
|
|
1972
|
+
patch:
|
|
1973
|
+
tags: [Treasury]
|
|
1974
|
+
summary: Update treasury name and/or threshold
|
|
1975
|
+
operationId: updateTreasury
|
|
1976
|
+
security:
|
|
1977
|
+
- BearerAuth: []
|
|
1978
|
+
parameters:
|
|
1979
|
+
- name: treasury_id
|
|
1980
|
+
in: path
|
|
1981
|
+
required: true
|
|
1982
|
+
schema:
|
|
1983
|
+
type: string
|
|
1984
|
+
format: uuid
|
|
1985
|
+
requestBody:
|
|
1986
|
+
required: true
|
|
1987
|
+
content:
|
|
1988
|
+
application/json:
|
|
1989
|
+
schema:
|
|
1990
|
+
$ref: "#/components/schemas/UpdateTreasuryRequest"
|
|
1991
|
+
responses:
|
|
1992
|
+
"200":
|
|
1993
|
+
description: Treasury updated
|
|
1994
|
+
content:
|
|
1995
|
+
application/json:
|
|
1996
|
+
schema:
|
|
1997
|
+
$ref: "#/components/schemas/TreasuryResponse"
|
|
1998
|
+
"400":
|
|
1999
|
+
$ref: "#/components/responses/BadRequest"
|
|
2000
|
+
"404":
|
|
2001
|
+
$ref: "#/components/responses/NotFound"
|
|
2002
|
+
delete:
|
|
2003
|
+
tags: [Treasury]
|
|
2004
|
+
summary: Delete a treasury and its signers
|
|
2005
|
+
operationId: deleteTreasury
|
|
2006
|
+
security:
|
|
2007
|
+
- BearerAuth: []
|
|
2008
|
+
parameters:
|
|
2009
|
+
- name: treasury_id
|
|
2010
|
+
in: path
|
|
2011
|
+
required: true
|
|
2012
|
+
schema:
|
|
2013
|
+
type: string
|
|
2014
|
+
format: uuid
|
|
2015
|
+
responses:
|
|
2016
|
+
"204":
|
|
2017
|
+
description: Treasury deleted
|
|
2018
|
+
"404":
|
|
2019
|
+
$ref: "#/components/responses/NotFound"
|
|
1926
2020
|
|
|
1927
2021
|
/v1/treasury/{treasury_id}/signers:
|
|
1928
2022
|
post:
|
|
@@ -2020,7 +2114,7 @@ paths:
|
|
|
2020
2114
|
schema:
|
|
2021
2115
|
type: object
|
|
2022
2116
|
properties:
|
|
2023
|
-
|
|
2117
|
+
requests:
|
|
2024
2118
|
type: array
|
|
2025
2119
|
items:
|
|
2026
2120
|
$ref: "#/components/schemas/AccessRequestResponse"
|
|
@@ -3184,6 +3278,47 @@ components:
|
|
|
3184
3278
|
last_active_at:
|
|
3185
3279
|
type: string
|
|
3186
3280
|
format: date-time
|
|
3281
|
+
smart_accounts:
|
|
3282
|
+
type: array
|
|
3283
|
+
description: Multi-chain; one Safe per chain
|
|
3284
|
+
items:
|
|
3285
|
+
$ref: "#/components/schemas/AgentSmartAccountResponse"
|
|
3286
|
+
|
|
3287
|
+
AgentSmartAccountResponse:
|
|
3288
|
+
type: object
|
|
3289
|
+
description: One Safe smart account per chain for an agent
|
|
3290
|
+
properties:
|
|
3291
|
+
id:
|
|
3292
|
+
type: string
|
|
3293
|
+
format: uuid
|
|
3294
|
+
chain:
|
|
3295
|
+
type: string
|
|
3296
|
+
chain_id:
|
|
3297
|
+
type: integer
|
|
3298
|
+
safe_address:
|
|
3299
|
+
type: string
|
|
3300
|
+
nonce:
|
|
3301
|
+
type: string
|
|
3302
|
+
init_data:
|
|
3303
|
+
type: object
|
|
3304
|
+
created_at:
|
|
3305
|
+
type: string
|
|
3306
|
+
format: date-time
|
|
3307
|
+
|
|
3308
|
+
AddSmartAccountRequest:
|
|
3309
|
+
type: object
|
|
3310
|
+
required: [chain, chain_id, safe_address]
|
|
3311
|
+
properties:
|
|
3312
|
+
chain:
|
|
3313
|
+
type: string
|
|
3314
|
+
chain_id:
|
|
3315
|
+
type: integer
|
|
3316
|
+
safe_address:
|
|
3317
|
+
type: string
|
|
3318
|
+
nonce:
|
|
3319
|
+
type: string
|
|
3320
|
+
init_data:
|
|
3321
|
+
type: object
|
|
3187
3322
|
|
|
3188
3323
|
AgentSelfResponse:
|
|
3189
3324
|
type: object
|
|
@@ -3881,6 +4016,13 @@ components:
|
|
|
3881
4016
|
email:
|
|
3882
4017
|
type: string
|
|
3883
4018
|
|
|
4019
|
+
AgentKeysVaultResponse:
|
|
4020
|
+
type: object
|
|
4021
|
+
properties:
|
|
4022
|
+
vault_id:
|
|
4023
|
+
type: string
|
|
4024
|
+
format: uuid
|
|
4025
|
+
|
|
3884
4026
|
# --- Billing ---
|
|
3885
4027
|
|
|
3886
4028
|
UsageSummaryResponse:
|
|
@@ -4274,20 +4416,51 @@ components:
|
|
|
4274
4416
|
|
|
4275
4417
|
CreateTreasuryRequest:
|
|
4276
4418
|
type: object
|
|
4277
|
-
required: [name,
|
|
4419
|
+
required: [name, safe_address]
|
|
4278
4420
|
properties:
|
|
4279
4421
|
name:
|
|
4280
4422
|
type: string
|
|
4423
|
+
description: Display name (1–128 characters)
|
|
4424
|
+
safe_address:
|
|
4425
|
+
type: string
|
|
4426
|
+
description: Deployed Safe contract address (0x-prefixed, 42 characters)
|
|
4281
4427
|
chain:
|
|
4282
4428
|
type: string
|
|
4429
|
+
description: Chain name (default base)
|
|
4283
4430
|
chain_id:
|
|
4284
4431
|
type: integer
|
|
4432
|
+
description: EVM chain ID (default 8453 for Base)
|
|
4285
4433
|
threshold:
|
|
4286
4434
|
type: integer
|
|
4287
4435
|
minimum: 1
|
|
4288
|
-
|
|
4436
|
+
description: Safe threshold (default 1)
|
|
4437
|
+
signers:
|
|
4438
|
+
type: array
|
|
4439
|
+
items:
|
|
4440
|
+
$ref: "#/components/schemas/CreateTreasurySignerEntry"
|
|
4441
|
+
|
|
4442
|
+
CreateTreasurySignerEntry:
|
|
4443
|
+
type: object
|
|
4444
|
+
required: [signer_type, signer_id, signer_address]
|
|
4445
|
+
properties:
|
|
4446
|
+
signer_type:
|
|
4447
|
+
type: string
|
|
4448
|
+
enum: [user, agent]
|
|
4449
|
+
signer_id:
|
|
4450
|
+
type: string
|
|
4451
|
+
format: uuid
|
|
4452
|
+
signer_address:
|
|
4453
|
+
type: string
|
|
4454
|
+
description: EVM address (0x-prefixed)
|
|
4455
|
+
|
|
4456
|
+
UpdateTreasuryRequest:
|
|
4457
|
+
type: object
|
|
4458
|
+
properties:
|
|
4459
|
+
name:
|
|
4289
4460
|
type: string
|
|
4290
|
-
|
|
4461
|
+
threshold:
|
|
4462
|
+
type: integer
|
|
4463
|
+
minimum: 1
|
|
4291
4464
|
|
|
4292
4465
|
TreasuryResponse:
|
|
4293
4466
|
type: object
|
|
@@ -4295,9 +4468,6 @@ components:
|
|
|
4295
4468
|
id:
|
|
4296
4469
|
type: string
|
|
4297
4470
|
format: uuid
|
|
4298
|
-
org_id:
|
|
4299
|
-
type: string
|
|
4300
|
-
format: uuid
|
|
4301
4471
|
name:
|
|
4302
4472
|
type: string
|
|
4303
4473
|
safe_address:
|
|
@@ -4308,6 +4478,9 @@ components:
|
|
|
4308
4478
|
type: integer
|
|
4309
4479
|
threshold:
|
|
4310
4480
|
type: integer
|
|
4481
|
+
created_by:
|
|
4482
|
+
type: string
|
|
4483
|
+
format: uuid
|
|
4311
4484
|
signers:
|
|
4312
4485
|
type: array
|
|
4313
4486
|
items:
|
|
@@ -4328,15 +4501,15 @@ components:
|
|
|
4328
4501
|
signer_id:
|
|
4329
4502
|
type: string
|
|
4330
4503
|
format: uuid
|
|
4331
|
-
|
|
4504
|
+
signer_address:
|
|
4332
4505
|
type: string
|
|
4333
|
-
|
|
4506
|
+
added_at:
|
|
4334
4507
|
type: string
|
|
4335
4508
|
format: date-time
|
|
4336
4509
|
|
|
4337
4510
|
AddSignerRequest:
|
|
4338
4511
|
type: object
|
|
4339
|
-
required: [signer_type, signer_id]
|
|
4512
|
+
required: [signer_type, signer_id, signer_address]
|
|
4340
4513
|
properties:
|
|
4341
4514
|
signer_type:
|
|
4342
4515
|
type: string
|
|
@@ -4344,6 +4517,8 @@ components:
|
|
|
4344
4517
|
signer_id:
|
|
4345
4518
|
type: string
|
|
4346
4519
|
format: uuid
|
|
4520
|
+
signer_address:
|
|
4521
|
+
type: string
|
|
4347
4522
|
|
|
4348
4523
|
AccessRequestResponse:
|
|
4349
4524
|
type: object
|
|
@@ -4360,9 +4535,15 @@ components:
|
|
|
4360
4535
|
status:
|
|
4361
4536
|
type: string
|
|
4362
4537
|
enum: [pending, approved, denied]
|
|
4363
|
-
|
|
4538
|
+
reason:
|
|
4364
4539
|
type: string
|
|
4365
|
-
|
|
4540
|
+
requested_at:
|
|
4541
|
+
type: string
|
|
4542
|
+
format: date-time
|
|
4543
|
+
resolved_by:
|
|
4544
|
+
type: string
|
|
4545
|
+
format: uuid
|
|
4546
|
+
resolved_at:
|
|
4366
4547
|
type: string
|
|
4367
4548
|
format: date-time
|
|
4368
4549
|
|