@1claw/sdk 0.47.0 → 0.47.3

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
@@ -792,6 +792,40 @@ Shroud enforces the agent's `allowed_models` and `denied_models` restrictions au
792
792
 
793
793
  See the [Shroud Security Guide](https://docs.1claw.xyz/docs/guides/shroud) for full configuration options.
794
794
 
795
+ ## v0.47 — Turnkey Parity
796
+
797
+ New SDK resources for enterprise and treasury features:
798
+
799
+ ```typescript
800
+ // Unified portfolio across treasury wallets, signing keys, and smart accounts
801
+ const portfolio = await client.portfolio.get({ include_tokens: true });
802
+
803
+ // Cedar declarative policies (Team+ tier)
804
+ await client.cedarPolicies.create({ name: "allow-read", cedar_text: "permit(...);" });
805
+ await client.cedarPolicies.test({ principal_type: "agent", action: "read", ... });
806
+
807
+ // OPA Rego policies (Business+ tier)
808
+ await client.opaPolicies.create({ name: "deny-export", rego_source: "package oneclaw\n..." });
809
+
810
+ // Sub-organizations (Enterprise hierarchy)
811
+ await client.subOrgs.create({ name: "Engineering" });
812
+ await client.subOrgs.list();
813
+
814
+ // Import existing Gnosis Safe smart accounts
815
+ await client.agents.importSmartAccount(agentId, {
816
+ chain: "ethereum",
817
+ chain_id: 1,
818
+ safe_address: "0x...",
819
+ verify: true,
820
+ });
821
+
822
+ // BYOK signing key import (human-only, requires password re-auth)
823
+ await client.signingKeys.import(agentId, "ethereum", {
824
+ private_key: "0x...",
825
+ format: "hex",
826
+ }, { authConfirm: "your-password" });
827
+ ```
828
+
795
829
  ## OpenAPI Types
796
830
 
797
831
  The SDK's request types are generated from the **OpenAPI 3.1** spec, published as [@1claw/openapi-spec](https://www.npmjs.com/package/@1claw/openapi-spec). Advanced users can access the raw generated types:
@@ -2522,8 +2522,8 @@ export interface paths {
2522
2522
  * Generate multi-chain wallets for the authenticated user
2523
2523
  * @description Generates keypairs for the requested chains (or all supported chains if omitted).
2524
2524
  * Private keys are stored in a per-org `__treasury-keys` vault with tier-appropriate
2525
- * MPC custody. Skips chains where the user already has an active wallet. Requires
2526
- * Pro or higher billing tier. Human users only — agents get 403.
2525
+ * MPC custody. Skips chains where the user already has an active wallet. Available
2526
+ * on all tiers (counts toward wallet quota). Human users only — agents get 403.
2527
2527
  */
2528
2528
  post: operations["generateTreasuryWallets"];
2529
2529
  delete?: never;
@@ -2603,7 +2603,7 @@ export interface paths {
2603
2603
  * Rotate the user's wallet key for a chain
2604
2604
  * @description Generates a new keypair, deactivates the old wallet, and creates a
2605
2605
  * new active wallet. The old private key version is retained in the
2606
- * vault for audit. Requires Pro or higher.
2606
+ * vault for audit. Counts toward wallet quota (does not require a paid plan).
2607
2607
  */
2608
2608
  post: operations["rotateTreasuryWallet"];
2609
2609
  delete?: never;
@@ -6120,6 +6120,26 @@ export interface paths {
6120
6120
  patch?: never;
6121
6121
  trace?: never;
6122
6122
  };
6123
+ "/v1/org/sub-orgs/{sub_org_id}/permissions/{permission}": {
6124
+ parameters: {
6125
+ query?: never;
6126
+ header?: never;
6127
+ path?: never;
6128
+ cookie?: never;
6129
+ };
6130
+ get?: never;
6131
+ put?: never;
6132
+ post?: never;
6133
+ /**
6134
+ * Revoke a sub-organization permission
6135
+ * @description Revoke a specific permission scope from the sub-organization.
6136
+ */
6137
+ delete: operations["revokeSubOrgPermission"];
6138
+ options?: never;
6139
+ head?: never;
6140
+ patch?: never;
6141
+ trace?: never;
6142
+ };
6123
6143
  "/v1/org/sub-orgs/{sub_org_id}/wallets/generate": {
6124
6144
  parameters: {
6125
6145
  query?: never;
@@ -8075,6 +8095,7 @@ export interface components {
8075
8095
  vaults?: components["schemas"]["UsageMeter"];
8076
8096
  team_members?: components["schemas"]["UsageMeter"];
8077
8097
  intent_transactions?: components["schemas"]["UsageMeter"];
8098
+ wallets?: components["schemas"]["UsageMeter"];
8078
8099
  shares?: components["schemas"]["UsageMeter"];
8079
8100
  };
8080
8101
  };
@@ -10173,6 +10194,18 @@ export interface components {
10173
10194
  */
10174
10195
  verify: boolean;
10175
10196
  };
10197
+ ImportSmartAccountResponse: {
10198
+ /** Format: uuid */
10199
+ id?: string;
10200
+ /** Format: uuid */
10201
+ agent_id?: string;
10202
+ chain?: string;
10203
+ chain_id?: number;
10204
+ safe_address?: string;
10205
+ nonce?: number | null;
10206
+ /** Format: date-time */
10207
+ created_at?: string;
10208
+ };
10176
10209
  };
10177
10210
  responses: {
10178
10211
  /** @description Invalid request */
@@ -18725,6 +18758,30 @@ export interface operations {
18725
18758
  404: components["responses"]["NotFound"];
18726
18759
  };
18727
18760
  };
18761
+ revokeSubOrgPermission: {
18762
+ parameters: {
18763
+ query?: never;
18764
+ header?: never;
18765
+ path: {
18766
+ sub_org_id: string;
18767
+ /** @description The permission scope to revoke */
18768
+ permission: string;
18769
+ };
18770
+ cookie?: never;
18771
+ };
18772
+ requestBody?: never;
18773
+ responses: {
18774
+ /** @description Permission revoked */
18775
+ 204: {
18776
+ headers: {
18777
+ [name: string]: unknown;
18778
+ };
18779
+ content?: never;
18780
+ };
18781
+ 401: components["responses"]["Unauthorized"];
18782
+ 404: components["responses"]["NotFound"];
18783
+ };
18784
+ };
18728
18785
  generateSubOrgWallets: {
18729
18786
  parameters: {
18730
18787
  query?: never;
@@ -18754,7 +18811,12 @@ export interface operations {
18754
18811
  };
18755
18812
  getPortfolio: {
18756
18813
  parameters: {
18757
- query?: never;
18814
+ query?: {
18815
+ /** @description Comma-separated list of chain names to filter by (e.g. "ethereum,solana") */
18816
+ chains?: string;
18817
+ /** @description Whether to include token balances alongside native balances */
18818
+ include_tokens?: boolean;
18819
+ };
18758
18820
  header?: never;
18759
18821
  path?: never;
18760
18822
  cookie?: never;
@@ -18793,7 +18855,9 @@ export interface operations {
18793
18855
  headers: {
18794
18856
  [name: string]: unknown;
18795
18857
  };
18796
- content?: never;
18858
+ content: {
18859
+ "application/json": components["schemas"]["ImportSmartAccountResponse"];
18860
+ };
18797
18861
  };
18798
18862
  400: components["responses"]["BadRequest"];
18799
18863
  401: components["responses"]["Unauthorized"];