Crate iota_lib_rs[][src]

This library provides pretty much anything you could need to work with Iota. The documentation is a work in progress, but if you need any help I can usually be found on the Iota discord rust or development chats.

Heres a quick example of how to send a transaction (Note that trytes is being used as a seed here...don't do that)

 extern crate iota_lib_rs;

 use iota_lib_rs::iota_api;
 use iota_lib_rs::utils::trytes_converter;
 use iota_lib_rs::model::*;
 
 fn main() {
     let trytes = "HELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDHELLOWORLDD";
     let message = trytes_converter::to_trytes("Hello World").unwrap();
     let mut transfer = Transfer::default();
     *transfer.value_mut() = 0;
     *transfer.address_mut() = trytes.to_string();
     *transfer.message_mut() = message;
     let api = iota_api::API::new("https://trinity.iota.fm");
     let tx = api.send_transfers(trytes, 3, 14, &transfer, true, None, None, None, None, None, None).unwrap();
     println!("{:?}", tx);
 }

Modules

crypto

Provides all crypto algorithms and data structures used by Iota

iota_api

Provides helper functions that make interacting with IRI easier

iri_api

Provides methods to call IRI APIs

model

Provides the various struces used by Iota

multisig

Provides multi-sig functionality

utils

Provides many useful helper functions that are used throughout the library

Type Definitions

Result

This is the result type used throughout the library