@agentlayer.tech/wallet 0.1.30 → 0.1.32

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.
Files changed (39) hide show
  1. package/.openclaw/extensions/agent-wallet/README.md +1 -2
  2. package/.openclaw/extensions/agent-wallet/dist/index.js +6 -340
  3. package/.openclaw/extensions/agent-wallet/index.ts +6 -340
  4. package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +0 -43
  5. package/.openclaw/extensions/agent-wallet/package.json +1 -1
  6. package/.openclaw/extensions/agent-wallet/skills/wallet-operator/SKILL.md +1 -3
  7. package/CHANGELOG.md +35 -0
  8. package/README.md +0 -5
  9. package/agent-wallet/.env.example +0 -12
  10. package/agent-wallet/README.md +0 -35
  11. package/agent-wallet/agent_wallet/btc_user_wallets.py +32 -1
  12. package/agent-wallet/agent_wallet/config.py +11 -7
  13. package/agent-wallet/agent_wallet/evm_user_wallets.py +2 -0
  14. package/agent-wallet/agent_wallet/openclaw_adapter.py +1 -655
  15. package/agent-wallet/agent_wallet/openclaw_cli.py +0 -7
  16. package/agent-wallet/agent_wallet/providers/evm_portfolio.py +18 -42
  17. package/agent-wallet/agent_wallet/providers/jupiter.py +1 -307
  18. package/agent-wallet/agent_wallet/providers/wdk_btc_local.py +31 -3
  19. package/agent-wallet/agent_wallet/providers/wdk_evm_local.py +37 -3
  20. package/agent-wallet/agent_wallet/transaction_policy.py +0 -262
  21. package/agent-wallet/agent_wallet/wallet_layer/base.py +0 -100
  22. package/agent-wallet/agent_wallet/wallet_layer/solana.py +1 -1118
  23. package/agent-wallet/openclaw.plugin.json +0 -4
  24. package/agent-wallet/pyproject.toml +1 -1
  25. package/agent-wallet/scripts/install_agent_wallet.py +113 -6
  26. package/agent-wallet/scripts/install_openclaw_local_config.py +7 -5
  27. package/agent-wallet/skills/wallet-operator/SKILL.md +1 -5
  28. package/bin/openclaw-agent-wallet.mjs +103 -36
  29. package/claude-code/plugins/agent-wallet/scripts/run_mcp.sh +7 -2
  30. package/codex/plugins/agent-wallet/server.py +2 -118
  31. package/hermes/plugins/agent_wallet/tools.py +1 -1
  32. package/package.json +1 -1
  33. package/wdk-btc-wallet/src/local_vault.js +45 -68
  34. package/wdk-btc-wallet/src/server.js +1 -0
  35. package/wdk-evm-wallet/README.md +4 -3
  36. package/wdk-evm-wallet/src/config.js +15 -0
  37. package/wdk-evm-wallet/src/local_vault.js +45 -68
  38. package/wdk-evm-wallet/src/server.js +1 -0
  39. package/agent-wallet/agent_wallet/providers/houdini.py +0 -539
@@ -18,7 +18,6 @@ In practice this means the agent works through explicit tools for:
18
18
  - wallet address, balances, and portfolio reads
19
19
  - native SOL and SPL token transfers
20
20
  - Jupiter swap and price lookup, including Solana swap intent execution that refreshes quotes inside user-approved limits
21
- - Jupiter Earn read/deposit/withdraw flows
22
21
  - Kamino lending read/deposit/withdraw/borrow/repay flows
23
22
  - native Solana staking, stake deactivation, and stake withdrawal
24
23
 
@@ -103,7 +102,7 @@ Important:
103
102
  - `get_wallet_balance` returns an enriched wallet overview for Solana and EVM: native balance, discovered token balances, per-asset USD values when pricing is available, and `total_value_usd`.
104
103
  - Solana wallet overview uses Solana RPC only for balance and token-account discovery. Token prices come from Jupiter, not RPC, and internal transfer/staking checks continue to use native-only balance reads.
105
104
  - If the user needs to recover the mnemonic later, host-side reveal stays outside the agent tool surface via `agent-wallet/scripts/manage_openclaw_btc_wallet.py reveal-seed`.
106
- - Optional Jupiter overrides are available via `jupiterBaseUrl`, `jupiterUltraBaseUrl`, `jupiterPriceBaseUrl`, `jupiterPortfolioBaseUrl`, `jupiterLendBaseUrl`, and `jupiterApiKey`.
105
+ - Optional Jupiter overrides are available via `jupiterBaseUrl`, `jupiterUltraBaseUrl`, `jupiterPriceBaseUrl`, `jupiterPortfolioBaseUrl`, and `jupiterApiKey`.
107
106
  - Optional Kamino overrides are available via `kaminoBaseUrl` and `kaminoProgramId`.
108
107
  - Jupiter `Portfolio` implementation remains in the backend, but those agent-facing tools are temporarily disabled for now.
109
108
  - Mainnet wallets are pinned by address. If a pinned mainnet wallet file disappears, the runtime refuses to silently create a replacement wallet.
@@ -13,16 +13,12 @@ let selectedSolanaNetwork = null;
13
13
  let selectedEvmNetwork = null;
14
14
  let selectedBtcNetwork = null;
15
15
  const PREVIEW_CACHE_TTL_MS = 15 * 60 * 1000;
16
- const PRIVATE_SWAP_CACHE_TTL_MS = 35 * 60 * 1000;
17
16
  const PREVIEW_BOUND_SWAP_TOOLS = new Set([
18
17
  "swap_solana_tokens",
19
- "swap_solana_privately",
20
18
  "flash_trade_open_position",
21
19
  "flash_trade_close_position",
22
20
  ]);
23
- const PRIVATE_SWAP_APPROVAL_TOOL_NAME = "swap_solana_privately";
24
21
  const approvalPreviewCache = new Map();
25
- const privateSwapOrderCache = new Map();
26
22
  const WALLET_TOOL_ONLY_GUIDANCE =
27
23
  "Use this wallet tool instead of shelling out to solana CLI, spl-token CLI, curl, or exec. If it fails, surface the wallet-tool error and stop rather than falling back to terminal commands.";
28
24
  const OPENCLAW_EXECUTE_APPROVAL_GUIDANCE =
@@ -82,16 +78,10 @@ function cachePreviewForApproval(userId, toolName, payload) {
82
78
  const digest = previewDigest(approvalSource);
83
79
  approvalPreviewCache.set(approvalCacheKey(userId, cacheToolName), {
84
80
  digest,
85
- expiresAt:
86
- cacheToolName === "swap_solana_privately"
87
- ? Date.now() + PRIVATE_SWAP_CACHE_TTL_MS
88
- : Date.now() + PREVIEW_CACHE_TTL_MS,
81
+ expiresAt: Date.now() + PREVIEW_CACHE_TTL_MS,
89
82
  preview: approvalSource,
90
83
  summary: approvalSource.confirmation_summary,
91
84
  });
92
- if (cacheToolName === "swap_solana_privately") {
93
- privateSwapOrderCache.delete(approvalCacheKey(userId, cacheToolName));
94
- }
95
85
  }
96
86
 
97
87
  function latestCachedPreview(userId, toolName) {
@@ -158,93 +148,6 @@ function normalizeApprovalContextError(error) {
158
148
  return wrapped;
159
149
  }
160
150
 
161
- function cachePendingPrivateSwapOrder(userId, toolName, preview, details) {
162
- if (toolName !== "swap_solana_privately") return;
163
- if (!preview || typeof preview !== "object") return;
164
- if (!details || typeof details !== "object") return;
165
- const houdiniId = typeof details.houdini_id === "string" ? details.houdini_id.trim() : "";
166
- const depositAddress =
167
- typeof details.deposit_address === "string" ? details.deposit_address.trim() : "";
168
- if (!houdiniId || !depositAddress) return;
169
- privateSwapOrderCache.set(approvalCacheKey(userId, toolName), {
170
- digest: previewDigest(preview),
171
- expiresAt: Date.now() + PRIVATE_SWAP_CACHE_TTL_MS,
172
- order: {
173
- multi_id: typeof details.multi_id === "string" ? details.multi_id.trim() : null,
174
- houdini_id: houdiniId,
175
- deposit_address: depositAddress,
176
- order: details.order && typeof details.order === "object" ? details.order : {},
177
- },
178
- });
179
- }
180
-
181
- function latestPendingPrivateSwapOrder(userId, toolName, preview) {
182
- if (toolName !== "swap_solana_privately") return null;
183
- const cached = privateSwapOrderCache.get(approvalCacheKey(userId, toolName));
184
- if (!cached || typeof cached !== "object") return null;
185
- if (Number(cached.expiresAt || 0) <= Date.now()) {
186
- privateSwapOrderCache.delete(approvalCacheKey(userId, toolName));
187
- return null;
188
- }
189
- if (!preview || typeof preview !== "object") return null;
190
- if (cached.digest !== previewDigest(preview)) return null;
191
- return cached.order && typeof cached.order === "object" ? cached.order : null;
192
- }
193
-
194
- function clearPendingPrivateSwapOrder(userId, toolName) {
195
- if (toolName !== "swap_solana_privately") return;
196
- privateSwapOrderCache.delete(approvalCacheKey(userId, toolName));
197
- }
198
-
199
- function formatPrivateSwapPendingOrderError(details) {
200
- const houdiniId = typeof details?.houdini_id === "string" ? details.houdini_id.trim() : "";
201
- const multiId = typeof details?.multi_id === "string" ? details.multi_id.trim() : "";
202
- const depositAddress =
203
- typeof details?.deposit_address === "string" ? details.deposit_address.trim() : "";
204
- const orderStatus =
205
- typeof details?.order_status === "string" ? details.order_status.trim() : "";
206
- const parts = [
207
- "Houdini order was created, but the Solana deposit account is not ready yet.",
208
- ];
209
- if (houdiniId) parts.push(`houdini_id=${houdiniId}`);
210
- if (multiId) parts.push(`multi_id=${multiId}`);
211
- if (depositAddress) parts.push(`deposit_address=${depositAddress}`);
212
- if (orderStatus) parts.push(`status=${orderStatus}`);
213
- parts.push("Retry execute for this existing order instead of generating a new preview.");
214
- return parts.join(" ");
215
- }
216
-
217
- function formatPrivateSwapRateLimitError(details) {
218
- const retryAfter =
219
- typeof details?.retry_after === "number"
220
- ? details.retry_after
221
- : typeof details?.retry_after === "string"
222
- ? details.retry_after
223
- : "";
224
- const quoteId = typeof details?.quote_id === "string" ? details.quote_id.trim() : "";
225
- const parts = [
226
- "Houdini exchange create is rate-limited right now.",
227
- ];
228
- if (retryAfter !== "") parts.push(`retry_after=${retryAfter}s`);
229
- if (quoteId) parts.push(`quote_id=${quoteId}`);
230
- parts.push("Do not generate a new preview yet; wait, then retry execute.");
231
- return parts.join(" ");
232
- }
233
-
234
- function listPendingPrivateSwapOrders(userId) {
235
- const key = approvalCacheKey(userId, PRIVATE_SWAP_APPROVAL_TOOL_NAME);
236
- const pending = privateSwapOrderCache.get(key);
237
- if (!pending || typeof pending !== "object" || Number(pending.expiresAt || 0) <= Date.now()) {
238
- privateSwapOrderCache.delete(key);
239
- return [];
240
- }
241
- return [
242
- {
243
- ...(pending.order && typeof pending.order === "object" ? pending.order : {}),
244
- expires_at_ms: Number(pending.expiresAt || 0),
245
- },
246
- ];
247
- }
248
151
 
249
152
  function resolvePluginConfig(api) {
250
153
  const globalConfig = api?.config ?? {};
@@ -569,9 +472,6 @@ async function issueApprovalToken(api, config, userId, toolName, previewPayload)
569
472
  if (previewPayload?.is_mainnet === true) {
570
473
  extraArgs.push("--mainnet-confirmed");
571
474
  }
572
- if (toolName === "swap_solana_privately") {
573
- extraArgs.push("--ttl-seconds", "1800");
574
- }
575
475
  const payload = await callWalletCli(api, "issue-approval", extraArgs, config);
576
476
  const token = String(payload?.approval_token || "").trim();
577
477
  if (!token) {
@@ -733,12 +633,6 @@ function registerTool(api, definition) {
733
633
  });
734
634
  }
735
635
 
736
- if (definition.name === "list_pending_solana_private_swaps") {
737
- return asContent({
738
- orders: listPendingPrivateSwapOrders(resolveUserId(api, resolvePluginConfig(api))),
739
- });
740
- }
741
-
742
636
  const effectiveParams = { ...(params ?? {}) };
743
637
  const activeBackend = activeBackendForTool(api, definition.name);
744
638
  const userId = resolveUserId(api, resolvePluginConfig(api));
@@ -754,43 +648,7 @@ function registerTool(api, definition) {
754
648
  if (activeBackend === "wdk_evm_local" && effectiveParams.network !== undefined) {
755
649
  configOverride.network = normalizeSelectableEvmNetwork(effectiveParams.network);
756
650
  }
757
- if (definition.name !== "continue_solana_private_swap") {
758
- await attachApprovalForExecute(api, configOverride, userId, definition.name, effectiveParams);
759
- }
760
- if (definition.name === "continue_solana_private_swap") {
761
- const cached = latestCachedPreview(userId, PRIVATE_SWAP_APPROVAL_TOOL_NAME);
762
- if (cached?.preview) {
763
- effectiveParams._approved_preview = cached.preview;
764
- }
765
- if (cached?.preview && cached?.summary) {
766
- effectiveParams.approval_token = await issueApprovalToken(
767
- api,
768
- configOverride,
769
- userId,
770
- PRIVATE_SWAP_APPROVAL_TOOL_NAME,
771
- cached.preview
772
- );
773
- } else if (!effectiveParams.approval_token) {
774
- throw new Error(APPROVAL_CONTEXT_MISSING_MESSAGE);
775
- }
776
- if (effectiveParams._resume_private_swap_order === undefined && cached?.preview) {
777
- const pendingOrder = latestPendingPrivateSwapOrder(
778
- userId,
779
- PRIVATE_SWAP_APPROVAL_TOOL_NAME,
780
- cached.preview
781
- );
782
- if (pendingOrder) {
783
- if (
784
- effectiveParams.houdini_id &&
785
- pendingOrder.houdini_id &&
786
- String(effectiveParams.houdini_id).trim() !== String(pendingOrder.houdini_id).trim()
787
- ) {
788
- throw new Error("The requested houdini_id does not match the cached pending private swap order.");
789
- }
790
- effectiveParams._resume_private_swap_order = pendingOrder;
791
- }
792
- }
793
- }
651
+ await attachApprovalForExecute(api, configOverride, userId, definition.name, effectiveParams);
794
652
  const executeWalletTool = async () =>
795
653
  callWalletCli(api, "invoke", [
796
654
  "--tool",
@@ -800,75 +658,10 @@ function registerTool(api, definition) {
800
658
  ], configOverride);
801
659
 
802
660
  let payload;
803
- if (definition.name === "swap_solana_privately" && String(effectiveParams.mode || "") === "execute") {
804
- const approvedPreview =
805
- effectiveParams._approved_preview && typeof effectiveParams._approved_preview === "object"
806
- ? effectiveParams._approved_preview
807
- : null;
808
- const pendingOrder = approvedPreview
809
- ? latestPendingPrivateSwapOrder(userId, definition.name, approvedPreview)
810
- : null;
811
- if (pendingOrder && effectiveParams._resume_private_swap_order === undefined) {
812
- effectiveParams._resume_private_swap_order = pendingOrder;
813
- }
814
-
815
- let remainingRetries = 3;
816
- while (true) {
817
- try {
818
- payload = await executeWalletTool();
819
- const executionState = payload?.data?.execution_state;
820
- if (executionState === "awaiting_deposit_funding" && approvedPreview) {
821
- cachePendingPrivateSwapOrder(userId, definition.name, approvedPreview, payload.data);
822
- } else {
823
- clearPendingPrivateSwapOrder(userId, definition.name);
824
- }
825
- break;
826
- } catch (error) {
827
- const errorCode = typeof error?.code === "string" ? error.code : "";
828
- const errorDetails =
829
- error?.details && typeof error.details === "object" ? error.details : null;
830
- if (
831
- (errorCode === "houdini_deposit_not_ready" ||
832
- errorCode === "houdini_order_initializing_timeout") &&
833
- approvedPreview &&
834
- errorDetails &&
835
- remainingRetries > 0
836
- ) {
837
- cachePendingPrivateSwapOrder(userId, definition.name, approvedPreview, errorDetails);
838
- effectiveParams._resume_private_swap_order =
839
- latestPendingPrivateSwapOrder(userId, definition.name, approvedPreview) || undefined;
840
- remainingRetries -= 1;
841
- continue;
842
- }
843
- if (
844
- (errorCode === "houdini_deposit_not_ready" ||
845
- errorCode === "houdini_order_initializing_timeout") &&
846
- errorDetails
847
- ) {
848
- cachePendingPrivateSwapOrder(userId, definition.name, approvedPreview, errorDetails);
849
- throw new Error(formatPrivateSwapPendingOrderError(errorDetails));
850
- }
851
- if (errorCode === "houdini_exchange_rate_limited" && errorDetails) {
852
- throw new Error(formatPrivateSwapRateLimitError(errorDetails));
853
- }
854
- throw normalizeApprovalContextError(error);
855
- }
856
- }
857
- } else if (definition.name === "continue_solana_private_swap") {
858
- try {
859
- payload = await executeWalletTool();
860
- } catch (error) {
861
- throw normalizeApprovalContextError(error);
862
- }
863
- if (payload?.data?.execution_state === "funding_submitted") {
864
- clearPendingPrivateSwapOrder(userId, PRIVATE_SWAP_APPROVAL_TOOL_NAME);
865
- }
866
- } else {
867
- try {
868
- payload = await executeWalletTool();
869
- } catch (error) {
870
- throw normalizeApprovalContextError(error);
871
- }
661
+ try {
662
+ payload = await executeWalletTool();
663
+ } catch (error) {
664
+ throw normalizeApprovalContextError(error);
872
665
  }
873
666
  cachePreviewForApproval(userId, definition.name, payload);
874
667
  if (payload?.ok === false) {
@@ -1008,12 +801,6 @@ const walletSessionToolDefinitions = [
1008
801
  ];
1009
802
 
1010
803
  const solanaToolDefinitions = [
1011
- {
1012
- name: "list_pending_solana_private_swaps",
1013
- description:
1014
- "List cached pending Houdini private Solana orders from this OpenClaw session, including houdini_id, multi_id, deposit_address, and the last known order payload.",
1015
- parameters: { type: "object", properties: {}, additionalProperties: false },
1016
- },
1017
804
  {
1018
805
  name: "get_wallet_capabilities",
1019
806
  description: "Describe the connected wallet backend, chain, and safety limits.",
@@ -1151,46 +938,6 @@ const solanaToolDefinitions = [
1151
938
  additionalProperties: false,
1152
939
  },
1153
940
  },
1154
- {
1155
- name: "get_jupiter_earn_tokens",
1156
- description: "List Jupiter Earn vault tokens currently supported on Solana mainnet.",
1157
- parameters: { type: "object", properties: {}, additionalProperties: false },
1158
- },
1159
- {
1160
- name: "get_jupiter_earn_positions",
1161
- description: "Get Jupiter Earn positions for one or more Solana wallet addresses on mainnet.",
1162
- parameters: {
1163
- type: "object",
1164
- properties: {
1165
- users: {
1166
- type: "array",
1167
- items: { type: "string" },
1168
- description: "Optional list of Solana wallet addresses. If omitted, use the configured wallet address.",
1169
- },
1170
- },
1171
- additionalProperties: false,
1172
- },
1173
- },
1174
- {
1175
- name: "get_jupiter_earn_earnings",
1176
- description: "Get Jupiter Earn earnings for a wallet and one or more position addresses on mainnet.",
1177
- parameters: {
1178
- type: "object",
1179
- properties: {
1180
- user: {
1181
- type: "string",
1182
- description: "Optional Solana wallet address override.",
1183
- },
1184
- positions: {
1185
- type: "array",
1186
- items: { type: "string" },
1187
- description: "List of Jupiter Earn position addresses.",
1188
- },
1189
- },
1190
- required: ["positions"],
1191
- additionalProperties: false,
1192
- },
1193
- },
1194
941
  {
1195
942
  name: "get_flash_trade_markets",
1196
943
  description: "List Flash Trade perpetual markets currently available on Solana mainnet.",
@@ -1365,53 +1112,6 @@ const solanaToolDefinitions = [
1365
1112
  additionalProperties: false,
1366
1113
  },
1367
1114
  },
1368
- {
1369
- name: "swap_solana_privately",
1370
- description: `Preview or create a Solana private payout through Houdini's anonymous routing. The initial implementation supports same-token private payouts only, such as SOL->SOL or USDC->USDC. Use preview first. After the user explicitly confirms the shown summary in chat, call execute; the OpenClaw plugin handles the internal execution authorization automatically. The first execute creates the Houdini order and returns its deposit address; use continue_solana_private_swap to submit the funding transfer. ${WALLET_TOOL_ONLY_GUIDANCE}`,
1371
- optional: true,
1372
- parameters: {
1373
- type: "object",
1374
- properties: {
1375
- input_token: { type: "string" },
1376
- output_token: { type: "string" },
1377
- destination_address: { type: "string" },
1378
- amount: { type: "number" },
1379
- use_xmr: { type: "boolean" },
1380
- mode: { type: "string", enum: ["preview", "execute"] },
1381
- purpose: { type: "string" },
1382
- user_intent: { type: "boolean" },
1383
- },
1384
- required: ["input_token", "output_token", "destination_address", "amount", "mode", "purpose"],
1385
- additionalProperties: false,
1386
- },
1387
- },
1388
- {
1389
- name: "continue_solana_private_swap",
1390
- description:
1391
- "Continue a previously created Houdini private Solana payout and submit the funding transfer to the cached deposit address. Use this after swap_solana_privately execute has returned a pending order; the OpenClaw plugin reuses the cached confirmation context automatically.",
1392
- optional: true,
1393
- parameters: {
1394
- type: "object",
1395
- properties: {
1396
- houdini_id: { type: "string" },
1397
- },
1398
- additionalProperties: false,
1399
- },
1400
- },
1401
- {
1402
- name: "get_solana_private_swap_status",
1403
- description: "Check Houdini status for a Solana private payout created by swap_solana_privately. Prefer houdini_id from the execute result; multi_id is only needed for legacy multi-order flows.",
1404
- optional: true,
1405
- parameters: {
1406
- type: "object",
1407
- properties: {
1408
- multi_id: { type: "string" },
1409
- houdini_id: { type: "string" },
1410
- },
1411
- anyOf: [{ required: ["multi_id"] }, { required: ["houdini_id"] }],
1412
- additionalProperties: false,
1413
- },
1414
- },
1415
1115
  {
1416
1116
  name: "swap_solana_lifi_cross_chain_tokens",
1417
1117
  description: "Preview, prepare, or execute a Solana-origin cross-chain swap through LI.FI. This currently supports Solana as the source chain and ethereum/base as the destination chain. Preview or prepare first. After the user explicitly confirms the shown summary in chat, call execute; the OpenClaw plugin handles the internal execution authorization automatically.",
@@ -1504,40 +1204,6 @@ const solanaToolDefinitions = [
1504
1204
  additionalProperties: false,
1505
1205
  },
1506
1206
  },
1507
- {
1508
- name: "jupiter_earn_deposit",
1509
- description: "Preview, prepare, or execute a Jupiter Earn deposit using a raw base-unit amount. Preview or prepare first. After the user explicitly confirms the shown summary in chat, call execute; the OpenClaw plugin handles the internal execution authorization automatically.",
1510
- optional: true,
1511
- parameters: {
1512
- type: "object",
1513
- properties: {
1514
- asset: { type: "string" },
1515
- amount_raw: { type: "string" },
1516
- mode: { type: "string", enum: ["preview", "prepare", "execute"] },
1517
- purpose: { type: "string" },
1518
- user_intent: { type: "boolean" },
1519
- },
1520
- required: ["asset", "amount_raw", "mode", "purpose"],
1521
- additionalProperties: false,
1522
- },
1523
- },
1524
- {
1525
- name: "jupiter_earn_withdraw",
1526
- description: "Preview, prepare, or execute a Jupiter Earn withdraw using a raw base-unit amount. Preview or prepare first. After the user explicitly confirms the shown summary in chat, call execute; the OpenClaw plugin handles the internal execution authorization automatically.",
1527
- optional: true,
1528
- parameters: {
1529
- type: "object",
1530
- properties: {
1531
- asset: { type: "string" },
1532
- amount_raw: { type: "string" },
1533
- mode: { type: "string", enum: ["preview", "prepare", "execute"] },
1534
- purpose: { type: "string" },
1535
- user_intent: { type: "boolean" },
1536
- },
1537
- required: ["asset", "amount_raw", "mode", "purpose"],
1538
- additionalProperties: false,
1539
- },
1540
- },
1541
1207
  {
1542
1208
  name: "kamino_lend_deposit",
1543
1209
  description: "Preview, prepare, or execute a Kamino lending deposit using a decimal token amount. Preview or prepare first. After the user explicitly confirms the shown summary in chat, call execute; the OpenClaw plugin handles the internal execution authorization automatically.",