shadow-drive-rust-0.2.0 has been yanked.
Shadow Drive Rust
Rust SDK for GenesysGo's Shadow Drive, a decentralized storage network.
Available on crates.io.
Install
Add the crate to your Cargo.toml.
= "0.1.0"
Examples
//init tracing.rs subscriber
fmt
.with_env_filter
.init;
//load keypair from file
let keypair = read_keypair_file.expect;
//create shdw drive client
let solana_rpc = new;
let shdw_drive_client = new;
//derive the storage account pubkey
let pubkey = keypair.pubkey;
let =
storage_account;
// read files in directory
let dir = read_dir
.await
.expect;
// create Vec of ShadowFile structs for upload
let mut files = new
.filter
.and_then
.
.await
.expect;
// Bytes are also supported
files.push;
// kick off upload
let upload_results = shdw_drive_client
.upload_multiple_files
.await
.expect;
//profit
println!;
More examples can be found in the example directory.