wayfinder-paths 0.1.3__py3-none-any.whl → 0.1.4__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 (79) hide show
  1. wayfinder_paths/CONFIG_GUIDE.md +23 -18
  2. wayfinder_paths/{vaults/adapters → adapters}/balance_adapter/README.md +2 -2
  3. wayfinder_paths/{vaults/adapters → adapters}/balance_adapter/adapter.py +2 -2
  4. wayfinder_paths/{vaults/adapters → adapters}/balance_adapter/manifest.yaml +1 -1
  5. wayfinder_paths/{vaults/adapters → adapters}/balance_adapter/test_adapter.py +12 -6
  6. wayfinder_paths/{vaults/adapters → adapters}/brap_adapter/README.md +1 -1
  7. wayfinder_paths/{vaults/adapters → adapters}/brap_adapter/adapter.py +2 -2
  8. wayfinder_paths/{vaults/adapters → adapters}/brap_adapter/manifest.yaml +1 -1
  9. wayfinder_paths/{vaults/adapters → adapters}/brap_adapter/test_adapter.py +2 -2
  10. wayfinder_paths/adapters/hyperlend_adapter/__init__.py +7 -0
  11. wayfinder_paths/{vaults/adapters → adapters}/hyperlend_adapter/manifest.yaml +1 -1
  12. wayfinder_paths/{vaults/adapters → adapters}/hyperlend_adapter/test_adapter.py +2 -2
  13. wayfinder_paths/{vaults/adapters → adapters}/ledger_adapter/README.md +1 -1
  14. wayfinder_paths/{vaults/adapters → adapters}/ledger_adapter/manifest.yaml +1 -1
  15. wayfinder_paths/{vaults/adapters → adapters}/ledger_adapter/test_adapter.py +2 -2
  16. wayfinder_paths/{vaults/adapters → adapters}/pool_adapter/README.md +1 -1
  17. wayfinder_paths/{vaults/adapters → adapters}/pool_adapter/manifest.yaml +1 -1
  18. wayfinder_paths/{vaults/adapters → adapters}/pool_adapter/test_adapter.py +2 -2
  19. wayfinder_paths/{vaults/adapters → adapters}/token_adapter/README.md +1 -1
  20. wayfinder_paths/adapters/token_adapter/examples.json +26 -0
  21. wayfinder_paths/{vaults/adapters → adapters}/token_adapter/manifest.yaml +1 -1
  22. wayfinder_paths/{vaults/adapters → adapters}/token_adapter/test_adapter.py +1 -1
  23. wayfinder_paths/config.example.json +3 -1
  24. wayfinder_paths/core/engine/manifest.py +1 -1
  25. wayfinder_paths/{vaults/policies → policies}/enso.py +1 -1
  26. wayfinder_paths/{vaults/policies → policies}/hyper_evm.py +2 -2
  27. wayfinder_paths/{vaults/policies → policies}/hyperlend.py +1 -1
  28. wayfinder_paths/{vaults/policies → policies}/moonwell.py +1 -1
  29. wayfinder_paths/{vaults/policies → policies}/prjx.py +1 -1
  30. wayfinder_paths/run_strategy.py +3 -3
  31. wayfinder_paths/scripts/create_strategy.py +3 -3
  32. wayfinder_paths/scripts/validate_manifests.py +2 -2
  33. wayfinder_paths/{vaults/strategies → strategies}/hyperlend_stable_yield_strategy/README.md +4 -3
  34. wayfinder_paths/{vaults/strategies → strategies}/hyperlend_stable_yield_strategy/manifest.yaml +1 -1
  35. wayfinder_paths/{vaults/strategies → strategies}/hyperlend_stable_yield_strategy/strategy.py +11 -11
  36. wayfinder_paths/{vaults/strategies → strategies}/hyperlend_stable_yield_strategy/test_strategy.py +4 -2
  37. wayfinder_paths/{vaults/strategies → strategies}/stablecoin_yield_strategy/README.md +4 -3
  38. wayfinder_paths/{vaults/strategies → strategies}/stablecoin_yield_strategy/manifest.yaml +1 -1
  39. wayfinder_paths/{vaults/strategies → strategies}/stablecoin_yield_strategy/strategy.py +5 -5
  40. wayfinder_paths/{vaults/strategies → strategies}/stablecoin_yield_strategy/test_strategy.py +2 -2
  41. wayfinder_paths/{vaults/templates → templates}/adapter/README.md +4 -4
  42. wayfinder_paths/{vaults/templates → templates}/adapter/manifest.yaml +1 -1
  43. wayfinder_paths/{vaults/templates → templates}/strategy/README.md +6 -5
  44. wayfinder_paths/{vaults/templates → templates}/strategy/manifest.yaml +1 -1
  45. wayfinder_paths/{vaults/templates → templates}/strategy/test_strategy.py +1 -1
  46. {wayfinder_paths-0.1.3.dist-info → wayfinder_paths-0.1.4.dist-info}/METADATA +101 -23
  47. wayfinder_paths-0.1.4.dist-info/RECORD +125 -0
  48. wayfinder_paths/vaults/adapters/hyperlend_adapter/__init__.py +0 -7
  49. wayfinder_paths/vaults/adapters/token_adapter/examples.json +0 -26
  50. wayfinder_paths/vaults/strategies/__init__.py +0 -0
  51. wayfinder_paths-0.1.3.dist-info/RECORD +0 -126
  52. /wayfinder_paths/{vaults → adapters}/__init__.py +0 -0
  53. /wayfinder_paths/{vaults/adapters → adapters}/balance_adapter/examples.json +0 -0
  54. /wayfinder_paths/{vaults/adapters → adapters}/brap_adapter/__init__.py +0 -0
  55. /wayfinder_paths/{vaults/adapters → adapters}/brap_adapter/examples.json +0 -0
  56. /wayfinder_paths/{vaults/adapters → adapters}/hyperlend_adapter/adapter.py +0 -0
  57. /wayfinder_paths/{vaults/adapters → adapters}/ledger_adapter/__init__.py +0 -0
  58. /wayfinder_paths/{vaults/adapters → adapters}/ledger_adapter/adapter.py +0 -0
  59. /wayfinder_paths/{vaults/adapters → adapters}/ledger_adapter/examples.json +0 -0
  60. /wayfinder_paths/{vaults/adapters → adapters}/pool_adapter/__init__.py +0 -0
  61. /wayfinder_paths/{vaults/adapters → adapters}/pool_adapter/adapter.py +0 -0
  62. /wayfinder_paths/{vaults/adapters → adapters}/pool_adapter/examples.json +0 -0
  63. /wayfinder_paths/{vaults/adapters → adapters}/token_adapter/__init__.py +0 -0
  64. /wayfinder_paths/{vaults/adapters → adapters}/token_adapter/adapter.py +0 -0
  65. /wayfinder_paths/{vaults/policies → policies}/erc20.py +0 -0
  66. /wayfinder_paths/{vaults/policies → policies}/evm.py +0 -0
  67. /wayfinder_paths/{vaults/policies → policies}/hyperliquid.py +0 -0
  68. /wayfinder_paths/{vaults/policies → policies}/util.py +0 -0
  69. /wayfinder_paths/{vaults/adapters → strategies}/__init__.py +0 -0
  70. /wayfinder_paths/{vaults/strategies → strategies}/config.py +0 -0
  71. /wayfinder_paths/{vaults/strategies → strategies}/hyperlend_stable_yield_strategy/examples.json +0 -0
  72. /wayfinder_paths/{vaults/strategies → strategies}/stablecoin_yield_strategy/examples.json +0 -0
  73. /wayfinder_paths/{vaults/templates → templates}/adapter/adapter.py +0 -0
  74. /wayfinder_paths/{vaults/templates → templates}/adapter/examples.json +0 -0
  75. /wayfinder_paths/{vaults/templates → templates}/adapter/test_adapter.py +0 -0
  76. /wayfinder_paths/{vaults/templates → templates}/strategy/examples.json +0 -0
  77. /wayfinder_paths/{vaults/templates → templates}/strategy/strategy.py +0 -0
  78. {wayfinder_paths-0.1.3.dist-info → wayfinder_paths-0.1.4.dist-info}/LICENSE +0 -0
  79. {wayfinder_paths-0.1.3.dist-info → wayfinder_paths-0.1.4.dist-info}/WHEEL +0 -0
@@ -6,7 +6,9 @@ This guide explains how to configure your vault strategies for local testing.
6
6
 
7
7
  ```bash
8
8
  # 1. Generate test wallets (required!)
9
- poetry run python wayfinder_paths/scripts/make_wallets.py --default --vault
9
+ # Creates a main wallet (or use 'just create-strategy' which auto-creates wallets)
10
+ just create-wallets
11
+ # Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
10
12
 
11
13
  # 2. Create your config file
12
14
  cp wayfinder_paths/config.example.json config.json
@@ -25,11 +27,11 @@ cp wayfinder_paths/config.example.json config.json
25
27
  "username": "your_username", // OPTIONAL: For OAuth authentication
26
28
  "password": "your_password", // OPTIONAL: For OAuth authentication
27
29
  "refresh_token": null, // OPTIONAL: Alternative to username/password
28
- "api_key": "sk_live_abc123..." // OPTIONAL: For service account authentication
30
+ "api_key": "sk_live_abc123..." // OPTIONAL: For service account authentication (loaded directly by clients, not stored in UserConfig)
29
31
  },
30
32
  "system": {
31
33
  "api_base_url": "https://wayfinder.ai/api/v1",
32
- "api_key": "sk_live_abc123...", // OPTIONAL: System-level API key (alternative to user.api_key)
34
+ "api_key": "sk_live_abc123...", // OPTIONAL: System-level API key (alternative to user.api_key, loaded directly by clients)
33
35
  "wallets_path": "wallets.json" // Path to your generated wallets.json
34
36
  },
35
37
  "strategy": {
@@ -48,11 +50,13 @@ cp wayfinder_paths/config.example.json config.json
48
50
  **Authentication (choose one method):**
49
51
 
50
52
  **Option 1: Service Account (API Key) - Recommended for Production**
51
- - `user.api_key` - Your Wayfinder API key for service account authentication
52
- - OR `system.api_key` - System-level API key (alternative location)
53
+ - `user.api_key` - Your Wayfinder API key for service account authentication (loaded directly by clients from config.json)
54
+ - OR `system.api_key` - System-level API key (alternative location, loaded directly by clients)
53
55
  - OR set `WAYFINDER_API_KEY` environment variable
54
56
  - OR pass `api_key` parameter to strategy constructor
55
57
 
58
+ **Note:** API keys in `config.json` are loaded directly by `WayfinderClient` via `_load_config_credentials()`, not through the `UserConfig` or `SystemConfig` dataclasses. This is intentional to allow flexible credential loading.
59
+
56
60
  **Option 2: Personal Access (OAuth) - For Development**
57
61
  - `user.username` - Your Wayfinder backend username
58
62
  - `user.password` - Your Wayfinder backend password
@@ -93,24 +97,24 @@ Individual strategies may have their own configuration parameters. Check the str
93
97
  Use the built-in script to generate test wallets for local development:
94
98
 
95
99
  ```bash
96
- # Generate default and vault wallets (recommended)
97
- poetry run python wayfinder_paths/scripts/make_wallets.py --default --vault
100
+ # Generate main wallet (recommended for initial setup)
101
+ poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
98
102
 
99
103
  # Add additional wallets for multi-account testing
100
- poetry run python wayfinder_paths/scripts/make_wallets.py --default --vault -n 3
104
+ poetry run python wayfinder_paths/scripts/make_wallets.py -n 3
101
105
 
102
- # Replace existing wallets
103
- poetry run python wayfinder_paths/scripts/make_wallets.py --default --vault --override
106
+ # Create a wallet with a specific label (e.g., for a strategy)
107
+ poetry run python wayfinder_paths/scripts/make_wallets.py --label "my_strategy_name"
104
108
 
105
109
  # Generate keystore files (for geth/web3 compatibility)
106
- poetry run python wayfinder_paths/scripts/make_wallets.py --default --vault --keystore-password "your-password"
110
+ poetry run python wayfinder_paths/scripts/make_wallets.py -n 1 --keystore-password "your-password"
107
111
  ```
108
112
 
109
113
  This creates `wallets.json` in the repository root with:
110
- - **default** wallet - your main wallet for testing
111
- - Additional unlabeled wallets if specified
114
+ - **main** wallet - your main wallet for testing (labeled "main")
115
+ - Additional wallets with labels if specified
112
116
 
113
- **Note:** Generated wallets are for testing only. Wallet addresses are automatically loaded from `wallets.json` when not explicitly set in config.
117
+ **Note:** Generated wallets are for testing only. Wallet addresses are automatically loaded from `wallets.json` when not explicitly set in config. Strategy-specific wallets are automatically created when you use `just create-strategy "Strategy Name"`.
114
118
 
115
119
  ## Per-Strategy Wallets
116
120
 
@@ -147,7 +151,7 @@ Wallets in `wallets.json` are stored with labels that match strategy directory n
147
151
  {
148
152
  "address": "0x...",
149
153
  "private_key_hex": "...",
150
- "label": "default"
154
+ "label": "main"
151
155
  },
152
156
  {
153
157
  "address": "0x...",
@@ -235,7 +239,7 @@ No code changes are required - existing strategies continue to work.
235
239
  To use a custodial wallet provider (e.g., Privy, Turnkey), inject it directly into adapters:
236
240
 
237
241
  ```python
238
- from vaults.adapters.evm_transaction_adapter.adapter import EvmTransactionAdapter
242
+ from adapters.evm_transaction_adapter.adapter import EvmTransactionAdapter
239
243
  from my_privy_integration import PrivyWalletProvider
240
244
 
241
245
  # Create your custom wallet provider
@@ -270,7 +274,7 @@ API keys provide service account authentication and are automatically discovered
270
274
 
271
275
  #### Option A: Strategy Constructor (Programmatic)
272
276
  ```python
273
- from wayfinder_paths.vaults.strategies.stablecoin_yield_strategy.strategy import StablecoinYieldStrategy
277
+ from wayfinder_paths.strategies.stablecoin_yield_strategy.strategy import StablecoinYieldStrategy
274
278
 
275
279
  strategy = StablecoinYieldStrategy(
276
280
  config={...},
@@ -301,10 +305,11 @@ export WAYFINDER_API_KEY="sk_live_abc123..."
301
305
  - When a strategy receives an `api_key`, it sets `os.environ["WAYFINDER_API_KEY"]`
302
306
  - All clients created by adapters automatically discover the API key from:
303
307
  - Constructor parameter (if passed)
304
- - `config.json` (via `_load_config_credentials()`)
308
+ - `config.json` (via `WayfinderClient._load_config_credentials()` which reads `user.api_key` or `system.api_key`)
305
309
  - `WAYFINDER_API_KEY` environment variable
306
310
  - API keys are included in **all** API requests (including public endpoints) for rate limiting
307
311
  - No need to pass API keys explicitly to adapters or clients—they auto-discover it
312
+ - **Note:** API keys in `config.json` are loaded directly by clients, not stored in the `UserConfig` or `SystemConfig` dataclasses
308
313
 
309
314
  ### 2. Personal Access Authentication (OAuth)
310
315
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter that exposes wallet, token, and pool balances backed by `WalletClient`/`TokenClient` and now orchestrates transfers between the configured main/vault wallets (with ledger bookkeeping).
4
4
 
5
- - Entrypoint: `vaults.adapters.balance_adapter.adapter.BalanceAdapter`
5
+ - Entrypoint: `adapters.balance_adapter.adapter.BalanceAdapter`
6
6
  - Manifest: `manifest.yaml`
7
7
  - Tests: `test_adapter.py`
8
8
 
@@ -14,7 +14,7 @@ The adapter declares both `wallet_read` and `wallet_transfer` capabilities in it
14
14
 
15
15
  ```python
16
16
  from wayfinder_paths.core.services.web3_service import DefaultWeb3Service
17
- from wayfinder_paths.vaults.adapters.balance_adapter.adapter import BalanceAdapter
17
+ from wayfinder_paths.adapters.balance_adapter.adapter import BalanceAdapter
18
18
 
19
19
  web3_service = DefaultWeb3Service(config)
20
20
  balance = BalanceAdapter(config, web3_service=web3_service)
@@ -1,13 +1,13 @@
1
1
  from typing import Any
2
2
 
3
+ from wayfinder_paths.adapters.ledger_adapter.adapter import LedgerAdapter
4
+ from wayfinder_paths.adapters.token_adapter.adapter import TokenAdapter
3
5
  from wayfinder_paths.core.adapters.BaseAdapter import BaseAdapter
4
6
  from wayfinder_paths.core.clients.TokenClient import TokenClient
5
7
  from wayfinder_paths.core.clients.WalletClient import WalletClient
6
8
  from wayfinder_paths.core.services.base import Web3Service
7
9
  from wayfinder_paths.core.settings import settings
8
10
  from wayfinder_paths.core.utils.evm_helpers import resolve_chain_id
9
- from wayfinder_paths.vaults.adapters.ledger_adapter.adapter import LedgerAdapter
10
- from wayfinder_paths.vaults.adapters.token_adapter.adapter import TokenAdapter
11
11
 
12
12
 
13
13
  class BalanceAdapter(BaseAdapter):
@@ -1,5 +1,5 @@
1
1
  schema_version: "0.1"
2
- entrypoint: "vaults.adapters.balance_adapter.adapter.BalanceAdapter"
2
+ entrypoint: "adapters.balance_adapter.adapter.BalanceAdapter"
3
3
  capabilities:
4
4
  - "wallet_read"
5
5
  - "wallet_transfer"
@@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch
2
2
 
3
3
  import pytest
4
4
 
5
- from wayfinder_paths.vaults.adapters.balance_adapter.adapter import BalanceAdapter
5
+ from wayfinder_paths.adapters.balance_adapter.adapter import BalanceAdapter
6
6
 
7
7
 
8
8
  class TestBalanceAdapter:
@@ -21,19 +21,25 @@ class TestBalanceAdapter:
21
21
  return mock_client
22
22
 
23
23
  @pytest.fixture
24
- def adapter(self, mock_wallet_client, mock_token_client):
24
+ def mock_web3_service(self):
25
+ """Mock TokenClient for testing"""
26
+ mock_client = AsyncMock()
27
+ return mock_client
28
+
29
+ @pytest.fixture
30
+ def adapter(self, mock_wallet_client, mock_token_client, mock_web3_service):
25
31
  """Create a BalanceAdapter instance with mocked clients for testing"""
26
32
  with (
27
33
  patch(
28
- "wayfinder_paths.vaults.adapters.balance_adapter.adapter.WalletClient",
34
+ "wayfinder_paths.adapters.balance_adapter.adapter.WalletClient",
29
35
  return_value=mock_wallet_client,
30
36
  ),
31
37
  patch(
32
- "wayfinder_paths.vaults.adapters.balance_adapter.adapter.TokenClient",
38
+ "wayfinder_paths.adapters.balance_adapter.adapter.TokenClient",
33
39
  return_value=mock_token_client,
34
40
  ),
35
41
  ):
36
- return BalanceAdapter(config={})
42
+ return BalanceAdapter(config={}, web3_service=mock_web3_service)
37
43
 
38
44
  @pytest.mark.asyncio
39
45
  async def test_health_check(self, adapter):
@@ -68,7 +74,7 @@ class TestBalanceAdapter:
68
74
  return_value=(True, mock_response)
69
75
  )
70
76
 
71
- success, data = await adapter.get_all_enriched_token_balances_for_wallet(
77
+ success, data = await adapter.get_all_balances(
72
78
  wallet_address="0x1234567890123456789012345678901234567890",
73
79
  enrich=True,
74
80
  )
@@ -26,7 +26,7 @@ The BRAPClient will automatically:
26
26
 
27
27
  ```python
28
28
  from wayfinder_paths.core.services.web3_service import DefaultWeb3Service
29
- from wayfinder_paths.vaults.adapters.brap_adapter.adapter import BRAPAdapter
29
+ from wayfinder_paths.adapters.brap_adapter.adapter import BRAPAdapter
30
30
 
31
31
  web3_service = DefaultWeb3Service(config)
32
32
  adapter = BRAPAdapter(web3_service=web3_service)
@@ -2,6 +2,8 @@ from typing import Any
2
2
 
3
3
  from eth_utils import to_checksum_address
4
4
 
5
+ from wayfinder_paths.adapters.ledger_adapter.adapter import LedgerAdapter
6
+ from wayfinder_paths.adapters.token_adapter.adapter import TokenAdapter
5
7
  from wayfinder_paths.core.adapters.BaseAdapter import BaseAdapter
6
8
  from wayfinder_paths.core.clients.BRAPClient import BRAPClient
7
9
  from wayfinder_paths.core.clients.SimulationClient import SimulationClient
@@ -9,8 +11,6 @@ from wayfinder_paths.core.clients.TokenClient import TokenClient
9
11
  from wayfinder_paths.core.constants import DEFAULT_SLIPPAGE
10
12
  from wayfinder_paths.core.services.base import Web3Service
11
13
  from wayfinder_paths.core.settings import settings
12
- from wayfinder_paths.vaults.adapters.ledger_adapter.adapter import LedgerAdapter
13
- from wayfinder_paths.vaults.adapters.token_adapter.adapter import TokenAdapter
14
14
 
15
15
  _NEEDS_CLEAR_APPROVAL = {
16
16
  (1, "0xdac17f958d2ee523a2206206994597c13d831ec7"),
@@ -1,5 +1,5 @@
1
1
  schema_version: "0.1"
2
- entrypoint: "vaults.adapters.brap_adapter.adapter.BRAPAdapter"
2
+ entrypoint: "adapters.brap_adapter.adapter.BRAPAdapter"
3
3
  capabilities:
4
4
  - "swap.quote"
5
5
  - "swap.execute"
@@ -3,7 +3,7 @@ from unittest.mock import AsyncMock, patch
3
3
 
4
4
  import pytest
5
5
 
6
- from wayfinder_paths.vaults.adapters.brap_adapter.adapter import BRAPAdapter
6
+ from wayfinder_paths.adapters.brap_adapter.adapter import BRAPAdapter
7
7
 
8
8
 
9
9
  class TestBRAPAdapter:
@@ -34,7 +34,7 @@ class TestBRAPAdapter:
34
34
  def adapter(self, mock_brap_client, mock_web3_service):
35
35
  """Create a BRAPAdapter instance with mocked client for testing"""
36
36
  with patch(
37
- "vaults.adapters.brap_adapter.adapter.BRAPClient",
37
+ "adapters.brap_adapter.adapter.BRAPClient",
38
38
  return_value=mock_brap_client,
39
39
  ):
40
40
  return BRAPAdapter(web3_service=mock_web3_service)
@@ -0,0 +1,7 @@
1
+ """
2
+ Hyperlend Adapter
3
+ """
4
+
5
+ from wayfinder_paths.adapters.hyperlend_adapter.adapter import HyperlendAdapter
6
+
7
+ __all__ = ["HyperlendAdapter"]
@@ -1,5 +1,5 @@
1
1
  schema_version: "0.1"
2
- entrypoint: "vaults.adapters.hyperlend_adapter.adapter.HyperlendAdapter"
2
+ entrypoint: "adapters.hyperlend_adapter.adapter.HyperlendAdapter"
3
3
  capabilities:
4
4
  - "hyperlend.stable_markets.read"
5
5
  - "hyperlend.markets.query"
@@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch
2
2
 
3
3
  import pytest
4
4
 
5
- from wayfinder_paths.vaults.adapters.hyperlend_adapter.adapter import HyperlendAdapter
5
+ from wayfinder_paths.adapters.hyperlend_adapter.adapter import HyperlendAdapter
6
6
 
7
7
 
8
8
  class TestHyperlendAdapter:
@@ -18,7 +18,7 @@ class TestHyperlendAdapter:
18
18
  def adapter(self, mock_hyperlend_client):
19
19
  """Create a HyperlendAdapter instance with mocked client for testing"""
20
20
  with patch(
21
- "wayfinder_paths.vaults.adapters.hyperlend_adapter.adapter.HyperlendClient",
21
+ "wayfinder_paths.adapters.hyperlend_adapter.adapter.HyperlendClient",
22
22
  return_value=mock_hyperlend_client,
23
23
  ):
24
24
  return HyperlendAdapter()
@@ -25,7 +25,7 @@ The LedgerClient will automatically:
25
25
  ### Initialize the Adapter
26
26
 
27
27
  ```python
28
- from wayfinder_paths.vaults.adapters.ledger_adapter.adapter import LedgerAdapter
28
+ from wayfinder_paths.adapters.ledger_adapter.adapter import LedgerAdapter
29
29
 
30
30
  # No configuration needed - uses LedgerClient with automatic settings
31
31
  adapter = LedgerAdapter()
@@ -1,5 +1,5 @@
1
1
  schema_version: "0.1"
2
- entrypoint: "vaults.adapters.ledger_adapter.adapter.LedgerAdapter"
2
+ entrypoint: "adapters.ledger_adapter.adapter.LedgerAdapter"
3
3
  capabilities:
4
4
  - "ledger.read"
5
5
  - "ledger.write"
@@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch
2
2
 
3
3
  import pytest
4
4
 
5
- from wayfinder_paths.vaults.adapters.ledger_adapter.adapter import LedgerAdapter
5
+ from wayfinder_paths.adapters.ledger_adapter.adapter import LedgerAdapter
6
6
 
7
7
 
8
8
  class TestLedgerAdapter:
@@ -18,7 +18,7 @@ class TestLedgerAdapter:
18
18
  def adapter(self, mock_ledger_client):
19
19
  """Create a LedgerAdapter instance with mocked client for testing"""
20
20
  with patch(
21
- "vaults.adapters.ledger_adapter.adapter.LedgerClient",
21
+ "adapters.ledger_adapter.adapter.LedgerClient",
22
22
  return_value=mock_ledger_client,
23
23
  ):
24
24
  return LedgerAdapter()
@@ -24,7 +24,7 @@ The PoolClient will automatically:
24
24
  ### Initialize the Adapter
25
25
 
26
26
  ```python
27
- from wayfinder_paths.vaults.adapters.pool_adapter.adapter import PoolAdapter
27
+ from wayfinder_paths.adapters.pool_adapter.adapter import PoolAdapter
28
28
 
29
29
  # No configuration needed - uses PoolClient with automatic settings
30
30
  adapter = PoolAdapter()
@@ -1,5 +1,5 @@
1
1
  schema_version: "0.1"
2
- entrypoint: "vaults.adapters.pool_adapter.adapter.PoolAdapter"
2
+ entrypoint: "adapters.pool_adapter.adapter.PoolAdapter"
3
3
  capabilities:
4
4
  - "pool.read"
5
5
  - "pool.analytics"
@@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch
2
2
 
3
3
  import pytest
4
4
 
5
- from wayfinder_paths.vaults.adapters.pool_adapter.adapter import PoolAdapter
5
+ from wayfinder_paths.adapters.pool_adapter.adapter import PoolAdapter
6
6
 
7
7
 
8
8
  class TestPoolAdapter:
@@ -18,7 +18,7 @@ class TestPoolAdapter:
18
18
  def adapter(self, mock_pool_client):
19
19
  """Create a PoolAdapter instance with mocked client for testing"""
20
20
  with patch(
21
- "vaults.adapters.pool_adapter.adapter.PoolClient",
21
+ "adapters.pool_adapter.adapter.PoolClient",
22
22
  return_value=mock_pool_client,
23
23
  ):
24
24
  return PoolAdapter()
@@ -20,7 +20,7 @@ The TokenClient will automatically:
20
20
  ### Initialize the Adapter
21
21
 
22
22
  ```python
23
- from wayfinder_paths.vaults.adapters.token_adapter.adapter import TokenAdapter
23
+ from wayfinder_paths.adapters.token_adapter.adapter import TokenAdapter
24
24
 
25
25
  # No configuration needed - uses TokenClient with automatic settings
26
26
  adapter = TokenAdapter()
@@ -0,0 +1,26 @@
1
+ {
2
+ "basic_usage": {
3
+ "description": "Basic usage of TokenAdapter to get token information",
4
+ "code": "from adapters.token_adapter.adapter import TokenAdapter\n\n# Initialize adapter (no config needed)\nadapter = TokenAdapter()\n\n# Get token by address\nsuccess, data = await adapter.get_token_by_address(\"0x1234567890abcdef1234567890abcdef12345678\")\nif success:\n print(f\"Token symbol: {data.get('symbol')}\")\n print(f\"Token name: {data.get('name')}\")\n print(f\"Decimals: {data.get('decimals')}\")\nelse:\n print(f\"Error: {data}\")"
5
+ },
6
+ "get_by_token_id": {
7
+ "description": "Get token information using token ID",
8
+ "code": "from adapters.token_adapter.adapter import TokenAdapter\n\n# Initialize adapter (no config needed)\nadapter = TokenAdapter()\n\n# Get token by ID\nsuccess, data = await adapter.get_token_by_id(\"token-12345\")\nif success:\n print(f\"Token data: {data}\")\nelse:\n print(f\"Error: {data}\")"
9
+ },
10
+ "flexible_lookup": {
11
+ "description": "Use flexible get_token method that tries both address and token_id",
12
+ "code": "from adapters.token_adapter.adapter import TokenAdapter\n\n# Initialize adapter (no config needed)\nadapter = TokenAdapter()\n\n# Try both address and token_id\nsuccess, data = await adapter.get_token(\n address=\"0x1234567890abcdef1234567890abcdef12345678\",\n token_id=\"token-12345\"\n)\nif success:\n print(f\"Found token: {data}\")\nelse:\n print(f\"Token not found: {data}\")"
13
+ },
14
+ "error_handling": {
15
+ "description": "Proper error handling for various scenarios",
16
+ "code": "from adapters.token_adapter.adapter import TokenAdapter\n\n# Initialize adapter (no config needed)\nadapter = TokenAdapter()\n\n# Handle missing parameters\ntry:\n success, data = await adapter.get_token()\n if not success:\n print(f\"Error: {data}\")\nexcept Exception as e:\n print(f\"Unexpected error: {e}\")\n\n# Handle API errors\nsuccess, data = await adapter.get_token_by_address(\"invalid-address\")\nif not success:\n print(f\"API error: {data}\")\nelse:\n print(f\"Token found: {data}\")"
17
+ },
18
+ "health_check": {
19
+ "description": "Check adapter health and connectivity",
20
+ "code": "from adapters.token_adapter.adapter import TokenAdapter\n\n# Initialize adapter (no config needed)\nadapter = TokenAdapter()\n\n# Check health\nhealth = await adapter.health_check()\nprint(f\"Adapter status: {health['status']}\")\nprint(f\"Connected: {health['connected']}\")\nprint(f\"Adapter type: {health['adapter']}\")\n\nif health['status'] == 'healthy':\n print(\"Adapter is ready to use\")\nelse:\n print(f\"Adapter has issues: {health.get('error', 'Unknown error')}\")"
21
+ },
22
+ "batch_operations": {
23
+ "description": "Perform multiple token lookups efficiently",
24
+ "code": "from adapters.token_adapter.adapter import TokenAdapter\nimport asyncio\n\n# Initialize adapter (no config needed)\nadapter = TokenAdapter()\n\n# List of token addresses to lookup\ntoken_addresses = [\n \"0x1234567890abcdef1234567890abcdef12345678\",\n \"0xabcdef1234567890abcdef1234567890abcdef12\",\n \"0x9876543210fedcba9876543210fedcba98765432\"\n]\n\n# Batch lookup\ntoken_data = {}\nfor address in token_addresses:\n success, data = await adapter.get_token_by_address(address)\n if success:\n token_data[address] = data\n else:\n print(f\"Failed to get token for {address}: {data}\")\n\nprint(f\"Successfully retrieved {len(token_data)} tokens\")\nfor address, data in token_data.items():\n print(f\"{address}: {data.get('symbol', 'Unknown')} - {data.get('name', 'Unknown')}\")"
25
+ }
26
+ }
@@ -1,5 +1,5 @@
1
1
  schema_version: "0.1"
2
- entrypoint: "vaults.adapters.token_adapter.adapter.TokenAdapter"
2
+ entrypoint: "adapters.token_adapter.adapter.TokenAdapter"
3
3
  capabilities:
4
4
  - "token.read"
5
5
  dependencies:
@@ -2,7 +2,7 @@ from unittest.mock import patch
2
2
 
3
3
  import pytest
4
4
 
5
- from wayfinder_paths.vaults.adapters.token_adapter.adapter import TokenAdapter
5
+ from wayfinder_paths.adapters.token_adapter.adapter import TokenAdapter
6
6
 
7
7
 
8
8
  class TestTokenAdapter:
@@ -2,10 +2,12 @@
2
2
  "user": {
3
3
  "username": "your_username",
4
4
  "password": "your_password",
5
- "refresh_token": null
5
+ "refresh_token": null,
6
+ "api_key": "sk_live_abc123..."
6
7
  },
7
8
  "system": {
8
9
  "api_base_url": "https://wayfinder.ai/api/v1",
10
+ "api_key": "sk_live_abc123...",
9
11
  "wallets_path": "wallets.json"
10
12
  },
11
13
  "strategy": {
@@ -40,7 +40,7 @@ class StrategyManifest(BaseModel):
40
40
  schema_version: str = Field(default="0.1")
41
41
  entrypoint: str = Field(
42
42
  ...,
43
- description="Python path to class, e.g. vaults.strategies.funding_rate_strategy.FundingRateStrategy",
43
+ description="Python path to class, e.g. strategies.funding_rate_strategy.FundingRateStrategy",
44
44
  )
45
45
  name: str | None = Field(
46
46
  default=None,
@@ -1,4 +1,4 @@
1
- from wayfinder_paths.vaults.policies.util import allow_functions
1
+ from wayfinder_paths.policies.util import allow_functions
2
2
 
3
3
  ENSO_ROUTER = "0xf75584ef6673ad213a685a1b58cc0330b8ea22cf"
4
4
 
@@ -1,5 +1,5 @@
1
- from wayfinder_paths.vaults.policies.evm import native_transfer
2
- from wayfinder_paths.vaults.policies.util import allow_functions
1
+ from wayfinder_paths.policies.evm import native_transfer
2
+ from wayfinder_paths.policies.util import allow_functions
3
3
 
4
4
  WHYPE_TOKEN = "0x5555555555555555555555555555555555555555"
5
5
  HYPERCORE_SENTINEL_ADDRESS = "0x2222222222222222222222222222222222222222"
@@ -1,4 +1,4 @@
1
- from wayfinder_paths.vaults.policies.util import allow_functions
1
+ from wayfinder_paths.policies.util import allow_functions
2
2
 
3
3
  HYPERLEND_POOL = "0x00A89d7a5A02160f20150EbEA7a2b5E4879A1A8b"
4
4
 
@@ -1,4 +1,4 @@
1
- from wayfinder_paths.vaults.policies.util import allow_functions
1
+ from wayfinder_paths.policies.util import allow_functions
2
2
 
3
3
  WETH = "0x4200000000000000000000000000000000000006"
4
4
 
@@ -1,4 +1,4 @@
1
- from wayfinder_paths.vaults.policies.util import allow_functions
1
+ from wayfinder_paths.policies.util import allow_functions
2
2
 
3
3
  PRJX_ROUTER = "0x1ebdfc75ffe3ba3de61e7138a3e8706ac841af9b"
4
4
  PRJX_NPM = "0xeAd19AE861c29bBb2101E834922B2FEee69B9091"
@@ -28,7 +28,7 @@ def load_strategy(
28
28
  Dynamically load a strategy by name using its manifest
29
29
 
30
30
  Args:
31
- strategy_name: Name of the strategy to load (directory name in vaults/strategies/)
31
+ strategy_name: Name of the strategy to load (directory name in strategies/)
32
32
  strategy_config: Configuration dict for the strategy
33
33
  simulation: Enable simulation mode for testing
34
34
  api_key: Optional API key for service account authentication
@@ -37,7 +37,7 @@ def load_strategy(
37
37
  Strategy instance
38
38
  """
39
39
  # Find strategy manifest by scanning for manifest.yaml in the strategy directory
40
- strategies_dir = Path(__file__).parent / "vaults" / "strategies"
40
+ strategies_dir = Path(__file__).parent / "strategies"
41
41
  strategy_dir = strategies_dir / strategy_name
42
42
  manifest_path = strategy_dir / "manifest.yaml"
43
43
 
@@ -120,7 +120,7 @@ async def run_strategy(
120
120
  # Extract directory name from manifest path for wallet lookup
121
121
  # Use the directory name (strategy identifier) for wallet lookup
122
122
  manifest_dir = Path(manifest_path).parent
123
- strategies_dir = Path(__file__).parent / "vaults" / "strategies"
123
+ strategies_dir = Path(__file__).parent / "strategies"
124
124
  try:
125
125
  # Try to get relative path - if it's under strategies_dir, use directory name
126
126
  rel_path = manifest_dir.relative_to(strategies_dir)
@@ -64,13 +64,13 @@ def main():
64
64
  parser.add_argument(
65
65
  "--template-dir",
66
66
  type=Path,
67
- default=Path(__file__).parent.parent / "vaults" / "templates" / "strategy",
67
+ default=Path(__file__).parent.parent / "templates" / "strategy",
68
68
  help="Path to strategy template directory",
69
69
  )
70
70
  parser.add_argument(
71
71
  "--strategies-dir",
72
72
  type=Path,
73
- default=Path(__file__).parent.parent / "vaults" / "strategies",
73
+ default=Path(__file__).parent.parent / "strategies",
74
74
  help="Path to strategies directory",
75
75
  )
76
76
  parser.add_argument(
@@ -136,7 +136,7 @@ def main():
136
136
  print(f" Updated strategy.py with class name: {class_name}")
137
137
 
138
138
  # Generate entrypoint path
139
- entrypoint = f"vaults.strategies.{dir_name}.strategy.{class_name}"
139
+ entrypoint = f"strategies.{dir_name}.strategy.{class_name}"
140
140
 
141
141
  # Update manifest with name (using directory name) and entrypoint
142
142
  manifest_path = strategy_dir / "manifest.yaml"
@@ -138,7 +138,7 @@ def validate_strategy_manifest(manifest_path: str) -> tuple[bool, list[str]]:
138
138
  def find_adapter_manifests() -> list[Path]:
139
139
  """Find all adapter manifest files."""
140
140
  manifests = []
141
- adapter_dir = Path(__file__).parent.parent / "vaults" / "adapters"
141
+ adapter_dir = Path(__file__).parent.parent / "adapters"
142
142
  if adapter_dir.exists():
143
143
  for adapter_path in adapter_dir.iterdir():
144
144
  manifest_path = adapter_path / "manifest.yaml"
@@ -150,7 +150,7 @@ def find_adapter_manifests() -> list[Path]:
150
150
  def find_strategy_manifests() -> list[Path]:
151
151
  """Find all strategy manifest files."""
152
152
  manifests = []
153
- strategy_dir = Path(__file__).parent.parent / "vaults" / "strategies"
153
+ strategy_dir = Path(__file__).parent.parent / "strategies"
154
154
  if strategy_dir.exists():
155
155
  for strategy_path in strategy_dir.iterdir():
156
156
  manifest_path = strategy_path / "manifest.yaml"
@@ -1,6 +1,6 @@
1
1
  # Hyperlend Stable Yield Strategy
2
2
 
3
- - Entrypoint: `vaults.strategies.hyperlend_stable_yield_strategy.strategy.HyperlendStableYieldStrategy`
3
+ - Entrypoint: `strategies.hyperlend_stable_yield_strategy.strategy.HyperlendStableYieldStrategy`
4
4
  - Manifest: `manifest.yaml`
5
5
  - Examples: `examples.json`
6
6
  - Tests: `test_strategy.py`
@@ -75,8 +75,9 @@ The manifest policy simply locks transactions to the vault wallet ID:
75
75
  # Install dependencies
76
76
  poetry install
77
77
 
78
- # Generate default + vault wallets (writes wallets.json)
79
- poetry run python wayfinder_paths/scripts/make_wallets.py --default --vault
78
+ # Generate main wallet (writes wallets.json)
79
+ # Creates a main wallet (or use 'just create-strategy' which auto-creates wallets)
80
+ poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
80
81
 
81
82
  # Copy config and edit credentials (or rely on env vars)
82
83
  cp wayfinder_paths/config.example.json config.json
@@ -1,5 +1,5 @@
1
1
  schema_version: "0.1"
2
- entrypoint: "vaults.strategies.hyperlend_stable_yield_strategy.strategy.HyperlendStableYieldStrategy"
2
+ entrypoint: "strategies.hyperlend_stable_yield_strategy.strategy.HyperlendStableYieldStrategy"
3
3
  permissions:
4
4
  policy: "(wallet.id == 'FORMAT_WALLET_ID')"
5
5
  adapters: