-
Notifications
You must be signed in to change notification settings - Fork 30
feat(python-client): add example for RA-TLS supported server #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(python-client): add example for RA-TLS supported server #100
Conversation
367731d to
ed70d30
Compare
| @@ -0,0 +1,3 @@ | |||
| from .ra_tls_main import main | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the example be renamed to something more specific e.g. examples/ra-tls-client/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll refractor to 'ra-tls-client'
|
|
||
| return unlock_tx_hash | ||
|
|
||
| def get_cyclo_contract_abi(self) -> list[dict[str, Any]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of hard coding the contract in the code, the JSON should be placed under src/flare-ai-kit/abis/, helper methods load_abi() for loading are already present under flare-ai-kit/common/utils.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll do this for all files with ABI in the code.
| list: The ABI (Application Binary Interface) for the Unitroller contract, defining functions like enterMarkets and exitMarket. | ||
| """ | ||
| return [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same point here re abis
| ] | ||
|
|
||
| def get_lending_contract_abi(self) -> list[dict[str, Any]]: | ||
| return [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
| ] | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "tlslite-ng @ git+https://github.com/simonjonsson87/tlslite-ng.git@master", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using a separate repo that needs to be maintained/rebased etc. Is it possible to include the custom logic within the kit itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately not. My edits to TLSLite impacts many functions and classes. It's very much a modifications of existing code, rather than separate code that could be moved to flare-ai-kit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, then can we add this as an optional dependency under the tee group.
…openocean, sceptre, and flare portal wrapping
- Apply fixes to meet ruff linting rules - Resolve Pyright type issues - Adjust code to pass pytest - Fix several minor bugs
- Custom RA-TLS compatible API - Example python client demonstrating ecosystem calls
2c0a9c3 to
959f727
Compare
This PR adds: