20 unstable releases (9 breaking)

0.10.1 Jul 25, 2024
0.9.2 Jun 17, 2024
0.8.1 Jan 22, 2024
0.8.0 Dec 5, 2023
0.3.0 May 26, 2023

#8 in #10

Download history 82/week @ 2024-06-25 6/week @ 2024-07-02 140/week @ 2024-07-09 10/week @ 2024-07-16 133/week @ 2024-07-23 11/week @ 2024-07-30 25/week @ 2024-08-06 73/week @ 2024-08-13 56/week @ 2024-08-20 30/week @ 2024-08-27 61/week @ 2024-09-03 90/week @ 2024-09-10 67/week @ 2024-09-17 63/week @ 2024-09-24 324/week @ 2024-10-01 71/week @ 2024-10-08

549 downloads per month
Used in lightspark-remote-signing

Apache-2.0

1MB
15K SLoC

Lightspark Rust SDK - v0.10.1

The Lightspark Rust SDK provides a convenient way to interact with the Lightspark services from applications written in the Rust language.

WARNING: This SDK is in version 0.10.1 (active development). It means that its APIs may not be fully stable. Please expect that changes to the APIs may happen until we move to v1.0.0.

Documentation

The documentation for this SDK (installation, usage, etc.) is available at https://docs.lightspark.com/lightspark-sdk/getting-started?language=Rust

Sample code

For your convenience, we included an example that shows you how to use the SDK. Open the file example/example.rs and make sure to update the variables at the top of the page with your information, then run it using cargo:

cargo run --example example

lib.rs:

Lightspark Rust SDK is a thin wrapper around the GraphQL API that provides an easy way to integrate with the Lightspark systems in a Rust environment.

Getting Started

After obtain an API token, a client can be initiate.

use lightspark::request::auth_provider::AccountAuthProvider;
use lightspark::client::LightsparkClient;
use lightspark::key::RSASigningKey;

let api_id = "<your api token id>";
let api_token = "<your api token secret>";
let auth_provider = AccountAuthProvider::new(api_id.to_string(), api_token.to_string());
let client = match LightsparkClient::<RSASigningKey>::new(auth_provider) {
   Ok(value) => value,
   Err(err) => {
      println!("{}", err);
      return;
   }
};

You are now ready to use the Lightspark SDK!

See more examples in examples/example.rs

Dependencies

~18–32MB
~450K SLoC