All Projects → kbacha → stellar-rust-sdk

kbacha / stellar-rust-sdk

Licence: MIT license
A lightweight SDK for the stellar horizon api. Written in rust.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to stellar-rust-sdk

stellar-js-sdk
Playing with Stellar JavaScript SDK - Stellar Lumens
Stars: ✭ 21 (-38.24%)
Mutual labels:  stellar, stellar-lumens
go-stellar-ipfs
🌀 A library that is a bridge between Stellar and IPFS.
Stars: ✭ 25 (-26.47%)
Mutual labels:  horizon, stellar
metapay-chrome
A Chrome extension wallet for Stellar that simplifies payment.
Stars: ✭ 21 (-38.24%)
Mutual labels:  stellar, stellar-lumens
Ktra
Your Little Cargo Registry
Stars: ✭ 147 (+332.35%)
Mutual labels:  crates
Paris
Logger in Rust for pretty colors and text in the terminal. Aiming for a relatively simple API
Stars: ✭ 162 (+376.47%)
Mutual labels:  crates
Honggfuzz Rs
Fuzz your Rust code with Google-developed Honggfuzz !
Stars: ✭ 222 (+552.94%)
Mutual labels:  crates
Naersk
Build rust crates in Nix. No configuration, no code generation, no IFD. Sandbox friendly.
Stars: ✭ 193 (+467.65%)
Mutual labels:  crates
Cedar
Rust framework for building visual/interactive applications
Stars: ✭ 136 (+300%)
Mutual labels:  crates
Rust Unic
UNIC: Unicode and Internationalization Crates for Rust
Stars: ✭ 189 (+455.88%)
Mutual labels:  crates
Ammonia
Repair and secure untrusted HTML
Stars: ✭ 184 (+441.18%)
Mutual labels:  crates
Alexandrie
An alternative crate registry, implemented in Rust.
Stars: ✭ 251 (+638.24%)
Mutual labels:  crates
Bee
A framework for IOTA nodes, clients and applications in Rust
Stars: ✭ 176 (+417.65%)
Mutual labels:  crates
Semantic Rs
🚀 Automatic crate publishing done right
Stars: ✭ 162 (+376.47%)
Mutual labels:  crates
Staticvec
Implements a fixed-capacity stack-allocated Vec alternative backed by an array, using const generics.
Stars: ✭ 236 (+594.12%)
Mutual labels:  crates
Multipart
A backend-agnostic extension for file uploads in HTTP libraries for Rust
Stars: ✭ 155 (+355.88%)
Mutual labels:  crates
cns
Search through rust crates without leaving the terminal
Stars: ✭ 23 (-32.35%)
Mutual labels:  crates
Pleco
A Rust-based re-write of the Stockfish Chess Engine
Stars: ✭ 137 (+302.94%)
Mutual labels:  crates
Meuse
A private Cargo crate registry, for Rust
Stars: ✭ 173 (+408.82%)
Mutual labels:  crates
stellar
A modular action based Web Framework for Node.js
Stars: ✭ 39 (+14.71%)
Mutual labels:  stellar
wifiscanner
A crate to list WiFi hotspots in your area
Stars: ✭ 47 (+38.24%)
Mutual labels:  crates

stellar-rust-sdk

A lightweight client SDK for the stellar horizon api. Written in rust.

Travis Gitter Crates.io Docs.rs

The SDK provides a client and modeled resources to the stellar horizon api. The resources are strictly typed and parse directly from the api. It also provides a robust CLI for managing and introspecting the network.

This repository is broken into multiple crates. Each crate is designed to be used as a different component. The crates are organized as a virtual workspace so that they can be built together and tested at once.

Client

The client provides two interfaces. One is the synchronous client and the other is the asynchronous client. Both consume an IntoRequest trait and will return the appropriate response associated with the endpoint implementation. You should see the documentation associated with the code itself since there are active doctests available for all endpoints. However, the general gist is that the developer should create an endpoint and then exchange that endpoint for a response from the client:

use stellar_client::sync::Client;
use stellar_client::endpoint::asset;

let client      = Client::horizon_test().unwrap();
let endpoint    = asset::All::default();
let records     = client.request(endpoint).unwrap();

Endpoints

The endpoints module in the client crate houses all the horizon API endpoint definitions. Each struct will define what parameters are required for making requests.

Resources

The resources module contains the return values of the various endpoints. These resources are fully documented and can be deserialized from the client. There are many resources in the horizon API and you can read about all of them here.

They are deserialized into types that we think will make using them inside other rust applications easier.

CLI

The CLI is a command line utility for querying against the stellar network. To install it clone the repo and run:

cargo install -f --path=cli

You can then use it with:

stellar --help

The CLI is most useful for easily perusing horizon/stellar data without needing to construct curl commands. It is also a working example of how the stellar SDK can be consumed and used.

Testing

Setup is managed through cargo. We develop on stable but you should be up-to-date before running tests.

cargo test

Documentation

To build the documentation locally, just use the doc command:

cargo doc

To build and automatically open the client documentation:

cargo doc -p stellar-client --open

To build and automatically open the resource documentation:

cargo doc -p stellar-resources --open

Contributing

We welcome contributors! Please see our contributing guide for information on how to contribute to our repo!

TODO

  • Implement all resources
  • Synchronous client
  • Asynchronous client (waiting stabilization of hyper)
  • Implement all endpoints to horizon
  • Implement complete CLI to request data from horizon
  • Implement informational CLI
  • Implement XDR resources for stellar
  • Implement ability to create transactions and submit to network
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].