@1claw/sdk 0.55.0 → 0.57.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 +65 -1
- package/dist/generated/api-types.d.ts +1904 -280
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/resources/agents.d.ts +95 -0
- package/dist/resources/agents.d.ts.map +1 -1
- package/dist/resources/agents.js +45 -0
- package/dist/resources/agents.js.map +1 -1
- package/dist/resources/auth.d.ts +10 -0
- package/dist/resources/auth.d.ts.map +1 -1
- package/dist/resources/auth.js +8 -0
- package/dist/resources/auth.js.map +1 -1
- package/dist/resources/org.d.ts +35 -1
- package/dist/resources/org.d.ts.map +1 -1
- package/dist/resources/org.js +20 -2
- package/dist/resources/org.js.map +1 -1
- package/dist/resources/platform.d.ts +83 -0
- package/dist/resources/platform.d.ts.map +1 -1
- package/dist/resources/platform.js +24 -0
- package/dist/resources/platform.js.map +1 -1
- package/dist/resources/treasury-wallets.d.ts +8 -0
- package/dist/resources/treasury-wallets.d.ts.map +1 -1
- package/dist/resources/treasury-wallets.js +8 -0
- package/dist/resources/treasury-wallets.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,7 +106,8 @@ await client.auth.verifyEmailChange({ code: "123456" });
|
|
|
106
106
|
| `client.fiat` | `createOnrampSession`, `initiateOfframp` |
|
|
107
107
|
| `client.signingKeys` | `create`, `list`, `rotate`, `deactivate`, `export` |
|
|
108
108
|
| `client.agents` (Bankr) | `leaseBankrKey`, `listBankrKeys`, `revokeBankrKey` — privileged; `api_key` omitted for agent JWTs (use Shroud) |
|
|
109
|
-
| `client.platform` | `createApp`, `listApps`, `getApp`, `updateApp`, `deleteApp`, `rotateKey`, `rotateWebhookSecret`, `getAppStats`, `marketplace`, `createTemplate`, `listTemplates`, `upsertUser`, `listUsers`, `bootstrapUser`, `reissueClaim`, `claimPreview`, `claimRedeem`, `listConnectedApps`, `disconnectApp`, `grantAccess`, `listGrants`, `revokeGrant`, `createSpendPolicy`, `listSpendPolicies`, `setUserSpendPolicy`, `deleteSpendPolicy`, `updateConnectionDelegation
|
|
109
|
+
| `client.platform` | `createApp`, `listApps`, `getApp`, `updateApp`, `deleteApp`, `rotateKey`, `rotateWebhookSecret`, `getAppStats`, `marketplace`, `createTemplate`, `listTemplates`, `upsertUser`, `listUsers`, `bootstrapUser`, `reissueClaim`, `claimPreview`, `claimRedeem`, `listConnectedApps`, `disconnectApp`, `grantAccess`, `listGrants`, `revokeGrant`, `createSpendPolicy`, `listSpendPolicies`, `setUserSpendPolicy`, `deleteSpendPolicy`, `updateConnectionDelegation`, **`siweChallenge`**, **`getConnection`**, **`getConnectionUsage`**, **`listEntitlements`**, **`refreshEntitlements`**, **`previewTemplate`** |
|
|
110
|
+
| `client.treasuryWallets` | … **`getInferenceBudget`** (platform-connected users) |
|
|
110
111
|
| `client.devices` | `register`, `list`, `delete`, `challenge`, `attest`, `setPushToken` |
|
|
111
112
|
| `client.passkeys` | `list`, `registerBegin`, `registerComplete`, `assertBegin`, `assertComplete`, `delete` |
|
|
112
113
|
| `client.risk` | `listEvents`, `getVerdict`, `listVerdicts`, `createHoneytoken`, `listHoneytokens`, `deleteHoneytoken` |
|
|
@@ -306,6 +307,31 @@ console.log(signRes.data?.from); // derived sender address
|
|
|
306
307
|
|
|
307
308
|
All agent guardrails (allowlists, value caps, daily limits) are enforced exactly as for submit. The transaction is recorded for audit and daily-limit tracking with `status: "sign_only"`.
|
|
308
309
|
|
|
310
|
+
### Graduated HITL & v0.55 guardrails
|
|
311
|
+
|
|
312
|
+
Configure graduated human-in-the-loop thresholds on agents with Intents API enabled:
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
await client.agents.update(agentId, {
|
|
316
|
+
tx_approval_policy: {
|
|
317
|
+
require_above_native: { ethereum: "0.1", base: "0.05" },
|
|
318
|
+
require_for_new_recipients: true,
|
|
319
|
+
require_for_unlimited_approvals: true,
|
|
320
|
+
},
|
|
321
|
+
typed_data_policy: "approve", // EIP-712 → 202 awaiting_approval
|
|
322
|
+
simulation_failure_policy: "approve", // Tenderly revert → HITL
|
|
323
|
+
raw_signing_policy: "approve", // allow | deny | approve
|
|
324
|
+
tx_block_unlimited_approvals: true,
|
|
325
|
+
tx_max_value_usd: "1000",
|
|
326
|
+
tx_daily_limit_usd: "5000",
|
|
327
|
+
allow_erc4337: true,
|
|
328
|
+
allow_eip7702: false,
|
|
329
|
+
clear_auto_suspended: true, // owner/admin — clear circuit breaker
|
|
330
|
+
});
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Org emergency freeze (owner/admin): `POST /v1/org/freeze` and `POST /v1/org/unfreeze`.
|
|
334
|
+
|
|
309
335
|
### Non-EVM transactions (Bitcoin, Solana, XRP, Cardano, Tron)
|
|
310
336
|
|
|
311
337
|
The same `submitTransaction` / `signTransaction` methods accept chain-specific fields. Values are in the chain's native unit (BTC, SOL, XRP, ADA, TRX):
|
|
@@ -936,6 +962,44 @@ await client.signingKeys.import(agentId, "ethereum", {
|
|
|
936
962
|
}, { authConfirm: "your-password" });
|
|
937
963
|
```
|
|
938
964
|
|
|
965
|
+
## v0.56 — Safe accounts, guardrail governance, HFA
|
|
966
|
+
|
|
967
|
+
Phase 5 Safe foundation and v0.56 guardrail governance APIs:
|
|
968
|
+
|
|
969
|
+
```typescript
|
|
970
|
+
// Agent on-chain accounts (EOA + counterfactual Safe)
|
|
971
|
+
const { data: accounts } = await client.agents.listAccounts(agentId);
|
|
972
|
+
await client.agents.migrateToSafe(agentId, { chain: "ethereum", deprecate_eoa: true });
|
|
973
|
+
await client.agents.deprecateEoaAccount(agentId, "ethereum");
|
|
974
|
+
await client.agents.syncOrgSafeAllowances(); // owner/admin
|
|
975
|
+
|
|
976
|
+
// Public Safe module registry (Guard + Zodiac addresses per chain)
|
|
977
|
+
const registry = await client.agents.getSafeModuleRegistry("ethereum");
|
|
978
|
+
|
|
979
|
+
// Guardrail widening returns 202 — resubmit PATCH with approval_id after decide
|
|
980
|
+
await client.agents.update(agentId, {
|
|
981
|
+
tx_to_allowlist: ["0xNewRecipient..."],
|
|
982
|
+
approval_id: "uuid-from-202-response",
|
|
983
|
+
});
|
|
984
|
+
|
|
985
|
+
// Guardrail governance (owner/admin)
|
|
986
|
+
await client.org.getGuardrailShadowReport({ since: "2026-01-01T00:00:00Z" });
|
|
987
|
+
await client.org.listGuardrailRevisions();
|
|
988
|
+
await client.agents.replayGuardrails(agentId, {
|
|
989
|
+
days: 7,
|
|
990
|
+
draft_guardrails: { tx_max_value_eth: "0.1" },
|
|
991
|
+
});
|
|
992
|
+
|
|
993
|
+
// Human Factor Auth — treasury send/swap step-up policies
|
|
994
|
+
await client.auth.getHumanFactorAuth();
|
|
995
|
+
await client.auth.setHumanFactorAuth({ require_passkey: true, require_totp: false });
|
|
996
|
+
const embedded = await client.treasuryWallets.getAuthPolicy(); // wallet-react / embedded clients
|
|
997
|
+
|
|
998
|
+
// Passkey tx-assert for treasury send/swap (alternative to X-Auth-Confirm password)
|
|
999
|
+
const begin = await client.auth.beginPasskeyTxAssert({ tx_digest: "abc123...", action: "swap" });
|
|
1000
|
+
// ... complete ceremony, then send with X-Passkey-Token header
|
|
1001
|
+
```
|
|
1002
|
+
|
|
939
1003
|
## OpenAPI Types
|
|
940
1004
|
|
|
941
1005
|
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:
|