@1claw/sdk 0.58.0 → 0.59.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 +68 -2
- package/dist/generated/api-types.d.ts +641 -7
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/resources/agents.d.ts +6 -1
- package/dist/resources/agents.d.ts.map +1 -1
- package/dist/resources/agents.js +7 -0
- package/dist/resources/agents.js.map +1 -1
- package/dist/resources/platform.d.ts +69 -0
- package/dist/resources/platform.d.ts.map +1 -1
- package/dist/resources/platform.js +41 -0
- package/dist/resources/platform.js.map +1 -1
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @1claw/sdk
|
|
1
|
+
# @1claw/sdk (v0.59.0)
|
|
2
2
|
|
|
3
3
|
TypeScript/JavaScript client for the 1Claw Vault API.
|
|
4
4
|
|
|
@@ -106,8 +106,19 @@ 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`, **`siweChallenge`**, **`getConnection`**, **`getConnectionUsage`**, **`listEntitlements`**, **`refreshEntitlements`**, **`previewTemplate`** |
|
|
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`**, **`transferAppOwnership`**, **`getSpendPolicy`**, **`getConnectionSpendPolicy`**, **`listConnectionApprovals`**, **`getConnectionApproval`**, **`listConnectionPendingApprovals`** |
|
|
110
110
|
| `client.treasuryWallets` | … **`getInferenceBudget`** (platform-connected users) |
|
|
111
|
+
| `client.bindings` | `create`, `list`, `get`, `update`, `delete`, `test`, `execute`, `rotateCredential`, `listExecutions` |
|
|
112
|
+
| `client.chat` | `sendMessage`, `sendMessageStream`, `listConversations`, `getConversation`, `deleteConversation` |
|
|
113
|
+
| `client.channels` | `create`, `list`, `update`, `delete`, `send`, `test`, `refreshWebhook`, `listMessages` |
|
|
114
|
+
| `client.oauthConnect` | `listProviders`, `listConnections`, `connect`, `disconnect`, `saveAppCredentials`, `listAppCredentials`, `deleteAppCredentials` |
|
|
115
|
+
| `client.cedarPolicies` | `create`, `list`, `get`, `delete`, `test` |
|
|
116
|
+
| `client.opaPolicies` | `create`, `list`, `get`, `delete`, `test` |
|
|
117
|
+
| `client.contractAbis` | `upload`, `list`, `delete` |
|
|
118
|
+
| `client.pendingApprovals` | `list`, `get`, `approve`, `execute`, `cancel` |
|
|
119
|
+
| `client.subOrgs` | `create`, `list`, `get`, `delete`, `grantPermission`, `revokePermission`, `addUser`, `generateWallets` |
|
|
120
|
+
| `client.portfolio` | `get` |
|
|
121
|
+
| `client.cards` | `order`, `orderGiftCard`, `searchGiftCards`, `list`, `get`, `reveal`, `update`, `void`, `refresh`, `import` |
|
|
111
122
|
| `client.devices` | `register`, `list`, `delete`, `challenge`, `attest`, `setPushToken` |
|
|
112
123
|
| `client.passkeys` | `list`, `registerBegin`, `registerComplete`, `assertBegin`, `assertComplete`, `delete` |
|
|
113
124
|
| `client.risk` | `listEvents`, `getVerdict`, `listVerdicts`, `createHoneytoken`, `listHoneytokens`, `deleteHoneytoken` |
|
|
@@ -1017,6 +1028,61 @@ await client.platform.previewTemplate(appId, templateId, { parameters: { agent_n
|
|
|
1017
1028
|
await client.treasuryWallets.getInferenceBudget();
|
|
1018
1029
|
```
|
|
1019
1030
|
|
|
1031
|
+
## v0.58 — Platform API control plane
|
|
1032
|
+
|
|
1033
|
+
App-scoped reads, spend-policy idempotency, and ownership transfer (plt_ auth unless noted):
|
|
1034
|
+
|
|
1035
|
+
```typescript
|
|
1036
|
+
await client.platform.transferAppOwnership(appId, {
|
|
1037
|
+
target_org_id: "org-uuid",
|
|
1038
|
+
});
|
|
1039
|
+
await client.platform.getSpendPolicy(appId, policyId);
|
|
1040
|
+
await client.platform.getConnectionSpendPolicy(connectionId);
|
|
1041
|
+
await client.platform.listConnectionApprovals(connectionId);
|
|
1042
|
+
await client.platform.getConnectionApproval(connectionId, approvalId);
|
|
1043
|
+
await client.platform.listConnectionPendingApprovals(connectionId);
|
|
1044
|
+
await client.platform.getTemplate(appId, templateId);
|
|
1045
|
+
await client.platform.createConnectionRuntime(connectionId, {
|
|
1046
|
+
name: "my-runtime",
|
|
1047
|
+
agent_id: "agent-uuid",
|
|
1048
|
+
preset: "small",
|
|
1049
|
+
template: "openclaw",
|
|
1050
|
+
});
|
|
1051
|
+
await client.platform.connectionAgentChat(connectionId, agentId, {
|
|
1052
|
+
message: "Hello",
|
|
1053
|
+
});
|
|
1054
|
+
await client.platform.decideConnectionPendingApproval(connectionId, approvalId, {
|
|
1055
|
+
decision: "approve",
|
|
1056
|
+
payload_hash: "...",
|
|
1057
|
+
credential_type: "wallet_mandate",
|
|
1058
|
+
});
|
|
1059
|
+
await client.platform.decideConnectionApproval(connectionId, approvalId, {
|
|
1060
|
+
decision: "approved",
|
|
1061
|
+
});
|
|
1062
|
+
await client.platform.deactivateConnectionSigningKey(connectionId, "ethereum", agentId);
|
|
1063
|
+
// setUserSpendPolicy(connectionId, data, { idempotencyKey: "..." }) — 24h replay protection
|
|
1064
|
+
```
|
|
1065
|
+
|
|
1066
|
+
## v0.59 — Fathom platform integration
|
|
1067
|
+
|
|
1068
|
+
Connection-scoped runtime, passkey enroll, and agent `system_prompt`:
|
|
1069
|
+
|
|
1070
|
+
```typescript
|
|
1071
|
+
await client.platform.getConnectionRuntime(connectionId, runtimeId);
|
|
1072
|
+
await client.platform.connectionPasskeyEnrollBegin(connectionId);
|
|
1073
|
+
await client.platform.connectionPasskeyEnrollComplete(connectionId, {
|
|
1074
|
+
credential_id: "...",
|
|
1075
|
+
attestation_object: "...",
|
|
1076
|
+
client_data_json: "...",
|
|
1077
|
+
});
|
|
1078
|
+
await client.platform.connectionAgentChat(connectionId, agentId, {
|
|
1079
|
+
message: "Hello",
|
|
1080
|
+
system_prompt: "You are helpful.",
|
|
1081
|
+
});
|
|
1082
|
+
await client.agents.create({ name: "bot", system_prompt: "Default persona" });
|
|
1083
|
+
// getConnection() includes provisioned_tier when billing_model is platform_pays
|
|
1084
|
+
```
|
|
1085
|
+
|
|
1020
1086
|
## OpenAPI Types
|
|
1021
1087
|
|
|
1022
1088
|
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:
|