@agentlayer.tech/wallet 0.1.47 → 0.1.48
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/.openclaw/extensions/agent-wallet/openclaw.plugin.json +1 -1
- package/.openclaw/extensions/agent-wallet/package.json +1 -1
- package/VERSION +1 -1
- package/agent-wallet/agent_wallet/__init__.py +1 -1
- package/agent-wallet/agent_wallet/openclaw_adapter.py +175 -14
- package/agent-wallet/agent_wallet/wallet_layer/base.py +110 -0
- package/agent-wallet/openclaw.plugin.json +1 -1
- package/agent-wallet/pyproject.toml +1 -1
- package/claude-code/plugins/agent-wallet/.claude-plugin/plugin.json +1 -1
- package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +1 -1
- package/hermes/plugins/agent_wallet/plugin.yaml +1 -1
- package/package.json +1 -1
- package/wdk-btc-wallet/package.json +1 -1
- package/wdk-evm-wallet/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "agent-wallet",
|
|
3
3
|
"name": "Agent Wallet",
|
|
4
4
|
"description": "Official OpenClaw plugin bridge for the agent-wallet backends, including Solana, local BTC, and local EVM.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.48",
|
|
6
6
|
"contracts": {
|
|
7
7
|
"tools": [
|
|
8
8
|
"close_empty_token_accounts",
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.48
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import hashlib
|
|
6
6
|
import json
|
|
7
|
+
import time
|
|
7
8
|
from typing import Any
|
|
8
9
|
|
|
9
10
|
from agent_wallet.approval import inspect_approval_token, verify_approval_token
|
|
@@ -371,6 +372,24 @@ class OpenClawWalletAdapter:
|
|
|
371
372
|
"spend_policy": payload.get("spend_policy"),
|
|
372
373
|
}
|
|
373
374
|
|
|
375
|
+
if asset_type == "kamino-lend-intent":
|
|
376
|
+
summary = {
|
|
377
|
+
"operation": action_label,
|
|
378
|
+
"network": str(payload.get("network") or getattr(self.backend, "network", "unknown")),
|
|
379
|
+
"owner": payload.get("owner"),
|
|
380
|
+
"kamino_operation": payload.get("kamino_operation"),
|
|
381
|
+
"market": payload.get("market"),
|
|
382
|
+
"reserve": payload.get("reserve"),
|
|
383
|
+
"amount_ui": payload.get("amount_ui"),
|
|
384
|
+
"recipient_policy": payload.get("recipient_policy"),
|
|
385
|
+
"spend_policy": payload.get("spend_policy"),
|
|
386
|
+
"valid_until_epoch_seconds": payload.get("valid_until_epoch_seconds"),
|
|
387
|
+
}
|
|
388
|
+
obligation_address = payload.get("obligation_address")
|
|
389
|
+
if obligation_address is not None:
|
|
390
|
+
summary["obligation_address"] = obligation_address
|
|
391
|
+
return summary
|
|
392
|
+
|
|
374
393
|
if asset_type == "solana-lifi-cross-chain-swap":
|
|
375
394
|
return {
|
|
376
395
|
"operation": action_label,
|
|
@@ -3000,12 +3019,16 @@ class OpenClawWalletAdapter:
|
|
|
3000
3019
|
},
|
|
3001
3020
|
"mode": {
|
|
3002
3021
|
"type": "string",
|
|
3003
|
-
"enum": ["preview", "prepare", "execute"],
|
|
3004
|
-
"description": "
|
|
3022
|
+
"enum": ["preview", "prepare", "execute", "intent_preview", "intent_execute"],
|
|
3023
|
+
"description": "Prefer intent_preview then intent_execute after explicit chat confirmation: intent_execute re-derives the Kamino transaction and executes within the approved parameters without round-tripping the preview payload. Legacy preview/prepare/execute remains supported.",
|
|
3024
|
+
},
|
|
3025
|
+
"valid_for_seconds": {
|
|
3026
|
+
"type": "integer",
|
|
3027
|
+
"description": "Optional intent validity window in seconds for intent_preview (1-300, default 120).",
|
|
3005
3028
|
},
|
|
3006
3029
|
"purpose": {"type": "string", "description": "Short explanation of why the deposit is being made."},
|
|
3007
3030
|
"user_intent": {"type": "boolean", "description": "Must be true for prepare mode."},
|
|
3008
|
-
"approval_token": {"type": "string", "description": "Host-issued approval token required for execute mode."},
|
|
3031
|
+
"approval_token": {"type": "string", "description": "Host-issued approval token required for execute/intent_execute mode."},
|
|
3009
3032
|
},
|
|
3010
3033
|
"required": ["market", "reserve", "amount_ui", "mode", "purpose"],
|
|
3011
3034
|
"additionalProperties": False,
|
|
@@ -3038,12 +3061,16 @@ class OpenClawWalletAdapter:
|
|
|
3038
3061
|
},
|
|
3039
3062
|
"mode": {
|
|
3040
3063
|
"type": "string",
|
|
3041
|
-
"enum": ["preview", "prepare", "execute"],
|
|
3042
|
-
"description": "
|
|
3064
|
+
"enum": ["preview", "prepare", "execute", "intent_preview", "intent_execute"],
|
|
3065
|
+
"description": "Prefer intent_preview then intent_execute after explicit chat confirmation: intent_execute re-derives the Kamino transaction and executes within the approved parameters without round-tripping the preview payload. Legacy preview/prepare/execute remains supported.",
|
|
3066
|
+
},
|
|
3067
|
+
"valid_for_seconds": {
|
|
3068
|
+
"type": "integer",
|
|
3069
|
+
"description": "Optional intent validity window in seconds for intent_preview (1-300, default 120).",
|
|
3043
3070
|
},
|
|
3044
3071
|
"purpose": {"type": "string", "description": "Short explanation of why the withdraw is being made."},
|
|
3045
3072
|
"user_intent": {"type": "boolean", "description": "Must be true for prepare mode."},
|
|
3046
|
-
"approval_token": {"type": "string", "description": "Host-issued approval token required for execute mode."},
|
|
3073
|
+
"approval_token": {"type": "string", "description": "Host-issued approval token required for execute/intent_execute mode."},
|
|
3047
3074
|
},
|
|
3048
3075
|
"required": ["market", "reserve", "amount_ui", "mode", "purpose"],
|
|
3049
3076
|
"additionalProperties": False,
|
|
@@ -3076,12 +3103,16 @@ class OpenClawWalletAdapter:
|
|
|
3076
3103
|
},
|
|
3077
3104
|
"mode": {
|
|
3078
3105
|
"type": "string",
|
|
3079
|
-
"enum": ["preview", "prepare", "execute"],
|
|
3080
|
-
"description": "
|
|
3106
|
+
"enum": ["preview", "prepare", "execute", "intent_preview", "intent_execute"],
|
|
3107
|
+
"description": "Prefer intent_preview then intent_execute after explicit chat confirmation: intent_execute re-derives the Kamino transaction and executes within the approved parameters without round-tripping the preview payload. Legacy preview/prepare/execute remains supported.",
|
|
3108
|
+
},
|
|
3109
|
+
"valid_for_seconds": {
|
|
3110
|
+
"type": "integer",
|
|
3111
|
+
"description": "Optional intent validity window in seconds for intent_preview (1-300, default 120).",
|
|
3081
3112
|
},
|
|
3082
3113
|
"purpose": {"type": "string", "description": "Short explanation of why the borrow is being made."},
|
|
3083
3114
|
"user_intent": {"type": "boolean", "description": "Must be true for prepare mode."},
|
|
3084
|
-
"approval_token": {"type": "string", "description": "Host-issued approval token required for execute mode."},
|
|
3115
|
+
"approval_token": {"type": "string", "description": "Host-issued approval token required for execute/intent_execute mode."},
|
|
3085
3116
|
},
|
|
3086
3117
|
"required": ["market", "reserve", "amount_ui", "mode", "purpose"],
|
|
3087
3118
|
"additionalProperties": False,
|
|
@@ -3114,12 +3145,16 @@ class OpenClawWalletAdapter:
|
|
|
3114
3145
|
},
|
|
3115
3146
|
"mode": {
|
|
3116
3147
|
"type": "string",
|
|
3117
|
-
"enum": ["preview", "prepare", "execute"],
|
|
3118
|
-
"description": "
|
|
3148
|
+
"enum": ["preview", "prepare", "execute", "intent_preview", "intent_execute"],
|
|
3149
|
+
"description": "Prefer intent_preview then intent_execute after explicit chat confirmation: intent_execute re-derives the Kamino transaction and executes within the approved parameters without round-tripping the preview payload. Legacy preview/prepare/execute remains supported.",
|
|
3150
|
+
},
|
|
3151
|
+
"valid_for_seconds": {
|
|
3152
|
+
"type": "integer",
|
|
3153
|
+
"description": "Optional intent validity window in seconds for intent_preview (1-300, default 120).",
|
|
3119
3154
|
},
|
|
3120
3155
|
"purpose": {"type": "string", "description": "Short explanation of why the repay is being made."},
|
|
3121
3156
|
"user_intent": {"type": "boolean", "description": "Must be true for prepare mode."},
|
|
3122
|
-
"approval_token": {"type": "string", "description": "Host-issued approval token required for execute mode."},
|
|
3157
|
+
"approval_token": {"type": "string", "description": "Host-issued approval token required for execute/intent_execute mode."},
|
|
3123
3158
|
},
|
|
3124
3159
|
"required": ["market", "reserve", "amount_ui", "mode", "purpose"],
|
|
3125
3160
|
"additionalProperties": False,
|
|
@@ -5480,6 +5515,7 @@ class OpenClawWalletAdapter:
|
|
|
5480
5515
|
purpose = args.get("purpose")
|
|
5481
5516
|
user_intent = args.get("user_intent", False)
|
|
5482
5517
|
approval_token = args.get("approval_token")
|
|
5518
|
+
valid_for_seconds = args.get("valid_for_seconds", 120)
|
|
5483
5519
|
|
|
5484
5520
|
if not isinstance(market, str) or not market.strip():
|
|
5485
5521
|
raise WalletBackendError("market is required.")
|
|
@@ -5489,10 +5525,18 @@ class OpenClawWalletAdapter:
|
|
|
5489
5525
|
raise WalletBackendError("amount_ui is required.")
|
|
5490
5526
|
if obligation_address is not None and not isinstance(obligation_address, str):
|
|
5491
5527
|
raise WalletBackendError("obligation_address must be a string when provided.")
|
|
5492
|
-
if mode not in {"preview", "prepare", "execute"}:
|
|
5493
|
-
raise WalletBackendError(
|
|
5528
|
+
if mode not in {"preview", "prepare", "execute", "intent_preview", "intent_execute"}:
|
|
5529
|
+
raise WalletBackendError(
|
|
5530
|
+
"mode must be 'preview', 'prepare', 'execute', 'intent_preview' or 'intent_execute'."
|
|
5531
|
+
)
|
|
5494
5532
|
if not isinstance(purpose, str) or not purpose.strip():
|
|
5495
5533
|
raise WalletBackendError("purpose is required.")
|
|
5534
|
+
if mode == "intent_preview" and (
|
|
5535
|
+
not isinstance(valid_for_seconds, int)
|
|
5536
|
+
or valid_for_seconds <= 0
|
|
5537
|
+
or valid_for_seconds > 300
|
|
5538
|
+
):
|
|
5539
|
+
raise WalletBackendError("valid_for_seconds must be an integer between 1 and 300.")
|
|
5496
5540
|
|
|
5497
5541
|
action_label_map = {
|
|
5498
5542
|
"kamino_lend_deposit": "Kamino deposit",
|
|
@@ -5500,12 +5544,24 @@ class OpenClawWalletAdapter:
|
|
|
5500
5544
|
"kamino_lend_borrow": "Kamino borrow",
|
|
5501
5545
|
"kamino_lend_repay": "Kamino repay",
|
|
5502
5546
|
}
|
|
5547
|
+
intent_action_label_map = {
|
|
5548
|
+
"kamino_lend_deposit": "Kamino deposit intent",
|
|
5549
|
+
"kamino_lend_withdraw": "Kamino withdraw intent",
|
|
5550
|
+
"kamino_lend_borrow": "Kamino borrow intent",
|
|
5551
|
+
"kamino_lend_repay": "Kamino repay intent",
|
|
5552
|
+
}
|
|
5503
5553
|
preview_method_map = {
|
|
5504
5554
|
"kamino_lend_deposit": self.backend.preview_kamino_lend_deposit,
|
|
5505
5555
|
"kamino_lend_withdraw": self.backend.preview_kamino_lend_withdraw,
|
|
5506
5556
|
"kamino_lend_borrow": self.backend.preview_kamino_lend_borrow,
|
|
5507
5557
|
"kamino_lend_repay": self.backend.preview_kamino_lend_repay,
|
|
5508
5558
|
}
|
|
5559
|
+
intent_preview_method_map = {
|
|
5560
|
+
"kamino_lend_deposit": self.backend.preview_kamino_lend_deposit_intent,
|
|
5561
|
+
"kamino_lend_withdraw": self.backend.preview_kamino_lend_withdraw_intent,
|
|
5562
|
+
"kamino_lend_borrow": self.backend.preview_kamino_lend_borrow_intent,
|
|
5563
|
+
"kamino_lend_repay": self.backend.preview_kamino_lend_repay_intent,
|
|
5564
|
+
}
|
|
5509
5565
|
execute_method_map = {
|
|
5510
5566
|
"kamino_lend_deposit": self.backend.execute_kamino_lend_deposit,
|
|
5511
5567
|
"kamino_lend_withdraw": self.backend.execute_kamino_lend_withdraw,
|
|
@@ -5513,8 +5569,113 @@ class OpenClawWalletAdapter:
|
|
|
5513
5569
|
"kamino_lend_repay": self.backend.execute_kamino_lend_repay,
|
|
5514
5570
|
}
|
|
5515
5571
|
action_label = action_label_map[tool_name]
|
|
5572
|
+
intent_action_label = intent_action_label_map[tool_name]
|
|
5516
5573
|
preview_method = preview_method_map[tool_name]
|
|
5574
|
+
intent_preview_method = intent_preview_method_map[tool_name]
|
|
5517
5575
|
execute_method = execute_method_map[tool_name]
|
|
5576
|
+
normalized_obligation_address = (
|
|
5577
|
+
obligation_address.strip()
|
|
5578
|
+
if isinstance(obligation_address, str) and obligation_address.strip()
|
|
5579
|
+
else None
|
|
5580
|
+
)
|
|
5581
|
+
|
|
5582
|
+
if mode == "intent_preview":
|
|
5583
|
+
intent_preview = await intent_preview_method(
|
|
5584
|
+
market=market.strip(),
|
|
5585
|
+
reserve=reserve.strip(),
|
|
5586
|
+
amount_ui=amount_ui.strip(),
|
|
5587
|
+
obligation_address=normalized_obligation_address,
|
|
5588
|
+
valid_for_seconds=valid_for_seconds,
|
|
5589
|
+
)
|
|
5590
|
+
if bool(intent_preview.get("requires_obligation_address")):
|
|
5591
|
+
raise WalletBackendError(
|
|
5592
|
+
f"{action_label} requires obligation_address when multiple Kamino obligations match the selected position."
|
|
5593
|
+
)
|
|
5594
|
+
return AgentToolResult(
|
|
5595
|
+
tool=tool_name,
|
|
5596
|
+
ok=True,
|
|
5597
|
+
data=self._annotate_sensitive_payload(
|
|
5598
|
+
intent_preview,
|
|
5599
|
+
action_label=intent_action_label,
|
|
5600
|
+
mode="preview",
|
|
5601
|
+
),
|
|
5602
|
+
)
|
|
5603
|
+
|
|
5604
|
+
if mode == "intent_execute":
|
|
5605
|
+
approval_payload = inspect_approval_token(
|
|
5606
|
+
approval_token,
|
|
5607
|
+
tool_name=tool_name,
|
|
5608
|
+
network=str(getattr(self.backend, "network", "unknown")),
|
|
5609
|
+
require_mainnet_confirmation=self._is_mainnet_for_backend(self.backend),
|
|
5610
|
+
)
|
|
5611
|
+
approval_summary = approval_payload.get("binding", {}).get("summary")
|
|
5612
|
+
if not isinstance(approval_summary, dict):
|
|
5613
|
+
raise WalletBackendError(
|
|
5614
|
+
"approval_token does not match the requested operation. Generate a new intent preview and approval before execute."
|
|
5615
|
+
)
|
|
5616
|
+
expected_summary = {
|
|
5617
|
+
"operation": intent_action_label,
|
|
5618
|
+
"network": str(getattr(self.backend, "network", "unknown")),
|
|
5619
|
+
"market": market.strip(),
|
|
5620
|
+
"reserve": reserve.strip(),
|
|
5621
|
+
"amount_ui": amount_ui.strip(),
|
|
5622
|
+
}
|
|
5623
|
+
for key, expected_value in expected_summary.items():
|
|
5624
|
+
if approval_summary.get(key) != expected_value:
|
|
5625
|
+
raise WalletBackendError(
|
|
5626
|
+
f"approval_token does not match the requested {action_label} intent. Generate a fresh intent preview and approval before execute."
|
|
5627
|
+
)
|
|
5628
|
+
if approval_summary.get("recipient_policy") != "owner-only":
|
|
5629
|
+
raise WalletBackendError("approved Kamino intent recipient policy is invalid.")
|
|
5630
|
+
if approval_summary.get("spend_policy") != "exact-amount":
|
|
5631
|
+
raise WalletBackendError("approved Kamino intent spend policy is invalid.")
|
|
5632
|
+
current_owner = await self.backend.get_address()
|
|
5633
|
+
approved_owner = approval_summary.get("owner")
|
|
5634
|
+
if approved_owner and current_owner and str(approved_owner) != str(current_owner):
|
|
5635
|
+
raise WalletBackendError(
|
|
5636
|
+
"approval_token does not match the active wallet owner. Generate a fresh intent preview and approval before execute."
|
|
5637
|
+
)
|
|
5638
|
+
approved_obligation = approval_summary.get("obligation_address")
|
|
5639
|
+
if (
|
|
5640
|
+
normalized_obligation_address is not None
|
|
5641
|
+
and approved_obligation is not None
|
|
5642
|
+
and str(approved_obligation) != normalized_obligation_address
|
|
5643
|
+
):
|
|
5644
|
+
raise WalletBackendError(
|
|
5645
|
+
"approval_token does not match the requested obligation. Generate a fresh intent preview and approval before execute."
|
|
5646
|
+
)
|
|
5647
|
+
valid_until = approval_summary.get("valid_until_epoch_seconds")
|
|
5648
|
+
if valid_until is not None and int(time.time()) > int(valid_until):
|
|
5649
|
+
raise WalletBackendError(
|
|
5650
|
+
"Approved Kamino intent has expired. Create a fresh intent preview."
|
|
5651
|
+
)
|
|
5652
|
+
approval_summary_copy = dict(approval_summary)
|
|
5653
|
+
self._require_execute_approval(
|
|
5654
|
+
approval_token=approval_token,
|
|
5655
|
+
tool_name=tool_name,
|
|
5656
|
+
summary=approval_summary_copy,
|
|
5657
|
+
action_label=intent_action_label,
|
|
5658
|
+
)
|
|
5659
|
+
result = await execute_method(
|
|
5660
|
+
market=market.strip(),
|
|
5661
|
+
reserve=reserve.strip(),
|
|
5662
|
+
amount_ui=amount_ui.strip(),
|
|
5663
|
+
obligation_address=(
|
|
5664
|
+
str(approved_obligation).strip()
|
|
5665
|
+
if approved_obligation
|
|
5666
|
+
else normalized_obligation_address
|
|
5667
|
+
),
|
|
5668
|
+
approved_preview=None,
|
|
5669
|
+
)
|
|
5670
|
+
return AgentToolResult(
|
|
5671
|
+
tool=tool_name,
|
|
5672
|
+
ok=True,
|
|
5673
|
+
data=self._annotate_sensitive_payload(
|
|
5674
|
+
result,
|
|
5675
|
+
action_label=action_label,
|
|
5676
|
+
mode="execute",
|
|
5677
|
+
),
|
|
5678
|
+
)
|
|
5518
5679
|
|
|
5519
5680
|
if mode == "preview":
|
|
5520
5681
|
preview = await preview_method(
|
|
@@ -603,6 +603,116 @@ class AgentWalletBackend(ABC):
|
|
|
603
603
|
) -> dict[str, Any]:
|
|
604
604
|
raise WalletBackendError(f"{self.name} does not support Kamino withdraw previews.")
|
|
605
605
|
|
|
606
|
+
def _build_kamino_lend_intent_preview(
|
|
607
|
+
self,
|
|
608
|
+
base_preview: dict[str, Any],
|
|
609
|
+
*,
|
|
610
|
+
valid_for_seconds: int,
|
|
611
|
+
) -> dict[str, Any]:
|
|
612
|
+
"""Wrap a base Kamino lend preview into an intent approval preview.
|
|
613
|
+
|
|
614
|
+
The intent binds approval to stable semantic parameters (owner, market,
|
|
615
|
+
reserve, amount, obligation) instead of an ephemeral preview digest, so
|
|
616
|
+
execute can re-derive the transaction server-side without the host having
|
|
617
|
+
to round-trip the full preview payload back as _approved_preview.
|
|
618
|
+
"""
|
|
619
|
+
if valid_for_seconds <= 0 or valid_for_seconds > 300:
|
|
620
|
+
raise WalletBackendError("valid_for_seconds must be between 1 and 300.")
|
|
621
|
+
try:
|
|
622
|
+
can_send = bool(self.get_capabilities().can_send_transaction)
|
|
623
|
+
except Exception:
|
|
624
|
+
can_send = bool(base_preview.get("can_send"))
|
|
625
|
+
return {
|
|
626
|
+
"chain": "solana",
|
|
627
|
+
"network": getattr(self, "network", "mainnet"),
|
|
628
|
+
"mode": "intent_preview",
|
|
629
|
+
"asset_type": "kamino-lend-intent",
|
|
630
|
+
"kamino_operation": base_preview["asset_type"],
|
|
631
|
+
"owner": base_preview["owner"],
|
|
632
|
+
"market": base_preview["market"],
|
|
633
|
+
"reserve": base_preview["reserve"],
|
|
634
|
+
"amount_ui": base_preview["amount_ui"],
|
|
635
|
+
"obligation_address": base_preview.get("obligation_address"),
|
|
636
|
+
"obligation_options": base_preview.get("obligation_options", []),
|
|
637
|
+
"requires_obligation_address": bool(base_preview.get("requires_obligation_address")),
|
|
638
|
+
"reserve_info": base_preview.get("reserve_info"),
|
|
639
|
+
"recipient_policy": "owner-only",
|
|
640
|
+
"spend_policy": "exact-amount",
|
|
641
|
+
"valid_for_seconds": valid_for_seconds,
|
|
642
|
+
"valid_until_epoch_seconds": int(time.time()) + valid_for_seconds,
|
|
643
|
+
"intent_note": (
|
|
644
|
+
"This is an intent approval preview. Execute re-derives the Kamino "
|
|
645
|
+
"transaction and only signs/sends if it remains within these approved parameters."
|
|
646
|
+
),
|
|
647
|
+
"can_send": can_send,
|
|
648
|
+
"sign_only": bool(getattr(self, "sign_only", False)),
|
|
649
|
+
"source": "kamino-intent",
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
async def preview_kamino_lend_deposit_intent(
|
|
653
|
+
self,
|
|
654
|
+
market: str,
|
|
655
|
+
reserve: str,
|
|
656
|
+
amount_ui: str,
|
|
657
|
+
obligation_address: str | None = None,
|
|
658
|
+
valid_for_seconds: int = 120,
|
|
659
|
+
) -> dict[str, Any]:
|
|
660
|
+
base = await self.preview_kamino_lend_deposit(
|
|
661
|
+
market=market,
|
|
662
|
+
reserve=reserve,
|
|
663
|
+
amount_ui=amount_ui,
|
|
664
|
+
obligation_address=obligation_address,
|
|
665
|
+
)
|
|
666
|
+
return self._build_kamino_lend_intent_preview(base, valid_for_seconds=valid_for_seconds)
|
|
667
|
+
|
|
668
|
+
async def preview_kamino_lend_withdraw_intent(
|
|
669
|
+
self,
|
|
670
|
+
market: str,
|
|
671
|
+
reserve: str,
|
|
672
|
+
amount_ui: str,
|
|
673
|
+
obligation_address: str | None = None,
|
|
674
|
+
valid_for_seconds: int = 120,
|
|
675
|
+
) -> dict[str, Any]:
|
|
676
|
+
base = await self.preview_kamino_lend_withdraw(
|
|
677
|
+
market=market,
|
|
678
|
+
reserve=reserve,
|
|
679
|
+
amount_ui=amount_ui,
|
|
680
|
+
obligation_address=obligation_address,
|
|
681
|
+
)
|
|
682
|
+
return self._build_kamino_lend_intent_preview(base, valid_for_seconds=valid_for_seconds)
|
|
683
|
+
|
|
684
|
+
async def preview_kamino_lend_borrow_intent(
|
|
685
|
+
self,
|
|
686
|
+
market: str,
|
|
687
|
+
reserve: str,
|
|
688
|
+
amount_ui: str,
|
|
689
|
+
obligation_address: str | None = None,
|
|
690
|
+
valid_for_seconds: int = 120,
|
|
691
|
+
) -> dict[str, Any]:
|
|
692
|
+
base = await self.preview_kamino_lend_borrow(
|
|
693
|
+
market=market,
|
|
694
|
+
reserve=reserve,
|
|
695
|
+
amount_ui=amount_ui,
|
|
696
|
+
obligation_address=obligation_address,
|
|
697
|
+
)
|
|
698
|
+
return self._build_kamino_lend_intent_preview(base, valid_for_seconds=valid_for_seconds)
|
|
699
|
+
|
|
700
|
+
async def preview_kamino_lend_repay_intent(
|
|
701
|
+
self,
|
|
702
|
+
market: str,
|
|
703
|
+
reserve: str,
|
|
704
|
+
amount_ui: str,
|
|
705
|
+
obligation_address: str | None = None,
|
|
706
|
+
valid_for_seconds: int = 120,
|
|
707
|
+
) -> dict[str, Any]:
|
|
708
|
+
base = await self.preview_kamino_lend_repay(
|
|
709
|
+
market=market,
|
|
710
|
+
reserve=reserve,
|
|
711
|
+
amount_ui=amount_ui,
|
|
712
|
+
obligation_address=obligation_address,
|
|
713
|
+
)
|
|
714
|
+
return self._build_kamino_lend_intent_preview(base, valid_for_seconds=valid_for_seconds)
|
|
715
|
+
|
|
606
716
|
async def prepare_kamino_lend_withdraw(
|
|
607
717
|
self,
|
|
608
718
|
market: str,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "agent-wallet",
|
|
3
3
|
"name": "Agent Wallet",
|
|
4
4
|
"description": "Plugin-friendly wallet backend for OpenClaw agents with safe wallet tools and runtime instructions across Solana, local BTC, and local EVM.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.48",
|
|
6
6
|
"skills": ["skills/wallet-operator"],
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-wallet",
|
|
3
3
|
"displayName": "Agent Wallet",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.48",
|
|
5
5
|
"description": "Claude Code bridge for the existing AgentLayer wallet runtime. Connects to Solana, Bitcoin, and EVM wallets without creating a new one.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "AgentLayer"
|
package/package.json
CHANGED