wayfinder-paths 0.1.1__tar.gz → 0.1.3__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.
Files changed (126) hide show
  1. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/PKG-INFO +15 -43
  2. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/README.md +14 -42
  3. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/pyproject.toml +1 -1
  4. wayfinder_paths-0.1.3/wayfinder_paths/abis/generic/erc20.json +383 -0
  5. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/strategies/Strategy.py +3 -3
  6. wayfinder_paths-0.1.3/wayfinder_paths/core/strategies/descriptors.py +80 -0
  7. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/utils/evm_helpers.py +39 -0
  8. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/enso.py +17 -0
  9. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/erc20.py +34 -0
  10. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/evm.py +21 -0
  11. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/hyper_evm.py +19 -0
  12. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/hyperlend.py +12 -0
  13. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/hyperliquid.py +30 -0
  14. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/moonwell.py +54 -0
  15. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/prjx.py +30 -0
  16. wayfinder_paths-0.1.3/wayfinder_paths/vaults/policies/util.py +27 -0
  17. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/hyperlend_stable_yield_strategy/strategy.py +138 -76
  18. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/stablecoin_yield_strategy/strategy.py +112 -75
  19. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/LICENSE +0 -0
  20. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/CONFIG_GUIDE.md +0 -0
  21. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/__init__.py +0 -0
  22. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/config.example.json +0 -0
  23. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/conftest.py +0 -0
  24. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/__init__.py +0 -0
  25. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/adapters/BaseAdapter.py +0 -0
  26. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/adapters/__init__.py +0 -0
  27. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/adapters/base.py +0 -0
  28. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/AuthClient.py +0 -0
  29. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/BRAPClient.py +0 -0
  30. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/ClientManager.py +0 -0
  31. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/HyperlendClient.py +0 -0
  32. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/LedgerClient.py +0 -0
  33. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/PoolClient.py +0 -0
  34. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/SimulationClient.py +0 -0
  35. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/TokenClient.py +0 -0
  36. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/TransactionClient.py +0 -0
  37. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/WalletClient.py +0 -0
  38. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/WayfinderClient.py +0 -0
  39. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/__init__.py +0 -0
  40. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/protocols.py +0 -0
  41. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/clients/sdk_example.py +0 -0
  42. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/config.py +0 -0
  43. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/constants/__init__.py +0 -0
  44. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/constants/base.py +0 -0
  45. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/constants/erc20_abi.py +0 -0
  46. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/constants/hyperlend_abi.py +0 -0
  47. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/engine/VaultJob.py +0 -0
  48. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/engine/__init__.py +0 -0
  49. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/engine/manifest.py +0 -0
  50. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/services/__init__.py +0 -0
  51. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/services/base.py +0 -0
  52. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/services/local_evm_txn.py +0 -0
  53. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/services/local_token_txn.py +0 -0
  54. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/services/web3_service.py +0 -0
  55. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/settings.py +0 -0
  56. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/strategies/__init__.py +0 -0
  57. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/strategies/base.py +0 -0
  58. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/utils/__init__.py +0 -0
  59. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/utils/wallets.py +0 -0
  60. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/wallets/README.md +0 -0
  61. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/wallets/WalletManager.py +0 -0
  62. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/core/wallets/__init__.py +0 -0
  63. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/run_strategy.py +0 -0
  64. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/scripts/__init__.py +0 -0
  65. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/scripts/create_strategy.py +0 -0
  66. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/scripts/make_wallets.py +0 -0
  67. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/scripts/validate_manifests.py +0 -0
  68. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/tests/__init__.py +0 -0
  69. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/tests/test_smoke_manifest.py +0 -0
  70. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/tests/test_test_coverage.py +0 -0
  71. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/tests/test_utils.py +0 -0
  72. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/__init__.py +0 -0
  73. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/__init__.py +0 -0
  74. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/balance_adapter/README.md +0 -0
  75. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/balance_adapter/adapter.py +0 -0
  76. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/balance_adapter/examples.json +0 -0
  77. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/balance_adapter/manifest.yaml +0 -0
  78. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/balance_adapter/test_adapter.py +0 -0
  79. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/brap_adapter/README.md +0 -0
  80. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/brap_adapter/__init__.py +0 -0
  81. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/brap_adapter/adapter.py +0 -0
  82. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/brap_adapter/examples.json +0 -0
  83. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/brap_adapter/manifest.yaml +0 -0
  84. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/brap_adapter/test_adapter.py +0 -0
  85. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/hyperlend_adapter/__init__.py +0 -0
  86. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/hyperlend_adapter/adapter.py +0 -0
  87. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/hyperlend_adapter/manifest.yaml +0 -0
  88. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/hyperlend_adapter/test_adapter.py +0 -0
  89. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/ledger_adapter/README.md +0 -0
  90. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/ledger_adapter/__init__.py +0 -0
  91. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/ledger_adapter/adapter.py +0 -0
  92. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/ledger_adapter/examples.json +0 -0
  93. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/ledger_adapter/manifest.yaml +0 -0
  94. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/ledger_adapter/test_adapter.py +0 -0
  95. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/pool_adapter/README.md +0 -0
  96. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/pool_adapter/__init__.py +0 -0
  97. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/pool_adapter/adapter.py +0 -0
  98. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/pool_adapter/examples.json +0 -0
  99. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/pool_adapter/manifest.yaml +0 -0
  100. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/pool_adapter/test_adapter.py +0 -0
  101. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/token_adapter/README.md +0 -0
  102. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/token_adapter/__init__.py +0 -0
  103. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/token_adapter/adapter.py +0 -0
  104. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/token_adapter/examples.json +0 -0
  105. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/token_adapter/manifest.yaml +0 -0
  106. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/adapters/token_adapter/test_adapter.py +0 -0
  107. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/__init__.py +0 -0
  108. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/config.py +0 -0
  109. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/hyperlend_stable_yield_strategy/README.md +0 -0
  110. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/hyperlend_stable_yield_strategy/examples.json +0 -0
  111. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/hyperlend_stable_yield_strategy/manifest.yaml +0 -0
  112. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/hyperlend_stable_yield_strategy/test_strategy.py +0 -0
  113. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/stablecoin_yield_strategy/README.md +0 -0
  114. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/stablecoin_yield_strategy/examples.json +0 -0
  115. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/stablecoin_yield_strategy/manifest.yaml +0 -0
  116. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/strategies/stablecoin_yield_strategy/test_strategy.py +0 -0
  117. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/adapter/README.md +0 -0
  118. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/adapter/adapter.py +0 -0
  119. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/adapter/examples.json +0 -0
  120. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/adapter/manifest.yaml +0 -0
  121. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/adapter/test_adapter.py +0 -0
  122. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/strategy/README.md +0 -0
  123. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/strategy/examples.json +0 -0
  124. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/strategy/manifest.yaml +0 -0
  125. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/strategy/strategy.py +0 -0
  126. {wayfinder_paths-0.1.1 → wayfinder_paths-0.1.3}/wayfinder_paths/vaults/templates/strategy/test_strategy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wayfinder-paths
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Wayfinder Path: strategies and adapters
5
5
  Author: Wayfinder
6
6
  Author-email: dev@wayfinder.ai
@@ -647,55 +647,27 @@ poetry run python wayfinder_paths/run_strategy.py stablecoin_yield_strategy --co
647
647
 
648
648
  ## 📦 Publishing
649
649
 
650
- This package is published to [PyPI](https://pypi.org/project/wayfinder-paths/) (Python Package Index).
651
-
652
- ### How PyPI Works
653
-
654
- - **Public by default**: Once published, anyone can download and install your package with `pip install wayfinder-paths` (no authentication required)
655
- - **Who can update**: Only package owners and maintainers can publish new versions
656
- - **Version control**: Version numbers must be unique and incrementing (you cannot overwrite a published version)
657
- - **Access control**: You control who can publish by adding collaborators on PyPI (project owners can add maintainers)
658
-
659
- ### Publishing a New Version
660
-
661
- 1. **Update the version** in `pyproject.toml`:
662
- ```toml
663
- [tool.poetry]
664
- version = "0.1.2" # Must be higher than previous version
665
- ```
666
-
667
- 2. **Set your PyPI token**:
668
- ```bash
669
- export PUBLISH_TOKEN="your_pypi_token_here"
670
- # Or add to .env file: PUBLISH_TOKEN=your_pypi_token_here
671
- ```
672
-
673
- Get your PyPI token from: https://pypi.org/manage/account/token/
674
-
675
- **Note**: PyPI requires 2FA (two-factor authentication) for all accounts.
676
-
677
- 3. **Publish**:
678
- ```bash
679
- just publish
680
- ```
681
-
682
- This will:
683
- - Build the package (wheel and source distribution)
684
- - Publish to PyPI
685
- - Make it publicly available for installation
686
-
687
- ### Installing the Published Package
688
-
689
- Anyone can install the published package with:
650
+ Publish to PyPI:
651
+
690
652
  ```bash
691
- pip install wayfinder-paths
653
+ export PUBLISH_TOKEN="your_pypi_token"
654
+ just publish
692
655
  ```
693
656
 
694
- Or with Poetry:
657
+ Install the published package:
658
+
695
659
  ```bash
660
+ pip install wayfinder-paths
661
+ # or
696
662
  poetry add wayfinder-paths
697
663
  ```
698
664
 
665
+ Install from Git (development):
666
+
667
+ ```bash
668
+ pip install git+https://github.com/wayfinder-ai/wayfinder-paths.git
669
+ ```
670
+
699
671
  ### Managing Package Access
700
672
 
701
673
  To add collaborators who can publish updates:
@@ -625,55 +625,27 @@ poetry run python wayfinder_paths/run_strategy.py stablecoin_yield_strategy --co
625
625
 
626
626
  ## 📦 Publishing
627
627
 
628
- This package is published to [PyPI](https://pypi.org/project/wayfinder-paths/) (Python Package Index).
629
-
630
- ### How PyPI Works
631
-
632
- - **Public by default**: Once published, anyone can download and install your package with `pip install wayfinder-paths` (no authentication required)
633
- - **Who can update**: Only package owners and maintainers can publish new versions
634
- - **Version control**: Version numbers must be unique and incrementing (you cannot overwrite a published version)
635
- - **Access control**: You control who can publish by adding collaborators on PyPI (project owners can add maintainers)
636
-
637
- ### Publishing a New Version
638
-
639
- 1. **Update the version** in `pyproject.toml`:
640
- ```toml
641
- [tool.poetry]
642
- version = "0.1.2" # Must be higher than previous version
643
- ```
644
-
645
- 2. **Set your PyPI token**:
646
- ```bash
647
- export PUBLISH_TOKEN="your_pypi_token_here"
648
- # Or add to .env file: PUBLISH_TOKEN=your_pypi_token_here
649
- ```
650
-
651
- Get your PyPI token from: https://pypi.org/manage/account/token/
652
-
653
- **Note**: PyPI requires 2FA (two-factor authentication) for all accounts.
654
-
655
- 3. **Publish**:
656
- ```bash
657
- just publish
658
- ```
659
-
660
- This will:
661
- - Build the package (wheel and source distribution)
662
- - Publish to PyPI
663
- - Make it publicly available for installation
664
-
665
- ### Installing the Published Package
666
-
667
- Anyone can install the published package with:
628
+ Publish to PyPI:
629
+
668
630
  ```bash
669
- pip install wayfinder-paths
631
+ export PUBLISH_TOKEN="your_pypi_token"
632
+ just publish
670
633
  ```
671
634
 
672
- Or with Poetry:
635
+ Install the published package:
636
+
673
637
  ```bash
638
+ pip install wayfinder-paths
639
+ # or
674
640
  poetry add wayfinder-paths
675
641
  ```
676
642
 
643
+ Install from Git (development):
644
+
645
+ ```bash
646
+ pip install git+https://github.com/wayfinder-ai/wayfinder-paths.git
647
+ ```
648
+
677
649
  ### Managing Package Access
678
650
 
679
651
  To add collaborators who can publish updates:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wayfinder-paths"
3
- version = "0.1.1"
3
+ version = "0.1.3"
4
4
  description = "Wayfinder Path: strategies and adapters"
5
5
  readme = "README.md"
6
6
  authors = ["Wayfinder <dev@wayfinder.ai>"]
@@ -0,0 +1,383 @@
1
+ [
2
+ {
3
+ "constant": true,
4
+ "inputs": [
5
+ {
6
+ "name": "owner",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "name": "spender",
11
+ "type": "address"
12
+ }
13
+ ],
14
+ "name": "allowance",
15
+ "outputs": [
16
+ {
17
+ "name": "",
18
+ "type": "uint256"
19
+ }
20
+ ],
21
+ "type": "function"
22
+ },
23
+ {
24
+ "constant": true,
25
+ "inputs": [
26
+ {
27
+ "name": "account",
28
+ "type": "address"
29
+ }
30
+ ],
31
+ "name": "balanceOf",
32
+ "outputs": [
33
+ {
34
+ "name": "",
35
+ "type": "uint256"
36
+ }
37
+ ],
38
+ "type": "function"
39
+ },
40
+ {
41
+ "constant": true,
42
+ "inputs": [],
43
+ "name": "decimals",
44
+ "outputs": [
45
+ {
46
+ "name": "",
47
+ "type": "uint8"
48
+ }
49
+ ],
50
+ "type": "function"
51
+ },
52
+ {
53
+ "constant": true,
54
+ "inputs": [],
55
+ "name": "name",
56
+ "outputs": [
57
+ {
58
+ "name": "",
59
+ "type": "string"
60
+ }
61
+ ],
62
+ "type": "function"
63
+ },
64
+ {
65
+ "constant": true,
66
+ "inputs": [],
67
+ "name": "symbol",
68
+ "outputs": [
69
+ {
70
+ "name": "",
71
+ "type": "string"
72
+ }
73
+ ],
74
+ "type": "function"
75
+ },
76
+ {
77
+ "constant": false,
78
+ "inputs": [
79
+ {
80
+ "name": "recipient",
81
+ "type": "address"
82
+ },
83
+ {
84
+ "name": "amount",
85
+ "type": "uint256"
86
+ }
87
+ ],
88
+ "name": "transfer",
89
+ "outputs": [
90
+ {
91
+ "name": "",
92
+ "type": "bool"
93
+ }
94
+ ],
95
+ "type": "function"
96
+ },
97
+ {
98
+ "constant": false,
99
+ "inputs": [
100
+ {
101
+ "name": "spender",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "name": "amount",
106
+ "type": "uint256"
107
+ }
108
+ ],
109
+ "name": "approve",
110
+ "outputs": [
111
+ {
112
+ "name": "",
113
+ "type": "bool"
114
+ }
115
+ ],
116
+ "type": "function"
117
+ },
118
+ {
119
+ "inputs": [
120
+ {
121
+ "internalType": "address",
122
+ "name": "tokenA",
123
+ "type": "address"
124
+ },
125
+ {
126
+ "internalType": "address",
127
+ "name": "tokenB",
128
+ "type": "address"
129
+ },
130
+ {
131
+ "internalType": "bool",
132
+ "name": "stable",
133
+ "type": "bool"
134
+ },
135
+ {
136
+ "internalType": "uint256",
137
+ "name": "amountADesired",
138
+ "type": "uint256"
139
+ },
140
+ {
141
+ "internalType": "uint256",
142
+ "name": "amountBDesired",
143
+ "type": "uint256"
144
+ },
145
+ {
146
+ "internalType": "uint256",
147
+ "name": "amountAMin",
148
+ "type": "uint256"
149
+ },
150
+ {
151
+ "internalType": "uint256",
152
+ "name": "amountBMin",
153
+ "type": "uint256"
154
+ },
155
+ {
156
+ "internalType": "address",
157
+ "name": "to",
158
+ "type": "address"
159
+ },
160
+ {
161
+ "internalType": "uint256",
162
+ "name": "deadline",
163
+ "type": "uint256"
164
+ }
165
+ ],
166
+ "name": "addLiquidity",
167
+ "outputs": [
168
+ {
169
+ "internalType": "uint256",
170
+ "name": "amountA",
171
+ "type": "uint256"
172
+ },
173
+ {
174
+ "internalType": "uint256",
175
+ "name": "amountB",
176
+ "type": "uint256"
177
+ },
178
+ {
179
+ "internalType": "uint256",
180
+ "name": "liquidity",
181
+ "type": "uint256"
182
+ }
183
+ ],
184
+ "stateMutability": "nonpayable",
185
+ "type": "function"
186
+ },
187
+ {
188
+ "inputs": [
189
+ {
190
+ "internalType": "address",
191
+ "name": "tokenA",
192
+ "type": "address"
193
+ },
194
+ {
195
+ "internalType": "address",
196
+ "name": "tokenB",
197
+ "type": "address"
198
+ },
199
+ {
200
+ "internalType": "bool",
201
+ "name": "stable",
202
+ "type": "bool"
203
+ },
204
+ {
205
+ "internalType": "address",
206
+ "name": "_factory",
207
+ "type": "address"
208
+ },
209
+ {
210
+ "internalType": "uint256",
211
+ "name": "amountADesired",
212
+ "type": "uint256"
213
+ },
214
+ {
215
+ "internalType": "uint256",
216
+ "name": "amountBDesired",
217
+ "type": "uint256"
218
+ }
219
+ ],
220
+ "name": "quoteAddLiquidity",
221
+ "outputs": [
222
+ {
223
+ "internalType": "uint256",
224
+ "name": "amountA",
225
+ "type": "uint256"
226
+ },
227
+ {
228
+ "internalType": "uint256",
229
+ "name": "amountB",
230
+ "type": "uint256"
231
+ },
232
+ {
233
+ "internalType": "uint256",
234
+ "name": "liquidity",
235
+ "type": "uint256"
236
+ }
237
+ ],
238
+ "stateMutability": "view",
239
+ "type": "function"
240
+ },
241
+ {
242
+ "inputs": [],
243
+ "name": "defaultFactory",
244
+ "outputs": [
245
+ {
246
+ "internalType": "address",
247
+ "name": "",
248
+ "type": "address"
249
+ }
250
+ ],
251
+ "stateMutability": "view",
252
+ "type": "function"
253
+ },
254
+ {
255
+ "inputs": [
256
+ {
257
+ "internalType": "address",
258
+ "name": "tokenA",
259
+ "type": "address"
260
+ },
261
+ {
262
+ "internalType": "address",
263
+ "name": "tokenB",
264
+ "type": "address"
265
+ },
266
+ {
267
+ "internalType": "bool",
268
+ "name": "stable",
269
+ "type": "bool"
270
+ },
271
+ {
272
+ "internalType": "address",
273
+ "name": "_factory",
274
+ "type": "address"
275
+ },
276
+ {
277
+ "internalType": "uint256",
278
+ "name": "liquidity",
279
+ "type": "uint256"
280
+ }
281
+ ],
282
+ "name": "quoteRemoveLiquidity",
283
+ "outputs": [
284
+ {
285
+ "internalType": "uint256",
286
+ "name": "amountA",
287
+ "type": "uint256"
288
+ },
289
+ {
290
+ "internalType": "uint256",
291
+ "name": "amountB",
292
+ "type": "uint256"
293
+ }
294
+ ],
295
+ "stateMutability": "view",
296
+ "type": "function"
297
+ },
298
+ {
299
+ "inputs": [
300
+ {
301
+ "internalType": "address",
302
+ "name": "tokenA",
303
+ "type": "address"
304
+ },
305
+ {
306
+ "internalType": "address",
307
+ "name": "tokenB",
308
+ "type": "address"
309
+ },
310
+ {
311
+ "internalType": "bool",
312
+ "name": "stable",
313
+ "type": "bool"
314
+ },
315
+ {
316
+ "internalType": "uint256",
317
+ "name": "liquidity",
318
+ "type": "uint256"
319
+ },
320
+ {
321
+ "internalType": "uint256",
322
+ "name": "amountAMin",
323
+ "type": "uint256"
324
+ },
325
+ {
326
+ "internalType": "uint256",
327
+ "name": "amountBMin",
328
+ "type": "uint256"
329
+ },
330
+ {
331
+ "internalType": "address",
332
+ "name": "to",
333
+ "type": "address"
334
+ },
335
+ {
336
+ "internalType": "uint256",
337
+ "name": "deadline",
338
+ "type": "uint256"
339
+ }
340
+ ],
341
+ "name": "removeLiquidity",
342
+ "outputs": [
343
+ {
344
+ "internalType": "uint256",
345
+ "name": "amountA",
346
+ "type": "uint256"
347
+ },
348
+ {
349
+ "internalType": "uint256",
350
+ "name": "amountB",
351
+ "type": "uint256"
352
+ }
353
+ ],
354
+ "stateMutability": "nonpayable",
355
+ "type": "function"
356
+ },
357
+ {
358
+ "inputs": [
359
+ {
360
+ "internalType": "uint256",
361
+ "name": "_amount",
362
+ "type": "uint256"
363
+ }
364
+ ],
365
+ "name": "deposit",
366
+ "outputs": [],
367
+ "stateMutability": "nonpayable",
368
+ "type": "function"
369
+ },
370
+ {
371
+ "inputs": [
372
+ {
373
+ "internalType": "uint256",
374
+ "name": "_shares",
375
+ "type": "uint256"
376
+ }
377
+ ],
378
+ "name": "withdraw",
379
+ "outputs": [],
380
+ "stateMutability": "nonpayable",
381
+ "type": "function"
382
+ }
383
+ ]
@@ -6,6 +6,7 @@ from typing import Any, TypedDict
6
6
  from loguru import logger
7
7
 
8
8
  from wayfinder_paths.core.services.base import Web3Service
9
+ from wayfinder_paths.core.strategies.descriptors import StratDescriptor
9
10
 
10
11
 
11
12
  class StatusDict(TypedDict):
@@ -19,8 +20,7 @@ StatusTuple = tuple[bool, str]
19
20
 
20
21
  class Strategy(ABC):
21
22
  name: str = None
22
- description: str = None
23
- summary: str = None
23
+ INFO: StratDescriptor = None
24
24
 
25
25
  def __init__(
26
26
  self,
@@ -90,7 +90,7 @@ class Strategy(ABC):
90
90
  pass
91
91
 
92
92
  @staticmethod
93
- def policies() -> list[str]:
93
+ async def policies() -> list[str]:
94
94
  """Return policy strings for this strategy (Django-compatible)."""
95
95
  raise NotImplementedError
96
96
 
@@ -0,0 +1,80 @@
1
+ from enum import Enum
2
+ from typing import Any
3
+
4
+ from pydantic import BaseModel
5
+
6
+
7
+ class Volatility(Enum):
8
+ LOW = "low"
9
+ MEDIUM = "medium"
10
+ HIGH = "high"
11
+
12
+
13
+ class Frequency(Enum):
14
+ LOW = "low"
15
+ MEDIUM = "medium"
16
+ HIGH = "high"
17
+
18
+
19
+ class Directionality(Enum):
20
+ LONG = "Long"
21
+ SHORT = "Short"
22
+ MARKET_NEUTRAL = "market_neutral"
23
+ DELTA_NEUTRAL = "delta_neutral"
24
+
25
+
26
+ class Complexity(Enum):
27
+ LOW = "low"
28
+ MEDIUM = "medium"
29
+ HIGH = "high"
30
+
31
+
32
+ class TokenExposure(Enum):
33
+ STABLECOINS = "Stablecoins"
34
+ MAJORS = "Majors"
35
+ ALTS = "Alts"
36
+
37
+
38
+ # Default token rewards for all strategies
39
+ DEFAULT_TOKEN_REWARDS = [
40
+ {
41
+ "symbol": "B3",
42
+ "name": "B3",
43
+ "address": "0xB3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B3",
44
+ "image_url": "https://storage.googleapis.com/prod-wayfinder-app-assets/asset-icons/B3.png",
45
+ },
46
+ ]
47
+
48
+
49
+ class StratDescriptor(BaseModel):
50
+ description: str
51
+
52
+ summary: str
53
+
54
+ gas_token_symbol: str
55
+ gas_token_id: str
56
+ deposit_token_id: str
57
+ minimum_net_deposit: float
58
+ gas_maximum: float
59
+ gas_threshold: float
60
+
61
+ available_rewards: dict[str, Any] = {
62
+ "token_rewards": DEFAULT_TOKEN_REWARDS,
63
+ "point_rewards": None,
64
+ }
65
+
66
+ # risk indicators
67
+ volatility: Volatility
68
+ volatility_description_short: str
69
+ directionality: Directionality
70
+ directionality_description: str
71
+ complexity: Complexity
72
+ complexity_description: str
73
+ token_exposure: TokenExposure
74
+ token_exposure_description: str
75
+ frequency: Frequency
76
+ frequency_description: str
77
+
78
+ return_drivers: list[str]
79
+
80
+ config: dict[str, Any]
@@ -5,7 +5,9 @@ This module provides reusable functions for EVM-related operations that are shar
5
5
  across multiple adapters, extracted from evm_transaction_adapter.
6
6
  """
7
7
 
8
+ import json
8
9
  import os
10
+ from pathlib import Path
9
11
  from typing import Any
10
12
 
11
13
  from loguru import logger
@@ -163,3 +165,40 @@ def resolve_private_key_for_from_address(
163
165
 
164
166
  # Fallback to environment variables
165
167
  return os.getenv("PRIVATE_KEY_VAULT") or os.getenv("PRIVATE_KEY")
168
+
169
+
170
+ async def _get_abi(chain_id: int, address: str) -> str | None:
171
+ os.makedirs(f"abis/{chain_id}/", exist_ok=True)
172
+
173
+ abi_file = f"abis/{chain_id}/{address}.json"
174
+ if not os.path.exists(abi_file):
175
+ raise ValueError(
176
+ f"There is no downloaded ABI for {address} on chain {chain_id} -- please download it to ({abi_file}) (make sure to get the implementation if this address is a proxy)"
177
+ )
178
+
179
+ with open(abi_file) as f:
180
+ abi = f.read()
181
+
182
+ return abi
183
+
184
+
185
+ # We filter ABIs for Privy Policy since most of the abi is useless, and we don't wanna upload big ABIs for both size and readability reasons.
186
+ async def get_abi_filtered(
187
+ chain_id: int, address: str, function_names: list[str]
188
+ ) -> list | None:
189
+ full_abi = await _get_abi(chain_id, address)
190
+ if full_abi is None:
191
+ raise Exception("Could not pull ABI, get_abi returned None")
192
+ abi_json = json.loads(full_abi)
193
+ filtered_abi = [
194
+ item
195
+ for item in abi_json
196
+ if item.get("type") == "function" and item.get("name") in function_names
197
+ ]
198
+ return filtered_abi
199
+
200
+
201
+ with open(Path(__file__).parent.parent.parent.joinpath("abis/generic/erc20.json")) as f:
202
+ erc20_abi_raw = f.read()
203
+
204
+ ERC20_ABI = json.loads(erc20_abi_raw)