wayfinder-paths 0.1.9__py3-none-any.whl → 0.1.10__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.
- wayfinder_paths/CONFIG_GUIDE.md +1 -1
- wayfinder_paths/adapters/balance_adapter/README.md +1 -2
- wayfinder_paths/adapters/balance_adapter/adapter.py +4 -4
- wayfinder_paths/adapters/brap_adapter/adapter.py +139 -23
- wayfinder_paths/adapters/moonwell_adapter/README.md +174 -0
- wayfinder_paths/adapters/moonwell_adapter/__init__.py +7 -0
- wayfinder_paths/adapters/moonwell_adapter/adapter.py +1226 -0
- wayfinder_paths/adapters/moonwell_adapter/test_adapter.py +635 -0
- wayfinder_paths/core/clients/AuthClient.py +3 -0
- wayfinder_paths/core/clients/WayfinderClient.py +2 -2
- wayfinder_paths/core/constants/__init__.py +0 -2
- wayfinder_paths/core/constants/base.py +6 -2
- wayfinder_paths/core/constants/moonwell_abi.py +411 -0
- wayfinder_paths/core/engine/StrategyJob.py +3 -0
- wayfinder_paths/core/services/base.py +55 -0
- wayfinder_paths/core/services/local_evm_txn.py +288 -208
- wayfinder_paths/core/services/local_token_txn.py +46 -26
- wayfinder_paths/core/strategies/descriptors.py +1 -1
- wayfinder_paths/run_strategy.py +34 -74
- wayfinder_paths/scripts/create_strategy.py +2 -27
- wayfinder_paths/scripts/run_strategy.py +37 -7
- wayfinder_paths/strategies/basis_trading_strategy/strategy.py +1 -1
- wayfinder_paths/strategies/hyperlend_stable_yield_strategy/README.md +0 -15
- wayfinder_paths/strategies/hyperlend_stable_yield_strategy/strategy.py +1 -1
- wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/README.md +108 -0
- wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/examples.json +11 -0
- wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/strategy.py +2975 -0
- wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/test_strategy.py +886 -0
- wayfinder_paths/strategies/stablecoin_yield_strategy/README.md +0 -7
- wayfinder_paths/strategies/stablecoin_yield_strategy/strategy.py +1 -1
- wayfinder_paths/templates/adapter/README.md +5 -21
- wayfinder_paths/templates/adapter/adapter.py +1 -2
- wayfinder_paths/templates/adapter/test_adapter.py +1 -1
- wayfinder_paths/templates/strategy/README.md +4 -21
- wayfinder_paths/tests/test_smoke_manifest.py +17 -2
- {wayfinder_paths-0.1.9.dist-info → wayfinder_paths-0.1.10.dist-info}/METADATA +60 -187
- {wayfinder_paths-0.1.9.dist-info → wayfinder_paths-0.1.10.dist-info}/RECORD +39 -44
- wayfinder_paths/adapters/balance_adapter/manifest.yaml +0 -8
- wayfinder_paths/adapters/brap_adapter/manifest.yaml +0 -11
- wayfinder_paths/adapters/hyperlend_adapter/manifest.yaml +0 -10
- wayfinder_paths/adapters/hyperliquid_adapter/manifest.yaml +0 -8
- wayfinder_paths/adapters/ledger_adapter/manifest.yaml +0 -11
- wayfinder_paths/adapters/pool_adapter/manifest.yaml +0 -10
- wayfinder_paths/adapters/token_adapter/manifest.yaml +0 -6
- wayfinder_paths/core/engine/manifest.py +0 -97
- wayfinder_paths/scripts/validate_manifests.py +0 -213
- wayfinder_paths/strategies/basis_trading_strategy/manifest.yaml +0 -23
- wayfinder_paths/strategies/hyperlend_stable_yield_strategy/manifest.yaml +0 -7
- wayfinder_paths/strategies/stablecoin_yield_strategy/manifest.yaml +0 -17
- wayfinder_paths/templates/adapter/manifest.yaml +0 -6
- wayfinder_paths/templates/strategy/manifest.yaml +0 -8
- {wayfinder_paths-0.1.9.dist-info → wayfinder_paths-0.1.10.dist-info}/LICENSE +0 -0
- {wayfinder_paths-0.1.9.dist-info → wayfinder_paths-0.1.10.dist-info}/WHEEL +0 -0
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
wayfinder_paths/CONFIG_GUIDE.md,sha256=
|
|
1
|
+
wayfinder_paths/CONFIG_GUIDE.md,sha256=p8eT2FC_dp4bBdezwGmQYLiefLNze-I6lY__UXv07zQ,12975
|
|
2
2
|
wayfinder_paths/__init__.py,sha256=YgOg-PRPT3ROh0zg6hgQyQE-YFkFGw6TM77zDvB4_sE,427
|
|
3
3
|
wayfinder_paths/abis/generic/erc20.json,sha256=geyzVzdTNt3u1XHKxi4seszP_GIWIzPTl0FYgiftRnM,9336
|
|
4
4
|
wayfinder_paths/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
wayfinder_paths/adapters/balance_adapter/README.md,sha256=
|
|
6
|
-
wayfinder_paths/adapters/balance_adapter/adapter.py,sha256=
|
|
5
|
+
wayfinder_paths/adapters/balance_adapter/README.md,sha256=t8-QRfU49g9FmJ18xDGbN_k-ybWebBfM7s4bBrnyo-g,3635
|
|
6
|
+
wayfinder_paths/adapters/balance_adapter/adapter.py,sha256=2_OgZlHsN3js800TWwTWRoSUNn1YCnSFAY0SG6ddcAg,8379
|
|
7
7
|
wayfinder_paths/adapters/balance_adapter/examples.json,sha256=3R1M4B_VsIy29viAuFT9nQbnQShWl8ZbU-rnSNWUW9U,129
|
|
8
|
-
wayfinder_paths/adapters/balance_adapter/manifest.yaml,sha256=vp2VoQJf-TxFxgkTsUJ1AEeeOoImM_QjrGYCmjyEQYI,189
|
|
9
8
|
wayfinder_paths/adapters/balance_adapter/test_adapter.py,sha256=Z8iTRU0Rv1UsODuVSo5q4j-DrTXMd4YRxvaxLdZE4Us,1878
|
|
10
9
|
wayfinder_paths/adapters/brap_adapter/README.md,sha256=H4_ep4r17DpQ0rnTSIbRsAdnK174NGBAcHNlHhvEA7o,7880
|
|
11
10
|
wayfinder_paths/adapters/brap_adapter/__init__.py,sha256=jpqxZ-Bv_8kBo-lhgO_QCWaVZNq_WwlkNBHD4RsqOJg,90
|
|
12
|
-
wayfinder_paths/adapters/brap_adapter/adapter.py,sha256=
|
|
11
|
+
wayfinder_paths/adapters/brap_adapter/adapter.py,sha256=uHS0HXQQYQVJOBM_POs2kHZJ9D7i2anOj4f5L40ebYM,30204
|
|
13
12
|
wayfinder_paths/adapters/brap_adapter/examples.json,sha256=KWuAklUspd2uvk0s2ey8gczg4nbzhdwxQqzhascyMiQ,5287
|
|
14
|
-
wayfinder_paths/adapters/brap_adapter/manifest.yaml,sha256=bJ8o4j9ZPjfnLxXxHfekoXKUHoBkXmWQ3nokTH1aya4,240
|
|
15
13
|
wayfinder_paths/adapters/brap_adapter/test_adapter.py,sha256=w2q35tcE7j2QG53jSm_XZgIk7OKL4O51fnFuGMVRSNQ,10754
|
|
16
14
|
wayfinder_paths/adapters/hyperlend_adapter/__init__.py,sha256=DsWOnEn-Tlu9ZoIoGaFeSqOYI3b4lXGVK3_FTntWpLw,139
|
|
17
15
|
wayfinder_paths/adapters/hyperlend_adapter/adapter.py,sha256=OiHIzhfTJTBk2iQs3px82DubhgTkuoPWHtgTPfAB7UQ,10260
|
|
18
|
-
wayfinder_paths/adapters/hyperlend_adapter/manifest.yaml,sha256=Ugc0jNf3txAQRGAXlVvTN3Mbdc4-fUMS1yVs0SZcBwI,259
|
|
19
16
|
wayfinder_paths/adapters/hyperlend_adapter/test_adapter.py,sha256=iLnrALVnK7JWJV2KFDqBYZlr1ShW1tjHC-kCV6-FlgE,9558
|
|
20
17
|
wayfinder_paths/adapters/hyperliquid_adapter/__init__.py,sha256=QpA258RzVbxzsha86HQduAuNVG0g0qvsI5OcZunQ8DQ,467
|
|
21
18
|
wayfinder_paths/adapters/hyperliquid_adapter/adapter.py,sha256=qkU_Au0rqj_vf5O6j81EikrHDk8_M8uaxltQvI3dvbU,34516
|
|
22
19
|
wayfinder_paths/adapters/hyperliquid_adapter/executor.py,sha256=uibNnfsgB_KMOYpZzaSDTsiKGQPIKwZyZ6uH34-Xu4A,17447
|
|
23
|
-
wayfinder_paths/adapters/hyperliquid_adapter/manifest.yaml,sha256=IOK5kFaOuqqEcf3EuY5oXufEaUQNoz2oBXRGVbCdSXQ,206
|
|
24
20
|
wayfinder_paths/adapters/hyperliquid_adapter/paired_filler.py,sha256=nOBsrAka8PKv5h8SuoJuLTH4HYS4n0vpTIADUCyDKlA,37546
|
|
25
21
|
wayfinder_paths/adapters/hyperliquid_adapter/test_adapter.py,sha256=JEDeIMSTdrgcSy4BGSVB0CixQzl3NsKpukOZ9mRu3kE,4542
|
|
26
22
|
wayfinder_paths/adapters/hyperliquid_adapter/test_adapter_live.py,sha256=lnlL0njECM6C4hVlsEZ4_7wtcixIBO8qqTRO6b1yGGg,7672
|
|
@@ -30,19 +26,20 @@ wayfinder_paths/adapters/ledger_adapter/README.md,sha256=_tGIpIkg-TCYddf8d4FhJvJ
|
|
|
30
26
|
wayfinder_paths/adapters/ledger_adapter/__init__.py,sha256=DK9GShIUiQ57YKSqhCKoS43GCweBxi0lzkUQ9sYVxUA,96
|
|
31
27
|
wayfinder_paths/adapters/ledger_adapter/adapter.py,sha256=6Fjxltvn9iXp_-CZtN7lDz1Xt0lWaNQX2drx6lgeryw,10260
|
|
32
28
|
wayfinder_paths/adapters/ledger_adapter/examples.json,sha256=DdqTSe4vnBrfIycQVQQ_JZom7fBGHbL7MR4ppK9ljCY,3936
|
|
33
|
-
wayfinder_paths/adapters/ledger_adapter/manifest.yaml,sha256=121VPXNpx13vO9qoBww47Wvpi29JLn5WoIFnudCkDYs,271
|
|
34
29
|
wayfinder_paths/adapters/ledger_adapter/test_adapter.py,sha256=Z1-rPP9k5fI-8ofWMKgU3syzNegKGH_hGO6CKApQj1c,7470
|
|
30
|
+
wayfinder_paths/adapters/moonwell_adapter/README.md,sha256=PyQllVXgW0aUUoWhAZ5phLPAxtR9A5GkwesnZznckV8,5465
|
|
31
|
+
wayfinder_paths/adapters/moonwell_adapter/__init__.py,sha256=Gf6AM4BylxxPenUQ_cveUg70QcB9i61SIYaCsXMSjXw,135
|
|
32
|
+
wayfinder_paths/adapters/moonwell_adapter/adapter.py,sha256=DwUgY03ECTrIr8ulbp4_Ur_ezNK1dkLcNXAkFu3oIxU,45191
|
|
33
|
+
wayfinder_paths/adapters/moonwell_adapter/test_adapter.py,sha256=DLbbCW6ytjKY2C5aQUrW-YBFyrXjush9qbGWiuL42DM,23440
|
|
35
34
|
wayfinder_paths/adapters/pool_adapter/README.md,sha256=JJZ5V-RpDfG-D0-UxyLEYMorPCORNPUaaLpccB5Oslk,2848
|
|
36
35
|
wayfinder_paths/adapters/pool_adapter/__init__.py,sha256=rv56pYzz2Gqiz33uoPJktCQRe3CRt8U9ry5GbjVgK3A,90
|
|
37
36
|
wayfinder_paths/adapters/pool_adapter/adapter.py,sha256=-XfmOHqKIr2Q8iyfyKrwIv6bYlyTDDL0WX-XdtKGFqQ,2793
|
|
38
37
|
wayfinder_paths/adapters/pool_adapter/examples.json,sha256=3eLXQIECR3tmUJUeX5wAhiJwFwPMYsUhzkc1i8vUAX8,923
|
|
39
|
-
wayfinder_paths/adapters/pool_adapter/manifest.yaml,sha256=z-OQYBsl2RdV6M34RZzqtQTAFHtQod0po_JD_-9ElNM,217
|
|
40
38
|
wayfinder_paths/adapters/pool_adapter/test_adapter.py,sha256=wtdr-IzfhTeS3oBjZLPHUxwYP-3o6tlir3kA6C7lbcE,2709
|
|
41
39
|
wayfinder_paths/adapters/token_adapter/README.md,sha256=TXn7pYQ6bCAiYNl-avem3_Hoz0p3JVyyThxObr59s8k,2673
|
|
42
40
|
wayfinder_paths/adapters/token_adapter/__init__.py,sha256=nEmxrvffEygn3iKH3cZTNLkhnUUhlUAEtshmrFRAjq8,62
|
|
43
41
|
wayfinder_paths/adapters/token_adapter/adapter.py,sha256=JEb7A8wJYHxENFhJ6upAgnQAbPZeVfYi6OGs1hiHxnA,3432
|
|
44
42
|
wayfinder_paths/adapters/token_adapter/examples.json,sha256=RW-3xazj4wbTPl-AVrzduRH1NCXx8m7-06bRMOUJ-lc,3626
|
|
45
|
-
wayfinder_paths/adapters/token_adapter/manifest.yaml,sha256=KQgbHAUaJ6JYjTlOJ9HGeRxwmICXVV01qRwW8wJPKMM,143
|
|
46
43
|
wayfinder_paths/adapters/token_adapter/test_adapter.py,sha256=oEhV5OooRh1oGnaTTMKtdU9oqvHBKR25KgL6-ZB6Mzo,4304
|
|
47
44
|
wayfinder_paths/config.example.json,sha256=gDvS7W-cbaNe2IV7Q72di_PYpCDKODojELaXdd77Gx4,605
|
|
48
45
|
wayfinder_paths/conftest.py,sha256=pqDNijXn9_zmbAdkt_2a18UQLjtsDkNTBJVTgC6H2nA,1136
|
|
@@ -55,7 +52,7 @@ wayfinder_paths/core/analytics/__init__.py,sha256=AtcSpt2vPpCNgdDaFDLhyZZpKa0QXK
|
|
|
55
52
|
wayfinder_paths/core/analytics/bootstrap.py,sha256=lb_PjL4Vh3O2F8eXgvAbnAFevJczRF59ODG-dxtpCZ8,1782
|
|
56
53
|
wayfinder_paths/core/analytics/stats.py,sha256=qE6h0j8TZAbqbVpDeYlVKe0YbV5CENQcHbREzKyZ_s8,1426
|
|
57
54
|
wayfinder_paths/core/analytics/test_analytics.py,sha256=DNkVTsbWPLc9I1eeCD5wsPPqUDgN-npbGRhBgMKn3GM,5580
|
|
58
|
-
wayfinder_paths/core/clients/AuthClient.py,sha256=
|
|
55
|
+
wayfinder_paths/core/clients/AuthClient.py,sha256=scz8GvnabNYAQq_XYDcLP2lf2LZqurQOixA7MMAfbCY,2796
|
|
59
56
|
wayfinder_paths/core/clients/BRAPClient.py,sha256=-cL05ELlroi3pUfT_5nF8Axie2a0n19npnuP408bkAQ,3744
|
|
60
57
|
wayfinder_paths/core/clients/ClientManager.py,sha256=pZ4e8XgwDYceCUBFyyemexAH8pqZCAN47iAVVwJWW2Q,7239
|
|
61
58
|
wayfinder_paths/core/clients/HyperlendClient.py,sha256=6yAhojEbjrRC7YLckwGL_2z5lwI4xnrRVNzxspqKSTg,6173
|
|
@@ -63,28 +60,28 @@ wayfinder_paths/core/clients/LedgerClient.py,sha256=M6VlG0yq3H4rQt6qRxc0QQVd7GoP
|
|
|
63
60
|
wayfinder_paths/core/clients/PoolClient.py,sha256=EMIRRw7nh2bha-Qb5uOcIRgbnnu_v5FIvDU0D61nXGI,3475
|
|
64
61
|
wayfinder_paths/core/clients/TokenClient.py,sha256=zg39K-uA1ObkNEcxoXviA1QYSd-fxQXxjBHFOeClY9E,2788
|
|
65
62
|
wayfinder_paths/core/clients/WalletClient.py,sha256=xG-b5YW1Wps-Lw1JFR3OwAGq0oKMvgIp1crXWd31guE,2604
|
|
66
|
-
wayfinder_paths/core/clients/WayfinderClient.py,sha256=
|
|
63
|
+
wayfinder_paths/core/clients/WayfinderClient.py,sha256=jhrCa3lQXVsp41y19GLztrSSFQiD6hSD2P8dWeHBoNE,10397
|
|
67
64
|
wayfinder_paths/core/clients/__init__.py,sha256=eKbB81C9ZphAKH1uKwkqOmVHtEwFdkDuZLVAQXQXa5M,1254
|
|
68
65
|
wayfinder_paths/core/clients/protocols.py,sha256=yUDz2dEnO-dDZY5pJfDtcvp5rtsoEQYE4G5IQTGLxfA,8469
|
|
69
66
|
wayfinder_paths/core/clients/sdk_example.py,sha256=Y6mSyHfsWcOje6E-geNI0C4CQ6uyZaD3V9Q8kPM53eo,2969
|
|
70
67
|
wayfinder_paths/core/config.py,sha256=ktogrNlE4DSf1DZONN4_C-sjjuoMFqQtS7chx2KDVYY,15382
|
|
71
|
-
wayfinder_paths/core/constants/__init__.py,sha256=
|
|
72
|
-
wayfinder_paths/core/constants/base.py,sha256=
|
|
68
|
+
wayfinder_paths/core/constants/__init__.py,sha256=upAVwHDgMXJ3DWaAuXo52UZktS8NZ17s5XwVH0qxgzg,591
|
|
69
|
+
wayfinder_paths/core/constants/base.py,sha256=BYQAD72XrsY6WRrOMIlUOpXLVANS7EYaS5Ell4Nj1H4,1551
|
|
73
70
|
wayfinder_paths/core/constants/erc20_abi.py,sha256=3ljIyUl6FesoEa4uprwNo-nF0Q5s73M9WEqXLw6ONI4,3214
|
|
74
71
|
wayfinder_paths/core/constants/hyperlend_abi.py,sha256=nIaqsfMl5-_InYN82pjz0FIKsT-AnNkwz0DIc9VrZSc,4331
|
|
75
|
-
wayfinder_paths/core/
|
|
72
|
+
wayfinder_paths/core/constants/moonwell_abi.py,sha256=ALb-kKdfF9aUtEHR8OlqvA-3zJ48N66RvVptTJyCfe4,13135
|
|
73
|
+
wayfinder_paths/core/engine/StrategyJob.py,sha256=DqwkPu5JHp00xkDmj7kyUqs9U-VP0k-OBlVipjEzk14,7257
|
|
76
74
|
wayfinder_paths/core/engine/__init__.py,sha256=WZ2KWnmOZnBocYrqdwq6EUHp6lmTyrKyXgHSHyQswnU,108
|
|
77
|
-
wayfinder_paths/core/engine/manifest.py,sha256=rkrALipqwqR61lZu_lF1jJj1aqJk6ZskuXokcB1g0HI,3146
|
|
78
75
|
wayfinder_paths/core/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
|
-
wayfinder_paths/core/services/base.py,sha256=
|
|
80
|
-
wayfinder_paths/core/services/local_evm_txn.py,sha256=
|
|
81
|
-
wayfinder_paths/core/services/local_token_txn.py,sha256=
|
|
76
|
+
wayfinder_paths/core/services/base.py,sha256=cvfNoS8VXP7ksrZIjk4BYvqtSSueiHphcxny7Qt7VHY,5980
|
|
77
|
+
wayfinder_paths/core/services/local_evm_txn.py,sha256=kzJUOvHWLZ0ygRmYpVnJJTp48E072YpfD8R9IJJIzOM,16522
|
|
78
|
+
wayfinder_paths/core/services/local_token_txn.py,sha256=YQjuHjdyGwVfAZt3FGMkSKoc34bRiJrWRiR5pXJmL9U,8556
|
|
82
79
|
wayfinder_paths/core/services/web3_service.py,sha256=7iR7bfqfUQCQcdfEWVGqy04PZBtZTuzCDpfLt1a-4OI,1485
|
|
83
80
|
wayfinder_paths/core/settings.py,sha256=aJdy2bRcJtufr4TZnu30R2iv---Ru4s6nxKo-j22uKQ,1962
|
|
84
81
|
wayfinder_paths/core/strategies/Strategy.py,sha256=nEzry8V-FGSM-S1eBmT35Ba2cVOJn3hNNWenpTMAVv8,9455
|
|
85
82
|
wayfinder_paths/core/strategies/__init__.py,sha256=2NjvvDw6sIQGUFV4Qo1olXTxUOY3GmCM8Ivz_J1FSmc,157
|
|
86
83
|
wayfinder_paths/core/strategies/base.py,sha256=-s0qeiGZl5CHTUL2PavGXM7ACkNlaa0c4jeZR_4DuBM,155
|
|
87
|
-
wayfinder_paths/core/strategies/descriptors.py,sha256=
|
|
84
|
+
wayfinder_paths/core/strategies/descriptors.py,sha256=9eFf-gPNw1NO1o1eQqGlEgnz237IpAmrmZnIH3JD-ys,1642
|
|
88
85
|
wayfinder_paths/core/utils/__init__.py,sha256=TEylMYHnG37Z3mizSmw28bUm0vyNBFzf0Nc8dB_7l1A,73
|
|
89
86
|
wayfinder_paths/core/utils/evm_helpers.py,sha256=D1NFanIdy7TcBHOFwYHAgnhENChaW34BNarFfauMX38,6230
|
|
90
87
|
wayfinder_paths/core/utils/wallets.py,sha256=tGgVxDW2ZvkvJIb6yow1cirrqhQ67_X9IqxZocBEy2k,2438
|
|
@@ -100,48 +97,46 @@ wayfinder_paths/policies/hyperliquid.py,sha256=hAxNtWdxavwf_a-AnlXMOmEYakkNBkrPT
|
|
|
100
97
|
wayfinder_paths/policies/moonwell.py,sha256=sKWLbruMKiW7Yh1DhXdVPRe0JBP-nooNybRz0G9PgvA,1605
|
|
101
98
|
wayfinder_paths/policies/prjx.py,sha256=6kfZ6OQFroFHYJl4vSWT-svwwfvoHlS_ZrcHt8nmZMU,743
|
|
102
99
|
wayfinder_paths/policies/util.py,sha256=r8xQLPvE3kU21_LG6VbkFI9sUSYltcsKunryZdHOUDA,912
|
|
103
|
-
wayfinder_paths/run_strategy.py,sha256=
|
|
100
|
+
wayfinder_paths/run_strategy.py,sha256=TPtewPaNc4IjSLF83BKhEOYTJacnHNhiiyWjbEwb1oc,11830
|
|
104
101
|
wayfinder_paths/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
105
|
-
wayfinder_paths/scripts/create_strategy.py,sha256=
|
|
102
|
+
wayfinder_paths/scripts/create_strategy.py,sha256=a4TOYg7iNhnnV2A1emTfxo0mvZzW-Uitnksl5LDsPGQ,5357
|
|
106
103
|
wayfinder_paths/scripts/make_wallets.py,sha256=LkWr65mKtKMYlm2ZINsacvnIJ--A5c97xG9ZY1azVec,5242
|
|
107
|
-
wayfinder_paths/scripts/run_strategy.py,sha256=
|
|
108
|
-
wayfinder_paths/scripts/validate_manifests.py,sha256=sTJhCVTb8X0SFYozArVbX4AMAEv-0R1Imp4dpHfAuHE,7075
|
|
104
|
+
wayfinder_paths/scripts/run_strategy.py,sha256=QXu30xL1DcyucF80VhH2ArzyOqcZkTi-4VFYD0D01f0,4453
|
|
109
105
|
wayfinder_paths/strategies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
110
106
|
wayfinder_paths/strategies/basis_trading_strategy/README.md,sha256=rTUXQ2owEoPmXlfHcJfRFCwcQxlU3a4hOJGN5kaWWQ0,7176
|
|
111
107
|
wayfinder_paths/strategies/basis_trading_strategy/__init__.py,sha256=kVcehFjBUtoi5xzSHI56jtDghsy0nYl6XIE6BI1l6aI,79
|
|
112
108
|
wayfinder_paths/strategies/basis_trading_strategy/constants.py,sha256=PJ1WtSALxiuW1FXx-BF30ciFISEhO5VBfrSZyfhPuz0,45
|
|
113
109
|
wayfinder_paths/strategies/basis_trading_strategy/examples.json,sha256=q2wlAH8Gr-LUJeamKzWL1EtChL3TBWe0HQ4_P-VCdqQ,429
|
|
114
|
-
wayfinder_paths/strategies/basis_trading_strategy/manifest.yaml,sha256=cmvAizwBP_SoXvypal8CEHLNh4Du5M_RBKy37ScUjL0,1078
|
|
115
110
|
wayfinder_paths/strategies/basis_trading_strategy/snapshot_mixin.py,sha256=Z1rgAfLGaSFFL2bS9_XPc7RzpY1Q74jZQGc86Yo_0DQ,38634
|
|
116
|
-
wayfinder_paths/strategies/basis_trading_strategy/strategy.py,sha256=
|
|
111
|
+
wayfinder_paths/strategies/basis_trading_strategy/strategy.py,sha256=jfLz0tuyqDhoWIGxuYRcPQLhJNeHV6aeBG5jSZIpsEo,171710
|
|
117
112
|
wayfinder_paths/strategies/basis_trading_strategy/test_strategy.py,sha256=FH0napmPYTzmflxfyqrqHujO9fmatYbXRH19LSsO_sA,31579
|
|
118
113
|
wayfinder_paths/strategies/basis_trading_strategy/types.py,sha256=rlbouTUOVPLfGPzMbsf-fUmMcn0R_OsG-IdfiBJmmqI,845
|
|
119
114
|
wayfinder_paths/strategies/config.py,sha256=5dv-8tWwoxH3Sxd9jtiw90shrLipEe3UlU-IYUBfciM,2762
|
|
120
|
-
wayfinder_paths/strategies/hyperlend_stable_yield_strategy/README.md,sha256=
|
|
115
|
+
wayfinder_paths/strategies/hyperlend_stable_yield_strategy/README.md,sha256=2QYulV-rr_Q4rVJTn-Sd0Zurbi7f_1k6V5a808JaqfY,4182
|
|
121
116
|
wayfinder_paths/strategies/hyperlend_stable_yield_strategy/examples.json,sha256=GbVo2p6QiG6M7Ma5s671lw8G9JwnMl1h0n9mrtt-ZS8,164
|
|
122
|
-
wayfinder_paths/strategies/hyperlend_stable_yield_strategy/
|
|
123
|
-
wayfinder_paths/strategies/hyperlend_stable_yield_strategy/strategy.py,sha256=V5Tv0Y8Bxbpbyu2JKv7PKHoRiebbWxbtCi7iIp2ivXA,91673
|
|
117
|
+
wayfinder_paths/strategies/hyperlend_stable_yield_strategy/strategy.py,sha256=hCcJk3YTPy5NSdWpHWXbAeLxjp4-zPY0MWeKb7qBBz4,91667
|
|
124
118
|
wayfinder_paths/strategies/hyperlend_stable_yield_strategy/test_strategy.py,sha256=puHIf160DQ_a1G3LXFHjIel504vKDhZvqktysyEwOdo,15296
|
|
125
|
-
wayfinder_paths/strategies/
|
|
119
|
+
wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/README.md,sha256=Vt8Ce429dkiZRKjfx2c-PEEykp62mbjfBcvOCXe7yjY,4517
|
|
120
|
+
wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/examples.json,sha256=kgNRdZcqne8XTm-Y8Hv1a1pdajRQsey4Qhd5La-iWss,164
|
|
121
|
+
wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/strategy.py,sha256=sR6KbfEjBlCo6BCF2S3-IRd6Ir1cOF1pl4UNfts1Erg,125347
|
|
122
|
+
wayfinder_paths/strategies/moonwell_wsteth_loop_strategy/test_strategy.py,sha256=9PfA5AiTdsyWcd3weNgFaoYJ5iWirZSPFoUwSBts7BY,31248
|
|
123
|
+
wayfinder_paths/strategies/stablecoin_yield_strategy/README.md,sha256=KvIkgUdNuG5MGoKDQnth1BvIfQ9XVy6l0V2reYi9oR4,4954
|
|
126
124
|
wayfinder_paths/strategies/stablecoin_yield_strategy/examples.json,sha256=pL1DNFEvYvXKK7xXD5oQYFPQj3Cm1ocKnk6r_iZk0IY,423
|
|
127
|
-
wayfinder_paths/strategies/stablecoin_yield_strategy/
|
|
128
|
-
wayfinder_paths/strategies/stablecoin_yield_strategy/strategy.py,sha256=uoy0TnKRG2ZgbJ_4JjC_DBRWAjEvUxiC3MN-QhohB7o,75430
|
|
125
|
+
wayfinder_paths/strategies/stablecoin_yield_strategy/strategy.py,sha256=e9AW57Co_xffjm07BGTwPZ6COIHra2ri7ip8eYUXO6g,75424
|
|
129
126
|
wayfinder_paths/strategies/stablecoin_yield_strategy/test_strategy.py,sha256=z3vkiyELwJipWNjksdG3Vs6HIVE_y-UoHJCDezXMH60,19967
|
|
130
|
-
wayfinder_paths/templates/adapter/README.md,sha256=
|
|
131
|
-
wayfinder_paths/templates/adapter/adapter.py,sha256=
|
|
127
|
+
wayfinder_paths/templates/adapter/README.md,sha256=nQkJeAfHXXSJj_dXaiFq5LarpHGaDmxwgb0U9pxACqQ,2925
|
|
128
|
+
wayfinder_paths/templates/adapter/adapter.py,sha256=UGPvD8SNcrEtYQXRTUxvK9WZ9Bzx1Xwb8sr9zSbqnuc,763
|
|
132
129
|
wayfinder_paths/templates/adapter/examples.json,sha256=KLHy3AgPIplAaZN0qY2A-HBMa1xXkMhIyusORovTD9w,79
|
|
133
|
-
wayfinder_paths/templates/adapter/
|
|
134
|
-
wayfinder_paths/templates/
|
|
135
|
-
wayfinder_paths/templates/strategy/README.md,sha256=c7iKlgkz0FPQC3xjMlXqYaDIwC_EKr0wJ6pCLfr2Oik,5664
|
|
130
|
+
wayfinder_paths/templates/adapter/test_adapter.py,sha256=PeG9ZZwx-cWXCDUKxrvj1cR8ljo9aXrKANZuz2hFAhk,1510
|
|
131
|
+
wayfinder_paths/templates/strategy/README.md,sha256=H3pOl_dy_dV3lsRluzV4omjwucJxT_OYBFvakeCFJTg,4972
|
|
136
132
|
wayfinder_paths/templates/strategy/examples.json,sha256=s8UdlD5uxLITQrRMCqgiaAP0IE0tdnnLfX-Zn-OChIc,135
|
|
137
|
-
wayfinder_paths/templates/strategy/manifest.yaml,sha256=Q13sIhfE7u0wMwa8oFwMZr_twwVMprMV4c_JEQNhkz8,289
|
|
138
133
|
wayfinder_paths/templates/strategy/strategy.py,sha256=dso2jhVphsdKNd17JPwnFAFzU01-1kHlWrKPAKIKSWw,2024
|
|
139
134
|
wayfinder_paths/templates/strategy/test_strategy.py,sha256=PwDVFTo7gql3WRqhhmyiBE9orfhXv46FBO989NQNxI0,7519
|
|
140
135
|
wayfinder_paths/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
141
|
-
wayfinder_paths/tests/test_smoke_manifest.py,sha256=
|
|
136
|
+
wayfinder_paths/tests/test_smoke_manifest.py,sha256=kTcIa4qikcspVh2ohQIk0aHUdIvBvcQBfNbm3PNiVvg,1636
|
|
142
137
|
wayfinder_paths/tests/test_test_coverage.py,sha256=9NrZeVmP02D4W7Qc0XjciC05bhvdTCVibYjTGfa_GQk,7893
|
|
143
138
|
wayfinder_paths/tests/test_utils.py,sha256=pxHT0QKFlyJeJo8bFnKXzWcOdi6t8rbJ0JFCBaFCBRQ,2112
|
|
144
|
-
wayfinder_paths-0.1.
|
|
145
|
-
wayfinder_paths-0.1.
|
|
146
|
-
wayfinder_paths-0.1.
|
|
147
|
-
wayfinder_paths-0.1.
|
|
139
|
+
wayfinder_paths-0.1.10.dist-info/LICENSE,sha256=dYKnlkC_xosBAEQNUvB6cHMuhFgcUtN0oBR7E8_aR2Y,1066
|
|
140
|
+
wayfinder_paths-0.1.10.dist-info/METADATA,sha256=Nyi2X5KQqUSKYoXjM7MQl_mnYZ8EIYbZ4t0BPwC-RSY,25656
|
|
141
|
+
wayfinder_paths-0.1.10.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
142
|
+
wayfinder_paths-0.1.10.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
schema_version: "0.1"
|
|
2
|
-
entrypoint: "adapters.hyperlend_adapter.adapter.HyperlendAdapter"
|
|
3
|
-
capabilities:
|
|
4
|
-
- "hyperlend.stable_markets.read"
|
|
5
|
-
- "hyperlend.markets.query"
|
|
6
|
-
- "hyperlend.assets_view.read"
|
|
7
|
-
- "hyperlend.lend"
|
|
8
|
-
dependencies:
|
|
9
|
-
- "HyperlendClient"
|
|
10
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
schema_version: "0.1"
|
|
2
|
-
entrypoint: "adapters.ledger_adapter.adapter.LedgerAdapter"
|
|
3
|
-
capabilities:
|
|
4
|
-
- "ledger.read"
|
|
5
|
-
- "ledger.write"
|
|
6
|
-
- "strategy.transactions"
|
|
7
|
-
- "strategy.deposits"
|
|
8
|
-
- "strategy.withdrawals"
|
|
9
|
-
- "strategy.operations"
|
|
10
|
-
dependencies:
|
|
11
|
-
- "LedgerClient"
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
from typing import Any
|
|
2
|
-
|
|
3
|
-
import yaml
|
|
4
|
-
from pydantic import BaseModel, Field, validator
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class AdapterRequirement(BaseModel):
|
|
8
|
-
name: str = Field(
|
|
9
|
-
..., description="Adapter symbolic name (e.g., BALANCE, HYPERLIQUID)"
|
|
10
|
-
)
|
|
11
|
-
capabilities: list[str] = Field(default_factory=list)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class AdapterManifest(BaseModel):
|
|
15
|
-
schema_version: str = Field(default="0.1")
|
|
16
|
-
entrypoint: str
|
|
17
|
-
capabilities: list[str] = Field(default_factory=list)
|
|
18
|
-
dependencies: list[str] = Field(default_factory=list)
|
|
19
|
-
|
|
20
|
-
@validator("entrypoint")
|
|
21
|
-
def validate_entrypoint(cls, v: str) -> str:
|
|
22
|
-
if "." not in v:
|
|
23
|
-
raise ValueError("entrypoint must be a full import path")
|
|
24
|
-
return v
|
|
25
|
-
|
|
26
|
-
@validator("capabilities")
|
|
27
|
-
def validate_capabilities(cls, v: list[str]) -> list[str]:
|
|
28
|
-
if not v:
|
|
29
|
-
raise ValueError("capabilities cannot be empty")
|
|
30
|
-
return v
|
|
31
|
-
|
|
32
|
-
@validator("dependencies")
|
|
33
|
-
def validate_dependencies(cls, v: list[str]) -> list[str]:
|
|
34
|
-
if not v:
|
|
35
|
-
raise ValueError("dependencies cannot be empty")
|
|
36
|
-
return v
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class StrategyManifest(BaseModel):
|
|
40
|
-
schema_version: str = Field(default="0.1")
|
|
41
|
-
entrypoint: str = Field(
|
|
42
|
-
...,
|
|
43
|
-
description="Python path to class, e.g. strategies.funding_rate_strategy.FundingRateStrategy",
|
|
44
|
-
)
|
|
45
|
-
name: str | None = Field(
|
|
46
|
-
default=None,
|
|
47
|
-
description="Unique name identifier for this strategy instance. Used to look up dedicated wallet in wallets.json by label.",
|
|
48
|
-
)
|
|
49
|
-
permissions: dict[str, Any] = Field(default_factory=dict)
|
|
50
|
-
adapters: list[AdapterRequirement] = Field(default_factory=list)
|
|
51
|
-
|
|
52
|
-
@validator("entrypoint")
|
|
53
|
-
def validate_entrypoint(cls, v: str) -> str:
|
|
54
|
-
if "." not in v:
|
|
55
|
-
raise ValueError(
|
|
56
|
-
"entrypoint must be a full import path to a Strategy class"
|
|
57
|
-
)
|
|
58
|
-
return v
|
|
59
|
-
|
|
60
|
-
@validator("permissions")
|
|
61
|
-
def validate_permissions(cls, v: dict) -> dict:
|
|
62
|
-
if "policy" not in v:
|
|
63
|
-
raise ValueError("permissions.policy is required")
|
|
64
|
-
if not v["policy"]:
|
|
65
|
-
raise ValueError("permissions.policy cannot be empty")
|
|
66
|
-
return v
|
|
67
|
-
|
|
68
|
-
@validator("adapters")
|
|
69
|
-
def validate_adapters(cls, v: list) -> list:
|
|
70
|
-
if not v:
|
|
71
|
-
raise ValueError("adapters cannot be empty")
|
|
72
|
-
return v
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def load_adapter_manifest(path: str) -> AdapterManifest:
|
|
76
|
-
with open(path) as f:
|
|
77
|
-
data = yaml.safe_load(f)
|
|
78
|
-
return AdapterManifest(**data)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
def load_strategy_manifest(path: str) -> StrategyManifest:
|
|
82
|
-
with open(path) as f:
|
|
83
|
-
data = yaml.safe_load(f)
|
|
84
|
-
return StrategyManifest(**data)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
def load_manifest(path: str) -> StrategyManifest:
|
|
88
|
-
"""Legacy function for backward compatibility."""
|
|
89
|
-
return load_strategy_manifest(path)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
def validate_manifest(manifest: StrategyManifest) -> None:
|
|
93
|
-
# Simple v0.1 rules: require at least one adapter and permissions.policy
|
|
94
|
-
if not manifest.adapters:
|
|
95
|
-
raise ValueError("Manifest must declare at least one adapter")
|
|
96
|
-
if "policy" not in manifest.permissions:
|
|
97
|
-
raise ValueError("Manifest.permissions must include 'policy'")
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Manifest Validator
|
|
4
|
-
|
|
5
|
-
Validates all adapter and strategy manifests in the repository.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
import sys
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
|
|
11
|
-
from loguru import logger
|
|
12
|
-
|
|
13
|
-
# Add parent to path for imports
|
|
14
|
-
sys.path.insert(0, str(Path(__file__).parent.parent))
|
|
15
|
-
|
|
16
|
-
from wayfinder_paths.core.adapters.BaseAdapter import BaseAdapter
|
|
17
|
-
from wayfinder_paths.core.engine.manifest import (
|
|
18
|
-
load_adapter_manifest,
|
|
19
|
-
load_strategy_manifest,
|
|
20
|
-
)
|
|
21
|
-
from wayfinder_paths.core.strategies.Strategy import Strategy
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def verify_entrypoint(entrypoint: str) -> tuple[bool, str | None]:
|
|
25
|
-
"""Verify entrypoint is importable. Returns (success, error_message)."""
|
|
26
|
-
try:
|
|
27
|
-
module_path, class_name = entrypoint.rsplit(".", 1)
|
|
28
|
-
module = __import__(module_path, fromlist=[class_name], level=0)
|
|
29
|
-
getattr(module, class_name) # Verify class exists
|
|
30
|
-
return True, None
|
|
31
|
-
except ImportError as e:
|
|
32
|
-
return False, f"Import error: {str(e)}"
|
|
33
|
-
except AttributeError as e:
|
|
34
|
-
return False, f"Class not found: {str(e)}"
|
|
35
|
-
except Exception as e:
|
|
36
|
-
return False, f"Unexpected error: {str(e)}"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def verify_adapter_class(entrypoint: str) -> tuple[bool, str | None]:
|
|
40
|
-
"""Verify entrypoint is an adapter class."""
|
|
41
|
-
valid, error = verify_entrypoint(entrypoint)
|
|
42
|
-
if not valid:
|
|
43
|
-
return False, error
|
|
44
|
-
|
|
45
|
-
try:
|
|
46
|
-
module_path, class_name = entrypoint.rsplit(".", 1)
|
|
47
|
-
module = __import__(module_path, fromlist=[class_name], level=0)
|
|
48
|
-
adapter_class = getattr(module, class_name)
|
|
49
|
-
|
|
50
|
-
if not issubclass(adapter_class, BaseAdapter):
|
|
51
|
-
return False, f"{class_name} is not a BaseAdapter"
|
|
52
|
-
return True, None
|
|
53
|
-
except Exception as e:
|
|
54
|
-
return False, f"Error verifying adapter: {str(e)}"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def verify_strategy_class(entrypoint: str) -> tuple[bool, str | None]:
|
|
58
|
-
"""Verify entrypoint is a strategy class."""
|
|
59
|
-
valid, error = verify_entrypoint(entrypoint)
|
|
60
|
-
if not valid:
|
|
61
|
-
return False, error
|
|
62
|
-
|
|
63
|
-
try:
|
|
64
|
-
module_path, class_name = entrypoint.rsplit(".", 1)
|
|
65
|
-
module = __import__(module_path, fromlist=[class_name], level=0)
|
|
66
|
-
strategy_class = getattr(module, class_name)
|
|
67
|
-
|
|
68
|
-
if not issubclass(strategy_class, Strategy):
|
|
69
|
-
return False, f"{class_name} is not a Strategy"
|
|
70
|
-
return True, None
|
|
71
|
-
except Exception as e:
|
|
72
|
-
return False, f"Error verifying strategy: {str(e)}"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
# Capabilities are only declared in manifest - no code validation needed
|
|
76
|
-
# Manifest is the single source of truth for capabilities
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
def verify_dependencies(dependencies: list[str]) -> tuple[bool, list[str]]:
|
|
80
|
-
"""Verify dependencies are importable. Returns (valid, error_messages)."""
|
|
81
|
-
errors = []
|
|
82
|
-
|
|
83
|
-
for dep in dependencies:
|
|
84
|
-
# Try to import from core.clients
|
|
85
|
-
try:
|
|
86
|
-
__import__(f"core.clients.{dep}", fromlist=[dep], level=0)
|
|
87
|
-
except ImportError:
|
|
88
|
-
errors.append(f"Dependency '{dep}' not found in core.clients")
|
|
89
|
-
except Exception as e:
|
|
90
|
-
errors.append(f"Error importing dependency '{dep}': {str(e)}")
|
|
91
|
-
|
|
92
|
-
return len(errors) == 0, errors
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
def validate_adapter_manifest(manifest_path: str) -> tuple[bool, list[str]]:
|
|
96
|
-
"""Validate adapter manifest. Returns (valid, error_messages)."""
|
|
97
|
-
errors = []
|
|
98
|
-
|
|
99
|
-
try:
|
|
100
|
-
manifest = load_adapter_manifest(manifest_path)
|
|
101
|
-
except Exception as e:
|
|
102
|
-
return False, [f"Schema error: {str(e)}"]
|
|
103
|
-
|
|
104
|
-
# Verify entrypoint
|
|
105
|
-
valid, error = verify_adapter_class(manifest.entrypoint)
|
|
106
|
-
if not valid:
|
|
107
|
-
errors.append(f"Entrypoint validation failed: {error}")
|
|
108
|
-
return False, errors
|
|
109
|
-
|
|
110
|
-
# Verify dependencies
|
|
111
|
-
valid, dep_errors = verify_dependencies(manifest.dependencies)
|
|
112
|
-
if not valid:
|
|
113
|
-
errors.extend(dep_errors)
|
|
114
|
-
|
|
115
|
-
return len(errors) == 0, errors
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
def validate_strategy_manifest(manifest_path: str) -> tuple[bool, list[str]]:
|
|
119
|
-
"""Validate strategy manifest. Returns (valid, error_messages)."""
|
|
120
|
-
errors = []
|
|
121
|
-
|
|
122
|
-
try:
|
|
123
|
-
manifest = load_strategy_manifest(manifest_path)
|
|
124
|
-
except Exception as e:
|
|
125
|
-
return False, [f"Schema error: {str(e)}"]
|
|
126
|
-
|
|
127
|
-
# Verify entrypoint
|
|
128
|
-
valid, error = verify_strategy_class(manifest.entrypoint)
|
|
129
|
-
if not valid:
|
|
130
|
-
errors.append(f"Entrypoint validation failed: {error}")
|
|
131
|
-
return False, errors
|
|
132
|
-
|
|
133
|
-
# Permissions are already validated by Pydantic model
|
|
134
|
-
|
|
135
|
-
return len(errors) == 0, errors
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
def find_adapter_manifests() -> list[Path]:
|
|
139
|
-
"""Find all adapter manifest files."""
|
|
140
|
-
manifests = []
|
|
141
|
-
adapter_dir = Path(__file__).parent.parent / "adapters"
|
|
142
|
-
if adapter_dir.exists():
|
|
143
|
-
for adapter_path in adapter_dir.iterdir():
|
|
144
|
-
manifest_path = adapter_path / "manifest.yaml"
|
|
145
|
-
if manifest_path.exists():
|
|
146
|
-
manifests.append(manifest_path)
|
|
147
|
-
return manifests
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
def find_strategy_manifests() -> list[Path]:
|
|
151
|
-
"""Find all strategy manifest files."""
|
|
152
|
-
manifests = []
|
|
153
|
-
strategy_dir = Path(__file__).parent.parent / "strategies"
|
|
154
|
-
if strategy_dir.exists():
|
|
155
|
-
for strategy_path in strategy_dir.iterdir():
|
|
156
|
-
manifest_path = strategy_path / "manifest.yaml"
|
|
157
|
-
if manifest_path.exists():
|
|
158
|
-
manifests.append(manifest_path)
|
|
159
|
-
return manifests
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
def main() -> int:
|
|
163
|
-
"""Main validation function. Returns 0 on success, 1 on failure."""
|
|
164
|
-
logger.info("Validating all manifests...")
|
|
165
|
-
|
|
166
|
-
all_valid = True
|
|
167
|
-
error_count = 0
|
|
168
|
-
|
|
169
|
-
# Validate adapter manifests
|
|
170
|
-
logger.info("\n=== Validating Adapter Manifests ===")
|
|
171
|
-
adapter_manifests = find_adapter_manifests()
|
|
172
|
-
for manifest_path in sorted(adapter_manifests):
|
|
173
|
-
logger.info(f"Validating {manifest_path}...")
|
|
174
|
-
valid, errors = validate_adapter_manifest(str(manifest_path))
|
|
175
|
-
if valid:
|
|
176
|
-
logger.success(f"✅ {manifest_path.name} - Valid")
|
|
177
|
-
else:
|
|
178
|
-
logger.error(f"❌ {manifest_path.name} - Invalid")
|
|
179
|
-
for error in errors:
|
|
180
|
-
logger.error(f" {error}")
|
|
181
|
-
all_valid = False
|
|
182
|
-
error_count += len(errors)
|
|
183
|
-
|
|
184
|
-
# Validate strategy manifests
|
|
185
|
-
logger.info("\n=== Validating Strategy Manifests ===")
|
|
186
|
-
strategy_manifests = find_strategy_manifests()
|
|
187
|
-
for manifest_path in sorted(strategy_manifests):
|
|
188
|
-
logger.info(f"Validating {manifest_path}...")
|
|
189
|
-
valid, errors = validate_strategy_manifest(str(manifest_path))
|
|
190
|
-
if valid:
|
|
191
|
-
logger.success(f"✅ {manifest_path.name} - Valid")
|
|
192
|
-
else:
|
|
193
|
-
logger.error(f"❌ {manifest_path.name} - Invalid")
|
|
194
|
-
for error in errors:
|
|
195
|
-
logger.error(f" {error}")
|
|
196
|
-
all_valid = False
|
|
197
|
-
error_count += len(errors)
|
|
198
|
-
|
|
199
|
-
# Summary
|
|
200
|
-
logger.info("\n=== Summary ===")
|
|
201
|
-
if all_valid:
|
|
202
|
-
logger.success(
|
|
203
|
-
f"✅ All manifests valid! ({len(adapter_manifests)} adapters, "
|
|
204
|
-
f"{len(strategy_manifests)} strategies)"
|
|
205
|
-
)
|
|
206
|
-
return 0
|
|
207
|
-
else:
|
|
208
|
-
logger.error(f"❌ Validation failed with {error_count} error(s)")
|
|
209
|
-
return 1
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
if __name__ == "__main__":
|
|
213
|
-
sys.exit(main())
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
schema_version: "0.1"
|
|
2
|
-
entrypoint: "wayfinder_paths.strategies.basis_trading_strategy.strategy.BasisTradingStrategy"
|
|
3
|
-
permissions:
|
|
4
|
-
policy: |
|
|
5
|
-
(wallet.id == 'FORMAT_WALLET_ID') AND (
|
|
6
|
-
# Allow Hyperliquid EIP-712 order actions
|
|
7
|
-
(action.type == 'hyperliquid_order') OR
|
|
8
|
-
(action.type == 'hyperliquid_cancel') OR
|
|
9
|
-
(action.type == 'hyperliquid_transfer') OR
|
|
10
|
-
# Allow USDC transfers to Hyperliquid bridge
|
|
11
|
-
(action.type == 'erc20_transfer' AND action.to == '0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7') OR
|
|
12
|
-
# Allow USDC withdraw to main wallet
|
|
13
|
-
(action.type == 'erc20_transfer' AND action.to == main_wallet.address)
|
|
14
|
-
)
|
|
15
|
-
adapters:
|
|
16
|
-
- name: "BALANCE"
|
|
17
|
-
capabilities: ["wallet_read", "wallet_transfer"]
|
|
18
|
-
- name: "LEDGER"
|
|
19
|
-
capabilities: ["ledger.read", "ledger.write", "strategy.transactions"]
|
|
20
|
-
- name: "TOKEN"
|
|
21
|
-
capabilities: ["token.read"]
|
|
22
|
-
- name: "HYPERLIQUID"
|
|
23
|
-
capabilities: ["market.read", "market.meta", "market.funding", "market.candles", "market.orderbook", "order.execute", "order.cancel", "position.manage", "transfer"]
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
schema_version: "0.1"
|
|
2
|
-
entrypoint: "strategies.stablecoin_yield_strategy.strategy.StablecoinYieldStrategy"
|
|
3
|
-
permissions:
|
|
4
|
-
policy: "(wallet.id == 'FORMAT_WALLET_ID') && ((eth.tx.data[0..10] == '0x095ea7b3' && eth.tx.data[34..74] == 'f75584ef6673ad213a685a1b58cc0330b8ea22cf') || (eth.tx.to == '0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf'))"
|
|
5
|
-
adapters:
|
|
6
|
-
- name: "BALANCE"
|
|
7
|
-
capabilities: ["wallet_read", "wallet_transfer"]
|
|
8
|
-
- name: "POOL"
|
|
9
|
-
capabilities: ["pool.read", "pool.analytics"]
|
|
10
|
-
- name: "BRAP"
|
|
11
|
-
capabilities: ["swap.quote", "swap.execute"]
|
|
12
|
-
- name: "TOKEN"
|
|
13
|
-
capabilities: ["token.read"]
|
|
14
|
-
- name: "LEDGER"
|
|
15
|
-
capabilities: ["ledger.read", "strategy.transactions"]
|
|
16
|
-
- name: "EVM_TRANSACTION"
|
|
17
|
-
capabilities: ["wallet_transfer"]
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
schema_version: "0.1"
|
|
2
|
-
entrypoint: "strategies.my_strategy.strategy.MyStrategy"
|
|
3
|
-
name: "my_strategy" # Unique name for this strategy instance (used for wallet lookup)
|
|
4
|
-
permissions:
|
|
5
|
-
policy: "(wallet.id == 'FORMAT_WALLET_ID')"
|
|
6
|
-
adapters:
|
|
7
|
-
- name: "BALANCE"
|
|
8
|
-
capabilities: ["wallet_read"]
|
|
File without changes
|
|
File without changes
|