@1claw/sdk 0.57.0 → 0.58.2
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 -2
- package/dist/generated/api-types.d.ts +754 -15
- 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 +111 -4
- package/dist/resources/platform.d.ts.map +1 -1
- package/dist/resources/platform.js +66 -3
- package/dist/resources/platform.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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @1claw/sdk
|
|
1
|
+
# @1claw/sdk (v0.58.2)
|
|
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` |
|
|
@@ -1000,6 +1011,58 @@ const begin = await client.auth.beginPasskeyTxAssert({ tx_digest: "abc123...", a
|
|
|
1000
1011
|
// ... complete ceremony, then send with X-Passkey-Token header
|
|
1001
1012
|
```
|
|
1002
1013
|
|
|
1014
|
+
## v0.57 — Platform API expansion
|
|
1015
|
+
|
|
1016
|
+
SIWE wallet login, parameterized bootstrap, connection polling, entitlements, and inference budgets:
|
|
1017
|
+
|
|
1018
|
+
```typescript
|
|
1019
|
+
// SIWE challenge + upsert (plt_ auth)
|
|
1020
|
+
const challenge = await client.platform.siweChallenge();
|
|
1021
|
+
// ... sign SIWE message, upsert with subject_token_type urn:1claw:params:oauth:token-type:siwe
|
|
1022
|
+
|
|
1023
|
+
await client.platform.getConnection(connectionId);
|
|
1024
|
+
await client.platform.getConnectionUsage(connectionId);
|
|
1025
|
+
await client.platform.listEntitlements(connectionId);
|
|
1026
|
+
await client.platform.previewTemplate(appId, templateId, { parameters: { agent_name: "demo" } });
|
|
1027
|
+
|
|
1028
|
+
await client.treasuryWallets.getInferenceBudget();
|
|
1029
|
+
```
|
|
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
|
+
|
|
1003
1066
|
## OpenAPI Types
|
|
1004
1067
|
|
|
1005
1068
|
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:
|