wayfinder-paths 0.1.11__py3-none-any.whl → 0.1.13__py3-none-any.whl

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.

Potentially problematic release.


This version of wayfinder-paths might be problematic. Click here for more details.

Files changed (46) hide show
  1. wayfinder_paths/adapters/balance_adapter/adapter.py +3 -7
  2. wayfinder_paths/adapters/brap_adapter/adapter.py +10 -13
  3. wayfinder_paths/adapters/hyperlend_adapter/adapter.py +6 -9
  4. wayfinder_paths/adapters/hyperliquid_adapter/adapter.py +1 -1
  5. wayfinder_paths/adapters/hyperliquid_adapter/executor.py +44 -5
  6. wayfinder_paths/adapters/hyperliquid_adapter/test_executor.py +104 -0
  7. wayfinder_paths/adapters/moonwell_adapter/adapter.py +0 -3
  8. wayfinder_paths/adapters/pool_adapter/README.md +4 -19
  9. wayfinder_paths/adapters/pool_adapter/adapter.py +4 -29
  10. wayfinder_paths/adapters/pool_adapter/examples.json +6 -7
  11. wayfinder_paths/adapters/pool_adapter/test_adapter.py +8 -8
  12. wayfinder_paths/core/clients/AuthClient.py +2 -2
  13. wayfinder_paths/core/clients/BRAPClient.py +2 -2
  14. wayfinder_paths/core/clients/HyperlendClient.py +2 -2
  15. wayfinder_paths/core/clients/PoolClient.py +18 -54
  16. wayfinder_paths/core/clients/TokenClient.py +3 -3
  17. wayfinder_paths/core/clients/WalletClient.py +2 -2
  18. wayfinder_paths/core/clients/WayfinderClient.py +9 -10
  19. wayfinder_paths/core/clients/protocols.py +1 -7
  20. wayfinder_paths/core/config.py +60 -224
  21. wayfinder_paths/core/services/local_evm_txn.py +22 -4
  22. wayfinder_paths/core/strategies/Strategy.py +3 -3
  23. wayfinder_paths/core/strategies/descriptors.py +7 -0
  24. wayfinder_paths/core/utils/evm_helpers.py +5 -1
  25. wayfinder_paths/core/utils/wallets.py +12 -19
  26. wayfinder_paths/core/wallets/README.md +1 -1
  27. wayfinder_paths/run_strategy.py +10 -8
  28. wayfinder_paths/scripts/create_strategy.py +5 -5
  29. wayfinder_paths/scripts/make_wallets.py +5 -5
  30. wayfinder_paths/scripts/run_strategy.py +3 -3
  31. wayfinder_paths/strategies/basis_trading_strategy/snapshot_mixin.py +1 -1
  32. wayfinder_paths/strategies/basis_trading_strategy/strategy.py +196 -515
  33. wayfinder_paths/strategies/basis_trading_strategy/test_strategy.py +228 -11
  34. wayfinder_paths/strategies/hyperlend_stable_yield_strategy/README.md +2 -2
  35. wayfinder_paths/strategies/hyperlend_stable_yield_strategy/strategy.py +1 -0
  36. wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/README.md +1 -1
  37. wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/strategy.py +8 -7
  38. wayfinder_paths/strategies/stablecoin_yield_strategy/README.md +2 -2
  39. wayfinder_paths/strategies/stablecoin_yield_strategy/strategy.py +25 -25
  40. wayfinder_paths/strategies/stablecoin_yield_strategy/test_strategy.py +28 -9
  41. wayfinder_paths/templates/adapter/README.md +1 -1
  42. {wayfinder_paths-0.1.11.dist-info → wayfinder_paths-0.1.13.dist-info}/METADATA +9 -12
  43. {wayfinder_paths-0.1.11.dist-info → wayfinder_paths-0.1.13.dist-info}/RECORD +45 -45
  44. wayfinder_paths/core/settings.py +0 -61
  45. {wayfinder_paths-0.1.11.dist-info → wayfinder_paths-0.1.13.dist-info}/LICENSE +0 -0
  46. {wayfinder_paths-0.1.11.dist-info → wayfinder_paths-0.1.13.dist-info}/WHEEL +0 -0
@@ -62,8 +62,8 @@ def main():
62
62
  parser.add_argument(
63
63
  "--wallets-file",
64
64
  type=Path,
65
- default=Path(__file__).parent.parent.parent / "wallets.json",
66
- help="Path to wallets.json file",
65
+ default=Path(__file__).parent.parent.parent / "config.json",
66
+ help="Path to config.json file",
67
67
  )
68
68
  parser.add_argument(
69
69
  "--override",
@@ -121,9 +121,9 @@ def main():
121
121
  print(f" Updated strategy.py with class name: {class_name}")
122
122
 
123
123
  # Generate wallet with label matching directory name (strategy identifier)
124
- # If wallets.json doesn't exist, create it with a main wallet first
124
+ # If config.json doesn't exist, create it with a main wallet first
125
125
  if not args.wallets_file.exists():
126
- print(" Creating new wallets.json with main wallet...")
126
+ print(" Creating new config.json with main wallet...")
127
127
  main_wallet = make_random_wallet()
128
128
  main_wallet["label"] = "main"
129
129
  write_wallet_to_json(
@@ -133,7 +133,7 @@ def main():
133
133
  )
134
134
  print(f" Generated main wallet: {main_wallet['address']}")
135
135
 
136
- # Generate strategy wallet (will append to existing wallets.json)
136
+ # Generate strategy wallet (will append to existing config.json)
137
137
  wallet = make_random_wallet()
138
138
  wallet["label"] = dir_name
139
139
  write_wallet_to_json(
@@ -27,7 +27,7 @@ def main():
27
27
  "--out-dir",
28
28
  type=Path,
29
29
  default=Path("."),
30
- help="Output directory for wallets.json (and keystore files)",
30
+ help="Output directory for config.json (and keystore files)",
31
31
  )
32
32
  parser.add_argument(
33
33
  "--keystore-password",
@@ -55,7 +55,7 @@ def main():
55
55
  args.out_dir.mkdir(parents=True, exist_ok=True)
56
56
 
57
57
  # Load existing wallets
58
- existing = load_wallets(args.out_dir, "wallets.json")
58
+ existing = load_wallets(args.out_dir, "config.json")
59
59
  has_main = any(w.get("label") in ("main", "default") for w in existing)
60
60
 
61
61
  rows: list[dict[str, str]] = []
@@ -72,7 +72,7 @@ def main():
72
72
  w["label"] = args.label
73
73
  rows.append(w)
74
74
  print(f"[{index}] {w['address']} (label: {args.label})")
75
- write_wallet_to_json(w, out_dir=args.out_dir, filename="wallets.json")
75
+ write_wallet_to_json(w, out_dir=args.out_dir, filename="config.json")
76
76
  if args.keystore_password:
77
77
  ks = to_keystore_json(w["private_key_hex"], args.keystore_password)
78
78
  ks_path = args.out_dir / f"keystore_{w['address']}.json"
@@ -86,7 +86,7 @@ def main():
86
86
  rows.append(main_w)
87
87
  print(f"[{index}] {main_w['address']} (main)")
88
88
  write_wallet_to_json(
89
- main_w, out_dir=args.out_dir, filename="wallets.json"
89
+ main_w, out_dir=args.out_dir, filename="config.json"
90
90
  )
91
91
  if args.keystore_password:
92
92
  ks = to_keystore_json(
@@ -133,7 +133,7 @@ def main():
133
133
  rows.append(w)
134
134
  print(f"[{index}] {w['address']} (label: temporary_{next_temp_num})")
135
135
 
136
- write_wallet_to_json(w, out_dir=args.out_dir, filename="wallets.json")
136
+ write_wallet_to_json(w, out_dir=args.out_dir, filename="config.json")
137
137
  if args.keystore_password:
138
138
  ks = to_keystore_json(w["private_key_hex"], args.keystore_password)
139
139
  ks_path = args.out_dir / f"keystore_{w['address']}.json"
@@ -27,7 +27,7 @@ def _find_wallet(wallets: list[dict[str, Any]], label: str) -> dict[str, Any]:
27
27
  for w in wallets:
28
28
  if w.get("label") == label:
29
29
  return w
30
- raise ValueError(f"Wallet label not found in wallets.json: {label}")
30
+ raise ValueError(f"Wallet label not found in config.json: {label}")
31
31
 
32
32
 
33
33
  def _get_strategy_class(strategy: str):
@@ -58,7 +58,7 @@ def _get_strategy_class(strategy: str):
58
58
  async def _run(args: argparse.Namespace) -> int:
59
59
  repo_root = Path(__file__).resolve().parents[2]
60
60
  wallets_path = (
61
- Path(args.wallets).resolve() if args.wallets else repo_root / "wallets.json"
61
+ Path(args.wallets).resolve() if args.wallets else repo_root / "config.json"
62
62
  )
63
63
  config_path = (
64
64
  Path(args.config).resolve() if args.config else repo_root / "config.json"
@@ -123,7 +123,7 @@ def main() -> int:
123
123
  ],
124
124
  )
125
125
  p.add_argument(
126
- "--wallets", default=None, help="Path to wallets.json (default: repo root)"
126
+ "--wallets", default=None, help="Path to config.json (default: repo root)"
127
127
  )
128
128
  p.add_argument(
129
129
  "--config", default=None, help="Path to config.json (default: repo root)"
@@ -38,7 +38,7 @@ class BasisSnapshotMixin:
38
38
  entry_cost_usd: float,
39
39
  exit_cost_usd: float,
40
40
  ) -> dict[str, Any]:
41
- """Build the `safe[horizon]` entry matching Django output shape."""
41
+ """Build the `safe[horizon]` entry matching the expected output shape."""
42
42
  L = max(1, int(leverage))
43
43
 
44
44
  depth_checks = depth_checks or {}