@agentlayer.tech/wallet 0.1.88 → 0.1.90
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/dist/index.js +5 -5
- package/.openclaw/extensions/agent-wallet/index.ts +5 -5
- package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +2 -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/autonomous_permissions.py +43 -1
- package/agent-wallet/agent_wallet/openclaw_adapter.py +696 -375
- package/agent-wallet/agent_wallet/providers/dexscreener.py +145 -0
- package/agent-wallet/agent_wallet/providers/x402.py +84 -0
- package/agent-wallet/agent_wallet/wallet_layer/base.py +12 -0
- package/agent-wallet/agent_wallet/wallet_layer/wdk_evm.py +38 -1
- 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/claude-code/plugins/agent-wallet/README.md +3 -1
- package/claude-code/plugins/agent-wallet/commands/agentlayer-autonomous-approve.md +7 -8
- package/claude-code/plugins/agent-wallet/commands/agentlayer-autonomous-revoke.md +2 -2
- package/claude-code/plugins/agent-wallet/commands/wallet-base.md +38 -15
- package/codex/plugins/agent-wallet/.codex-plugin/plugin.json +1 -1
- package/codex/plugins/agent-wallet/README.md +11 -6
- package/codex/plugins/agent-wallet/skills/wallet-base/SKILL.md +56 -0
- 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
|
@@ -724,17 +724,17 @@ const walletSessionToolDefinitions = [
|
|
|
724
724
|
},
|
|
725
725
|
{
|
|
726
726
|
name: "agentlayer_autonomous_status",
|
|
727
|
-
description: "Return AgentLayer high-trust autonomous permission status
|
|
727
|
+
description: "Return AgentLayer high-trust autonomous permission status. The autonomous permission group covers every wallet write tool (transfers, bridges, Solana swaps, staking, x402 payments, generic contract calls, Base swaps, and EVM DeFi management), not just base_swaps/defi_tools.",
|
|
728
728
|
parameters: { type: "object", properties: {}, additionalProperties: false },
|
|
729
729
|
},
|
|
730
730
|
{
|
|
731
731
|
name: "agentlayer_autonomous_approve",
|
|
732
732
|
description:
|
|
733
|
-
"Enable high-trust autonomous
|
|
733
|
+
"Enable the high-trust autonomous permission group. The scope parameter accepts \"all\" (recommended); base_swaps and defi_tools are deprecated aliases with identical effect. This covers every wallet write tool -- transfers, bridges, Solana swaps, staking, x402 payments, generic contract calls, Base Velora/Uniswap swap execute calls, and supported EVM DeFi management tools -- until revoked.",
|
|
734
734
|
parameters: {
|
|
735
735
|
type: "object",
|
|
736
736
|
properties: {
|
|
737
|
-
scope: { type: "string", enum: ["base_swaps", "defi_tools"], description: "
|
|
737
|
+
scope: { type: "string", enum: ["all", "base_swaps", "defi_tools"], description: "Scope to enable. Use \"all\" (recommended) -- base_swaps and defi_tools are deprecated aliases that enable the exact same full autonomous permission group." },
|
|
738
738
|
purpose: { type: "string" },
|
|
739
739
|
user_intent: { type: "boolean" },
|
|
740
740
|
},
|
|
@@ -744,11 +744,11 @@ const walletSessionToolDefinitions = [
|
|
|
744
744
|
},
|
|
745
745
|
{
|
|
746
746
|
name: "agentlayer_autonomous_revoke",
|
|
747
|
-
description: "Disable the full high-trust autonomous permission group. The scope parameter
|
|
747
|
+
description: "Disable the full high-trust autonomous permission group. The scope parameter accepts \"all\" (recommended); base_swaps and defi_tools are deprecated aliases that revoke the same full group.",
|
|
748
748
|
parameters: {
|
|
749
749
|
type: "object",
|
|
750
750
|
properties: {
|
|
751
|
-
scope: { type: "string", enum: ["base_swaps", "defi_tools"], description: "
|
|
751
|
+
scope: { type: "string", enum: ["all", "base_swaps", "defi_tools"], description: "Scope to revoke. Use \"all\" (recommended) -- base_swaps and defi_tools are deprecated aliases that revoke the exact same full autonomous permission group." },
|
|
752
752
|
},
|
|
753
753
|
required: ["scope"],
|
|
754
754
|
additionalProperties: false,
|
|
@@ -724,17 +724,17 @@ const walletSessionToolDefinitions = [
|
|
|
724
724
|
},
|
|
725
725
|
{
|
|
726
726
|
name: "agentlayer_autonomous_status",
|
|
727
|
-
description: "Return AgentLayer high-trust autonomous permission status
|
|
727
|
+
description: "Return AgentLayer high-trust autonomous permission status. The autonomous permission group covers every wallet write tool (transfers, bridges, Solana swaps, staking, x402 payments, generic contract calls, Base swaps, and EVM DeFi management), not just base_swaps/defi_tools.",
|
|
728
728
|
parameters: { type: "object", properties: {}, additionalProperties: false },
|
|
729
729
|
},
|
|
730
730
|
{
|
|
731
731
|
name: "agentlayer_autonomous_approve",
|
|
732
732
|
description:
|
|
733
|
-
"Enable high-trust autonomous
|
|
733
|
+
"Enable the high-trust autonomous permission group. The scope parameter accepts \"all\" (recommended); base_swaps and defi_tools are deprecated aliases with identical effect. This covers every wallet write tool -- transfers, bridges, Solana swaps, staking, x402 payments, generic contract calls, Base Velora/Uniswap swap execute calls, and supported EVM DeFi management tools -- until revoked.",
|
|
734
734
|
parameters: {
|
|
735
735
|
type: "object",
|
|
736
736
|
properties: {
|
|
737
|
-
scope: { type: "string", enum: ["base_swaps", "defi_tools"], description: "
|
|
737
|
+
scope: { type: "string", enum: ["all", "base_swaps", "defi_tools"], description: "Scope to enable. Use \"all\" (recommended) -- base_swaps and defi_tools are deprecated aliases that enable the exact same full autonomous permission group." },
|
|
738
738
|
purpose: { type: "string" },
|
|
739
739
|
user_intent: { type: "boolean" },
|
|
740
740
|
},
|
|
@@ -744,11 +744,11 @@ const walletSessionToolDefinitions = [
|
|
|
744
744
|
},
|
|
745
745
|
{
|
|
746
746
|
name: "agentlayer_autonomous_revoke",
|
|
747
|
-
description: "Disable the full high-trust autonomous permission group. The scope parameter
|
|
747
|
+
description: "Disable the full high-trust autonomous permission group. The scope parameter accepts \"all\" (recommended); base_swaps and defi_tools are deprecated aliases that revoke the same full group.",
|
|
748
748
|
parameters: {
|
|
749
749
|
type: "object",
|
|
750
750
|
properties: {
|
|
751
|
-
scope: { type: "string", enum: ["base_swaps", "defi_tools"], description: "
|
|
751
|
+
scope: { type: "string", enum: ["all", "base_swaps", "defi_tools"], description: "Scope to revoke. Use \"all\" (recommended) -- base_swaps and defi_tools are deprecated aliases that revoke the exact same full autonomous permission group." },
|
|
752
752
|
},
|
|
753
753
|
required: ["scope"],
|
|
754
754
|
additionalProperties: false,
|
|
@@ -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.90",
|
|
6
6
|
"contracts": {
|
|
7
7
|
"tools": [
|
|
8
8
|
"agentlayer_autonomous_approve",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"manage_evm_morpho_vault_position",
|
|
62
62
|
"manage_evm_lido_position",
|
|
63
63
|
"manage_evm_lido_withdrawal",
|
|
64
|
+
"search_uniswap_pairs",
|
|
64
65
|
"set_evm_network",
|
|
65
66
|
"set_wallet_backend",
|
|
66
67
|
"sign_wallet_message",
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.90
|
|
@@ -34,7 +34,13 @@ DEFI_TOOLS = frozenset(
|
|
|
34
34
|
}
|
|
35
35
|
)
|
|
36
36
|
DEFI_TOOLS_ISSUER = "autonomous-permission:defi-tools"
|
|
37
|
-
|
|
37
|
+
ALL_TOOLS_ISSUER = "autonomous-permission:all-tools"
|
|
38
|
+
#: Canonical scope name -- the group covers every wallet write tool (see
|
|
39
|
+
#: authorize_operation), not just Base swaps or EVM DeFi. base_swaps/
|
|
40
|
+
#: defi_tools remain accepted as deprecated aliases with identical effect,
|
|
41
|
+
#: for backward compatibility with existing callers.
|
|
42
|
+
ALL_SCOPE = "all"
|
|
43
|
+
SUPPORTED_SCOPES = frozenset({ALL_SCOPE, BASE_SWAP_SCOPE, DEFI_TOOLS_SCOPE})
|
|
38
44
|
_PERMISSIONS_FILENAME = "autonomous_permissions.json"
|
|
39
45
|
|
|
40
46
|
|
|
@@ -213,6 +219,42 @@ def authorize_base_swap(*, tool_name: str, network: str, summary: dict[str, Any]
|
|
|
213
219
|
)
|
|
214
220
|
|
|
215
221
|
|
|
222
|
+
def is_autonomous_approved() -> bool:
|
|
223
|
+
"""Whether the combined high-trust autonomous permission group is active.
|
|
224
|
+
|
|
225
|
+
Same underlying flag as :func:`is_base_swap_approved` /
|
|
226
|
+
:func:`is_defi_tools_approved`; exposed under a name that doesn't imply a
|
|
227
|
+
narrower scope, for callers that gate every wallet tool rather than just
|
|
228
|
+
Base swaps or EVM DeFi tools.
|
|
229
|
+
"""
|
|
230
|
+
return bool(status()["active"])
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def authorize_operation(*, tool_name: str, network: str, summary: dict[str, Any]) -> str:
|
|
234
|
+
"""Issue an internal approval token for any wallet tool/network once the
|
|
235
|
+
combined high-trust autonomous permission group is enabled.
|
|
236
|
+
|
|
237
|
+
Unlike :func:`authorize_base_swap` / :func:`authorize_defi_tool`, this has
|
|
238
|
+
no per-tool or per-network allow-list -- the group toggle enabled by
|
|
239
|
+
``agentlayer_autonomous_approve`` is the only gate. Callers are expected to
|
|
240
|
+
have already built ``summary`` from a live preview/quote, matching every
|
|
241
|
+
other execute path's binding contract.
|
|
242
|
+
"""
|
|
243
|
+
if not is_autonomous_approved():
|
|
244
|
+
raise WalletBackendError(
|
|
245
|
+
"Autonomous execution is not enabled. Ask the user to run "
|
|
246
|
+
"agentlayer_autonomous_approve first."
|
|
247
|
+
)
|
|
248
|
+
return issue_approval_token(
|
|
249
|
+
tool_name=str(tool_name),
|
|
250
|
+
network=str(network or "").strip().lower(),
|
|
251
|
+
summary=summary,
|
|
252
|
+
mainnet_confirmed=True,
|
|
253
|
+
ttl_seconds=120,
|
|
254
|
+
issued_by=ALL_TOOLS_ISSUER,
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
|
|
216
258
|
def authorize_defi_tool(*, tool_name: str, network: str, summary: dict[str, Any]) -> str:
|
|
217
259
|
"""Issue an internal approval token for one exact EVM DeFi operation."""
|
|
218
260
|
normalized_network = str(network or "").strip().lower()
|