@agentlayer.tech/wallet 0.1.44 → 0.1.47
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/index.ts +99 -0
- package/.openclaw/extensions/agent-wallet/openclaw.plugin.json +6 -1
- package/.openclaw/extensions/agent-wallet/package.json +1 -1
- package/CHANGELOG.md +62 -0
- package/README.md +2 -2
- package/VERSION +1 -1
- package/agent-wallet/agent_wallet/__init__.py +1 -1
- package/agent-wallet/agent_wallet/openclaw_adapter.py +686 -0
- package/agent-wallet/agent_wallet/providers/jupiter.py +5 -0
- package/agent-wallet/agent_wallet/providers/wdk_evm_local.py +6 -0
- package/agent-wallet/agent_wallet/wallet_layer/base.py +79 -0
- package/agent-wallet/agent_wallet/wallet_layer/solana.py +14 -0
- package/agent-wallet/agent_wallet/wallet_layer/wdk_evm.py +404 -0
- package/agent-wallet/openclaw.plugin.json +1 -1
- package/agent-wallet/pyproject.toml +1 -1
- package/agent-wallet/scripts/install_agent_wallet.py +33 -8
- 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/README.md +31 -0
- package/wdk-evm-wallet/package-lock.json +268 -64
- package/wdk-evm-wallet/package.json +4 -1
- package/wdk-evm-wallet/src/config.js +2 -0
- package/wdk-evm-wallet/src/server.js +66 -0
- package/wdk-evm-wallet/src/wdk_evm_wallet.js +2725 -939
|
@@ -469,6 +469,35 @@ def _replace_with_directory_symlink(link_path: Path, target_path: Path) -> None:
|
|
|
469
469
|
link_path.symlink_to(target_resolved, target_is_directory=True)
|
|
470
470
|
|
|
471
471
|
|
|
472
|
+
def _bootstrap_venv_pip(python_bin: Path) -> None:
|
|
473
|
+
"""Upgrade pip in a freshly created venv before installing dependencies.
|
|
474
|
+
|
|
475
|
+
A new venv ships with whatever pip ``ensurepip`` bundled, which on older
|
|
476
|
+
interpreters (e.g. a python.org 3.10 build) can be too old to select
|
|
477
|
+
prebuilt wheels for native dependencies such as ``cryptography`` and
|
|
478
|
+
``ckzg``. Without a matching wheel pip falls back to a source build that
|
|
479
|
+
needs a Rust/C toolchain and fails on machines that lack one. Upgrading pip
|
|
480
|
+
first keeps the editable install below on wheels.
|
|
481
|
+
"""
|
|
482
|
+
subprocess.run(
|
|
483
|
+
[str(python_bin), "-m", "pip", "install", "--upgrade", "pip", "setuptools", "wheel"],
|
|
484
|
+
check=True,
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
def _pip_install_editable(python_bin: Path, package_root: Path) -> None:
|
|
489
|
+
"""Editable-install the package, preferring prebuilt wheels for deps.
|
|
490
|
+
|
|
491
|
+
``--prefer-binary`` keeps pip on prebuilt wheels for native dependencies
|
|
492
|
+
instead of compiling them from source when a newer source-only release is
|
|
493
|
+
available, so the install does not require a local build toolchain.
|
|
494
|
+
"""
|
|
495
|
+
subprocess.run(
|
|
496
|
+
[str(python_bin), "-m", "pip", "install", "--prefer-binary", "-e", str(package_root)],
|
|
497
|
+
check=True,
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
|
|
472
501
|
def _ensure_python_runtime(
|
|
473
502
|
venv_path: Path,
|
|
474
503
|
package_root: Path,
|
|
@@ -483,10 +512,8 @@ def _ensure_python_runtime(
|
|
|
483
512
|
if not python_bin.exists():
|
|
484
513
|
venv.EnvBuilder(with_pip=True).create(shared_venv_path)
|
|
485
514
|
created = True
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
check=True,
|
|
489
|
-
)
|
|
515
|
+
_bootstrap_venv_pip(python_bin)
|
|
516
|
+
_pip_install_editable(python_bin, package_root)
|
|
490
517
|
shared_wrapper = _ensure_python_wrapper(shared_venv_path)
|
|
491
518
|
_replace_with_directory_symlink(venv_path, shared_venv_path)
|
|
492
519
|
plan["action"] = "create" if created else "reuse"
|
|
@@ -501,11 +528,9 @@ def _ensure_python_runtime(
|
|
|
501
528
|
if not python_bin.exists():
|
|
502
529
|
venv.EnvBuilder(with_pip=True).create(venv_path)
|
|
503
530
|
created = True
|
|
531
|
+
_bootstrap_venv_pip(python_bin)
|
|
504
532
|
|
|
505
|
-
|
|
506
|
-
[str(python_bin), "-m", "pip", "install", "-e", str(package_root)],
|
|
507
|
-
check=True,
|
|
508
|
-
)
|
|
533
|
+
_pip_install_editable(python_bin, package_root)
|
|
509
534
|
return (
|
|
510
535
|
_ensure_python_wrapper(venv_path),
|
|
511
536
|
created,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-wallet",
|
|
3
3
|
"displayName": "Agent Wallet",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.47",
|
|
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
package/wdk-evm-wallet/README.md
CHANGED
|
@@ -26,6 +26,11 @@ Current scope:
|
|
|
26
26
|
- fetch Aave V3 reserve catalog on supported mainnet networks
|
|
27
27
|
- fetch Aave V3 per-reserve user positions on supported mainnet networks
|
|
28
28
|
- quote and send narrow Aave V3 `supply`, `withdraw`, `borrow`, and `repay` operations
|
|
29
|
+
- fetch Morpho vault discovery and detail data on supported mainnet networks
|
|
30
|
+
- fetch Morpho market discovery and detail data on supported mainnet networks
|
|
31
|
+
- fetch Morpho user vault and market positions on supported mainnet networks
|
|
32
|
+
- quote and send narrow Morpho vault `supply` and `withdraw` operations
|
|
33
|
+
- quote and send narrow Morpho market `supply_collateral`, `borrow`, `repay`, and `withdraw_collateral` operations
|
|
29
34
|
- quote and send native transfers
|
|
30
35
|
- quote and send ERC-20 transfers
|
|
31
36
|
- fetch transaction receipts
|
|
@@ -41,6 +46,8 @@ The implementation follows the official WDK documentation:
|
|
|
41
46
|
- Velora swap API reference: https://docs.wdk.tether.io/sdk/swap-modules/swap-velora-evm/api-reference
|
|
42
47
|
- Aave lending overview: https://docs.wdk.tether.io/sdk/lending-modules/lending-aave-evm
|
|
43
48
|
- Aave lending API reference: https://docs.wdk.tether.io/sdk/lending-modules/lending-aave-evm/api-reference
|
|
49
|
+
- Morpho Build overview: https://morpho.org/build
|
|
50
|
+
- Morpho offchain API docs: https://docs.morpho.org/tools/offchain/api/get-started/
|
|
44
51
|
|
|
45
52
|
## Why Separate
|
|
46
53
|
|
|
@@ -101,6 +108,21 @@ The active network is persistent and can be switched without changing code.
|
|
|
101
108
|
- `POST /v1/evm/aave/borrow/send`
|
|
102
109
|
- `POST /v1/evm/aave/repay/quote`
|
|
103
110
|
- `POST /v1/evm/aave/repay/send`
|
|
111
|
+
- `POST /v1/evm/morpho/vaults/get`
|
|
112
|
+
- `POST /v1/evm/morpho/markets/get`
|
|
113
|
+
- `POST /v1/evm/morpho/positions/get`
|
|
114
|
+
- `POST /v1/evm/morpho/vault/supply/quote`
|
|
115
|
+
- `POST /v1/evm/morpho/vault/supply/send`
|
|
116
|
+
- `POST /v1/evm/morpho/vault/withdraw/quote`
|
|
117
|
+
- `POST /v1/evm/morpho/vault/withdraw/send`
|
|
118
|
+
- `POST /v1/evm/morpho/market/supply_collateral/quote`
|
|
119
|
+
- `POST /v1/evm/morpho/market/supply_collateral/send`
|
|
120
|
+
- `POST /v1/evm/morpho/market/borrow/quote`
|
|
121
|
+
- `POST /v1/evm/morpho/market/borrow/send`
|
|
122
|
+
- `POST /v1/evm/morpho/market/repay/quote`
|
|
123
|
+
- `POST /v1/evm/morpho/market/repay/send`
|
|
124
|
+
- `POST /v1/evm/morpho/market/withdraw_collateral/quote`
|
|
125
|
+
- `POST /v1/evm/morpho/market/withdraw_collateral/send`
|
|
104
126
|
- `POST /v1/evm/swap/quote`
|
|
105
127
|
- `POST /v1/evm/swap/send`
|
|
106
128
|
- `POST /v1/evm/uniswap/swap/quote`
|
|
@@ -162,11 +184,20 @@ Environment variables:
|
|
|
162
184
|
- `WDK_EVM_SEPOLIA_RPC_URL`
|
|
163
185
|
- `WDK_EVM_BASE_RPC_URL`
|
|
164
186
|
- `WDK_EVM_BASE_SEPOLIA_RPC_URL`
|
|
187
|
+
- `MORPHO_API_BASE_URL`
|
|
165
188
|
- `UNISWAP_API_KEY`
|
|
166
189
|
- `UNISWAP_TRADING_API_BASE_URL`
|
|
167
190
|
- `UNISWAP_ROUTER_VERSION`
|
|
168
191
|
- `UNISWAP_DEFAULT_SLIPPAGE_BPS`
|
|
169
192
|
|
|
193
|
+
Morpho read-only support:
|
|
194
|
+
|
|
195
|
+
- the runtime exposes Morpho discovery and account-read routes through the public
|
|
196
|
+
Morpho GraphQL API at `https://api.morpho.org/graphql` by default
|
|
197
|
+
- Morpho support is currently limited to `ethereum` and `base` mainnet
|
|
198
|
+
- vault and market discovery use fixed first-party queries rather than caller-provided
|
|
199
|
+
GraphQL strings
|
|
200
|
+
|
|
170
201
|
Swap providers:
|
|
171
202
|
|
|
172
203
|
- the runtime exposes three independent swap surfaces: Velora (`/v1/evm/swap/*`),
|