wayfinder-paths 0.1.2__tar.gz → 0.1.4__tar.gz
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.
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/PKG-INFO +101 -23
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/README.md +100 -22
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/pyproject.toml +2 -2
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/CONFIG_GUIDE.md +23 -18
- wayfinder_paths-0.1.4/wayfinder_paths/abis/generic/erc20.json +383 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/balance_adapter/README.md +2 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/balance_adapter/adapter.py +2 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/balance_adapter/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/balance_adapter/test_adapter.py +12 -6
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/brap_adapter/README.md +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/brap_adapter/adapter.py +2 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/brap_adapter/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/brap_adapter/test_adapter.py +2 -2
- wayfinder_paths-0.1.4/wayfinder_paths/adapters/hyperlend_adapter/__init__.py +7 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/hyperlend_adapter/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/hyperlend_adapter/test_adapter.py +2 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/ledger_adapter/README.md +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/ledger_adapter/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/ledger_adapter/test_adapter.py +2 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/pool_adapter/README.md +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/pool_adapter/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/pool_adapter/test_adapter.py +2 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/token_adapter/README.md +1 -1
- wayfinder_paths-0.1.4/wayfinder_paths/adapters/token_adapter/examples.json +26 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/token_adapter/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/token_adapter/test_adapter.py +1 -1
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/config.example.json +3 -1
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/engine/manifest.py +1 -1
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/strategies/Strategy.py +3 -3
- wayfinder_paths-0.1.4/wayfinder_paths/core/strategies/descriptors.py +80 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/utils/evm_helpers.py +39 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/enso.py +17 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/erc20.py +34 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/evm.py +21 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/hyper_evm.py +19 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/hyperlend.py +12 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/hyperliquid.py +30 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/moonwell.py +54 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/prjx.py +30 -0
- wayfinder_paths-0.1.4/wayfinder_paths/policies/util.py +27 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/run_strategy.py +3 -3
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/scripts/create_strategy.py +3 -3
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/scripts/validate_manifests.py +2 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/hyperlend_stable_yield_strategy/README.md +4 -3
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/hyperlend_stable_yield_strategy/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/hyperlend_stable_yield_strategy/strategy.py +143 -81
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/hyperlend_stable_yield_strategy/test_strategy.py +4 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/stablecoin_yield_strategy/README.md +4 -3
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/stablecoin_yield_strategy/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/stablecoin_yield_strategy/strategy.py +117 -80
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/stablecoin_yield_strategy/test_strategy.py +2 -2
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/adapter/README.md +4 -4
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/adapter/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/strategy/README.md +6 -5
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/strategy/manifest.yaml +1 -1
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/strategy/test_strategy.py +1 -1
- wayfinder_paths-0.1.2/wayfinder_paths/vaults/adapters/hyperlend_adapter/__init__.py +0 -7
- wayfinder_paths-0.1.2/wayfinder_paths/vaults/adapters/token_adapter/examples.json +0 -26
- wayfinder_paths-0.1.2/wayfinder_paths/vaults/strategies/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/LICENSE +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/core/services → wayfinder_paths-0.1.4/wayfinder_paths/adapters}/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/balance_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/brap_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/brap_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/hyperlend_adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/ledger_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/ledger_adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/ledger_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/pool_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/pool_adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/pool_adapter/examples.json +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/token_adapter/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/adapters/token_adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/conftest.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/adapters/BaseAdapter.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/adapters/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/adapters/base.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/AuthClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/BRAPClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/ClientManager.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/HyperlendClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/LedgerClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/PoolClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/SimulationClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/TokenClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/TransactionClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/WalletClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/WayfinderClient.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/protocols.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/clients/sdk_example.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/config.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/constants/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/constants/base.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/constants/erc20_abi.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/constants/hyperlend_abi.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/engine/VaultJob.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/engine/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/scripts → wayfinder_paths-0.1.4/wayfinder_paths/core/services}/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/services/base.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/services/local_evm_txn.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/services/local_token_txn.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/services/web3_service.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/settings.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/strategies/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/strategies/base.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/utils/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/utils/wallets.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/wallets/README.md +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/wallets/WalletManager.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/core/wallets/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/tests → wayfinder_paths-0.1.4/wayfinder_paths/scripts}/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/scripts/make_wallets.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths/strategies}/__init__.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/config.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/hyperlend_stable_yield_strategy/examples.json +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/strategies/stablecoin_yield_strategy/examples.json +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/adapter/adapter.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/adapter/examples.json +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/adapter/test_adapter.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/strategy/examples.json +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults → wayfinder_paths-0.1.4/wayfinder_paths}/templates/strategy/strategy.py +0 -0
- {wayfinder_paths-0.1.2/wayfinder_paths/vaults/adapters → wayfinder_paths-0.1.4/wayfinder_paths/tests}/__init__.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/tests/test_smoke_manifest.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/tests/test_test_coverage.py +0 -0
- {wayfinder_paths-0.1.2 → wayfinder_paths-0.1.4}/wayfinder_paths/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: wayfinder-paths
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Wayfinder Path: strategies and adapters
|
|
5
5
|
Author: Wayfinder
|
|
6
6
|
Author-email: dev@wayfinder.ai
|
|
@@ -42,8 +42,9 @@ curl -sSL https://install.python-poetry.org | python3 -
|
|
|
42
42
|
poetry install
|
|
43
43
|
|
|
44
44
|
# ⚠️ Generate test wallets FIRST (required!)
|
|
45
|
-
# This creates wallets.json with
|
|
46
|
-
|
|
45
|
+
# This creates wallets.json with a main wallet for local testing
|
|
46
|
+
just create-wallets
|
|
47
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
47
48
|
|
|
48
49
|
# Copy and configure
|
|
49
50
|
cp wayfinder_paths/config.example.json config.json
|
|
@@ -167,7 +168,9 @@ cd wayfinder-paths
|
|
|
167
168
|
poetry install
|
|
168
169
|
|
|
169
170
|
# 3. Generate test wallets (required before testing!)
|
|
170
|
-
|
|
171
|
+
# Creates a main wallet (or use 'just create-strategy' which auto-creates wallets)
|
|
172
|
+
just create-wallets
|
|
173
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
171
174
|
|
|
172
175
|
# 4. Create a new strategy (recommended - automatically creates wallet)
|
|
173
176
|
just create-strategy "My Strategy Name"
|
|
@@ -230,7 +233,7 @@ Adapter manifests declare the capabilities an adapter provides and the clients i
|
|
|
230
233
|
**Schema:**
|
|
231
234
|
```yaml
|
|
232
235
|
schema_version: "0.1"
|
|
233
|
-
entrypoint: "
|
|
236
|
+
entrypoint: "adapters.my_adapter.adapter.MyAdapter"
|
|
234
237
|
capabilities:
|
|
235
238
|
- "pool.read"
|
|
236
239
|
- "pool.analytics"
|
|
@@ -248,7 +251,7 @@ dependencies:
|
|
|
248
251
|
**Example** (`vaults/adapters/pool_adapter/manifest.yaml`):
|
|
249
252
|
```yaml
|
|
250
253
|
schema_version: "0.1"
|
|
251
|
-
entrypoint: "
|
|
254
|
+
entrypoint: "adapters.pool_adapter.adapter.PoolAdapter"
|
|
252
255
|
capabilities:
|
|
253
256
|
- "pool.read"
|
|
254
257
|
- "pool.analytics"
|
|
@@ -268,7 +271,7 @@ Strategy manifests declare permissions and required adapters with their capabili
|
|
|
268
271
|
**Schema:**
|
|
269
272
|
```yaml
|
|
270
273
|
schema_version: "0.1"
|
|
271
|
-
entrypoint: "
|
|
274
|
+
entrypoint: "strategies.my_strategy.strategy.MyStrategy"
|
|
272
275
|
permissions:
|
|
273
276
|
policy: "(wallet.id == 'FORMAT_WALLET_ID') && (eth.tx.to == '0x...')"
|
|
274
277
|
adapters:
|
|
@@ -290,7 +293,7 @@ adapters:
|
|
|
290
293
|
**Example** (`vaults/strategies/stablecoin_yield_strategy/manifest.yaml`):
|
|
291
294
|
```yaml
|
|
292
295
|
schema_version: "0.1"
|
|
293
|
-
entrypoint: "
|
|
296
|
+
entrypoint: "strategies.stablecoin_yield_strategy.strategy.StablecoinYieldStrategy"
|
|
294
297
|
permissions:
|
|
295
298
|
policy: "(wallet.id == 'FORMAT_WALLET_ID') && ((eth.tx.data[0..10] == '0x095ea7b3' && eth.tx.data[34..74] == 'f75584ef6673ad213a685a1b58cc0330b8ea22cf') || (eth.tx.to == '0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf'))"
|
|
296
299
|
adapters:
|
|
@@ -328,7 +331,7 @@ The `validate_manifests.py` script performs multi-stage validation:
|
|
|
328
331
|
1. **Schema Validation** (via Pydantic models):
|
|
329
332
|
- Loads YAML file and validates against `AdapterManifest` or `StrategyManifest` schema
|
|
330
333
|
- Checks required fields, types, and basic constraints (e.g., capabilities cannot be empty)
|
|
331
|
-
- Validates entrypoint format (must be full import path like `"
|
|
334
|
+
- Validates entrypoint format (must be full import path like `"adapters.pool_adapter.adapter.PoolAdapter"`)
|
|
332
335
|
|
|
333
336
|
2. **Entrypoint Verification**:
|
|
334
337
|
- **For Adapters**: Imports the entrypoint class and verifies it's a subclass of `BaseAdapter`
|
|
@@ -385,7 +388,7 @@ For backend services and automated systems with higher rate limits:
|
|
|
385
388
|
|
|
386
389
|
**Option A: Pass to Strategy Constructor**
|
|
387
390
|
```python
|
|
388
|
-
from wayfinder_paths.
|
|
391
|
+
from wayfinder_paths.strategies.stablecoin_yield_strategy.strategy import StablecoinYieldStrategy
|
|
389
392
|
|
|
390
393
|
strategy = StablecoinYieldStrategy(
|
|
391
394
|
config={...},
|
|
@@ -411,7 +414,9 @@ export WAYFINDER_API_KEY="sk_live_abc123..."
|
|
|
411
414
|
}
|
|
412
415
|
```
|
|
413
416
|
|
|
414
|
-
**Priority Order:** Constructor parameter > `config.json` > `WAYFINDER_API_KEY` environment variable
|
|
417
|
+
**Priority Order:** Constructor parameter > `config.json` (user.api_key or system.api_key) > `WAYFINDER_API_KEY` environment variable
|
|
418
|
+
|
|
419
|
+
**Note:** API keys in `config.json` are loaded directly by `WayfinderClient` via `_load_config_credentials()`, not through the `UserConfig` or `SystemConfig` dataclasses. This allows flexible credential loading.
|
|
415
420
|
|
|
416
421
|
#### 2. Personal Access Authentication (OAuth)
|
|
417
422
|
For standalone SDK users with username/password:
|
|
@@ -431,6 +436,7 @@ For standalone SDK users with username/password:
|
|
|
431
436
|
- When an API key is available, it's used for all API requests (including public endpoints) for rate limiting
|
|
432
437
|
- If no API key is found, the system falls back to OAuth authentication
|
|
433
438
|
- All clients created by adapters automatically inherit the API key discovery mechanism
|
|
439
|
+
- API keys in `config.json` are loaded directly by `WayfinderClient._load_config_credentials()` from `user.api_key` or `system.api_key`, not stored in the `UserConfig` or `SystemConfig` dataclasses
|
|
434
440
|
|
|
435
441
|
See [CONFIG_GUIDE.md](wayfinder_paths/CONFIG_GUIDE.md) for detailed authentication documentation.
|
|
436
442
|
|
|
@@ -472,7 +478,7 @@ Strategies implement trading logic using adapters and the unified client system.
|
|
|
472
478
|
# wayfinder_paths/vaults/strategies/my_strategy/strategy.py
|
|
473
479
|
from wayfinder_paths.core.services.web3_service import DefaultWeb3Service
|
|
474
480
|
from wayfinder_paths.core.strategies.Strategy import StatusDict, StatusTuple, Strategy
|
|
475
|
-
from wayfinder_paths.
|
|
481
|
+
from wayfinder_paths.adapters.balance_adapter.adapter import BalanceAdapter
|
|
476
482
|
|
|
477
483
|
|
|
478
484
|
class MyStrategy(Strategy):
|
|
@@ -546,7 +552,9 @@ Each strategy manifest declares which adapters it needs and which capabilities i
|
|
|
546
552
|
|
|
547
553
|
```bash
|
|
548
554
|
# 1. Generate test wallets (required!)
|
|
549
|
-
|
|
555
|
+
# Creates a main wallet (or use 'just create-strategy' which auto-creates wallets)
|
|
556
|
+
just create-wallets
|
|
557
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
550
558
|
|
|
551
559
|
# 2. Run smoke tests
|
|
552
560
|
poetry run pytest -k smoke -v
|
|
@@ -577,7 +585,9 @@ cd wayfinder-paths
|
|
|
577
585
|
poetry install
|
|
578
586
|
|
|
579
587
|
# Generate test wallets (essential!)
|
|
580
|
-
|
|
588
|
+
# Creates a main wallet (or use 'just create-strategy' which auto-creates wallets)
|
|
589
|
+
just create-wallets
|
|
590
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
581
591
|
|
|
582
592
|
# Copy and configure
|
|
583
593
|
cp wayfinder_paths/config.example.json config.json
|
|
@@ -598,14 +608,17 @@ poetry run python wayfinder_paths/run_strategy.py stablecoin_yield_strategy --de
|
|
|
598
608
|
**Before running any strategies, generate test wallets.** This creates `wallets.json` in the repository root with throwaway wallets for local testing:
|
|
599
609
|
|
|
600
610
|
```bash
|
|
601
|
-
# Essential: Create
|
|
602
|
-
|
|
611
|
+
# Essential: Create main wallet for testing
|
|
612
|
+
just create-wallets
|
|
613
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
603
614
|
```
|
|
604
615
|
|
|
605
616
|
This creates:
|
|
606
|
-
- `
|
|
617
|
+
- `main` wallet - your main wallet for testing (labeled "main" in wallets.json)
|
|
607
618
|
- `wallets.json` - wallet addresses and private keys for local testing
|
|
608
619
|
|
|
620
|
+
**Note:** Strategy-specific wallets are automatically created when you use `just create-strategy "Strategy Name"`. For manual creation, use `just create-wallet "strategy_name"` or `poetry run python wayfinder_paths/scripts/make_wallets.py --label "strategy_name"`.
|
|
621
|
+
|
|
609
622
|
**Important:** These wallets are for testing only. Never use them with real funds or on mainnet.
|
|
610
623
|
|
|
611
624
|
**Per-Strategy Wallets:** Each strategy should have its own dedicated wallet. When you create a new strategy using `just create-strategy`, a wallet is automatically generated with a label matching the strategy directory name. The system automatically uses this wallet when running the strategy. See [CONFIG_GUIDE.md](wayfinder_paths/CONFIG_GUIDE.md) for details.
|
|
@@ -613,14 +626,14 @@ This creates:
|
|
|
613
626
|
Additional options:
|
|
614
627
|
|
|
615
628
|
```bash
|
|
616
|
-
# Add 3 extra
|
|
617
|
-
poetry run python wayfinder_paths/scripts/make_wallets.py
|
|
629
|
+
# Add 3 extra wallets for multi-account testing
|
|
630
|
+
poetry run python wayfinder_paths/scripts/make_wallets.py -n 3
|
|
618
631
|
|
|
619
|
-
#
|
|
620
|
-
poetry run python wayfinder_paths/scripts/make_wallets.py --
|
|
632
|
+
# Create a wallet with a specific label (e.g., for a strategy)
|
|
633
|
+
poetry run python wayfinder_paths/scripts/make_wallets.py --label "my_strategy_name"
|
|
621
634
|
|
|
622
|
-
#
|
|
623
|
-
poetry run python wayfinder_paths/scripts/make_wallets.py
|
|
635
|
+
# Generate keystore files (for geth/web3 compatibility)
|
|
636
|
+
poetry run python wayfinder_paths/scripts/make_wallets.py -n 1 --keystore-password "my-password"
|
|
624
637
|
```
|
|
625
638
|
|
|
626
639
|
### Configuration
|
|
@@ -645,6 +658,65 @@ cp wayfinder_paths/config.example.json config.json
|
|
|
645
658
|
poetry run python wayfinder_paths/run_strategy.py stablecoin_yield_strategy --config config.json
|
|
646
659
|
```
|
|
647
660
|
|
|
661
|
+
## 📦 Versioning
|
|
662
|
+
|
|
663
|
+
This package follows [Semantic Versioning](https://semver.org/) (SemVer) and is published to PyPI as a public package.
|
|
664
|
+
|
|
665
|
+
### Version Format: MAJOR.MINOR.PATCH
|
|
666
|
+
|
|
667
|
+
- **MAJOR** (X.0.0): Breaking changes that require code updates
|
|
668
|
+
- **MINOR** (0.X.0): New features, backward compatible
|
|
669
|
+
- **PATCH** (0.0.X): Bug fixes, backward compatible
|
|
670
|
+
|
|
671
|
+
### Version Bumping Rules
|
|
672
|
+
|
|
673
|
+
- **PATCH**: Bug fixes, security patches, documentation updates
|
|
674
|
+
- **MINOR**: New adapters, new strategies, new features (backward compatible)
|
|
675
|
+
- **MAJOR**: Breaking API changes, removed features, incompatible changes
|
|
676
|
+
|
|
677
|
+
### Important Notes
|
|
678
|
+
|
|
679
|
+
- **Versions are immutable**: Once published to PyPI, a version cannot be changed or deleted
|
|
680
|
+
- **Versions must be unique**: Each release must have a new, unique version number
|
|
681
|
+
- **Publishing is restricted**: Only publish from the `main` branch to prevent accidental releases
|
|
682
|
+
|
|
683
|
+
### Publishing Workflow and Order of Operations
|
|
684
|
+
|
|
685
|
+
**Critical**: Changes must follow this strict order:
|
|
686
|
+
|
|
687
|
+
1. **Merge to main**: All changes must be merged to the `main` branch first
|
|
688
|
+
2. **Publish to PyPI**: The new version must be published to PyPI from `main` branch
|
|
689
|
+
3. **Dependent changes**: Only after publishing can dependent changes be merged in other applications
|
|
690
|
+
|
|
691
|
+
**Why this order matters:**
|
|
692
|
+
- Other applications depend on this package from PyPI
|
|
693
|
+
- They cannot merge changes that depend on new versions until those versions are available on PyPI
|
|
694
|
+
- Publishing from `main` ensures the published version matches what's in the repository
|
|
695
|
+
- This prevents dependency resolution failures in downstream applications
|
|
696
|
+
|
|
697
|
+
**Example workflow:**
|
|
698
|
+
```bash
|
|
699
|
+
# 1. Make changes in a feature branch
|
|
700
|
+
git checkout -b feature/new-adapter
|
|
701
|
+
# ... make changes ...
|
|
702
|
+
git commit -m "Add new adapter"
|
|
703
|
+
|
|
704
|
+
# 2. Merge to main
|
|
705
|
+
git checkout main
|
|
706
|
+
git merge feature/new-adapter
|
|
707
|
+
|
|
708
|
+
# 3. Bump version in pyproject.toml (e.g., 0.1.3 → 0.2.0)
|
|
709
|
+
# Edit pyproject.toml: version = "0.2.0"
|
|
710
|
+
git commit -m "Bump version to 0.2.0"
|
|
711
|
+
git push origin main
|
|
712
|
+
|
|
713
|
+
# 4. Publish to PyPI (must be on main branch)
|
|
714
|
+
just publish
|
|
715
|
+
|
|
716
|
+
# 5. Now dependent applications can update their dependencies
|
|
717
|
+
# pip install wayfinder-paths==0.2.0
|
|
718
|
+
```
|
|
719
|
+
|
|
648
720
|
## 📦 Publishing
|
|
649
721
|
|
|
650
722
|
Publish to PyPI:
|
|
@@ -654,6 +726,12 @@ export PUBLISH_TOKEN="your_pypi_token"
|
|
|
654
726
|
just publish
|
|
655
727
|
```
|
|
656
728
|
|
|
729
|
+
**Important:**
|
|
730
|
+
- ⚠️ **Publishing is only allowed from the `main` branch** - the publish command will fail if run from any other branch
|
|
731
|
+
- ⚠️ **Versions must be unique** - ensure the version in `pyproject.toml` has been bumped and is unique
|
|
732
|
+
- ⚠️ **Follow the order of operations** - see [Versioning](#-versioning) section above for the required workflow
|
|
733
|
+
- ⚠️ **Versions are immutable** - once published, a version cannot be changed or deleted from PyPI
|
|
734
|
+
|
|
657
735
|
Install the published package:
|
|
658
736
|
|
|
659
737
|
```bash
|
|
@@ -20,8 +20,9 @@ curl -sSL https://install.python-poetry.org | python3 -
|
|
|
20
20
|
poetry install
|
|
21
21
|
|
|
22
22
|
# ⚠️ Generate test wallets FIRST (required!)
|
|
23
|
-
# This creates wallets.json with
|
|
24
|
-
|
|
23
|
+
# This creates wallets.json with a main wallet for local testing
|
|
24
|
+
just create-wallets
|
|
25
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
25
26
|
|
|
26
27
|
# Copy and configure
|
|
27
28
|
cp wayfinder_paths/config.example.json config.json
|
|
@@ -145,7 +146,9 @@ cd wayfinder-paths
|
|
|
145
146
|
poetry install
|
|
146
147
|
|
|
147
148
|
# 3. Generate test wallets (required before testing!)
|
|
148
|
-
|
|
149
|
+
# Creates a main wallet (or use 'just create-strategy' which auto-creates wallets)
|
|
150
|
+
just create-wallets
|
|
151
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
149
152
|
|
|
150
153
|
# 4. Create a new strategy (recommended - automatically creates wallet)
|
|
151
154
|
just create-strategy "My Strategy Name"
|
|
@@ -208,7 +211,7 @@ Adapter manifests declare the capabilities an adapter provides and the clients i
|
|
|
208
211
|
**Schema:**
|
|
209
212
|
```yaml
|
|
210
213
|
schema_version: "0.1"
|
|
211
|
-
entrypoint: "
|
|
214
|
+
entrypoint: "adapters.my_adapter.adapter.MyAdapter"
|
|
212
215
|
capabilities:
|
|
213
216
|
- "pool.read"
|
|
214
217
|
- "pool.analytics"
|
|
@@ -226,7 +229,7 @@ dependencies:
|
|
|
226
229
|
**Example** (`vaults/adapters/pool_adapter/manifest.yaml`):
|
|
227
230
|
```yaml
|
|
228
231
|
schema_version: "0.1"
|
|
229
|
-
entrypoint: "
|
|
232
|
+
entrypoint: "adapters.pool_adapter.adapter.PoolAdapter"
|
|
230
233
|
capabilities:
|
|
231
234
|
- "pool.read"
|
|
232
235
|
- "pool.analytics"
|
|
@@ -246,7 +249,7 @@ Strategy manifests declare permissions and required adapters with their capabili
|
|
|
246
249
|
**Schema:**
|
|
247
250
|
```yaml
|
|
248
251
|
schema_version: "0.1"
|
|
249
|
-
entrypoint: "
|
|
252
|
+
entrypoint: "strategies.my_strategy.strategy.MyStrategy"
|
|
250
253
|
permissions:
|
|
251
254
|
policy: "(wallet.id == 'FORMAT_WALLET_ID') && (eth.tx.to == '0x...')"
|
|
252
255
|
adapters:
|
|
@@ -268,7 +271,7 @@ adapters:
|
|
|
268
271
|
**Example** (`vaults/strategies/stablecoin_yield_strategy/manifest.yaml`):
|
|
269
272
|
```yaml
|
|
270
273
|
schema_version: "0.1"
|
|
271
|
-
entrypoint: "
|
|
274
|
+
entrypoint: "strategies.stablecoin_yield_strategy.strategy.StablecoinYieldStrategy"
|
|
272
275
|
permissions:
|
|
273
276
|
policy: "(wallet.id == 'FORMAT_WALLET_ID') && ((eth.tx.data[0..10] == '0x095ea7b3' && eth.tx.data[34..74] == 'f75584ef6673ad213a685a1b58cc0330b8ea22cf') || (eth.tx.to == '0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf'))"
|
|
274
277
|
adapters:
|
|
@@ -306,7 +309,7 @@ The `validate_manifests.py` script performs multi-stage validation:
|
|
|
306
309
|
1. **Schema Validation** (via Pydantic models):
|
|
307
310
|
- Loads YAML file and validates against `AdapterManifest` or `StrategyManifest` schema
|
|
308
311
|
- Checks required fields, types, and basic constraints (e.g., capabilities cannot be empty)
|
|
309
|
-
- Validates entrypoint format (must be full import path like `"
|
|
312
|
+
- Validates entrypoint format (must be full import path like `"adapters.pool_adapter.adapter.PoolAdapter"`)
|
|
310
313
|
|
|
311
314
|
2. **Entrypoint Verification**:
|
|
312
315
|
- **For Adapters**: Imports the entrypoint class and verifies it's a subclass of `BaseAdapter`
|
|
@@ -363,7 +366,7 @@ For backend services and automated systems with higher rate limits:
|
|
|
363
366
|
|
|
364
367
|
**Option A: Pass to Strategy Constructor**
|
|
365
368
|
```python
|
|
366
|
-
from wayfinder_paths.
|
|
369
|
+
from wayfinder_paths.strategies.stablecoin_yield_strategy.strategy import StablecoinYieldStrategy
|
|
367
370
|
|
|
368
371
|
strategy = StablecoinYieldStrategy(
|
|
369
372
|
config={...},
|
|
@@ -389,7 +392,9 @@ export WAYFINDER_API_KEY="sk_live_abc123..."
|
|
|
389
392
|
}
|
|
390
393
|
```
|
|
391
394
|
|
|
392
|
-
**Priority Order:** Constructor parameter > `config.json` > `WAYFINDER_API_KEY` environment variable
|
|
395
|
+
**Priority Order:** Constructor parameter > `config.json` (user.api_key or system.api_key) > `WAYFINDER_API_KEY` environment variable
|
|
396
|
+
|
|
397
|
+
**Note:** API keys in `config.json` are loaded directly by `WayfinderClient` via `_load_config_credentials()`, not through the `UserConfig` or `SystemConfig` dataclasses. This allows flexible credential loading.
|
|
393
398
|
|
|
394
399
|
#### 2. Personal Access Authentication (OAuth)
|
|
395
400
|
For standalone SDK users with username/password:
|
|
@@ -409,6 +414,7 @@ For standalone SDK users with username/password:
|
|
|
409
414
|
- When an API key is available, it's used for all API requests (including public endpoints) for rate limiting
|
|
410
415
|
- If no API key is found, the system falls back to OAuth authentication
|
|
411
416
|
- All clients created by adapters automatically inherit the API key discovery mechanism
|
|
417
|
+
- API keys in `config.json` are loaded directly by `WayfinderClient._load_config_credentials()` from `user.api_key` or `system.api_key`, not stored in the `UserConfig` or `SystemConfig` dataclasses
|
|
412
418
|
|
|
413
419
|
See [CONFIG_GUIDE.md](wayfinder_paths/CONFIG_GUIDE.md) for detailed authentication documentation.
|
|
414
420
|
|
|
@@ -450,7 +456,7 @@ Strategies implement trading logic using adapters and the unified client system.
|
|
|
450
456
|
# wayfinder_paths/vaults/strategies/my_strategy/strategy.py
|
|
451
457
|
from wayfinder_paths.core.services.web3_service import DefaultWeb3Service
|
|
452
458
|
from wayfinder_paths.core.strategies.Strategy import StatusDict, StatusTuple, Strategy
|
|
453
|
-
from wayfinder_paths.
|
|
459
|
+
from wayfinder_paths.adapters.balance_adapter.adapter import BalanceAdapter
|
|
454
460
|
|
|
455
461
|
|
|
456
462
|
class MyStrategy(Strategy):
|
|
@@ -524,7 +530,9 @@ Each strategy manifest declares which adapters it needs and which capabilities i
|
|
|
524
530
|
|
|
525
531
|
```bash
|
|
526
532
|
# 1. Generate test wallets (required!)
|
|
527
|
-
|
|
533
|
+
# Creates a main wallet (or use 'just create-strategy' which auto-creates wallets)
|
|
534
|
+
just create-wallets
|
|
535
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
528
536
|
|
|
529
537
|
# 2. Run smoke tests
|
|
530
538
|
poetry run pytest -k smoke -v
|
|
@@ -555,7 +563,9 @@ cd wayfinder-paths
|
|
|
555
563
|
poetry install
|
|
556
564
|
|
|
557
565
|
# Generate test wallets (essential!)
|
|
558
|
-
|
|
566
|
+
# Creates a main wallet (or use 'just create-strategy' which auto-creates wallets)
|
|
567
|
+
just create-wallets
|
|
568
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
559
569
|
|
|
560
570
|
# Copy and configure
|
|
561
571
|
cp wayfinder_paths/config.example.json config.json
|
|
@@ -576,14 +586,17 @@ poetry run python wayfinder_paths/run_strategy.py stablecoin_yield_strategy --de
|
|
|
576
586
|
**Before running any strategies, generate test wallets.** This creates `wallets.json` in the repository root with throwaway wallets for local testing:
|
|
577
587
|
|
|
578
588
|
```bash
|
|
579
|
-
# Essential: Create
|
|
580
|
-
|
|
589
|
+
# Essential: Create main wallet for testing
|
|
590
|
+
just create-wallets
|
|
591
|
+
# Or manually: poetry run python wayfinder_paths/scripts/make_wallets.py -n 1
|
|
581
592
|
```
|
|
582
593
|
|
|
583
594
|
This creates:
|
|
584
|
-
- `
|
|
595
|
+
- `main` wallet - your main wallet for testing (labeled "main" in wallets.json)
|
|
585
596
|
- `wallets.json` - wallet addresses and private keys for local testing
|
|
586
597
|
|
|
598
|
+
**Note:** Strategy-specific wallets are automatically created when you use `just create-strategy "Strategy Name"`. For manual creation, use `just create-wallet "strategy_name"` or `poetry run python wayfinder_paths/scripts/make_wallets.py --label "strategy_name"`.
|
|
599
|
+
|
|
587
600
|
**Important:** These wallets are for testing only. Never use them with real funds or on mainnet.
|
|
588
601
|
|
|
589
602
|
**Per-Strategy Wallets:** Each strategy should have its own dedicated wallet. When you create a new strategy using `just create-strategy`, a wallet is automatically generated with a label matching the strategy directory name. The system automatically uses this wallet when running the strategy. See [CONFIG_GUIDE.md](wayfinder_paths/CONFIG_GUIDE.md) for details.
|
|
@@ -591,14 +604,14 @@ This creates:
|
|
|
591
604
|
Additional options:
|
|
592
605
|
|
|
593
606
|
```bash
|
|
594
|
-
# Add 3 extra
|
|
595
|
-
poetry run python wayfinder_paths/scripts/make_wallets.py
|
|
607
|
+
# Add 3 extra wallets for multi-account testing
|
|
608
|
+
poetry run python wayfinder_paths/scripts/make_wallets.py -n 3
|
|
596
609
|
|
|
597
|
-
#
|
|
598
|
-
poetry run python wayfinder_paths/scripts/make_wallets.py --
|
|
610
|
+
# Create a wallet with a specific label (e.g., for a strategy)
|
|
611
|
+
poetry run python wayfinder_paths/scripts/make_wallets.py --label "my_strategy_name"
|
|
599
612
|
|
|
600
|
-
#
|
|
601
|
-
poetry run python wayfinder_paths/scripts/make_wallets.py
|
|
613
|
+
# Generate keystore files (for geth/web3 compatibility)
|
|
614
|
+
poetry run python wayfinder_paths/scripts/make_wallets.py -n 1 --keystore-password "my-password"
|
|
602
615
|
```
|
|
603
616
|
|
|
604
617
|
### Configuration
|
|
@@ -623,6 +636,65 @@ cp wayfinder_paths/config.example.json config.json
|
|
|
623
636
|
poetry run python wayfinder_paths/run_strategy.py stablecoin_yield_strategy --config config.json
|
|
624
637
|
```
|
|
625
638
|
|
|
639
|
+
## 📦 Versioning
|
|
640
|
+
|
|
641
|
+
This package follows [Semantic Versioning](https://semver.org/) (SemVer) and is published to PyPI as a public package.
|
|
642
|
+
|
|
643
|
+
### Version Format: MAJOR.MINOR.PATCH
|
|
644
|
+
|
|
645
|
+
- **MAJOR** (X.0.0): Breaking changes that require code updates
|
|
646
|
+
- **MINOR** (0.X.0): New features, backward compatible
|
|
647
|
+
- **PATCH** (0.0.X): Bug fixes, backward compatible
|
|
648
|
+
|
|
649
|
+
### Version Bumping Rules
|
|
650
|
+
|
|
651
|
+
- **PATCH**: Bug fixes, security patches, documentation updates
|
|
652
|
+
- **MINOR**: New adapters, new strategies, new features (backward compatible)
|
|
653
|
+
- **MAJOR**: Breaking API changes, removed features, incompatible changes
|
|
654
|
+
|
|
655
|
+
### Important Notes
|
|
656
|
+
|
|
657
|
+
- **Versions are immutable**: Once published to PyPI, a version cannot be changed or deleted
|
|
658
|
+
- **Versions must be unique**: Each release must have a new, unique version number
|
|
659
|
+
- **Publishing is restricted**: Only publish from the `main` branch to prevent accidental releases
|
|
660
|
+
|
|
661
|
+
### Publishing Workflow and Order of Operations
|
|
662
|
+
|
|
663
|
+
**Critical**: Changes must follow this strict order:
|
|
664
|
+
|
|
665
|
+
1. **Merge to main**: All changes must be merged to the `main` branch first
|
|
666
|
+
2. **Publish to PyPI**: The new version must be published to PyPI from `main` branch
|
|
667
|
+
3. **Dependent changes**: Only after publishing can dependent changes be merged in other applications
|
|
668
|
+
|
|
669
|
+
**Why this order matters:**
|
|
670
|
+
- Other applications depend on this package from PyPI
|
|
671
|
+
- They cannot merge changes that depend on new versions until those versions are available on PyPI
|
|
672
|
+
- Publishing from `main` ensures the published version matches what's in the repository
|
|
673
|
+
- This prevents dependency resolution failures in downstream applications
|
|
674
|
+
|
|
675
|
+
**Example workflow:**
|
|
676
|
+
```bash
|
|
677
|
+
# 1. Make changes in a feature branch
|
|
678
|
+
git checkout -b feature/new-adapter
|
|
679
|
+
# ... make changes ...
|
|
680
|
+
git commit -m "Add new adapter"
|
|
681
|
+
|
|
682
|
+
# 2. Merge to main
|
|
683
|
+
git checkout main
|
|
684
|
+
git merge feature/new-adapter
|
|
685
|
+
|
|
686
|
+
# 3. Bump version in pyproject.toml (e.g., 0.1.3 → 0.2.0)
|
|
687
|
+
# Edit pyproject.toml: version = "0.2.0"
|
|
688
|
+
git commit -m "Bump version to 0.2.0"
|
|
689
|
+
git push origin main
|
|
690
|
+
|
|
691
|
+
# 4. Publish to PyPI (must be on main branch)
|
|
692
|
+
just publish
|
|
693
|
+
|
|
694
|
+
# 5. Now dependent applications can update their dependencies
|
|
695
|
+
# pip install wayfinder-paths==0.2.0
|
|
696
|
+
```
|
|
697
|
+
|
|
626
698
|
## 📦 Publishing
|
|
627
699
|
|
|
628
700
|
Publish to PyPI:
|
|
@@ -632,6 +704,12 @@ export PUBLISH_TOKEN="your_pypi_token"
|
|
|
632
704
|
just publish
|
|
633
705
|
```
|
|
634
706
|
|
|
707
|
+
**Important:**
|
|
708
|
+
- ⚠️ **Publishing is only allowed from the `main` branch** - the publish command will fail if run from any other branch
|
|
709
|
+
- ⚠️ **Versions must be unique** - ensure the version in `pyproject.toml` has been bumped and is unique
|
|
710
|
+
- ⚠️ **Follow the order of operations** - see [Versioning](#-versioning) section above for the required workflow
|
|
711
|
+
- ⚠️ **Versions are immutable** - once published, a version cannot be changed or deleted from PyPI
|
|
712
|
+
|
|
635
713
|
Install the published package:
|
|
636
714
|
|
|
637
715
|
```bash
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "wayfinder-paths"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.4"
|
|
4
4
|
description = "Wayfinder Path: strategies and adapters"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = ["Wayfinder <dev@wayfinder.ai>"]
|
|
@@ -63,7 +63,7 @@ ignore = [
|
|
|
63
63
|
known-first-party = ["wayfinder_paths"]
|
|
64
64
|
|
|
65
65
|
[tool.pytest.ini_options]
|
|
66
|
-
testpaths = ["tests", "wayfinder_paths/
|
|
66
|
+
testpaths = ["tests", "wayfinder_paths/strategies/", "wayfinder_paths/adapters/"]
|
|
67
67
|
python_files = ["test_*.py"]
|
|
68
68
|
python_classes = ["Test*"]
|
|
69
69
|
python_functions = ["test_*"]
|
|
@@ -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
|
-
|
|
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
|
|
97
|
-
poetry run python wayfinder_paths/scripts/make_wallets.py
|
|
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
|
|
104
|
+
poetry run python wayfinder_paths/scripts/make_wallets.py -n 3
|
|
101
105
|
|
|
102
|
-
#
|
|
103
|
-
poetry run python wayfinder_paths/scripts/make_wallets.py --
|
|
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
|
|
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
|
-
- **
|
|
111
|
-
- Additional
|
|
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": "
|
|
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
|
|
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.
|
|
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
|
|