Rust Soroban Client Library
A Rust client library for interacting with Soroban smart contracts on the Stellar blockchain
This project is currently alpha-ish and is compatible with Protocol 22 and you can use it for buidling and signing transactions that involve interacting with Soroban. It is a work in progress and is subject to significant changes, including the addition or removal of features and modifications to its functionality.
Quickstart
Add this to your Cargo.toml:
[]
= "0.4.7"
And this to your code:
use *;
Crate Docs
Description
The library is composed of 3 components:
- rs-stellar-xdr: a low-level library for encoding/decoding XDR data. This has already been developed by the Stellar Core team.
- rs-stellar-base: a library that offers a comprehensive set of functions for reading, writing, hashing, and signing primitive XDR constructs utilized in the Stellar network. It provides a nice abstraction for building and signing transactions.
- rs-soroban-client: A high-level rust library that serves as client-side API for the Soroban Environment. Useful for communicating with a Soroban RPC server.
This library will enable developers to seamlessly integrate Soroban functionality into their Rust-based applications and services. Most of the groundwork has already been laid by the Stellar team by building the xdr library and rust stellar strkey implementation. This particular library has been the missing piece for soroban and the rust community at large in the stellar ecosystem.
Running Examples
Sample Demo of the library
Getting Help
Join the discord server to chat with the community!
Practical Use Case
Suppose someone wants to build a trading bot targeting a DEX built on Soroban itself. This bot executes a large number of trades within a short period, often leveraging market inefficiencies and price discrepancies. A Rust client library for Soroban would provide the person with a performant toolset to build trading algorithms, interact with the Stellar network, and execute trades with minimal latency.
Authors
Rahul Soshte (Twitter)