Python SDK
In order to simplify the implementation of Bebop solvers, you can use the JAM Python SDK. It includes:
Managed websocket connection to JAM
Simple base class to implement for providing solutions
Cache management and validation
Fully typed request and responses
Jam contract deployments and ABIs
The SDK can also be a helpful guide for implementing a solver in your language of choice.
pip install jam_sdk
Creating your solver
To implement these functions, simply implement the BaseSolver class with get_quote and execute functions.
get_quote
Receives a quote request and expects a response with the output token amounts.
execute_order
Given a execution request, execute the given quote on chain and return the transaction hash.
You may access the quote request and response for this execution using the quote_cache parameter.
Utilities
build_settle - Simulate and build the settlement call to JAM.
encode_order - Create an order object that is compatible with the onchain settlement call.
Example
Last updated