@1claw/sdk 0.47.1 → 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.
|
|
2526
|
-
*
|
|
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.
|
|
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;
|
|
@@ -8095,6 +8095,7 @@ export interface components {
|
|
|
8095
8095
|
vaults?: components["schemas"]["UsageMeter"];
|
|
8096
8096
|
team_members?: components["schemas"]["UsageMeter"];
|
|
8097
8097
|
intent_transactions?: components["schemas"]["UsageMeter"];
|
|
8098
|
+
wallets?: components["schemas"]["UsageMeter"];
|
|
8098
8099
|
shares?: components["schemas"]["UsageMeter"];
|
|
8099
8100
|
};
|
|
8100
8101
|
};
|