@agentlayer.tech/wallet 0.1.15 → 0.1.16

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.
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@openclaw/flash-sdk-bridge",
3
+ "private": true,
4
+ "version": "0.1.0",
5
+ "type": "module",
6
+ "description": "Local CLI bridge between agent-wallet and flash-sdk",
7
+ "dependencies": {
8
+ "@coral-xyz/anchor": "^0.32.1",
9
+ "@solana/web3.js": "1.98.2",
10
+ "flash-sdk": "^15.16.10"
11
+ }
12
+ }
@@ -197,8 +197,12 @@ def _infer_source_root(
197
197
 
198
198
 
199
199
  def _ignore_runtime_entries(_directory: str, names: list[str]) -> set[str]:
200
+ directory = Path(_directory)
201
+ keep_dist = ".openclaw" in directory.parts and "extensions" in directory.parts
200
202
  ignored: set[str] = set()
201
203
  for name in names:
204
+ if name == "dist" and keep_dist:
205
+ continue
202
206
  if name in EXCLUDED_RUNTIME_DIR_NAMES:
203
207
  ignored.add(name)
204
208
  continue
@@ -304,6 +308,27 @@ def _ensure_runtime_boot_key_file_env(env_path: Path) -> bool:
304
308
  return _upsert_env_value(env_path, "AGENT_WALLET_BOOT_KEY_FILE", str(boot_key_file))
305
309
 
306
310
 
311
+ def _ensure_flash_bridge_env(env_path: Path, package_root: Path) -> dict[str, bool]:
312
+ bridge_path = package_root / "scripts" / "flash-sdk-bridge" / "bridge.mjs"
313
+ results = {
314
+ "command_updated": False,
315
+ "mode_updated": False,
316
+ }
317
+ if not bridge_path.exists():
318
+ return results
319
+ results["command_updated"] = _upsert_env_value(
320
+ env_path,
321
+ "FLASH_SDK_BRIDGE_COMMAND",
322
+ f"node {bridge_path}",
323
+ )
324
+ results["mode_updated"] = _upsert_env_value(
325
+ env_path,
326
+ "FLASH_SDK_BRIDGE_MODE",
327
+ "real",
328
+ )
329
+ return results
330
+
331
+
307
332
  def _ensure_openclaw_config(config_path: Path) -> bool:
308
333
  if config_path.exists():
309
334
  return False
@@ -485,18 +510,22 @@ def main() -> None:
485
510
  if env_path.resolve() == default_source_env_path.resolve():
486
511
  env_path = package_root / ".env"
487
512
  if venv_path.resolve() == default_source_venv_path.resolve():
488
- venv_path = package_root / ".venv"
513
+ venv_path = package_root / ".runtime-venv"
489
514
  source_env_example_path = source_package_root / ".env.example"
490
515
  if env_example_path.resolve() == source_env_example_path.resolve():
491
516
  env_example_path = package_root / ".env.example"
492
517
 
493
518
  env_created = _ensure_env_file(env_path, env_example_path)
494
519
  boot_key_file_env_updated = _ensure_runtime_boot_key_file_env(env_path)
520
+ flash_bridge_env = _ensure_flash_bridge_env(env_path, package_root)
495
521
  config_created = _ensure_openclaw_config(config_path)
496
522
 
497
523
  python_bin = Path(sys.executable)
498
524
  venv_created = False
499
- if not args.skip_python_setup:
525
+ existing_wrapper = _venv_python_wrapper(venv_path)
526
+ if args.skip_python_setup and args.install_from_runtime and existing_wrapper.exists():
527
+ python_bin = existing_wrapper
528
+ elif not args.skip_python_setup:
500
529
  if not args.dry_run:
501
530
  python_bin, venv_created = _ensure_python_runtime(venv_path, package_root)
502
531
  else:
@@ -507,22 +536,27 @@ def main() -> None:
507
536
  "npm_bin": args.npm_bin,
508
537
  "projects": [],
509
538
  }
539
+ node_projects = [wdk_btc_root, wdk_evm_root]
540
+ flash_bridge_root = package_root / "scripts" / "flash-sdk-bridge"
541
+ if (flash_bridge_root / "package.json").exists():
542
+ node_projects.append(flash_bridge_root)
543
+
510
544
  if not args.skip_node_setup:
511
545
  if args.dry_run:
512
546
  node_runtime["projects"] = [
513
547
  {
514
- "project_root": str(wdk_btc_root),
515
- "command": [args.npm_bin, "ci" if (wdk_btc_root / "package-lock.json").exists() else "install"],
516
- },
517
- {
518
- "project_root": str(wdk_evm_root),
519
- "command": [args.npm_bin, "ci" if (wdk_evm_root / "package-lock.json").exists() else "install"],
520
- },
548
+ "project_root": str(project_root),
549
+ "command": [
550
+ args.npm_bin,
551
+ "ci" if (project_root / "package-lock.json").exists() else "install",
552
+ ],
553
+ }
554
+ for project_root in node_projects
521
555
  ]
522
556
  else:
523
557
  node_runtime["projects"] = [
524
- _ensure_node_runtime(args.npm_bin, wdk_btc_root),
525
- _ensure_node_runtime(args.npm_bin, wdk_evm_root),
558
+ _ensure_node_runtime(args.npm_bin, project_root)
559
+ for project_root in node_projects
526
560
  ]
527
561
 
528
562
  backend_enabled = args.backend.strip().lower() not in {"", "none"}
@@ -552,6 +586,7 @@ def main() -> None:
552
586
  "env_path": str(env_path),
553
587
  "env_created": env_created,
554
588
  "boot_key_file_env_updated": boot_key_file_env_updated,
589
+ "flash_bridge_env": flash_bridge_env,
555
590
  "config_path": str(config_path),
556
591
  "config_created": config_created,
557
592
  "package_root": str(package_root),
@@ -43,6 +43,10 @@ OPTIONAL_TOOLS = [
43
43
  "swap_solana_tokens",
44
44
  "close_empty_token_accounts",
45
45
  "request_devnet_airdrop",
46
+ "get_flash_trade_markets",
47
+ "get_flash_trade_positions",
48
+ "flash_trade_open_position",
49
+ "flash_trade_close_position",
46
50
  ]
47
51
 
48
52
  PAY_BRIDGE_PLUGIN_ID = "pay-bridge"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentlayer.tech/wallet",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "NPM installer for the OpenClaw Agent Wallet local runtime.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -61,6 +61,7 @@
61
61
  "!agent-wallet/.pytest_cache/**",
62
62
  "!agent-wallet/.runtime-venv/**",
63
63
  "!**/node_modules/**",
64
+ "!**/*.tgz",
64
65
  "!**/.DS_Store"
65
66
  ],
66
67
  "keywords": [