@1claw/sdk 0.26.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -86,7 +86,7 @@ await client.auth.verifyEmailChange({ code: "123456" });
86
86
  | `client.vault` | `create`, `get`, `list`, `delete`, `enableMpc`, `disableMpc` |
87
87
  | `client.secrets` | `set`, `get`, `delete`, `list`, `rotate` |
88
88
  | `client.access` | `grantHuman`, `grantAgent`, `update`, `revoke`, `listGrants` |
89
- | `client.agents` | `enroll` (also `AgentsResource.enroll(baseUrl, …)` static), `create`, `getSelf`, `get`, `list`, `update`, `delete`, `rotateKey`, `submitTransaction`, `signTransaction`, `getTransaction`, `listTransactions`, `simulateTransaction`, `simulateBundle`, `sign` |
89
+ | `client.agents` | `enroll` (also `AgentsResource.enroll(baseUrl, …)` static), `create`, `getSelf`, `get`, `list`, `update`, `delete`, `rotateKey`, `generateEoa`, `createSmartAccount`, `deleteSmartAccount`, `rotateSigner`, `submitTransaction`, `signTransaction`, `getTransaction`, `listTransactions`, `simulateTransaction`, `simulateBundle`, `sign` |
90
90
  | `client.chains` | `list`, `get`, `adminList`, `create`, `update`, `delete` |
91
91
  | `client.sharing` | `create`, `access`, `listOutbound`, `listInbound`, `accept`, `decline`, `revoke` |
92
92
  | `client.approvals` | `request`, `list`, `approve`, `deny`, `check`, `subscribe` |
@@ -95,7 +95,7 @@ await client.auth.verifyEmailChange({ code: "123456" });
95
95
  | `client.org` | `listMembers`, `getAgentKeysVault`, `updateMemberRole`, `removeMember` |
96
96
  | `client.auth` | `login`, `signup`, `agentToken`, `apiKeyToken`, `google`, `changePassword`, `setPassword`, `changeEmail`, `verifyEmailChange`, `forgotPassword`, `resetPassword`, `exportData`, `exchangeFederatedToken`, `logout`, `getMe`, `updateMe`, `deleteMe` |
97
97
  | `client.apiKeys` | `create`, `list`, `revoke` |
98
- | `client.treasury` | `create`, `list`, `get`, `update`, `delete`, `addSigner`, `removeSigner`, `requestAccess`, `listAccessRequests`, `approveAccess`, `denyAccess` |
98
+ | `client.treasury` | `create`, `list`, `get`, `update`, `delete`, `addSigner`, `removeSigner`, `requestAccess`, `listAccessRequests`, `approveAccess`, `denyAccess`, `propose`, `listProposals`, `getProposal`, `signProposal`, `executeProposal` |
99
99
  | `client.treasuryWallets` | `generateWallets`, `listWallets`, `getWallet`, `exportWallet`, `rotateWallet`, `deactivateWallet` |
100
100
  | `client.signingKeys` | `create`, `list`, `rotate`, `deactivate`, `export` |
101
101
  | `client.platform` | `createApp`, `listApps`, `getApp`, `updateApp`, `deleteApp`, `createTemplate`, `listTemplates`, `upsertUser`, `listUsers`, `bootstrapUser`, `claimPreview`, `claimRedeem`, `listConnectedApps`, `disconnectApp` |
@@ -2099,6 +2099,88 @@ export interface paths {
2099
2099
  patch?: never;
2100
2100
  trace?: never;
2101
2101
  };
2102
+ "/v1/treasury/{treasury_id}/proposals": {
2103
+ parameters: {
2104
+ query?: never;
2105
+ header?: never;
2106
+ path?: never;
2107
+ cookie?: never;
2108
+ };
2109
+ /** List proposals for a treasury */
2110
+ get: operations["listTreasuryProposals"];
2111
+ put?: never;
2112
+ /**
2113
+ * Create a multisig proposal
2114
+ * @description Create a new Safe multisig transaction proposal. The proposer must be a
2115
+ * treasury signer or an agent with an active delegation for the treasury.
2116
+ * If auto-approve rules match, the agent's signature is auto-inserted and
2117
+ * auto-execute fires if threshold is met.
2118
+ */
2119
+ post: operations["createTreasuryProposal"];
2120
+ delete?: never;
2121
+ options?: never;
2122
+ head?: never;
2123
+ patch?: never;
2124
+ trace?: never;
2125
+ };
2126
+ "/v1/treasury/{treasury_id}/proposals/{proposal_id}": {
2127
+ parameters: {
2128
+ query?: never;
2129
+ header?: never;
2130
+ path?: never;
2131
+ cookie?: never;
2132
+ };
2133
+ /** Get a proposal with collected signatures */
2134
+ get: operations["getTreasuryProposal"];
2135
+ put?: never;
2136
+ post?: never;
2137
+ /** Cancel a pending proposal (proposer only) */
2138
+ delete: operations["cancelTreasuryProposal"];
2139
+ options?: never;
2140
+ head?: never;
2141
+ patch?: never;
2142
+ trace?: never;
2143
+ };
2144
+ "/v1/treasury/{treasury_id}/proposals/{proposal_id}/sign": {
2145
+ parameters: {
2146
+ query?: never;
2147
+ header?: never;
2148
+ path?: never;
2149
+ cookie?: never;
2150
+ };
2151
+ get?: never;
2152
+ put?: never;
2153
+ /**
2154
+ * Sign a proposal (approve or reject)
2155
+ * @description Submit an EIP-712 signature for a pending proposal. When approve signatures
2156
+ * reach the Safe threshold, auto-execute fires: signatures are collected in
2157
+ * address-sorted order, `execTransaction` calldata is built, and the transaction
2158
+ * is broadcast via RPC.
2159
+ */
2160
+ post: operations["signTreasuryProposal"];
2161
+ delete?: never;
2162
+ options?: never;
2163
+ head?: never;
2164
+ patch?: never;
2165
+ trace?: never;
2166
+ };
2167
+ "/v1/treasury/{treasury_id}/proposals/{proposal_id}/execute": {
2168
+ parameters: {
2169
+ query?: never;
2170
+ header?: never;
2171
+ path?: never;
2172
+ cookie?: never;
2173
+ };
2174
+ get?: never;
2175
+ put?: never;
2176
+ /** Force-execute a proposal if threshold is met (user-only) */
2177
+ post: operations["executeTreasuryProposal"];
2178
+ delete?: never;
2179
+ options?: never;
2180
+ head?: never;
2181
+ patch?: never;
2182
+ trace?: never;
2183
+ };
2102
2184
  "/v1/treasury/wallets/generate": {
2103
2185
  parameters: {
2104
2186
  query?: never;
@@ -2732,6 +2814,70 @@ export interface paths {
2732
2814
  };
2733
2815
  trace?: never;
2734
2816
  };
2817
+ "/v1/platform/apps/{appId}/rotate-key": {
2818
+ parameters: {
2819
+ query?: never;
2820
+ header?: never;
2821
+ path?: never;
2822
+ cookie?: never;
2823
+ };
2824
+ get?: never;
2825
+ put?: never;
2826
+ /**
2827
+ * Rotate platform API key
2828
+ * @description Generate a new API key for the platform app. The old key is immediately invalidated. Returns the new key (one-time).
2829
+ */
2830
+ post: {
2831
+ parameters: {
2832
+ query?: never;
2833
+ header?: never;
2834
+ path: {
2835
+ appId: string;
2836
+ };
2837
+ cookie?: never;
2838
+ };
2839
+ requestBody?: {
2840
+ content: {
2841
+ "application/json": {
2842
+ /**
2843
+ * Format: date-time
2844
+ * @description Optional expiration for the new key.
2845
+ */
2846
+ api_key_expires_at?: string | null;
2847
+ };
2848
+ };
2849
+ };
2850
+ responses: {
2851
+ /** @description New key generated */
2852
+ 200: {
2853
+ headers: {
2854
+ [name: string]: unknown;
2855
+ };
2856
+ content: {
2857
+ "application/json": {
2858
+ /** @description The new API key (shown once) */
2859
+ api_key?: string;
2860
+ api_key_prefix?: string;
2861
+ /** Format: date-time */
2862
+ api_key_expires_at?: string | null;
2863
+ };
2864
+ };
2865
+ };
2866
+ /** @description Only human users can rotate platform keys */
2867
+ 403: {
2868
+ headers: {
2869
+ [name: string]: unknown;
2870
+ };
2871
+ content?: never;
2872
+ };
2873
+ };
2874
+ };
2875
+ delete?: never;
2876
+ options?: never;
2877
+ head?: never;
2878
+ patch?: never;
2879
+ trace?: never;
2880
+ };
2735
2881
  "/v1/platform/apps/{appId}/templates": {
2736
2882
  parameters: {
2737
2883
  query?: never;
@@ -2937,6 +3083,75 @@ export interface paths {
2937
3083
  patch?: never;
2938
3084
  trace?: never;
2939
3085
  };
3086
+ "/v1/platform/connections/{connectionId}/reissue-claim": {
3087
+ parameters: {
3088
+ query?: never;
3089
+ header?: never;
3090
+ path?: never;
3091
+ cookie?: never;
3092
+ };
3093
+ get?: never;
3094
+ put?: never;
3095
+ /**
3096
+ * Reissue a claim URL
3097
+ * @description Mints a fresh 10-minute claim token for an already-bootstrapped connection without re-provisioning resources. Use when the original claim URL has expired.
3098
+ */
3099
+ post: {
3100
+ parameters: {
3101
+ query?: never;
3102
+ header?: never;
3103
+ path: {
3104
+ connectionId: string;
3105
+ };
3106
+ cookie?: never;
3107
+ };
3108
+ requestBody?: {
3109
+ content: {
3110
+ "application/json": {
3111
+ /** @description Optional redirect URL after claim */
3112
+ return_to?: string;
3113
+ };
3114
+ };
3115
+ };
3116
+ responses: {
3117
+ /** @description New claim URL issued */
3118
+ 200: {
3119
+ headers: {
3120
+ [name: string]: unknown;
3121
+ };
3122
+ content: {
3123
+ "application/json": {
3124
+ claim_url?: string;
3125
+ claim_token?: string;
3126
+ /** @description Seconds until expiry (600 = 10 min) */
3127
+ expires_in?: number;
3128
+ /** Format: uuid */
3129
+ connection_id?: string;
3130
+ };
3131
+ };
3132
+ };
3133
+ /** @description Connection not yet bootstrapped */
3134
+ 400: {
3135
+ headers: {
3136
+ [name: string]: unknown;
3137
+ };
3138
+ content?: never;
3139
+ };
3140
+ /** @description Connection not found */
3141
+ 404: {
3142
+ headers: {
3143
+ [name: string]: unknown;
3144
+ };
3145
+ content?: never;
3146
+ };
3147
+ };
3148
+ };
3149
+ delete?: never;
3150
+ options?: never;
3151
+ head?: never;
3152
+ patch?: never;
3153
+ trace?: never;
3154
+ };
2940
3155
  "/v1/platform/apps/{appId}/audit": {
2941
3156
  parameters: {
2942
3157
  query?: never;
@@ -3715,6 +3930,11 @@ export interface components {
3715
3930
  */
3716
3931
  shroud_enabled: boolean;
3717
3932
  shroud_config?: components["schemas"]["ShroudConfig"];
3933
+ /**
3934
+ * Format: date-time
3935
+ * @description Optional expiration time for the agent's API key.
3936
+ */
3937
+ api_key_expires_at?: string | null;
3718
3938
  };
3719
3939
  UpdateAgentRequest: {
3720
3940
  name?: string;
@@ -3750,6 +3970,11 @@ export interface components {
3750
3970
  * Hard-capped at 3600 seconds.
3751
3971
  */
3752
3972
  federated_token_ttl_seconds?: number | null;
3973
+ /**
3974
+ * Format: date-time
3975
+ * @description Optional expiration time for the agent's API key. Set to null to clear.
3976
+ */
3977
+ api_key_expires_at?: string | null;
3753
3978
  };
3754
3979
  AgentResponse: {
3755
3980
  /** Format: uuid */
@@ -3802,6 +4027,13 @@ export interface components {
3802
4027
  eip712_default_policy?: "deny" | "allow";
3803
4028
  /** @description Whether EIP-191 personal_sign is enabled. */
3804
4029
  message_signing_enabled?: boolean;
4030
+ /**
4031
+ * Format: date-time
4032
+ * @description Optional expiration time for the agent's API key.
4033
+ */
4034
+ api_key_expires_at?: string | null;
4035
+ /** @description Agent's Ethereum EOA address (used as Safe signer for smart accounts and Intents API). */
4036
+ evm_address?: string | null;
3805
4037
  /** Format: date-time */
3806
4038
  created_at: string;
3807
4039
  /** Format: date-time */
@@ -4814,6 +5046,79 @@ export interface components {
4814
5046
  /** Format: date-time */
4815
5047
  resolved_at?: string;
4816
5048
  };
5049
+ CreateTreasuryProposalRequest: {
5050
+ /** @description Destination address (0x-prefixed) */
5051
+ to_address: string;
5052
+ /** @description Transaction value in wei */
5053
+ value_wei: string;
5054
+ /** @description Chain name (e.g. ethereum, base) */
5055
+ chain: string;
5056
+ /** @description Numeric chain ID (alternative to chain name) */
5057
+ chain_id?: number;
5058
+ /** @description Hex-encoded calldata (optional) */
5059
+ data_hex?: string;
5060
+ /**
5061
+ * @description Safe operation type (0 = Call, 1 = DelegateCall)
5062
+ * @default 0
5063
+ */
5064
+ operation: number;
5065
+ };
5066
+ SignTreasuryProposalRequest: {
5067
+ /**
5068
+ * @description Whether to approve or reject the proposal
5069
+ * @enum {string}
5070
+ */
5071
+ decision: "approve" | "reject";
5072
+ /** @description EIP-712 signature (hex). If omitted, server signs with caller's key. */
5073
+ signature?: string;
5074
+ };
5075
+ TreasuryProposalResponse: {
5076
+ /** Format: uuid */
5077
+ id?: string;
5078
+ /** Format: uuid */
5079
+ treasury_id?: string;
5080
+ /** Format: uuid */
5081
+ proposed_by?: string;
5082
+ /** @enum {string} */
5083
+ proposed_by_type?: "user" | "agent";
5084
+ chain?: string;
5085
+ chain_id?: number;
5086
+ safe_address?: string;
5087
+ to_address?: string;
5088
+ value_wei?: string;
5089
+ data_hex?: string | null;
5090
+ operation?: number;
5091
+ safe_tx_hash?: string | null;
5092
+ nonce?: number | null;
5093
+ /** @enum {string} */
5094
+ status?: "pending" | "approved" | "executing" | "executed" | "rejected" | "expired";
5095
+ threshold?: number;
5096
+ /** Format: date-time */
5097
+ expires_at?: string | null;
5098
+ executed_tx_hash?: string | null;
5099
+ /** Format: date-time */
5100
+ executed_at?: string | null;
5101
+ signatures?: components["schemas"]["ProposalSignatureResponse"][];
5102
+ /** Format: date-time */
5103
+ created_at?: string;
5104
+ };
5105
+ ProposalSignatureResponse: {
5106
+ /** Format: uuid */
5107
+ id?: string;
5108
+ /** Format: uuid */
5109
+ signer_id?: string;
5110
+ /** @enum {string} */
5111
+ signer_type?: "user" | "agent";
5112
+ signer_address?: string;
5113
+ signature?: string;
5114
+ /** @enum {string} */
5115
+ decision?: "approve" | "reject";
5116
+ /** Format: date-time */
5117
+ created_at?: string;
5118
+ };
5119
+ TreasuryProposalListResponse: {
5120
+ proposals?: components["schemas"]["TreasuryProposalResponse"][];
5121
+ };
4817
5122
  GenerateTreasuryWalletsRequest: {
4818
5123
  /** @description Chains to generate wallets for (e.g. ["ethereum", "solana"]). Omit for all supported chains. */
4819
5124
  chains?: string[];
@@ -4979,6 +5284,11 @@ export interface components {
4979
5284
  */
4980
5285
  auth_mode: "silent" | "user_signin" | "configurable";
4981
5286
  max_connected_users?: number | null;
5287
+ /**
5288
+ * Format: date-time
5289
+ * @description Optional expiration time for the platform API key.
5290
+ */
5291
+ api_key_expires_at?: string | null;
4982
5292
  };
4983
5293
  UpdatePlatformAppRequest: {
4984
5294
  name?: string;
@@ -4996,6 +5306,11 @@ export interface components {
4996
5306
  auth_mode?: "silent" | "user_signin" | "configurable";
4997
5307
  max_connected_users?: number | null;
4998
5308
  is_active?: boolean;
5309
+ /**
5310
+ * Format: date-time
5311
+ * @description Optional expiration time for the platform API key. Set to null to clear.
5312
+ */
5313
+ api_key_expires_at?: string | null;
4999
5314
  };
5000
5315
  PlatformAppResponse: {
5001
5316
  /** Format: uuid */
@@ -5016,6 +5331,16 @@ export interface components {
5016
5331
  auth_mode?: string;
5017
5332
  max_connected_users?: number | null;
5018
5333
  connected_users?: number;
5334
+ /**
5335
+ * Format: date-time
5336
+ * @description When the platform API key expires.
5337
+ */
5338
+ api_key_expires_at?: string | null;
5339
+ /**
5340
+ * Format: date-time
5341
+ * @description When the platform API key was last rotated.
5342
+ */
5343
+ api_key_rotated_at?: string | null;
5019
5344
  /** Format: date-time */
5020
5345
  created_at?: string;
5021
5346
  /** Format: date-time */
@@ -8769,6 +9094,167 @@ export interface operations {
8769
9094
  404: components["responses"]["NotFound"];
8770
9095
  };
8771
9096
  };
9097
+ listTreasuryProposals: {
9098
+ parameters: {
9099
+ query?: {
9100
+ status?: "pending" | "approved" | "executing" | "executed" | "rejected" | "expired";
9101
+ };
9102
+ header?: never;
9103
+ path: {
9104
+ treasury_id: string;
9105
+ };
9106
+ cookie?: never;
9107
+ };
9108
+ requestBody?: never;
9109
+ responses: {
9110
+ /** @description Proposal list */
9111
+ 200: {
9112
+ headers: {
9113
+ [name: string]: unknown;
9114
+ };
9115
+ content: {
9116
+ "application/json": components["schemas"]["TreasuryProposalListResponse"];
9117
+ };
9118
+ };
9119
+ 401: components["responses"]["Unauthorized"];
9120
+ 403: components["responses"]["Forbidden"];
9121
+ };
9122
+ };
9123
+ createTreasuryProposal: {
9124
+ parameters: {
9125
+ query?: never;
9126
+ header?: never;
9127
+ path: {
9128
+ treasury_id: string;
9129
+ };
9130
+ cookie?: never;
9131
+ };
9132
+ requestBody: {
9133
+ content: {
9134
+ "application/json": components["schemas"]["CreateTreasuryProposalRequest"];
9135
+ };
9136
+ };
9137
+ responses: {
9138
+ /** @description Proposal created */
9139
+ 201: {
9140
+ headers: {
9141
+ [name: string]: unknown;
9142
+ };
9143
+ content: {
9144
+ "application/json": components["schemas"]["TreasuryProposalResponse"];
9145
+ };
9146
+ };
9147
+ 400: components["responses"]["BadRequest"];
9148
+ 401: components["responses"]["Unauthorized"];
9149
+ 403: components["responses"]["Forbidden"];
9150
+ };
9151
+ };
9152
+ getTreasuryProposal: {
9153
+ parameters: {
9154
+ query?: never;
9155
+ header?: never;
9156
+ path: {
9157
+ treasury_id: string;
9158
+ proposal_id: string;
9159
+ };
9160
+ cookie?: never;
9161
+ };
9162
+ requestBody?: never;
9163
+ responses: {
9164
+ /** @description Proposal details */
9165
+ 200: {
9166
+ headers: {
9167
+ [name: string]: unknown;
9168
+ };
9169
+ content: {
9170
+ "application/json": components["schemas"]["TreasuryProposalResponse"];
9171
+ };
9172
+ };
9173
+ 401: components["responses"]["Unauthorized"];
9174
+ 404: components["responses"]["NotFound"];
9175
+ };
9176
+ };
9177
+ cancelTreasuryProposal: {
9178
+ parameters: {
9179
+ query?: never;
9180
+ header?: never;
9181
+ path: {
9182
+ treasury_id: string;
9183
+ proposal_id: string;
9184
+ };
9185
+ cookie?: never;
9186
+ };
9187
+ requestBody?: never;
9188
+ responses: {
9189
+ /** @description Proposal cancelled */
9190
+ 204: {
9191
+ headers: {
9192
+ [name: string]: unknown;
9193
+ };
9194
+ content?: never;
9195
+ };
9196
+ 401: components["responses"]["Unauthorized"];
9197
+ 403: components["responses"]["Forbidden"];
9198
+ 404: components["responses"]["NotFound"];
9199
+ };
9200
+ };
9201
+ signTreasuryProposal: {
9202
+ parameters: {
9203
+ query?: never;
9204
+ header?: never;
9205
+ path: {
9206
+ treasury_id: string;
9207
+ proposal_id: string;
9208
+ };
9209
+ cookie?: never;
9210
+ };
9211
+ requestBody: {
9212
+ content: {
9213
+ "application/json": components["schemas"]["SignTreasuryProposalRequest"];
9214
+ };
9215
+ };
9216
+ responses: {
9217
+ /** @description Signature recorded (may include executed_tx_hash if auto-executed) */
9218
+ 200: {
9219
+ headers: {
9220
+ [name: string]: unknown;
9221
+ };
9222
+ content: {
9223
+ "application/json": components["schemas"]["TreasuryProposalResponse"];
9224
+ };
9225
+ };
9226
+ 400: components["responses"]["BadRequest"];
9227
+ 401: components["responses"]["Unauthorized"];
9228
+ 403: components["responses"]["Forbidden"];
9229
+ 404: components["responses"]["NotFound"];
9230
+ };
9231
+ };
9232
+ executeTreasuryProposal: {
9233
+ parameters: {
9234
+ query?: never;
9235
+ header?: never;
9236
+ path: {
9237
+ treasury_id: string;
9238
+ proposal_id: string;
9239
+ };
9240
+ cookie?: never;
9241
+ };
9242
+ requestBody?: never;
9243
+ responses: {
9244
+ /** @description Proposal executed */
9245
+ 200: {
9246
+ headers: {
9247
+ [name: string]: unknown;
9248
+ };
9249
+ content: {
9250
+ "application/json": components["schemas"]["TreasuryProposalResponse"];
9251
+ };
9252
+ };
9253
+ 401: components["responses"]["Unauthorized"];
9254
+ 403: components["responses"]["Forbidden"];
9255
+ 404: components["responses"]["NotFound"];
9256
+ };
9257
+ };
8772
9258
  generateTreasuryWallets: {
8773
9259
  parameters: {
8774
9260
  query?: never;