@1claw/sdk 0.23.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -79,7 +79,7 @@ await client.auth.resetPassword({ token: "...", new_password: "..." });
79
79
  | `client.vault` | `create`, `get`, `list`, `delete`, `enableMpc`, `disableMpc` |
80
80
  | `client.secrets` | `set`, `get`, `delete`, `list`, `rotate` |
81
81
  | `client.access` | `grantHuman`, `grantAgent`, `update`, `revoke`, `listGrants` |
82
- | `client.agents` | `enroll` (also `AgentsResource.enroll(baseUrl, …)` static), `create`, `getSelf`, `get`, `list`, `update`, `delete`, `rotateKey`, `rotateIdentityKeys`, `submitTransaction`, `signTransaction`, `getTransaction`, `listTransactions`, `simulateTransaction`, `simulateBundle`, `sign` |
82
+ | `client.agents` | `enroll` (also `AgentsResource.enroll(baseUrl, …)` static), `create`, `getSelf`, `get`, `list`, `update`, `delete`, `rotateKey`, `submitTransaction`, `signTransaction`, `getTransaction`, `listTransactions`, `simulateTransaction`, `simulateBundle`, `sign` |
83
83
  | `client.chains` | `list`, `get`, `adminList`, `create`, `update`, `delete` |
84
84
  | `client.sharing` | `create`, `access`, `listOutbound`, `listInbound`, `accept`, `decline`, `revoke` |
85
85
  | `client.approvals` | `request`, `list`, `approve`, `deny`, `check`, `subscribe` |
@@ -90,8 +90,8 @@ await client.auth.resetPassword({ token: "...", new_password: "..." });
90
90
  | `client.apiKeys` | `create`, `list`, `revoke` |
91
91
  | `client.treasury` | `create`, `list`, `get`, `update`, `delete`, `addSigner`, `removeSigner`, `requestAccess`, `listAccessRequests`, `approveAccess`, `denyAccess` |
92
92
  | `client.treasuryWallets` | `generateWallets`, `listWallets`, `getWallet`, `exportWallet`, `rotateWallet`, `deactivateWallet` |
93
- | `client.signingKeys` | `create`, `list`, `rotate`, `deactivate` |
94
- | `client.platform` | `createApp`, `listApps`, `getApp`, `updateApp`, `deleteApp`, `createTemplate`, `listTemplates`, `upsertUser`, `bootstrapUser`, `listConnectedApps` |
93
+ | `client.signingKeys` | `create`, `list`, `rotate`, `deactivate`, `export` |
94
+ | `client.platform` | `createApp`, `listApps`, `getApp`, `updateApp`, `deleteApp`, `createTemplate`, `listTemplates`, `upsertUser`, `listUsers`, `bootstrapUser`, `listConnectedApps`, `disconnectApp` |
95
95
  | `client.x402` | `getPaymentRequirement`, `pay`, `verifyReceipt`, `withPayment` |
96
96
 
97
97
  **Agent create response:** `agents.create()` returns `{ agent: AgentResponse, api_key?: string }`. The `api_key` is only present for `auth_method: "api_key"` and is shown once — use `data.agent.id` and `data.api_key` from the response.
@@ -249,7 +249,7 @@ const oidcJwt = tokenRes.data?.access_token; // RS256-signed; ~15 min default TT
249
249
 
250
250
  The acting agent must have `federation_enabled: true` and the `audience` must be on its `federation_audiences` allowlist (set via dashboard or `client.agents.update`). Every active KMS key version is published in JWKS, so verifiers reject unknown `kid`s automatically when 1claw rotates keys.
251
251
 
252
- End-to-end Anthropic WIF demo: [`examples/anthropic-wif`](https://github.com/1clawAI/1claw-examples/tree/main/anthropic-wif).
252
+ End-to-end Anthropic WIF demo: see the [`examples/anthropic-wif`](https://github.com/1clawAI/1claw-examples/tree/main/anthropic-wif) repo and [`internal-docs/runbooks/oidc-federation.md`](../../internal-docs/runbooks/oidc-federation.md).
253
253
 
254
254
  ## Customer-Managed Encryption Keys (CMEK)
255
255
 
@@ -1119,6 +1119,28 @@ export interface paths {
1119
1119
  patch?: never;
1120
1120
  trace?: never;
1121
1121
  };
1122
+ "/v1/agents/{agent_id}/signing-keys/{chain}/export": {
1123
+ parameters: {
1124
+ query?: never;
1125
+ header?: never;
1126
+ path?: never;
1127
+ cookie?: never;
1128
+ };
1129
+ get?: never;
1130
+ put?: never;
1131
+ /**
1132
+ * Export a signing key (private key included)
1133
+ * @description Export the private key for an agent's signing key. Requires re-authentication
1134
+ * via the X-Auth-Confirm header containing the user's account password.
1135
+ * Human users only — agents cannot export keys.
1136
+ */
1137
+ post: operations["exportSigningKey"];
1138
+ delete?: never;
1139
+ options?: never;
1140
+ head?: never;
1141
+ patch?: never;
1142
+ trace?: never;
1143
+ };
1122
1144
  "/v1/agents/{agent_id}/sign": {
1123
1145
  parameters: {
1124
1146
  query?: never;
@@ -1856,7 +1878,8 @@ export interface paths {
1856
1878
  /**
1857
1879
  * Export the private key for a treasury wallet
1858
1880
  * @description Returns the raw private key hex for the user's active wallet on
1859
- * the given chain. Audit-logged as `treasury_wallet.export`.
1881
+ * the given chain. Requires re-authentication via the `X-Auth-Confirm`
1882
+ * header (account password). Audit-logged as `treasury_wallet.export`.
1860
1883
  * Human users only.
1861
1884
  */
1862
1885
  post: operations["exportTreasuryWallet"];
@@ -2756,6 +2779,104 @@ export interface paths {
2756
2779
  patch?: never;
2757
2780
  trace?: never;
2758
2781
  };
2782
+ "/v1/platform/claim/{token}": {
2783
+ parameters: {
2784
+ query?: never;
2785
+ header?: never;
2786
+ path?: never;
2787
+ cookie?: never;
2788
+ };
2789
+ /**
2790
+ * Preview a claim token
2791
+ * @description Verify a claim token and preview what was provisioned (app name, vaults, agents, policies).
2792
+ * Public endpoint — the token itself is the authentication.
2793
+ */
2794
+ get: {
2795
+ parameters: {
2796
+ query?: never;
2797
+ header?: never;
2798
+ path: {
2799
+ /** @description The `ct_` prefixed claim token from the bootstrap response */
2800
+ token: string;
2801
+ };
2802
+ cookie?: never;
2803
+ };
2804
+ requestBody?: never;
2805
+ responses: {
2806
+ /** @description Claim preview */
2807
+ 200: {
2808
+ headers: {
2809
+ [name: string]: unknown;
2810
+ };
2811
+ content: {
2812
+ "application/json": components["schemas"]["ClaimPreviewResponse"];
2813
+ };
2814
+ };
2815
+ /** @description Invalid or expired claim token */
2816
+ 404: {
2817
+ headers: {
2818
+ [name: string]: unknown;
2819
+ };
2820
+ content?: never;
2821
+ };
2822
+ };
2823
+ };
2824
+ put?: never;
2825
+ /**
2826
+ * Redeem a claim token
2827
+ * @description Redeem a one-time claim token, marking the connection as claimed.
2828
+ * Public endpoint — the token itself is the authentication. Returns 409 if already claimed, 410 if expired.
2829
+ */
2830
+ post: {
2831
+ parameters: {
2832
+ query?: never;
2833
+ header?: never;
2834
+ path: {
2835
+ /** @description The `ct_` prefixed claim token from the bootstrap response */
2836
+ token: string;
2837
+ };
2838
+ cookie?: never;
2839
+ };
2840
+ requestBody?: never;
2841
+ responses: {
2842
+ /** @description Claim redeemed */
2843
+ 200: {
2844
+ headers: {
2845
+ [name: string]: unknown;
2846
+ };
2847
+ content: {
2848
+ "application/json": components["schemas"]["ClaimRedeemResponse"];
2849
+ };
2850
+ };
2851
+ /** @description Invalid claim token */
2852
+ 404: {
2853
+ headers: {
2854
+ [name: string]: unknown;
2855
+ };
2856
+ content?: never;
2857
+ };
2858
+ /** @description Claim token already used */
2859
+ 409: {
2860
+ headers: {
2861
+ [name: string]: unknown;
2862
+ };
2863
+ content?: never;
2864
+ };
2865
+ /** @description Claim token has expired */
2866
+ 410: {
2867
+ headers: {
2868
+ [name: string]: unknown;
2869
+ };
2870
+ content?: never;
2871
+ };
2872
+ };
2873
+ };
2874
+ delete?: never;
2875
+ options?: never;
2876
+ head?: never;
2877
+ patch?: never;
2878
+ trace?: never;
2879
+ };
2759
2880
  }
2760
2881
  export type webhooks = Record<string, never>;
2761
2882
  export interface components {
@@ -4491,6 +4612,8 @@ export interface components {
4491
4612
  oidc_jwks_url?: string;
4492
4613
  /** Format: uri */
4493
4614
  oidc_issuer?: string;
4615
+ /** @description Expected audience claim for OIDC token validation */
4616
+ oidc_audience?: string;
4494
4617
  redirect_uris?: string[];
4495
4618
  /**
4496
4619
  * @default platform_pays
@@ -4510,6 +4633,8 @@ export interface components {
4510
4633
  logo_url?: string;
4511
4634
  oidc_jwks_url?: string;
4512
4635
  oidc_issuer?: string;
4636
+ /** @description Expected audience claim for OIDC token validation */
4637
+ oidc_audience?: string;
4513
4638
  redirect_uris?: string[];
4514
4639
  webhook_url?: string;
4515
4640
  /** @enum {string} */
@@ -4529,6 +4654,8 @@ export interface components {
4529
4654
  api_key_prefix?: string;
4530
4655
  oidc_jwks_url?: string | null;
4531
4656
  oidc_issuer?: string | null;
4657
+ /** @description Expected audience claim for OIDC token validation */
4658
+ oidc_audience?: string | null;
4532
4659
  redirect_uris?: string[];
4533
4660
  webhook_url?: string | null;
4534
4661
  is_active?: boolean;
@@ -4548,7 +4675,15 @@ export interface components {
4548
4675
  CreateTemplateRequest: {
4549
4676
  name: string;
4550
4677
  description?: string;
4551
- /** @description Template specification defining vault, agents, and policies to bootstrap. */
4678
+ /**
4679
+ * @description Template specification defining vault, agents, policies, and signing keys to bootstrap.
4680
+ * Top-level fields: `vault` (object with name, description), `agents` (array of agent specs
4681
+ * with name, description, shroud_enabled, intents, shroud_config), `policies` (array with
4682
+ * vault_ref, principal_ref, paths, permissions, conditions), and `signing_keys` (array of
4683
+ * `{ chain }` objects — supported chains: ethereum, bitcoin, solana, xrp, cardano, tron).
4684
+ * When `signing_keys` is present, HSM-backed signing keys are auto-provisioned for the
4685
+ * bootstrapped agent.
4686
+ */
4552
4687
  spec: Record<string, never>;
4553
4688
  };
4554
4689
  PlatformTemplateResponse: {
@@ -4639,6 +4774,28 @@ export interface components {
4639
4774
  /** Format: date-time */
4640
4775
  created_at?: string;
4641
4776
  };
4777
+ ClaimPreviewResponse: {
4778
+ app_name?: string;
4779
+ app_slug?: string;
4780
+ app_logo_url?: string | null;
4781
+ auth_mode?: string;
4782
+ vault_ids?: string[];
4783
+ agent_ids?: string[];
4784
+ policy_count?: number;
4785
+ status?: string;
4786
+ already_claimed?: boolean;
4787
+ expired?: boolean;
4788
+ return_to?: string | null;
4789
+ };
4790
+ ClaimRedeemResponse: {
4791
+ status?: string;
4792
+ /** Format: uuid */
4793
+ connection_id?: string;
4794
+ vault_ids?: string[];
4795
+ agent_ids?: string[];
4796
+ return_to?: string | null;
4797
+ dashboard_url?: string;
4798
+ };
4642
4799
  };
4643
4800
  responses: {
4644
4801
  /** @description Invalid request */
@@ -6598,6 +6755,43 @@ export interface operations {
6598
6755
  404: components["responses"]["NotFound"];
6599
6756
  };
6600
6757
  };
6758
+ exportSigningKey: {
6759
+ parameters: {
6760
+ query?: never;
6761
+ header: {
6762
+ /** @description Account password for re-authentication */
6763
+ "X-Auth-Confirm": string;
6764
+ };
6765
+ path: {
6766
+ agent_id: components["parameters"]["AgentId"];
6767
+ chain: string;
6768
+ };
6769
+ cookie?: never;
6770
+ };
6771
+ requestBody?: never;
6772
+ responses: {
6773
+ /** @description Signing key exported successfully */
6774
+ 200: {
6775
+ headers: {
6776
+ [name: string]: unknown;
6777
+ };
6778
+ content: {
6779
+ "application/json": {
6780
+ chain: string;
6781
+ curve: string;
6782
+ public_key: string;
6783
+ address?: string;
6784
+ private_key: string;
6785
+ key_version: number;
6786
+ /** Format: uuid */
6787
+ agent_id: string;
6788
+ };
6789
+ };
6790
+ };
6791
+ 403: components["responses"]["Forbidden"];
6792
+ 404: components["responses"]["NotFound"];
6793
+ };
6794
+ };
6601
6795
  signIntent: {
6602
6796
  parameters: {
6603
6797
  query?: never;
@@ -7756,7 +7950,10 @@ export interface operations {
7756
7950
  exportTreasuryWallet: {
7757
7951
  parameters: {
7758
7952
  query?: never;
7759
- header?: never;
7953
+ header: {
7954
+ /** @description Account password for re-authentication */
7955
+ "X-Auth-Confirm": string;
7956
+ };
7760
7957
  path: {
7761
7958
  chain: string;
7762
7959
  };