@1claw/openapi-spec 0.61.23 → 0.61.24
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/openapi.json +461 -42
- package/openapi.yaml +238 -15
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "1Claw API",
|
|
5
|
-
"version": "0.61.
|
|
5
|
+
"version": "0.61.24",
|
|
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. Automations (workflow_spec,\nwebhook tokens, event triggers, Assist), cloud runtimes with\ninteractive shell sessions, agent memory, and discovery.\n\n## Domains\n\n`api.1claw.co` is canonical: it is the OIDC issuer, the `aud` the API\nmints, and the first entry in `servers` — a generated client takes its\nbase URL from there, and the previous ordering pointed every SDK at the\ndomain the issuer had already left. `api.1claw.xyz` still answers and is\nstill accepted on token validation, because tokens minted before the\nmove carry it; it is never minted now.\n\nOne deliberate exception: the Shroud attestation identity token is\nrequested from GCP with `audience: https://api.1claw.xyz`, so\n`/v1/shroud/attestation` reports that as its `expected_audience`. That\nis accurate rather than stale — the audience is a verification contract\nwith anyone already checking the token, and moving it is a breaking\nchange for them, not a rename.\n\nAll endpoints require JWT Bearer authentication unless marked with\n`security: []`.\n",
|
|
7
7
|
"contact": {
|
|
8
8
|
"email": "ops@1claw.co"
|
|
@@ -9779,7 +9779,7 @@
|
|
|
9779
9779
|
"Key Custody"
|
|
9780
9780
|
],
|
|
9781
9781
|
"summary": "Create a Safe owned by your passkey",
|
|
9782
|
-
"description": "An EVM Safe (v1.4.1) whose only owner is Safe's WebAuthn shared signer,\nconfigured with this passkey's P-256 public key. No private key exists\nanywhere: signing a transaction is a WebAuthn assertion whose challenge\nis the SafeTx hash. The address is counterfactual (CREATE2) until the\nfirst `execute` deploys it. Chains: base, optimism, arbitrum, polygon\n(RIP-7212 precompile + fallback verifier), ethereum, sepolia, base-sepolia.\n",
|
|
9782
|
+
"description": "An EVM Safe (v1.4.1) whose only owner is Safe's WebAuthn shared signer,\nconfigured with this passkey's P-256 public key. No private key exists\nanywhere: signing a transaction is a WebAuthn assertion whose challenge\nis the SafeTx hash. The address is counterfactual (CREATE2) until the\nfirst `execute` deploys it. Chains: base, optimism, arbitrum, polygon\n(RIP-7212 precompile + fallback verifier), ethereum, sepolia, base-sepolia.\nThe passkey must have been registered on the domain making this\nrequest (its rpId): a credential from `1claw.xyz` cannot sign on\n`1claw.co`, so such a passkey is refused here (400) rather than\nproducing a Safe no browser here can sign for.\n",
|
|
9783
9783
|
"operationId": "createPasskeySafe",
|
|
9784
9784
|
"security": [
|
|
9785
9785
|
{
|
|
@@ -9964,46 +9964,7 @@
|
|
|
9964
9964
|
"content": {
|
|
9965
9965
|
"application/json": {
|
|
9966
9966
|
"schema": {
|
|
9967
|
-
"
|
|
9968
|
-
"properties": {
|
|
9969
|
-
"safe_id": {
|
|
9970
|
-
"type": "string",
|
|
9971
|
-
"format": "uuid"
|
|
9972
|
-
},
|
|
9973
|
-
"safe_address": {
|
|
9974
|
-
"type": "string"
|
|
9975
|
-
},
|
|
9976
|
-
"chain": {
|
|
9977
|
-
"type": "string"
|
|
9978
|
-
},
|
|
9979
|
-
"chain_id": {
|
|
9980
|
-
"type": "integer"
|
|
9981
|
-
},
|
|
9982
|
-
"to": {
|
|
9983
|
-
"type": "string"
|
|
9984
|
-
},
|
|
9985
|
-
"value_wei": {
|
|
9986
|
-
"type": "string"
|
|
9987
|
-
},
|
|
9988
|
-
"data": {
|
|
9989
|
-
"type": "string"
|
|
9990
|
-
},
|
|
9991
|
-
"nonce": {
|
|
9992
|
-
"type": "integer"
|
|
9993
|
-
},
|
|
9994
|
-
"deploy_required": {
|
|
9995
|
-
"type": "boolean"
|
|
9996
|
-
},
|
|
9997
|
-
"safe_tx_hash": {
|
|
9998
|
-
"type": "string"
|
|
9999
|
-
},
|
|
10000
|
-
"credential_id": {
|
|
10001
|
-
"type": "string"
|
|
10002
|
-
},
|
|
10003
|
-
"rp_id": {
|
|
10004
|
-
"type": "string"
|
|
10005
|
-
}
|
|
10006
|
-
}
|
|
9967
|
+
"$ref": "#/components/schemas/PasskeySafePrepare"
|
|
10007
9968
|
}
|
|
10008
9969
|
}
|
|
10009
9970
|
}
|
|
@@ -10074,6 +10035,16 @@
|
|
|
10074
10035
|
"nonce": {
|
|
10075
10036
|
"type": "integer"
|
|
10076
10037
|
},
|
|
10038
|
+
"operation": {
|
|
10039
|
+
"type": "integer",
|
|
10040
|
+
"default": 0,
|
|
10041
|
+
"description": "0 = call. 1 = delegatecall, accepted only with a `grant_id` whose\nprepared setup calldata this is, and only to the pinned\nMultiSendCallOnly — the API cannot delegatecall arbitrary code.\n"
|
|
10042
|
+
},
|
|
10043
|
+
"grant_id": {
|
|
10044
|
+
"type": "string",
|
|
10045
|
+
"format": "uuid",
|
|
10046
|
+
"description": "Pass back from a grant or revoke prepare; activates / revokes the grant on success."
|
|
10047
|
+
},
|
|
10077
10048
|
"authenticator_data": {
|
|
10078
10049
|
"type": "string",
|
|
10079
10050
|
"description": "Base64url."
|
|
@@ -10145,6 +10116,313 @@
|
|
|
10145
10116
|
}
|
|
10146
10117
|
}
|
|
10147
10118
|
},
|
|
10119
|
+
"/v1/treasury/passkey-safes/{id}/grants": {
|
|
10120
|
+
"parameters": [
|
|
10121
|
+
{
|
|
10122
|
+
"name": "id",
|
|
10123
|
+
"in": "path",
|
|
10124
|
+
"required": true,
|
|
10125
|
+
"schema": {
|
|
10126
|
+
"type": "string",
|
|
10127
|
+
"format": "uuid"
|
|
10128
|
+
}
|
|
10129
|
+
}
|
|
10130
|
+
],
|
|
10131
|
+
"get": {
|
|
10132
|
+
"tags": [
|
|
10133
|
+
"Key Custody"
|
|
10134
|
+
],
|
|
10135
|
+
"summary": "List agent spending grants on a passkey Safe",
|
|
10136
|
+
"operationId": "listPasskeySafeGrants",
|
|
10137
|
+
"security": [
|
|
10138
|
+
{
|
|
10139
|
+
"BearerAuth": []
|
|
10140
|
+
}
|
|
10141
|
+
],
|
|
10142
|
+
"responses": {
|
|
10143
|
+
"200": {
|
|
10144
|
+
"description": "Grants",
|
|
10145
|
+
"content": {
|
|
10146
|
+
"application/json": {
|
|
10147
|
+
"schema": {
|
|
10148
|
+
"type": "object",
|
|
10149
|
+
"properties": {
|
|
10150
|
+
"grants": {
|
|
10151
|
+
"type": "array",
|
|
10152
|
+
"items": {
|
|
10153
|
+
"$ref": "#/components/schemas/PasskeySafeGrant"
|
|
10154
|
+
}
|
|
10155
|
+
}
|
|
10156
|
+
}
|
|
10157
|
+
}
|
|
10158
|
+
}
|
|
10159
|
+
}
|
|
10160
|
+
},
|
|
10161
|
+
"401": {
|
|
10162
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
10163
|
+
},
|
|
10164
|
+
"404": {
|
|
10165
|
+
"$ref": "#/components/responses/NotFound"
|
|
10166
|
+
}
|
|
10167
|
+
}
|
|
10168
|
+
},
|
|
10169
|
+
"post": {
|
|
10170
|
+
"tags": [
|
|
10171
|
+
"Key Custody"
|
|
10172
|
+
],
|
|
10173
|
+
"summary": "Prepare an agent spending grant (Allowance Module)",
|
|
10174
|
+
"description": "Gives one agent's server-custody Ethereum signing key a bounded, on-chain\nallowance from this Safe through Safe's Allowance Module v1.0.0: one Safe\ntransaction (delegatecall into MultiSendCallOnly) that enables the module if\nneeded, adds the agent's key as a delegate and sets the allowance per reset\nperiod. Returns the grant (`pending`) and the SafeTx for the owner's passkey\nto sign; pass `operation` and `grant_id` from `prepare` to `execute`. The cap\nis enforced by the module on-chain — 1claw holding the delegate key gives it\nexactly the allowance and nothing more. Audited as `passkey_safe.grant_activated`.\n",
|
|
10175
|
+
"operationId": "createPasskeySafeGrant",
|
|
10176
|
+
"security": [
|
|
10177
|
+
{
|
|
10178
|
+
"BearerAuth": []
|
|
10179
|
+
}
|
|
10180
|
+
],
|
|
10181
|
+
"requestBody": {
|
|
10182
|
+
"required": true,
|
|
10183
|
+
"content": {
|
|
10184
|
+
"application/json": {
|
|
10185
|
+
"schema": {
|
|
10186
|
+
"type": "object",
|
|
10187
|
+
"required": [
|
|
10188
|
+
"agent_id",
|
|
10189
|
+
"allowance_amount"
|
|
10190
|
+
],
|
|
10191
|
+
"properties": {
|
|
10192
|
+
"agent_id": {
|
|
10193
|
+
"type": "string",
|
|
10194
|
+
"format": "uuid"
|
|
10195
|
+
},
|
|
10196
|
+
"token": {
|
|
10197
|
+
"type": "string",
|
|
10198
|
+
"description": "ERC-20 contract; omit for the native token."
|
|
10199
|
+
},
|
|
10200
|
+
"allowance_amount": {
|
|
10201
|
+
"type": "string",
|
|
10202
|
+
"description": "Base units",
|
|
10203
|
+
"decimal string": null,
|
|
10204
|
+
"≤ 2^96-1.": null
|
|
10205
|
+
},
|
|
10206
|
+
"reset_time_min": {
|
|
10207
|
+
"type": "integer",
|
|
10208
|
+
"default": 1440,
|
|
10209
|
+
"description": "Reset period in minutes."
|
|
10210
|
+
}
|
|
10211
|
+
}
|
|
10212
|
+
}
|
|
10213
|
+
}
|
|
10214
|
+
}
|
|
10215
|
+
},
|
|
10216
|
+
"responses": {
|
|
10217
|
+
"200": {
|
|
10218
|
+
"description": "Grant and what to sign",
|
|
10219
|
+
"content": {
|
|
10220
|
+
"application/json": {
|
|
10221
|
+
"schema": {
|
|
10222
|
+
"$ref": "#/components/schemas/PasskeySafeGrantPrepare"
|
|
10223
|
+
}
|
|
10224
|
+
}
|
|
10225
|
+
}
|
|
10226
|
+
},
|
|
10227
|
+
"400": {
|
|
10228
|
+
"$ref": "#/components/responses/BadRequest"
|
|
10229
|
+
},
|
|
10230
|
+
"401": {
|
|
10231
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
10232
|
+
},
|
|
10233
|
+
"404": {
|
|
10234
|
+
"$ref": "#/components/responses/NotFound"
|
|
10235
|
+
},
|
|
10236
|
+
"409": {
|
|
10237
|
+
"$ref": "#/components/responses/Conflict"
|
|
10238
|
+
}
|
|
10239
|
+
}
|
|
10240
|
+
}
|
|
10241
|
+
},
|
|
10242
|
+
"/v1/treasury/passkey-safes/{id}/grants/{grant_id}/revoke": {
|
|
10243
|
+
"parameters": [
|
|
10244
|
+
{
|
|
10245
|
+
"name": "id",
|
|
10246
|
+
"in": "path",
|
|
10247
|
+
"required": true,
|
|
10248
|
+
"schema": {
|
|
10249
|
+
"type": "string",
|
|
10250
|
+
"format": "uuid"
|
|
10251
|
+
}
|
|
10252
|
+
},
|
|
10253
|
+
{
|
|
10254
|
+
"name": "grant_id",
|
|
10255
|
+
"in": "path",
|
|
10256
|
+
"required": true,
|
|
10257
|
+
"schema": {
|
|
10258
|
+
"type": "string",
|
|
10259
|
+
"format": "uuid"
|
|
10260
|
+
}
|
|
10261
|
+
}
|
|
10262
|
+
],
|
|
10263
|
+
"post": {
|
|
10264
|
+
"tags": [
|
|
10265
|
+
"Key Custody"
|
|
10266
|
+
],
|
|
10267
|
+
"summary": "Prepare a grant revocation",
|
|
10268
|
+
"description": "Prepares `AllowanceModule.removeDelegate(delegate, true)` for the owner's\npasskey to sign; `execute` with `grant_id` relays it and marks the grant\n`revoked`. Audited as `passkey_safe.grant_revoked`.\n",
|
|
10269
|
+
"operationId": "revokePasskeySafeGrant",
|
|
10270
|
+
"security": [
|
|
10271
|
+
{
|
|
10272
|
+
"BearerAuth": []
|
|
10273
|
+
}
|
|
10274
|
+
],
|
|
10275
|
+
"responses": {
|
|
10276
|
+
"200": {
|
|
10277
|
+
"description": "Grant and what to sign",
|
|
10278
|
+
"content": {
|
|
10279
|
+
"application/json": {
|
|
10280
|
+
"schema": {
|
|
10281
|
+
"$ref": "#/components/schemas/PasskeySafeGrantPrepare"
|
|
10282
|
+
}
|
|
10283
|
+
}
|
|
10284
|
+
}
|
|
10285
|
+
},
|
|
10286
|
+
"401": {
|
|
10287
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
10288
|
+
},
|
|
10289
|
+
"404": {
|
|
10290
|
+
"$ref": "#/components/responses/NotFound"
|
|
10291
|
+
},
|
|
10292
|
+
"409": {
|
|
10293
|
+
"$ref": "#/components/responses/Conflict"
|
|
10294
|
+
}
|
|
10295
|
+
}
|
|
10296
|
+
}
|
|
10297
|
+
},
|
|
10298
|
+
"/v1/agents/{agent_id}/passkey-safes/{safe_id}/spend": {
|
|
10299
|
+
"parameters": [
|
|
10300
|
+
{
|
|
10301
|
+
"name": "agent_id",
|
|
10302
|
+
"in": "path",
|
|
10303
|
+
"required": true,
|
|
10304
|
+
"schema": {
|
|
10305
|
+
"type": "string",
|
|
10306
|
+
"format": "uuid"
|
|
10307
|
+
}
|
|
10308
|
+
},
|
|
10309
|
+
{
|
|
10310
|
+
"name": "safe_id",
|
|
10311
|
+
"in": "path",
|
|
10312
|
+
"required": true,
|
|
10313
|
+
"schema": {
|
|
10314
|
+
"type": "string",
|
|
10315
|
+
"format": "uuid"
|
|
10316
|
+
}
|
|
10317
|
+
}
|
|
10318
|
+
],
|
|
10319
|
+
"post": {
|
|
10320
|
+
"tags": [
|
|
10321
|
+
"Key Custody"
|
|
10322
|
+
],
|
|
10323
|
+
"summary": "Spend from a passkey-owned Safe under an active grant",
|
|
10324
|
+
"description": "Agent credential only. Runs the agent's guardrails (chains, allowlists, caps,\ndaily limits, approval policy) and the sanctions screen, reads the module's\ncurrent allowance and nonce, signs the Allowance Module transfer hash with the\nagent's Ethereum signing key, and relays `executeAllowanceTransfer` from the\nSafe owner's Ethereum treasury wallet. Above the on-chain remaining allowance\nthe request is refused before any gas is spent; the module would refuse it\nanyway. Counts as one signature. Audited as `passkey_safe.allowance_spent`.\n",
|
|
10325
|
+
"operationId": "spendFromPasskeySafeGrant",
|
|
10326
|
+
"security": [
|
|
10327
|
+
{
|
|
10328
|
+
"BearerAuth": []
|
|
10329
|
+
}
|
|
10330
|
+
],
|
|
10331
|
+
"requestBody": {
|
|
10332
|
+
"required": true,
|
|
10333
|
+
"content": {
|
|
10334
|
+
"application/json": {
|
|
10335
|
+
"schema": {
|
|
10336
|
+
"type": "object",
|
|
10337
|
+
"required": [
|
|
10338
|
+
"to",
|
|
10339
|
+
"amount"
|
|
10340
|
+
],
|
|
10341
|
+
"properties": {
|
|
10342
|
+
"to": {
|
|
10343
|
+
"type": "string"
|
|
10344
|
+
},
|
|
10345
|
+
"amount": {
|
|
10346
|
+
"type": "string",
|
|
10347
|
+
"description": "Base units",
|
|
10348
|
+
"decimal string.": null
|
|
10349
|
+
},
|
|
10350
|
+
"token": {
|
|
10351
|
+
"type": "string",
|
|
10352
|
+
"description": "ERC-20 contract; omit for the native token."
|
|
10353
|
+
}
|
|
10354
|
+
}
|
|
10355
|
+
}
|
|
10356
|
+
}
|
|
10357
|
+
}
|
|
10358
|
+
},
|
|
10359
|
+
"responses": {
|
|
10360
|
+
"200": {
|
|
10361
|
+
"description": "Broadcast",
|
|
10362
|
+
"content": {
|
|
10363
|
+
"application/json": {
|
|
10364
|
+
"schema": {
|
|
10365
|
+
"type": "object",
|
|
10366
|
+
"properties": {
|
|
10367
|
+
"grant_id": {
|
|
10368
|
+
"type": "string",
|
|
10369
|
+
"format": "uuid"
|
|
10370
|
+
},
|
|
10371
|
+
"safe_address": {
|
|
10372
|
+
"type": "string"
|
|
10373
|
+
},
|
|
10374
|
+
"chain": {
|
|
10375
|
+
"type": "string"
|
|
10376
|
+
},
|
|
10377
|
+
"to": {
|
|
10378
|
+
"type": "string"
|
|
10379
|
+
},
|
|
10380
|
+
"amount": {
|
|
10381
|
+
"type": "string"
|
|
10382
|
+
},
|
|
10383
|
+
"token_address": {
|
|
10384
|
+
"type": "string"
|
|
10385
|
+
},
|
|
10386
|
+
"remaining_after": {
|
|
10387
|
+
"type": "string",
|
|
10388
|
+
"description": "Allowance left in this period after this transfer."
|
|
10389
|
+
},
|
|
10390
|
+
"nonce": {
|
|
10391
|
+
"type": "integer",
|
|
10392
|
+
"description": "The module's delegate nonce used."
|
|
10393
|
+
},
|
|
10394
|
+
"tx_hash": {
|
|
10395
|
+
"type": "string"
|
|
10396
|
+
},
|
|
10397
|
+
"status": {
|
|
10398
|
+
"type": "string"
|
|
10399
|
+
}
|
|
10400
|
+
}
|
|
10401
|
+
}
|
|
10402
|
+
}
|
|
10403
|
+
}
|
|
10404
|
+
},
|
|
10405
|
+
"400": {
|
|
10406
|
+
"$ref": "#/components/responses/BadRequest"
|
|
10407
|
+
},
|
|
10408
|
+
"401": {
|
|
10409
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
10410
|
+
},
|
|
10411
|
+
"402": {
|
|
10412
|
+
"$ref": "#/components/responses/PaymentRequired"
|
|
10413
|
+
},
|
|
10414
|
+
"403": {
|
|
10415
|
+
"$ref": "#/components/responses/Forbidden"
|
|
10416
|
+
},
|
|
10417
|
+
"404": {
|
|
10418
|
+
"$ref": "#/components/responses/NotFound"
|
|
10419
|
+
},
|
|
10420
|
+
"409": {
|
|
10421
|
+
"$ref": "#/components/responses/Conflict"
|
|
10422
|
+
}
|
|
10423
|
+
}
|
|
10424
|
+
}
|
|
10425
|
+
},
|
|
10148
10426
|
"/v1/treasury/wallets/generate": {
|
|
10149
10427
|
"post": {
|
|
10150
10428
|
"tags": [
|
|
@@ -40186,6 +40464,16 @@
|
|
|
40186
40464
|
"type": "string",
|
|
40187
40465
|
"format": "uuid"
|
|
40188
40466
|
},
|
|
40467
|
+
"passkey_name": {
|
|
40468
|
+
"type": "string",
|
|
40469
|
+
"nullable": true,
|
|
40470
|
+
"description": "The owning passkey's name — only that credential can sign for the Safe."
|
|
40471
|
+
},
|
|
40472
|
+
"passkey_rp_id": {
|
|
40473
|
+
"type": "string",
|
|
40474
|
+
"nullable": true,
|
|
40475
|
+
"description": "The domain the owning passkey was registered under (WebAuthn rpId); a browser on another domain cannot use it."
|
|
40476
|
+
},
|
|
40189
40477
|
"custody": {
|
|
40190
40478
|
"type": "string",
|
|
40191
40479
|
"enum": [
|
|
@@ -40213,6 +40501,137 @@
|
|
|
40213
40501
|
}
|
|
40214
40502
|
}
|
|
40215
40503
|
},
|
|
40504
|
+
"PasskeySafePrepare": {
|
|
40505
|
+
"type": "object",
|
|
40506
|
+
"properties": {
|
|
40507
|
+
"safe_id": {
|
|
40508
|
+
"type": "string",
|
|
40509
|
+
"format": "uuid"
|
|
40510
|
+
},
|
|
40511
|
+
"safe_address": {
|
|
40512
|
+
"type": "string"
|
|
40513
|
+
},
|
|
40514
|
+
"chain": {
|
|
40515
|
+
"type": "string"
|
|
40516
|
+
},
|
|
40517
|
+
"chain_id": {
|
|
40518
|
+
"type": "integer"
|
|
40519
|
+
},
|
|
40520
|
+
"to": {
|
|
40521
|
+
"type": "string"
|
|
40522
|
+
},
|
|
40523
|
+
"value_wei": {
|
|
40524
|
+
"type": "string"
|
|
40525
|
+
},
|
|
40526
|
+
"data": {
|
|
40527
|
+
"type": "string"
|
|
40528
|
+
},
|
|
40529
|
+
"nonce": {
|
|
40530
|
+
"type": "integer"
|
|
40531
|
+
},
|
|
40532
|
+
"operation": {
|
|
40533
|
+
"type": "integer",
|
|
40534
|
+
"description": "Pass back to `execute` unchanged."
|
|
40535
|
+
},
|
|
40536
|
+
"grant_id": {
|
|
40537
|
+
"type": "string",
|
|
40538
|
+
"format": "uuid",
|
|
40539
|
+
"description": "Present for grant setup / revoke; pass back to `execute`."
|
|
40540
|
+
},
|
|
40541
|
+
"deploy_required": {
|
|
40542
|
+
"type": "boolean"
|
|
40543
|
+
},
|
|
40544
|
+
"safe_tx_hash": {
|
|
40545
|
+
"type": "string",
|
|
40546
|
+
"description": "Hex SafeTx hash — the WebAuthn challenge (raw 32 bytes)."
|
|
40547
|
+
},
|
|
40548
|
+
"credential_id": {
|
|
40549
|
+
"type": "string"
|
|
40550
|
+
},
|
|
40551
|
+
"transports": {
|
|
40552
|
+
"type": "array",
|
|
40553
|
+
"nullable": true,
|
|
40554
|
+
"items": {
|
|
40555
|
+
"type": "string"
|
|
40556
|
+
},
|
|
40557
|
+
"description": "The passkey's registered transports (`internal`, `hybrid`, `usb`…) — pass as the `allowCredentials` hint so the browser asks the right authenticator."
|
|
40558
|
+
},
|
|
40559
|
+
"passkey_name": {
|
|
40560
|
+
"type": "string",
|
|
40561
|
+
"nullable": true
|
|
40562
|
+
},
|
|
40563
|
+
"rp_id": {
|
|
40564
|
+
"type": "string"
|
|
40565
|
+
}
|
|
40566
|
+
}
|
|
40567
|
+
},
|
|
40568
|
+
"PasskeySafeGrant": {
|
|
40569
|
+
"type": "object",
|
|
40570
|
+
"properties": {
|
|
40571
|
+
"id": {
|
|
40572
|
+
"type": "string",
|
|
40573
|
+
"format": "uuid"
|
|
40574
|
+
},
|
|
40575
|
+
"safe_id": {
|
|
40576
|
+
"type": "string",
|
|
40577
|
+
"format": "uuid"
|
|
40578
|
+
},
|
|
40579
|
+
"agent_id": {
|
|
40580
|
+
"type": "string",
|
|
40581
|
+
"format": "uuid"
|
|
40582
|
+
},
|
|
40583
|
+
"chain": {
|
|
40584
|
+
"type": "string"
|
|
40585
|
+
},
|
|
40586
|
+
"delegate_address": {
|
|
40587
|
+
"type": "string",
|
|
40588
|
+
"description": "The agent's Ethereum signing key at grant time."
|
|
40589
|
+
},
|
|
40590
|
+
"token_address": {
|
|
40591
|
+
"type": "string",
|
|
40592
|
+
"description": "0x000…0 for the native token."
|
|
40593
|
+
},
|
|
40594
|
+
"allowance_amount": {
|
|
40595
|
+
"type": "string",
|
|
40596
|
+
"description": "Base units per reset period."
|
|
40597
|
+
},
|
|
40598
|
+
"reset_time_min": {
|
|
40599
|
+
"type": "integer"
|
|
40600
|
+
},
|
|
40601
|
+
"status": {
|
|
40602
|
+
"type": "string",
|
|
40603
|
+
"enum": [
|
|
40604
|
+
"pending",
|
|
40605
|
+
"active",
|
|
40606
|
+
"revoking",
|
|
40607
|
+
"revoked"
|
|
40608
|
+
]
|
|
40609
|
+
},
|
|
40610
|
+
"setup_tx_hash": {
|
|
40611
|
+
"type": "string",
|
|
40612
|
+
"nullable": true
|
|
40613
|
+
},
|
|
40614
|
+
"revoke_tx_hash": {
|
|
40615
|
+
"type": "string",
|
|
40616
|
+
"nullable": true
|
|
40617
|
+
},
|
|
40618
|
+
"created_at": {
|
|
40619
|
+
"type": "string",
|
|
40620
|
+
"format": "date-time"
|
|
40621
|
+
}
|
|
40622
|
+
}
|
|
40623
|
+
},
|
|
40624
|
+
"PasskeySafeGrantPrepare": {
|
|
40625
|
+
"type": "object",
|
|
40626
|
+
"properties": {
|
|
40627
|
+
"grant": {
|
|
40628
|
+
"$ref": "#/components/schemas/PasskeySafeGrant"
|
|
40629
|
+
},
|
|
40630
|
+
"prepare": {
|
|
40631
|
+
"$ref": "#/components/schemas/PasskeySafePrepare"
|
|
40632
|
+
}
|
|
40633
|
+
}
|
|
40634
|
+
},
|
|
40216
40635
|
"ClientShareListResponse": {
|
|
40217
40636
|
"type": "object",
|
|
40218
40637
|
"properties": {
|
package/openapi.yaml
CHANGED
|
@@ -2,7 +2,7 @@ openapi: 3.1.0
|
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
4
|
title: 1Claw API
|
|
5
|
-
version: "0.61.
|
|
5
|
+
version: "0.61.24"
|
|
6
6
|
description: |
|
|
7
7
|
Secure secret management for AI agents. Provides vaults, secrets,
|
|
8
8
|
policy-based access control, agent identity, Intents API,
|
|
@@ -6239,6 +6239,10 @@ paths:
|
|
|
6239
6239
|
is the SafeTx hash. The address is counterfactual (CREATE2) until the
|
|
6240
6240
|
first `execute` deploys it. Chains: base, optimism, arbitrum, polygon
|
|
6241
6241
|
(RIP-7212 precompile + fallback verifier), ethereum, sepolia, base-sepolia.
|
|
6242
|
+
The passkey must have been registered on the domain making this
|
|
6243
|
+
request (its rpId): a credential from `1claw.xyz` cannot sign on
|
|
6244
|
+
`1claw.co`, so such a passkey is refused here (400) rather than
|
|
6245
|
+
producing a Safe no browser here can sign for.
|
|
6242
6246
|
operationId: createPasskeySafe
|
|
6243
6247
|
security:
|
|
6244
6248
|
- BearerAuth: []
|
|
@@ -6343,20 +6347,7 @@ paths:
|
|
|
6343
6347
|
content:
|
|
6344
6348
|
application/json:
|
|
6345
6349
|
schema:
|
|
6346
|
-
|
|
6347
|
-
properties:
|
|
6348
|
-
safe_id: { type: string, format: uuid }
|
|
6349
|
-
safe_address: { type: string }
|
|
6350
|
-
chain: { type: string }
|
|
6351
|
-
chain_id: { type: integer }
|
|
6352
|
-
to: { type: string }
|
|
6353
|
-
value_wei: { type: string }
|
|
6354
|
-
data: { type: string }
|
|
6355
|
-
nonce: { type: integer }
|
|
6356
|
-
deploy_required: { type: boolean }
|
|
6357
|
-
safe_tx_hash: { type: string }
|
|
6358
|
-
credential_id: { type: string }
|
|
6359
|
-
rp_id: { type: string }
|
|
6350
|
+
$ref: "#/components/schemas/PasskeySafePrepare"
|
|
6360
6351
|
"400":
|
|
6361
6352
|
$ref: "#/components/responses/BadRequest"
|
|
6362
6353
|
"401":
|
|
@@ -6396,6 +6387,17 @@ paths:
|
|
|
6396
6387
|
value_wei: { type: string }
|
|
6397
6388
|
data: { type: string }
|
|
6398
6389
|
nonce: { type: integer }
|
|
6390
|
+
operation:
|
|
6391
|
+
type: integer
|
|
6392
|
+
default: 0
|
|
6393
|
+
description: |
|
|
6394
|
+
0 = call. 1 = delegatecall, accepted only with a `grant_id` whose
|
|
6395
|
+
prepared setup calldata this is, and only to the pinned
|
|
6396
|
+
MultiSendCallOnly — the API cannot delegatecall arbitrary code.
|
|
6397
|
+
grant_id:
|
|
6398
|
+
type: string
|
|
6399
|
+
format: uuid
|
|
6400
|
+
description: Pass back from a grant or revoke prepare; activates / revokes the grant on success.
|
|
6399
6401
|
authenticator_data: { type: string, description: Base64url. }
|
|
6400
6402
|
client_data_json: { type: string, description: Base64url. }
|
|
6401
6403
|
signature: { type: string, description: Base64url DER ECDSA signature. }
|
|
@@ -6425,6 +6427,177 @@ paths:
|
|
|
6425
6427
|
"409":
|
|
6426
6428
|
$ref: "#/components/responses/Conflict"
|
|
6427
6429
|
|
|
6430
|
+
/v1/treasury/passkey-safes/{id}/grants:
|
|
6431
|
+
parameters:
|
|
6432
|
+
- name: id
|
|
6433
|
+
in: path
|
|
6434
|
+
required: true
|
|
6435
|
+
schema: { type: string, format: uuid }
|
|
6436
|
+
get:
|
|
6437
|
+
tags: [Key Custody]
|
|
6438
|
+
summary: List agent spending grants on a passkey Safe
|
|
6439
|
+
operationId: listPasskeySafeGrants
|
|
6440
|
+
security:
|
|
6441
|
+
- BearerAuth: []
|
|
6442
|
+
responses:
|
|
6443
|
+
"200":
|
|
6444
|
+
description: Grants
|
|
6445
|
+
content:
|
|
6446
|
+
application/json:
|
|
6447
|
+
schema:
|
|
6448
|
+
type: object
|
|
6449
|
+
properties:
|
|
6450
|
+
grants:
|
|
6451
|
+
type: array
|
|
6452
|
+
items:
|
|
6453
|
+
$ref: "#/components/schemas/PasskeySafeGrant"
|
|
6454
|
+
"401":
|
|
6455
|
+
$ref: "#/components/responses/Unauthorized"
|
|
6456
|
+
"404":
|
|
6457
|
+
$ref: "#/components/responses/NotFound"
|
|
6458
|
+
post:
|
|
6459
|
+
tags: [Key Custody]
|
|
6460
|
+
summary: Prepare an agent spending grant (Allowance Module)
|
|
6461
|
+
description: |
|
|
6462
|
+
Gives one agent's server-custody Ethereum signing key a bounded, on-chain
|
|
6463
|
+
allowance from this Safe through Safe's Allowance Module v1.0.0: one Safe
|
|
6464
|
+
transaction (delegatecall into MultiSendCallOnly) that enables the module if
|
|
6465
|
+
needed, adds the agent's key as a delegate and sets the allowance per reset
|
|
6466
|
+
period. Returns the grant (`pending`) and the SafeTx for the owner's passkey
|
|
6467
|
+
to sign; pass `operation` and `grant_id` from `prepare` to `execute`. The cap
|
|
6468
|
+
is enforced by the module on-chain — 1claw holding the delegate key gives it
|
|
6469
|
+
exactly the allowance and nothing more. Audited as `passkey_safe.grant_activated`.
|
|
6470
|
+
operationId: createPasskeySafeGrant
|
|
6471
|
+
security:
|
|
6472
|
+
- BearerAuth: []
|
|
6473
|
+
requestBody:
|
|
6474
|
+
required: true
|
|
6475
|
+
content:
|
|
6476
|
+
application/json:
|
|
6477
|
+
schema:
|
|
6478
|
+
type: object
|
|
6479
|
+
required: [agent_id, allowance_amount]
|
|
6480
|
+
properties:
|
|
6481
|
+
agent_id: { type: string, format: uuid }
|
|
6482
|
+
token: { type: string, description: ERC-20 contract; omit for the native token. }
|
|
6483
|
+
allowance_amount: { type: string, description: Base units, decimal string, ≤ 2^96-1. }
|
|
6484
|
+
reset_time_min: { type: integer, default: 1440, description: Reset period in minutes. }
|
|
6485
|
+
responses:
|
|
6486
|
+
"200":
|
|
6487
|
+
description: Grant and what to sign
|
|
6488
|
+
content:
|
|
6489
|
+
application/json:
|
|
6490
|
+
schema:
|
|
6491
|
+
$ref: "#/components/schemas/PasskeySafeGrantPrepare"
|
|
6492
|
+
"400":
|
|
6493
|
+
$ref: "#/components/responses/BadRequest"
|
|
6494
|
+
"401":
|
|
6495
|
+
$ref: "#/components/responses/Unauthorized"
|
|
6496
|
+
"404":
|
|
6497
|
+
$ref: "#/components/responses/NotFound"
|
|
6498
|
+
"409":
|
|
6499
|
+
$ref: "#/components/responses/Conflict"
|
|
6500
|
+
|
|
6501
|
+
/v1/treasury/passkey-safes/{id}/grants/{grant_id}/revoke:
|
|
6502
|
+
parameters:
|
|
6503
|
+
- name: id
|
|
6504
|
+
in: path
|
|
6505
|
+
required: true
|
|
6506
|
+
schema: { type: string, format: uuid }
|
|
6507
|
+
- name: grant_id
|
|
6508
|
+
in: path
|
|
6509
|
+
required: true
|
|
6510
|
+
schema: { type: string, format: uuid }
|
|
6511
|
+
post:
|
|
6512
|
+
tags: [Key Custody]
|
|
6513
|
+
summary: Prepare a grant revocation
|
|
6514
|
+
description: |
|
|
6515
|
+
Prepares `AllowanceModule.removeDelegate(delegate, true)` for the owner's
|
|
6516
|
+
passkey to sign; `execute` with `grant_id` relays it and marks the grant
|
|
6517
|
+
`revoked`. Audited as `passkey_safe.grant_revoked`.
|
|
6518
|
+
operationId: revokePasskeySafeGrant
|
|
6519
|
+
security:
|
|
6520
|
+
- BearerAuth: []
|
|
6521
|
+
responses:
|
|
6522
|
+
"200":
|
|
6523
|
+
description: Grant and what to sign
|
|
6524
|
+
content:
|
|
6525
|
+
application/json:
|
|
6526
|
+
schema:
|
|
6527
|
+
$ref: "#/components/schemas/PasskeySafeGrantPrepare"
|
|
6528
|
+
"401":
|
|
6529
|
+
$ref: "#/components/responses/Unauthorized"
|
|
6530
|
+
"404":
|
|
6531
|
+
$ref: "#/components/responses/NotFound"
|
|
6532
|
+
"409":
|
|
6533
|
+
$ref: "#/components/responses/Conflict"
|
|
6534
|
+
|
|
6535
|
+
/v1/agents/{agent_id}/passkey-safes/{safe_id}/spend:
|
|
6536
|
+
parameters:
|
|
6537
|
+
- name: agent_id
|
|
6538
|
+
in: path
|
|
6539
|
+
required: true
|
|
6540
|
+
schema: { type: string, format: uuid }
|
|
6541
|
+
- name: safe_id
|
|
6542
|
+
in: path
|
|
6543
|
+
required: true
|
|
6544
|
+
schema: { type: string, format: uuid }
|
|
6545
|
+
post:
|
|
6546
|
+
tags: [Key Custody]
|
|
6547
|
+
summary: Spend from a passkey-owned Safe under an active grant
|
|
6548
|
+
description: |
|
|
6549
|
+
Agent credential only. Runs the agent's guardrails (chains, allowlists, caps,
|
|
6550
|
+
daily limits, approval policy) and the sanctions screen, reads the module's
|
|
6551
|
+
current allowance and nonce, signs the Allowance Module transfer hash with the
|
|
6552
|
+
agent's Ethereum signing key, and relays `executeAllowanceTransfer` from the
|
|
6553
|
+
Safe owner's Ethereum treasury wallet. Above the on-chain remaining allowance
|
|
6554
|
+
the request is refused before any gas is spent; the module would refuse it
|
|
6555
|
+
anyway. Counts as one signature. Audited as `passkey_safe.allowance_spent`.
|
|
6556
|
+
operationId: spendFromPasskeySafeGrant
|
|
6557
|
+
security:
|
|
6558
|
+
- BearerAuth: []
|
|
6559
|
+
requestBody:
|
|
6560
|
+
required: true
|
|
6561
|
+
content:
|
|
6562
|
+
application/json:
|
|
6563
|
+
schema:
|
|
6564
|
+
type: object
|
|
6565
|
+
required: [to, amount]
|
|
6566
|
+
properties:
|
|
6567
|
+
to: { type: string }
|
|
6568
|
+
amount: { type: string, description: Base units, decimal string. }
|
|
6569
|
+
token: { type: string, description: ERC-20 contract; omit for the native token. }
|
|
6570
|
+
responses:
|
|
6571
|
+
"200":
|
|
6572
|
+
description: Broadcast
|
|
6573
|
+
content:
|
|
6574
|
+
application/json:
|
|
6575
|
+
schema:
|
|
6576
|
+
type: object
|
|
6577
|
+
properties:
|
|
6578
|
+
grant_id: { type: string, format: uuid }
|
|
6579
|
+
safe_address: { type: string }
|
|
6580
|
+
chain: { type: string }
|
|
6581
|
+
to: { type: string }
|
|
6582
|
+
amount: { type: string }
|
|
6583
|
+
token_address: { type: string }
|
|
6584
|
+
remaining_after: { type: string, description: Allowance left in this period after this transfer. }
|
|
6585
|
+
nonce: { type: integer, description: The module's delegate nonce used. }
|
|
6586
|
+
tx_hash: { type: string }
|
|
6587
|
+
status: { type: string }
|
|
6588
|
+
"400":
|
|
6589
|
+
$ref: "#/components/responses/BadRequest"
|
|
6590
|
+
"401":
|
|
6591
|
+
$ref: "#/components/responses/Unauthorized"
|
|
6592
|
+
"402":
|
|
6593
|
+
$ref: "#/components/responses/PaymentRequired"
|
|
6594
|
+
"403":
|
|
6595
|
+
$ref: "#/components/responses/Forbidden"
|
|
6596
|
+
"404":
|
|
6597
|
+
$ref: "#/components/responses/NotFound"
|
|
6598
|
+
"409":
|
|
6599
|
+
$ref: "#/components/responses/Conflict"
|
|
6600
|
+
|
|
6428
6601
|
/v1/treasury/wallets/generate:
|
|
6429
6602
|
post:
|
|
6430
6603
|
tags: [Treasury Wallets]
|
|
@@ -26074,12 +26247,62 @@ components:
|
|
|
26074
26247
|
chain_id: { type: integer }
|
|
26075
26248
|
safe_address: { type: string }
|
|
26076
26249
|
passkey_id: { type: string, format: uuid }
|
|
26250
|
+
passkey_name: { type: string, nullable: true, description: The owning passkey's name — only that credential can sign for the Safe. }
|
|
26251
|
+
passkey_rp_id: { type: string, nullable: true, description: The domain the owning passkey was registered under (WebAuthn rpId); a browser on another domain cannot use it. }
|
|
26077
26252
|
custody: { type: string, enum: [passkey_owner] }
|
|
26078
26253
|
deploy_status: { type: string, enum: [pending, deployed] }
|
|
26079
26254
|
deploy_tx_hash: { type: string, nullable: true }
|
|
26080
26255
|
owner_signer: { type: string, description: The SafeWebAuthnSharedSigner address listed as the Safe's owner. }
|
|
26081
26256
|
created_at: { type: string, format: date-time }
|
|
26082
26257
|
|
|
26258
|
+
PasskeySafePrepare:
|
|
26259
|
+
type: object
|
|
26260
|
+
properties:
|
|
26261
|
+
safe_id: { type: string, format: uuid }
|
|
26262
|
+
safe_address: { type: string }
|
|
26263
|
+
chain: { type: string }
|
|
26264
|
+
chain_id: { type: integer }
|
|
26265
|
+
to: { type: string }
|
|
26266
|
+
value_wei: { type: string }
|
|
26267
|
+
data: { type: string }
|
|
26268
|
+
nonce: { type: integer }
|
|
26269
|
+
operation: { type: integer, description: Pass back to `execute` unchanged. }
|
|
26270
|
+
grant_id: { type: string, format: uuid, description: Present for grant setup / revoke; pass back to `execute`. }
|
|
26271
|
+
deploy_required: { type: boolean }
|
|
26272
|
+
safe_tx_hash: { type: string, description: Hex SafeTx hash — the WebAuthn challenge (raw 32 bytes). }
|
|
26273
|
+
credential_id: { type: string }
|
|
26274
|
+
transports:
|
|
26275
|
+
type: array
|
|
26276
|
+
nullable: true
|
|
26277
|
+
items: { type: string }
|
|
26278
|
+
description: The passkey's registered transports (`internal`, `hybrid`, `usb`…) — pass as the `allowCredentials` hint so the browser asks the right authenticator.
|
|
26279
|
+
passkey_name: { type: string, nullable: true }
|
|
26280
|
+
rp_id: { type: string }
|
|
26281
|
+
|
|
26282
|
+
PasskeySafeGrant:
|
|
26283
|
+
type: object
|
|
26284
|
+
properties:
|
|
26285
|
+
id: { type: string, format: uuid }
|
|
26286
|
+
safe_id: { type: string, format: uuid }
|
|
26287
|
+
agent_id: { type: string, format: uuid }
|
|
26288
|
+
chain: { type: string }
|
|
26289
|
+
delegate_address: { type: string, description: The agent's Ethereum signing key at grant time. }
|
|
26290
|
+
token_address: { type: string, description: 0x000…0 for the native token. }
|
|
26291
|
+
allowance_amount: { type: string, description: Base units per reset period. }
|
|
26292
|
+
reset_time_min: { type: integer }
|
|
26293
|
+
status: { type: string, enum: [pending, active, revoking, revoked] }
|
|
26294
|
+
setup_tx_hash: { type: string, nullable: true }
|
|
26295
|
+
revoke_tx_hash: { type: string, nullable: true }
|
|
26296
|
+
created_at: { type: string, format: date-time }
|
|
26297
|
+
|
|
26298
|
+
PasskeySafeGrantPrepare:
|
|
26299
|
+
type: object
|
|
26300
|
+
properties:
|
|
26301
|
+
grant:
|
|
26302
|
+
$ref: "#/components/schemas/PasskeySafeGrant"
|
|
26303
|
+
prepare:
|
|
26304
|
+
$ref: "#/components/schemas/PasskeySafePrepare"
|
|
26305
|
+
|
|
26083
26306
|
ClientShareListResponse:
|
|
26084
26307
|
type: object
|
|
26085
26308
|
properties:
|