A Rust SDK for working with XRP Ledger APIs.
This project is an unofficial, community-driven effort.
The SDK contains the following high-level crates:
Additionally, low-level crates are provided:
Finally, a convenient CLI is provided to demonstrate example usage:
let client = Client::new();
let account = env::var("XRPL_ACCOUNT_ADDRESS").expect("account not defined");
let req = AccountTxRequest::new(&account).limit(5);
let resp = client.call(req).await;
dbg!(&resp);
let mut client = Client::connect(DEFAULT_WS_URL)
.await
.expect("cannot connect");
let account = env::var("XRPL_ACCOUNT_ADDRESS").expect("account not defined");
let req = AccountInfoRequest::new(&account).strict(true);
client.call(req).await.expect("cannot send request");
if let Some(msg) = client.messages.next().await {
dbg!(&msg);
}
The software is under active development (pre-alpha) and the API is expected to change. It's not considered ready for use in production.
- Support for WebSocket API
- Introduce XRPL command line client (CLI)
Pull requests, issues and comments are welcome! Make sure to add tests for new features and bug fixes.
For questions, suggestions, etc, you can reach the maintainer on Twitter.
Each component of the XRPL SDK is individually licensed. Please check the corresponding directories for more details.
- xrpl_sdk_jsonrpc: LICENSE-MIT, LICENSE-APACHE
- xrpl_sdk_ws: LICENSE-MIT, LICENSE-APACHE
- xrpl_types: LICENSE-MIT, LICENSE-APACHE
- xrpl_api: LICENSE-MIT, LICENSE-APACHE
- xrpl_address_codec: LICENSE-MIT, LICENSE-APACHE
- xrpl_binary_codec: LICENSE-MIT, LICENSE-APACHE
- xrpl_cli: LICENSE-MIT, LICENSE-APACHE
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2021-2022 George Moschovitis.