@1claw/openapi-spec 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/openapi.json +779 -3
- package/openapi.yaml +487 -0
- package/package.json +2 -2
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.
|
|
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": [
|
|
@@ -5741,9 +5798,405 @@
|
|
|
5741
5798
|
"401": {
|
|
5742
5799
|
"$ref": "#/components/responses/Unauthorized"
|
|
5743
5800
|
},
|
|
5744
|
-
"403": {
|
|
5745
|
-
"$ref": "#/components/responses/Forbidden"
|
|
5746
|
-
},
|
|
5801
|
+
"403": {
|
|
5802
|
+
"$ref": "#/components/responses/Forbidden"
|
|
5803
|
+
},
|
|
5804
|
+
"404": {
|
|
5805
|
+
"$ref": "#/components/responses/NotFound"
|
|
5806
|
+
}
|
|
5807
|
+
}
|
|
5808
|
+
}
|
|
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
|
+
},
|
|
5747
6200
|
"404": {
|
|
5748
6201
|
"$ref": "#/components/responses/NotFound"
|
|
5749
6202
|
}
|
|
@@ -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,324 @@
|
|
|
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
|
+
}
|
|
12171
|
+
},
|
|
12172
|
+
"TreasuryWalletSendResponse": {
|
|
12173
|
+
"type": "object",
|
|
12174
|
+
"required": [
|
|
12175
|
+
"tx_hash",
|
|
12176
|
+
"from",
|
|
12177
|
+
"to",
|
|
12178
|
+
"value_wei",
|
|
12179
|
+
"chain",
|
|
12180
|
+
"status"
|
|
12181
|
+
],
|
|
12182
|
+
"properties": {
|
|
12183
|
+
"tx_hash": {
|
|
12184
|
+
"type": "string"
|
|
12185
|
+
},
|
|
12186
|
+
"from": {
|
|
12187
|
+
"type": "string"
|
|
12188
|
+
},
|
|
12189
|
+
"to": {
|
|
12190
|
+
"type": "string"
|
|
12191
|
+
},
|
|
12192
|
+
"value_wei": {
|
|
12193
|
+
"type": "string"
|
|
12194
|
+
},
|
|
12195
|
+
"chain": {
|
|
12196
|
+
"type": "string"
|
|
12197
|
+
},
|
|
12198
|
+
"status": {
|
|
12199
|
+
"type": "string"
|
|
12200
|
+
}
|
|
12201
|
+
}
|
|
12202
|
+
},
|
|
12203
|
+
"TreasuryWalletSwapRequest": {
|
|
12204
|
+
"type": "object",
|
|
12205
|
+
"required": [
|
|
12206
|
+
"sell_token",
|
|
12207
|
+
"buy_token",
|
|
12208
|
+
"sell_amount"
|
|
12209
|
+
],
|
|
12210
|
+
"properties": {
|
|
12211
|
+
"sell_token": {
|
|
12212
|
+
"type": "string",
|
|
12213
|
+
"description": "Address of the token to sell (or \"native\" for ETH)"
|
|
12214
|
+
},
|
|
12215
|
+
"buy_token": {
|
|
12216
|
+
"type": "string",
|
|
12217
|
+
"description": "Address of the token to buy (or \"native\" for ETH)"
|
|
12218
|
+
},
|
|
12219
|
+
"sell_amount": {
|
|
12220
|
+
"type": "string",
|
|
12221
|
+
"description": "Amount to sell in token's smallest unit"
|
|
12222
|
+
}
|
|
12223
|
+
}
|
|
12224
|
+
},
|
|
12225
|
+
"TreasuryWalletSwapResponse": {
|
|
12226
|
+
"type": "object",
|
|
12227
|
+
"required": [
|
|
12228
|
+
"tx_hash",
|
|
12229
|
+
"sell_token",
|
|
12230
|
+
"buy_token",
|
|
12231
|
+
"sell_amount",
|
|
12232
|
+
"buy_amount",
|
|
12233
|
+
"chain",
|
|
12234
|
+
"status"
|
|
12235
|
+
],
|
|
12236
|
+
"properties": {
|
|
12237
|
+
"tx_hash": {
|
|
12238
|
+
"type": "string"
|
|
12239
|
+
},
|
|
12240
|
+
"sell_token": {
|
|
12241
|
+
"type": "string"
|
|
12242
|
+
},
|
|
12243
|
+
"buy_token": {
|
|
12244
|
+
"type": "string"
|
|
12245
|
+
},
|
|
12246
|
+
"sell_amount": {
|
|
12247
|
+
"type": "string"
|
|
12248
|
+
},
|
|
12249
|
+
"buy_amount": {
|
|
12250
|
+
"type": "string"
|
|
12251
|
+
},
|
|
12252
|
+
"chain": {
|
|
12253
|
+
"type": "string"
|
|
12254
|
+
},
|
|
12255
|
+
"status": {
|
|
12256
|
+
"type": "string"
|
|
12257
|
+
}
|
|
12258
|
+
}
|
|
12259
|
+
},
|
|
12260
|
+
"CreateWebhookRequest": {
|
|
12261
|
+
"type": "object",
|
|
12262
|
+
"required": [
|
|
12263
|
+
"url",
|
|
12264
|
+
"events"
|
|
12265
|
+
],
|
|
12266
|
+
"properties": {
|
|
12267
|
+
"url": {
|
|
12268
|
+
"type": "string",
|
|
12269
|
+
"format": "uri",
|
|
12270
|
+
"description": "HTTPS URL to deliver webhook events to"
|
|
12271
|
+
},
|
|
12272
|
+
"events": {
|
|
12273
|
+
"type": "array",
|
|
12274
|
+
"items": {
|
|
12275
|
+
"type": "string"
|
|
12276
|
+
},
|
|
12277
|
+
"description": "Event types to subscribe to"
|
|
12278
|
+
},
|
|
12279
|
+
"description": {
|
|
12280
|
+
"type": "string"
|
|
12281
|
+
}
|
|
12282
|
+
}
|
|
12283
|
+
},
|
|
12284
|
+
"UpdateWebhookRequest": {
|
|
12285
|
+
"type": "object",
|
|
12286
|
+
"properties": {
|
|
12287
|
+
"url": {
|
|
12288
|
+
"type": "string",
|
|
12289
|
+
"format": "uri"
|
|
12290
|
+
},
|
|
12291
|
+
"events": {
|
|
12292
|
+
"type": "array",
|
|
12293
|
+
"items": {
|
|
12294
|
+
"type": "string"
|
|
12295
|
+
}
|
|
12296
|
+
},
|
|
12297
|
+
"is_active": {
|
|
12298
|
+
"type": "boolean"
|
|
12299
|
+
},
|
|
12300
|
+
"description": {
|
|
12301
|
+
"type": "string"
|
|
12302
|
+
}
|
|
12303
|
+
}
|
|
12304
|
+
},
|
|
12305
|
+
"WebhookCreatedResponse": {
|
|
12306
|
+
"type": "object",
|
|
12307
|
+
"required": [
|
|
12308
|
+
"id",
|
|
12309
|
+
"url",
|
|
12310
|
+
"events",
|
|
12311
|
+
"secret",
|
|
12312
|
+
"created_at"
|
|
12313
|
+
],
|
|
12314
|
+
"properties": {
|
|
12315
|
+
"id": {
|
|
12316
|
+
"type": "string",
|
|
12317
|
+
"format": "uuid"
|
|
12318
|
+
},
|
|
12319
|
+
"url": {
|
|
12320
|
+
"type": "string",
|
|
12321
|
+
"format": "uri"
|
|
12322
|
+
},
|
|
12323
|
+
"events": {
|
|
12324
|
+
"type": "array",
|
|
12325
|
+
"items": {
|
|
12326
|
+
"type": "string"
|
|
12327
|
+
}
|
|
12328
|
+
},
|
|
12329
|
+
"secret": {
|
|
12330
|
+
"type": "string",
|
|
12331
|
+
"description": "HMAC signing secret for verifying payloads (shown only once)"
|
|
12332
|
+
},
|
|
12333
|
+
"created_at": {
|
|
12334
|
+
"type": "string",
|
|
12335
|
+
"format": "date-time"
|
|
12336
|
+
}
|
|
12337
|
+
}
|
|
12338
|
+
},
|
|
12339
|
+
"WebhookResponse": {
|
|
12340
|
+
"type": "object",
|
|
12341
|
+
"required": [
|
|
12342
|
+
"id",
|
|
12343
|
+
"url",
|
|
12344
|
+
"events",
|
|
12345
|
+
"is_active",
|
|
12346
|
+
"created_at"
|
|
12347
|
+
],
|
|
12348
|
+
"properties": {
|
|
12349
|
+
"id": {
|
|
12350
|
+
"type": "string",
|
|
12351
|
+
"format": "uuid"
|
|
12352
|
+
},
|
|
12353
|
+
"url": {
|
|
12354
|
+
"type": "string",
|
|
12355
|
+
"format": "uri"
|
|
12356
|
+
},
|
|
12357
|
+
"events": {
|
|
12358
|
+
"type": "array",
|
|
12359
|
+
"items": {
|
|
12360
|
+
"type": "string"
|
|
12361
|
+
}
|
|
12362
|
+
},
|
|
12363
|
+
"is_active": {
|
|
12364
|
+
"type": "boolean"
|
|
12365
|
+
},
|
|
12366
|
+
"description": {
|
|
12367
|
+
"type": "string"
|
|
12368
|
+
},
|
|
12369
|
+
"created_at": {
|
|
12370
|
+
"type": "string",
|
|
12371
|
+
"format": "date-time"
|
|
12372
|
+
}
|
|
12373
|
+
}
|
|
12374
|
+
},
|
|
12375
|
+
"WebhookListResponse": {
|
|
12376
|
+
"type": "object",
|
|
12377
|
+
"required": [
|
|
12378
|
+
"webhooks"
|
|
12379
|
+
],
|
|
12380
|
+
"properties": {
|
|
12381
|
+
"webhooks": {
|
|
12382
|
+
"type": "array",
|
|
12383
|
+
"items": {
|
|
12384
|
+
"$ref": "#/components/schemas/WebhookResponse"
|
|
12385
|
+
}
|
|
12386
|
+
}
|
|
12387
|
+
}
|
|
12388
|
+
},
|
|
12389
|
+
"SigningKeyBalanceResponse": {
|
|
12390
|
+
"type": "object",
|
|
12391
|
+
"required": [
|
|
12392
|
+
"chain",
|
|
12393
|
+
"address",
|
|
12394
|
+
"balance_wei",
|
|
12395
|
+
"balance_display"
|
|
12396
|
+
],
|
|
12397
|
+
"properties": {
|
|
12398
|
+
"chain": {
|
|
12399
|
+
"type": "string"
|
|
12400
|
+
},
|
|
12401
|
+
"address": {
|
|
12402
|
+
"type": "string"
|
|
12403
|
+
},
|
|
12404
|
+
"balance_wei": {
|
|
12405
|
+
"type": "string"
|
|
12406
|
+
},
|
|
12407
|
+
"balance_display": {
|
|
12408
|
+
"type": "string"
|
|
12409
|
+
}
|
|
12410
|
+
}
|
|
12411
|
+
},
|
|
11636
12412
|
"PaymentRequirement": {
|
|
11637
12413
|
"type": "object",
|
|
11638
12414
|
"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,202 @@ 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
|
+
|
|
8082
|
+
TreasuryWalletSendResponse:
|
|
8083
|
+
type: object
|
|
8084
|
+
required: [tx_hash, from, to, value_wei, chain, status]
|
|
8085
|
+
properties:
|
|
8086
|
+
tx_hash:
|
|
8087
|
+
type: string
|
|
8088
|
+
from:
|
|
8089
|
+
type: string
|
|
8090
|
+
to:
|
|
8091
|
+
type: string
|
|
8092
|
+
value_wei:
|
|
8093
|
+
type: string
|
|
8094
|
+
chain:
|
|
8095
|
+
type: string
|
|
8096
|
+
status:
|
|
8097
|
+
type: string
|
|
8098
|
+
|
|
8099
|
+
TreasuryWalletSwapRequest:
|
|
8100
|
+
type: object
|
|
8101
|
+
required: [sell_token, buy_token, sell_amount]
|
|
8102
|
+
properties:
|
|
8103
|
+
sell_token:
|
|
8104
|
+
type: string
|
|
8105
|
+
description: Address of the token to sell (or "native" for ETH)
|
|
8106
|
+
buy_token:
|
|
8107
|
+
type: string
|
|
8108
|
+
description: Address of the token to buy (or "native" for ETH)
|
|
8109
|
+
sell_amount:
|
|
8110
|
+
type: string
|
|
8111
|
+
description: Amount to sell in token's smallest unit
|
|
8112
|
+
|
|
8113
|
+
TreasuryWalletSwapResponse:
|
|
8114
|
+
type: object
|
|
8115
|
+
required: [tx_hash, sell_token, buy_token, sell_amount, buy_amount, chain, status]
|
|
8116
|
+
properties:
|
|
8117
|
+
tx_hash:
|
|
8118
|
+
type: string
|
|
8119
|
+
sell_token:
|
|
8120
|
+
type: string
|
|
8121
|
+
buy_token:
|
|
8122
|
+
type: string
|
|
8123
|
+
sell_amount:
|
|
8124
|
+
type: string
|
|
8125
|
+
buy_amount:
|
|
8126
|
+
type: string
|
|
8127
|
+
chain:
|
|
8128
|
+
type: string
|
|
8129
|
+
status:
|
|
8130
|
+
type: string
|
|
8131
|
+
|
|
8132
|
+
# --- Webhooks ---
|
|
8133
|
+
|
|
8134
|
+
CreateWebhookRequest:
|
|
8135
|
+
type: object
|
|
8136
|
+
required: [url, events]
|
|
8137
|
+
properties:
|
|
8138
|
+
url:
|
|
8139
|
+
type: string
|
|
8140
|
+
format: uri
|
|
8141
|
+
description: HTTPS URL to deliver webhook events to
|
|
8142
|
+
events:
|
|
8143
|
+
type: array
|
|
8144
|
+
items:
|
|
8145
|
+
type: string
|
|
8146
|
+
description: Event types to subscribe to
|
|
8147
|
+
description:
|
|
8148
|
+
type: string
|
|
8149
|
+
|
|
8150
|
+
UpdateWebhookRequest:
|
|
8151
|
+
type: object
|
|
8152
|
+
properties:
|
|
8153
|
+
url:
|
|
8154
|
+
type: string
|
|
8155
|
+
format: uri
|
|
8156
|
+
events:
|
|
8157
|
+
type: array
|
|
8158
|
+
items:
|
|
8159
|
+
type: string
|
|
8160
|
+
is_active:
|
|
8161
|
+
type: boolean
|
|
8162
|
+
description:
|
|
8163
|
+
type: string
|
|
8164
|
+
|
|
8165
|
+
WebhookCreatedResponse:
|
|
8166
|
+
type: object
|
|
8167
|
+
required: [id, url, events, secret, created_at]
|
|
8168
|
+
properties:
|
|
8169
|
+
id:
|
|
8170
|
+
type: string
|
|
8171
|
+
format: uuid
|
|
8172
|
+
url:
|
|
8173
|
+
type: string
|
|
8174
|
+
format: uri
|
|
8175
|
+
events:
|
|
8176
|
+
type: array
|
|
8177
|
+
items:
|
|
8178
|
+
type: string
|
|
8179
|
+
secret:
|
|
8180
|
+
type: string
|
|
8181
|
+
description: HMAC signing secret for verifying payloads (shown only once)
|
|
8182
|
+
created_at:
|
|
8183
|
+
type: string
|
|
8184
|
+
format: date-time
|
|
8185
|
+
|
|
8186
|
+
WebhookResponse:
|
|
8187
|
+
type: object
|
|
8188
|
+
required: [id, url, events, is_active, created_at]
|
|
8189
|
+
properties:
|
|
8190
|
+
id:
|
|
8191
|
+
type: string
|
|
8192
|
+
format: uuid
|
|
8193
|
+
url:
|
|
8194
|
+
type: string
|
|
8195
|
+
format: uri
|
|
8196
|
+
events:
|
|
8197
|
+
type: array
|
|
8198
|
+
items:
|
|
8199
|
+
type: string
|
|
8200
|
+
is_active:
|
|
8201
|
+
type: boolean
|
|
8202
|
+
description:
|
|
8203
|
+
type: string
|
|
8204
|
+
created_at:
|
|
8205
|
+
type: string
|
|
8206
|
+
format: date-time
|
|
8207
|
+
|
|
8208
|
+
WebhookListResponse:
|
|
8209
|
+
type: object
|
|
8210
|
+
required: [webhooks]
|
|
8211
|
+
properties:
|
|
8212
|
+
webhooks:
|
|
8213
|
+
type: array
|
|
8214
|
+
items:
|
|
8215
|
+
$ref: "#/components/schemas/WebhookResponse"
|
|
8216
|
+
|
|
8217
|
+
# --- Signing Key Balance ---
|
|
8218
|
+
|
|
8219
|
+
SigningKeyBalanceResponse:
|
|
8220
|
+
type: object
|
|
8221
|
+
required: [chain, address, balance_wei, balance_display]
|
|
8222
|
+
properties:
|
|
8223
|
+
chain:
|
|
8224
|
+
type: string
|
|
8225
|
+
address:
|
|
8226
|
+
type: string
|
|
8227
|
+
balance_wei:
|
|
8228
|
+
type: string
|
|
8229
|
+
balance_display:
|
|
8230
|
+
type: string
|
|
8231
|
+
|
|
7745
8232
|
# --- x402 ---
|
|
7746
8233
|
|
|
7747
8234
|
PaymentRequirement:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1claw/openapi-spec",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "OpenAPI 3.1.0 specification for the 1Claw Vault API
|
|
3
|
+
"version": "0.29.0",
|
|
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",
|