feat(python-client): add example for RA-TLS supported server#100
feat(python-client): add example for RA-TLS supported server#100simonjonsson87 wants to merge 12 commits intoflare-foundation:mainfrom
Conversation
367731d to
ed70d30
Compare
| @@ -0,0 +1,3 @@ | |||
| from .ra_tls_main import main | |||
There was a problem hiding this comment.
Can the example be renamed to something more specific e.g. examples/ra-tls-client/
There was a problem hiding this comment.
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.
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.
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 [ |
| ] | ||
|
|
||
| def get_lending_contract_abi(self) -> list[dict[str, Any]]: | ||
| return [ |
| ] | ||
| requires-python = ">=3.12" | ||
| dependencies = [ | ||
| "tlslite-ng @ git+https://github.com/simonjonsson87/tlslite-ng.git@master", |
There was a problem hiding this comment.
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.
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.
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: